Skip to content
GitLab
Menu
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
15178ec6
Commit
15178ec6
authored
Mar 21, 2022
by
Chad Lantz
Browse files
Changed absorption chance calculation to reflect the terminology
parent
b31a0864
Changes
1
Hide whitespace changes
Inline
Side-by-side
MonteCarlo/src/FiberSD.cc
View file @
15178ec6
...
...
@@ -176,8 +176,8 @@ G4bool FiberSD::ProcessHits(G4Step* aStep,G4TouchableHistory*){
G4ThreeVector
momDir
=
aStep
->
GetPreStepPoint
()
->
GetMomentumDirection
();
//pathLength = (distance to top of fiber)/sin(polarAngle); polarAngle = atan(y/sqrt(x^2 + z^2));
G4double
pathLength
=
(
m_topOfVolume
-
pos
.
y
())
/
sin
(
atan
(
momDir
.
y
()
/
sqrt
(
pow
(
momDir
.
x
(),
2.0
)
+
pow
(
momDir
.
z
(),
2.0
)
)
)
);
G4double
absChance
=
exp
(
-
pathLength
/
Absorption
);
if
(
CLHEP
::
RandFlat
::
shoot
(
0.0
,
1.0
)
<
absChance
){
//This check amounts to if(!absorbed)
G4double
absChance
=
1
-
exp
(
-
pathLength
/
Absorption
);
if
(
CLHEP
::
RandFlat
::
shoot
(
0.0
,
1.0
)
>
absChance
){
//This check amounts to if(!absorbed)
//Finally, record the ouput
if
(
REDUCED_TREE
){
m_cherenkovVec
->
at
(
rodNum
)
++
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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