Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab has been updated. More info
here
and
there
.
Show more breadcrumbs
np
nptool
Commits
f5ffc56a
Commit
f5ffc56a
authored
14 years ago
by
matta
Browse files
Options
Downloads
Patches
Plain Diff
* Changing NPEnergyLoss so it can also find table away fron the standard directory
parent
5121c18a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NPLib/Tools/NPEnergyLoss.cxx
+11
-3
11 additions, 3 deletions
NPLib/Tools/NPEnergyLoss.cxx
NPSimulation/src/MUST2Array.cc
+5
-5
5 additions, 5 deletions
NPSimulation/src/MUST2Array.cc
NPSimulation/src/Target.cc
+10
-0
10 additions, 0 deletions
NPSimulation/src/Target.cc
with
26 additions
and
8 deletions
NPLib/Tools/NPEnergyLoss.cxx
+
11
−
3
View file @
f5ffc56a
...
...
@@ -63,7 +63,7 @@ EnergyLoss::EnergyLoss(string Path , string Source, int NumberOfSlice=100 , int
fNumberOfMass
=
NumberOfMass
;
string
globalPath
=
getenv
(
"NPTOOL"
);
Path
=
globalPath
+
"/Inputs/EnergyLoss/"
+
Path
;
string
Standard
Path
=
globalPath
+
"/Inputs/EnergyLoss/"
+
Path
;
cout
<<
"///////////////////////////////// "
<<
endl
;
cout
<<
"Initialising an EnergyLoss object "
<<
endl
;
...
...
@@ -72,11 +72,19 @@ EnergyLoss::EnergyLoss(string Path , string Source, int NumberOfSlice=100 , int
TableFile
.
open
(
Path
.
c_str
())
;
// Opening dE/dX file
if
(
!
TableFile
)
cout
<<
"ERROR: TABLE FILE NOT FOUND"
<<
endl
;
if
(
TableFile
.
is_open
())
cout
<<
"Reading Energy Loss File: "
<<
Path
<<
endl
;
// In case the file is not found in the standard path, the programm try to interpret the file name as an absolute or relative file path.
else
{
TableFile
.
open
(
Path
.
c_str
()
);
if
(
TableFile
.
is_open
())
{
cout
<<
"Reading Energy Loss File: "
<<
Path
<<
endl
;}
else
{
cout
<<
"ERROR: TABLE FILE NOT FOUND"
<<
endl
;
return
;
}
}
if
(
Source
==
"G4Table"
)
{
cout
<<
"Reading Energy Loss File: "
<<
Path
<<
endl
;
// Reading Data
double
energy
,
total
;
string
dummy
;
...
...
This diff is collapsed.
Click to expand it.
NPSimulation/src/MUST2Array.cc
+
5
−
5
View file @
f5ffc56a
...
...
@@ -164,11 +164,11 @@ void MUST2Array::VolumeMaker(G4int TelescopeNumber ,
PVPBuffer
=
new
G4PVPlacement
(
G4Transform3D
(
*
MMrot
,
MMpos
)
,
logicMM
,
Name
,
world
,
false
,
0
);
logicMM
,
Name
,
world
,
false
,
0
);
...
...
This diff is collapsed.
Click to expand it.
NPSimulation/src/Target.cc
+
10
−
0
View file @
f5ffc56a
...
...
@@ -216,6 +216,16 @@ G4Material* Target::GetMaterialFromLibrary(G4String MaterialName, G4double Tempe
return
myMaterial
;
}
else
if
(
MaterialName
==
"Si"
)
{
G4Material
*
myMaterial
=
new
G4Material
(
"Si"
,
14.
,
28.0855
*
g
/
mole
,
2.321
*
g
/
cm3
);
return
myMaterial
;
}
else
if
(
MaterialName
==
"Al"
)
{
G4Material
*
myMaterial
=
new
G4Material
(
"Aluminium"
,
13.
,
26.98
*
g
/
mole
,
2.702
*
g
/
cm3
);
return
myMaterial
;
}
else
{
G4cout
<<
"No Matching Material in the Target Library Default is Vacuum"
<<
G4endl
;
G4Element
*
N
=
new
G4Element
(
"Nitrogen"
,
"N"
,
7.
,
14.01
*
g
/
mole
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment