GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
GGSPrimaryDisAction.h
Go to the documentation of this file.
1 /*
2  * GGSPrimaryDisAction.h
3  *
4  * Created on: 1 Jun 2020
5  * Author: Nicola Mori
6  */
7 
10 #ifndef GGSPRIMARYDISACTION_H_
11 #define GGSPRIMARYDISACTION_H_
12 
13 // Standard headers
14 #include <map>
15 #include <vector>
16 
17 // GGS headers
20 // messenger
22 
23 // GEANT4 headers
24 #include "G4GenericMessenger.hh"
25 #include "G4PrimaryParticle.hh"
26 #include "G4Track.hh"
27 
28 // ROOT headers
29 #include "TClonesArray.h"
30 #include "TFile.h"
31 #include "TTree.h"
32 
40 
41 public:
44 
52  void PreUserTrackingAction(const G4Track *track);
53 
60  void PostUserTrackingAction(const G4Track *track);
61 
66  void BeginOfEventAction(const G4Event *event);
67 
72  void EndOfEventAction(const G4Event *event);
73 
78  void BeginOfRunAction(const G4Run *run);
79 
84  void EndOfRunAction(const G4Run *run);
85 
86 private:
87  TClonesArray _disInfo;
88  std::map<const G4Track *, int> _tracks; // first: followed track, second: originalTrackID
89  bool _outputProducts;
90 
91  std::string _outBase;
92  std::string _outTreeName;
93  TFile *_outRootFile;
94  TTree *_outTree;
95 
96  G4GenericMessenger _messenger;
97 };
98 
99 #endif /* GGSPRIMARYDISACTION_H_ */
void EndOfEventAction(const G4Event *event)
Fills the output tree.
void PreUserTrackingAction(const G4Track *track)
Initialization of primary track.
void EndOfRunAction(const G4Run *run)
Closes the output file for the current run.
void BeginOfEventAction(const G4Event *event)
Clears the interaction arrays.
void BeginOfRunAction(const G4Run *run)
Opens the output file for the current run and prepares the output tree.
void PostUserTrackingAction(const G4Track *track)
Check the track end .
A control messenger for GGSHadrIntAction.
Mother class for user actions in GGS.
Definition: GGSUserAction.h:27
GGSPrimaryDisAction()
Constructor.
Action which finds the point of disappearance points for each primary particle.