The basf2 stacking action.
More...
#include <StackingAction.h>
|
| double | m_photonFraction = 1.0 |
| | The fraction of Cerenkov photons which will be kept and propagated.
|
| |
The basf2 stacking action.
Definition at line 25 of file StackingAction.h.
◆ StackingAction()
◆ ~StackingAction()
◆ ClassifyNewTrack()
| G4ClassificationOfNewTrack ClassifyNewTrack |
( |
const G4Track * | aTrack | ) |
|
|
virtual |
Function that classifies new tracks.
Definition at line 34 of file StackingAction.cc.
35{
36
37 if (aTrack->GetDefinition() != G4OpticalPhoton::OpticalPhotonDefinition())
38 return fUrgent;
39
40
41 if (!aTrack->GetCreatorProcess()) return fUrgent;
42
43
44 if (aTrack->GetCreatorProcess()->GetProcessName() != "Cerenkov") return fUrgent;
45
46
47 TrackInfo* info = dynamic_cast<TrackInfo*>(aTrack->GetUserInformation());
48 if (!info) return fUrgent;
49
50
51 if (info->getStatus() != 0) return fUrgent;
52
53
54 if (gRandom->Uniform() > m_photonFraction) {
55 TrackInfo::getInfo(*aTrack).setIgnore();
56 return fKill;
57 }
58
59
60 info->setStatus(1);
61 info->setFraction(m_photonFraction);
62
63 return fUrgent;
64}
◆ NewStage()
Function that is called at each event when "urgent" stack is empty.
Definition at line 67 of file StackingAction.cc.
◆ PrepareNewEvent()
◆ setPropagatedPhotonFraction()
| void setPropagatedPhotonFraction |
( |
double | fraction | ) |
|
|
inline |
Set fraction of Cerenkov photons that are actually propagated.
Definition at line 45 of file StackingAction.h.
45{ m_photonFraction = fraction; };
◆ m_photonFraction
| double m_photonFraction = 1.0 |
|
private |
The fraction of Cerenkov photons which will be kept and propagated.
Definition at line 50 of file StackingAction.h.
The documentation for this class was generated from the following files: