Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
JZCaPA
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Show more breadcrumbs
Riccardo Longo
JZCaPA
Commits
ec52a20a
Commit
ec52a20a
authored
3 years ago
by
Chad Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Changed from having multiple OPTICAL flag behaviors to just killing any photons outside of an SD
parent
5bfa11ed
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
MonteCarlo/src/SteppingAction.cc
+7
-19
7 additions, 19 deletions
MonteCarlo/src/SteppingAction.cc
with
7 additions
and
19 deletions
MonteCarlo/src/SteppingAction.cc
+
7
−
19
View file @
ec52a20a
...
...
@@ -66,28 +66,16 @@ void SteppingAction::UserSteppingAction(__attribute__((unused)) const G4Step* th
}
//If we are tracking a gamma that came from the primary event
if
(
PI0
&&
theTrack
->
GetParentID
()
==
1
&&
theTrack
->
GetCurrentStepNumber
()
==
1
&&
theTrack
->
GetDefinition
()
==
G4Gamma
::
GammaDefinition
()
){
m_Pi0Mom
->
push_back
(
theTrack
->
GetVertexMomentumDirection
()
);
m_Pi0Vert
->
push_back
(
theTrack
->
GetVertexPosition
()
);
}
else
if
(
theTrack
->
GetDefinition
()
==
G4OpticalPhoton
::
OpticalPhotonDefinition
()
){
// If we are tracking an optical photon
// Get the SD for the volume we're in. Returns 0 if we aren't in an SD volume
}
else
if
(
theTrack
->
GetDefinition
()
==
G4OpticalPhoton
::
OpticalPhotonDefinition
()
){
//If the particle is an optical photon outside of any SDs, kill it.
FiberSD
*
sd
=
(
FiberSD
*
)
theTrack
->
GetVolume
()
->
GetLogicalVolume
()
->
GetSensitiveDetector
();
// If World OPTICAL is on
if
(
OPTICAL
){
// Kill photons only in SD volumes with OPTICAL off
if
(
sd
!=
0
&&
!
sd
->
OpticalIsOn
()
){
if
(
!
sd
){
theTrack
->
SetTrackStatus
(
fStopAndKill
);
}
}
else
{
// World OPTICAL is off
// Kill all photons except those in SD volumes with OPTICAL on
if
(
sd
==
0
||
!
sd
->
OpticalIsOn
()
){
theTrack
->
SetTrackStatus
(
fStopAndKill
);
}
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
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