Main Page
Class Categories
Classes
Namespaces
File List
File Members
exper-sw
cosmosw
AugerSW
Offline
source
main
Modules
SdSimulation
G4StationSimulator
G4StationTrackingAction.cc
Go to the documentation of this file.
1
#include "
G4StationTrackingAction.h
"
2
3
#include <G4Track.hh>
4
#include <G4TrackingManager.hh>
5
#include <G4TrackStatus.hh>
6
7
8
namespace
G4StationSimulatorOG {
9
10
// Number of Cherenkov photons from injected particle
11
int
G4StationTrackingAction::fNumC
= 0;
12
// Number of Cherenkov photons NOT coming directly from the injected particle. (eg. delta rays)
13
int
G4StationTrackingAction::fNumCDelta
= 0;
14
int
G4StationTrackingAction::fNumBounces
= 0;
15
16
17
G4StationTrackingAction::G4StationTrackingAction
(
const
bool
umdEnable) :
18
fIsUMDEnabled(umdEnable)
19
{ }
20
21
22
void
23
G4StationTrackingAction::PreUserTrackingAction
(
const
G4Track*
const
track)
24
{
25
firstStepInVolume
=
true
;
26
fNumBounces
= 0;
27
28
const
int
code = track->GetDefinition()->GetPDGEncoding();
29
30
if
(code == 0) {
// Optical photon
31
32
const
int
parent = track->GetParentID();
33
34
// Count number of Cerenkov photons
35
if
(parent != 1)
// not directly produced by the injected particle (eg delta ray)
36
++
fNumCDelta
;
37
else
// Produced by injected particle
38
++
fNumC
;
39
}
40
}
41
42
43
void
44
G4StationTrackingAction::PostUserTrackingAction
(
const
G4Track*
const
/*track*/
)
45
{
46
firstStepInVolume
=
false
;
47
}
48
49
}
G4StationTrackingAction.h
G4StationSimulatorOG::G4StationTrackingAction::G4StationTrackingAction
G4StationTrackingAction(const bool enabled)
Definition:
G4StationTrackingAction.cc:17
G4StationSimulatorOG::G4StationTrackingAction::fNumC
static int fNumC
Definition:
G4StationTrackingAction.h:36
G4StationSimulatorOG::G4StationTrackingAction::PreUserTrackingAction
virtual void PreUserTrackingAction(const G4Track *const track) override
Definition:
G4StationTrackingAction.cc:23
G4StationSimulatorOG::G4StationTrackingAction::PostUserTrackingAction
virtual void PostUserTrackingAction(const G4Track *const track) override
Definition:
G4StationTrackingAction.cc:44
G4StationSimulatorOG::G4StationTrackingAction::fNumCDelta
static int fNumCDelta
Definition:
G4StationTrackingAction.h:37
G4StationSimulatorOG::G4StationTrackingAction::firstStepInVolume
bool firstStepInVolume
Definition:
G4StationTrackingAction.h:42
G4StationSimulatorOG::G4StationTrackingAction::fNumBounces
static int fNumBounces
Definition:
G4StationTrackingAction.h:38
, generated on Tue Sep 26 2023.