Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zdcLG
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
Chad Lantz
zdcLG
Commits
4d5dedd8
Commit
4d5dedd8
authored
4 years ago
by
Chad Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Removed unnecessary processing
parent
70d1a014
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
Segmented lg
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/SteppingAction.hh
+1
-3
1 addition, 3 deletions
include/SteppingAction.hh
src/SteppingAction.cc
+4
-35
4 additions, 35 deletions
src/SteppingAction.cc
with
5 additions
and
38 deletions
include/SteppingAction.hh
+
1
−
3
View file @
4d5dedd8
...
...
@@ -46,9 +46,7 @@ class SteppingAction : public G4UserSteppingAction
virtual
void
UserSteppingAction
(
const
G4Step
*
);
private:
G4int
fScintillationCounter
;
G4int
fCerenkovCounter
;
G4int
fEventNumber
;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
...
...
This diff is collapsed.
Click to expand it.
src/SteppingAction.cc
+
4
−
35
View file @
4d5dedd8
...
...
@@ -41,50 +41,19 @@
SteppingAction
::
SteppingAction
()
:
G4UserSteppingAction
()
{
fScintillationCounter
=
0
;
fCerenkovCounter
=
0
;
fEventNumber
=
-
1
;
}
/*
*/
SteppingAction
::~
SteppingAction
()
{
;
}
{
}
/*
*/
void
SteppingAction
::
UserSteppingAction
(
const
G4Step
*
step
)
{
G4int
eventNumber
=
G4RunManager
::
GetRunManager
()
->
GetCurrentEvent
()
->
GetEventID
();
if
(
eventNumber
!=
fEventNumber
)
{
fEventNumber
=
eventNumber
;
fScintillationCounter
=
0
;
fCerenkovCounter
=
0
;
}
G4Track
*
track
=
step
->
GetTrack
();
G4String
ParticleName
=
track
->
GetDynamicParticle
()
->
GetParticleDefinition
()
->
GetParticleName
();
if
(
ParticleName
==
"opticalphoton"
)
return
;
const
std
::
vector
<
const
G4Track
*>*
secondaries
=
step
->
GetSecondaryInCurrentStep
();
if
(
secondaries
->
size
()
>
0
)
{
for
(
unsigned
int
i
=
0
;
i
<
secondaries
->
size
();
++
i
)
{
if
(
secondaries
->
at
(
i
)
->
GetParentID
()
>
0
)
{
if
(
secondaries
->
at
(
i
)
->
GetDynamicParticle
()
->
GetParticleDefinition
()
==
G4OpticalPhoton
::
OpticalPhotonDefinition
()){
if
(
secondaries
->
at
(
i
)
->
GetCreatorProcess
()
->
GetProcessName
()
==
"Scintillation"
)
fScintillationCounter
++
;
if
(
secondaries
->
at
(
i
)
->
GetCreatorProcess
()
->
GetProcessName
()
==
"Cerenkov"
)
fCerenkovCounter
++
;
}
}
}
}
}
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