Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Riccardo Longo
JZCaPA
Commits
f6cd5047
Commit
f6cd5047
authored
Apr 09, 2020
by
Chad Lantz
Browse files
Committing so I can move to a different computer. Made a couple more things compileble
parent
83466c35
Changes
5
Hide whitespace changes
Inline
Side-by-side
MonteCarlo/include/Materials.hh
View file @
f6cd5047
...
...
@@ -36,6 +36,8 @@ class Materials
G4Element
*
Si
;
/* \brief Nickel */
G4Element
*
Ni
;
/* \brief Tungsten */
G4Element
*
W
;
/* \brief Iron */
G4Element
*
Fe
;
/* \brief Carbon */
...
...
@@ -57,7 +59,7 @@ class Materials
/* \brief Lead */
G4Material
*
Pb
;
/* \brief Tungsten */
G4Material
*
W
;
G4Material
*
pure
W
;
/* \brief Tungsten Nickel composite */
G4Material
*
NiW
;
/* \brief Tungsten Nickel composite */
...
...
MonteCarlo/src/FiberSD.cc
View file @
f6cd5047
...
...
@@ -100,36 +100,33 @@ G4bool FiberSD::ProcessHits(G4Step* aStep,G4TouchableHistory*){
//Get the number of Cherenkov photons created in this step
//If optical is off, stop that track
int
capturedPhotons
=
0
;
const
std
::
vector
<
const
G4Track
*
>*
secVec
=
aStep
->
GetSecondaryInCurrentStep
();
const
G4Track
*
track
;
//for(const G4Track* track : *secVec){
int
capturedPhotons
=
0
;
const
std
::
vector
<
const
G4Track
*>*
secVec
=
aStep
->
GetSecondaryInCurrentStep
();
for
(
uint
i
=
0
;
i
<
secVec
->
size
();
i
++
){
track
=
secVec
->
at
(
i
);
if
(
track
->
GetDefinition
()
==
G4OpticalPhoton
::
OpticalPhotonDefinition
()){
if
(
secVec
->
at
(
i
)
->
GetDefinition
()
==
G4OpticalPhoton
::
OpticalPhotonDefinition
()){
capturedPhotons
++
;
if
(
!
OPTICAL
){
track
->
SetTrackStatus
(
fStopAndKill
);
}
//end if optical
}
//end if pid==0
}
//end secondary track loop
FiberHit
*
newHit
=
new
FiberHit
();
newHit
->
setCharge
(
charge
);
newHit
->
setTrackID
(
aStep
->
GetTrack
()
->
GetTrackID
()
);
newHit
->
setModNb
(
m_modNum
);
newHit
->
setRadNb
(
radNum
);
newHit
->
setRodNb
(
rodNum
);
newHit
->
setEdep
(
eDep
);
newHit
->
setPos
(
aStep
->
GetTrack
()
->
GetVertexPosition
()
);
newHit
->
setParticle
(
particle
);
newHit
->
setEnergy
(
energy
);
newHit
->
setMomentum
(
momentum
);
newHit
->
setNCherenkovs
(
capturedPhotons
);
newHit
->
setCharge
(
charge
);
newHit
->
setTrackID
(
aStep
->
GetTrack
()
->
GetTrackID
()
);
newHit
->
setModNb
(
m_modNum
);
newHit
->
setRadNb
(
radNum
);
newHit
->
setRodNb
(
rodNum
);
newHit
->
setEdep
(
eDep
);
newHit
->
setPos
(
aStep
->
GetTrack
()
->
GetVertexPosition
()
);
newHit
->
setParticle
(
particle
);
newHit
->
setEnergy
(
energy
);
newHit
->
setMomentum
(
momentum
);
newHit
->
setNCherenkovs
(
capturedPhotons
);
fiberCollection
->
insert
(
newHit
);
// only want to record photons if optical flag is on
if
(
OPTICAL
&&
particle
->
GetPDGEncoding
()
==
0
)
fiberCollection
->
insert
(
newHit
);
//if( OPTICAL && particle->GetPDGEncoding() == 0 ) fiberCollection->insert (newHit );
return
true
;
}
...
...
MonteCarlo/src/Materials.cc
View file @
f6cd5047
...
...
@@ -14,12 +14,14 @@ Materials* Materials::getInstance(void)
/* Function that constructs all the materials - to be then retrieved via pointer */
Materials
::
Materials
(
void
){
H
=
new
G4Element
(
"Hydrogen"
,
"H"
,
1.
,
1.01
*
g
/
mole
);
N
=
new
G4Element
(
"Nitrogen"
,
"N"
,
7.
,
14.01
*
g
/
mole
);
Ni
=
new
G4Element
(
"Ni"
,
"Ni"
,
28.0
,
58.6934
*
g
/
mole
);
O
=
new
G4Element
(
"Oxygen"
,
"O"
,
8.
,
16.00
*
g
/
mole
);
Si
=
new
G4Element
(
"Silicon"
,
"Si"
,
14.
,
28.08
*
g
/
mole
);
C
=
new
G4Element
(
"Carbon"
,
"C"
,
6.
,
12.00
*
g
/
mole
);
H
=
new
G4Element
(
"Hydrogen"
,
"H"
,
1.
,
1.01
*
g
/
mole
);
N
=
new
G4Element
(
"Nitrogen"
,
"N"
,
7.
,
14.01
*
g
/
mole
);
Ni
=
new
G4Element
(
"Ni"
,
"Ni"
,
28.0
,
58.6934
*
g
/
mole
);
W
=
new
G4Element
(
"W"
,
"W"
,
74.0
,
183.84
*
g
/
mole
);
Fe
=
new
G4Element
(
"Fe"
,
"Fe"
,
26.0
,
55.845
*
g
/
mole
);
O
=
new
G4Element
(
"Oxygen"
,
"O"
,
8.
,
16.00
*
g
/
mole
);
Si
=
new
G4Element
(
"Silicon"
,
"Si"
,
14.
,
28.08
*
g
/
mole
);
C
=
new
G4Element
(
"Carbon"
,
"C"
,
6.
,
12.00
*
g
/
mole
);
//Materials definition
Xenon
=
new
G4Material
(
"XenonGas"
,
54.
,
131.29
*
g
/
mole
,
5.458
*
mg
/
cm3
,
...
...
@@ -27,31 +29,31 @@ Materials::Materials(void){
// Absorber composition: savannah.cern.ch/task/download.php?file_id=22925
NiW
=
new
G4Material
(
"Tungsten/Nickel Composite"
,
18.155
*
g
/
cm3
,
ncomponents
=
3
);
NiW
->
AddElement
(
W
,
fractionMass
=
0.948
);
NiW
->
AddElement
(
Ni
,
fractionMass
=
0.037
);
NiW
->
AddElement
(
Fe
,
fractionMass
=
0.015
);
NiW
=
new
G4Material
(
"Tungsten/Nickel Composite"
,
18.155
*
g
/
cm3
,
3
);
NiW
->
AddElement
(
W
,
0.948
);
NiW
->
AddElement
(
Ni
,
0.037
);
NiW
->
AddElement
(
Fe
,
0.015
);
Steel
=
new
G4Material
(
"Steel"
,
7.9
*
gram
/
cm3
,
ncomponents
=
2
);
Steel
->
AddElement
(
Fe
,
fractionMass
=
0.98
);
Steel
->
AddElement
(
C
,
fractionMass
=
0.02
);
Steel
=
new
G4Material
(
"Steel"
,
7.9
*
gram
/
cm3
,
2
);
Steel
->
AddElement
(
Fe
,
0.98
);
Steel
->
AddElement
(
C
,
0.02
);
pQuartz
=
new
G4Material
(
"Quartz"
,
2.200
*
g
/
cm3
,
2
);
pQuartz
->
AddElement
(
Si
,
1
);
pQuartz
->
AddElement
(
O
,
2
);
pQuartz
->
AddElement
(
O
,
2
);
EM_Quartz
=
new
G4Material
(
"EMQuartz"
,
2.200
*
g
/
cm3
,
2
);
EM_Quartz
->
AddElement
(
Si
,
1
);
EM_Quartz
->
AddElement
(
O
,
2
);
EM_Quartz
->
AddElement
(
O
,
2
);
nist_manager
=
G4NistManager
::
Instance
();
nist_manager
->
SetVerbose
(
1
);
Air
=
nist_manager
->
FindOrBuildMaterial
(
"G4_AIR"
);
Al
=
nist_manager
->
FindOrBuildMaterial
(
"G4_Al"
);
//G4_Al
Cu
=
nist_manager
->
FindOrBuildMaterial
(
"G4_Cu"
);
Pb
=
nist_manager
->
FindOrBuildMaterial
(
"G4_Pb"
);
W
=
nist_manager
->
FindOrBuildMaterial
(
"G4_W"
);
Air
=
nist_manager
->
FindOrBuildMaterial
(
"G4_AIR"
);
Al
=
nist_manager
->
FindOrBuildMaterial
(
"G4_Al"
);
//G4_Al
Cu
=
nist_manager
->
FindOrBuildMaterial
(
"G4_Cu"
);
Pb
=
nist_manager
->
FindOrBuildMaterial
(
"G4_Pb"
);
pureW
=
nist_manager
->
FindOrBuildMaterial
(
"G4_W"
);
Polyethylene
=
new
G4Material
(
"Polyethylene"
,
1200
*
kg
/
m3
,
2
);
Polyethylene
->
AddElement
(
H
,
2
);
...
...
@@ -224,7 +226,9 @@ Materials::~Materials(void)
delete
Al
;
delete
Cu
;
delete
Pb
;
delete
W
;
delete
pureW
;
delete
NiW
;
delete
Steel
;
delete
Polyethylene
;
delete
PMMA
;
delete
Grease
;
...
...
MonteCarlo/src/ModTypeZDC.cc
View file @
f6cd5047
...
...
@@ -297,7 +297,7 @@ void ModTypeZDC::SetHousingMaterial(G4String material)
void
ModTypeZDC
::
SetAbsorberMaterial
(
G4String
material
)
{
material
.
toLower
();
if
(
material
==
"pure"
)
)
m_matHousing
=
m_materials
->
W
;
if
(
material
==
"pure"
)
)
m_matHousing
=
m_materials
->
pure
W
;
else
if
(
material
==
"composite"
)
m_matHousing
=
m_materials
->
NiW
;
else
G4cout
<<
"Invalid absorber material selection, defaulting to composite"
<<
G4endl
;
}
MonteCarlo/src/SteppingAction.cc
View file @
f6cd5047
...
...
@@ -68,5 +68,9 @@ void SteppingAction::UserSteppingAction(__attribute__((unused)) const G4Step* th
}
}
if
(
theTrack
->
GetDefinition
()
==
G4OpticalPhoton
::
OpticalPhotonDefinition
()
&&
!
OPTICAL
){
theTrack
->
SetTrackStatus
(
fStopAndKill
);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment