G4TankSimulatorOG/G4TankTrackingAction.cc
Go to the documentation of this file.
1 #include "G4TankTrackingAction.h"
2 
3 #include <G4Track.hh>
4 #include <G4TrackingManager.hh>
5 #include <G4TrackStatus.hh>
6 
7 #include <cstddef>
8 #include <iostream>
9 
10 using namespace G4TankSimulatorOG;
11 
12 using std::cout;
13 using std::endl;
14 
15 
16 // Number of Cherenkov photons from injected particle
18 
19 // Number of Cherenkov photons NOT coming directly from
20 // the injected particle. (eg. delta rays)
21 //
24 
25 
27 {
28 }
29 
30 
32 {
33 }
34 
35 
36 void
38 {
39 }
40 
41 
42 void
44 {
45  //AfterTracking(aTrack);
46  //G4cerr << "Number of Cerenkov photons : " << fNumC;
47 }
48 
49 
50 void
52 {
53  fNumBounces = 0;
54 
55  const int Code = aTrack->GetDefinition()->GetPDGEncoding();
56 
57  if (Code == 0) { // Optical photon
58 
59  const int Parent = aTrack->GetParentID();
60 
61  // Count number of Cerenkov photons
62  if (Parent != 1) // not directly produced by the injected particle (eg delta ray)
63  ++fNumCDelta;
64  else // Produced by injected particle
65  ++fNumC;
66  }
67 }
68 
69 
70 void
71 G4TankTrackingAction::AfterTracking(const G4Track* /*aTrack*/)
72 {
73 }

, generated on Tue Sep 26 2023.