QwGeant4
QweakSimEventAction.hh
Go to the documentation of this file.
1 //=============================================================================
2 /**
3 
4  \file QweakSimEventAction.hh
5  $Revision: 1.4 $
6  $Date: 2006/01/06 21:29:35 $
7  \author Klaus Hans Grimm
8 
9 */
10 //=============================================================================
11 //
12 //=============================================================================
13 /**
14  \class QweakSimEventAction
15 
16  \brief Mainly filling/storing the hit event structure at the end of an event
17 
18  Placeholder for a long explaination
19 
20  */
21 //=============================================================================
22 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
23 #ifndef QweakSimEventAction_h
24 #define QweakSimEventAction_h 1
25 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
26 
27 // system includes
28 #include <vector>
29 #include <map>
30 
31 // root includes
32 #include "Rtypes.h"
33 #include "TString.h"
34 
35 // geant4 includes
36 #include "G4Types.hh"
37 #include "G4String.hh"
38 #include "G4ThreeVector.hh"
39 #include "G4UserEventAction.hh"
40 
41 // user classes
42 class QweakSimAnalysis;
45 
46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47 
53 
54 class QweakSimEventAction : public G4UserEventAction
55 {
56 public:
57  //!Constructor
59 
60  //!Destructor
61  virtual ~QweakSimEventAction();
62 
63 public:
64 
65  void BeginOfEventAction(const G4Event* evt);
66  void EndOfEventAction(const G4Event* evt);
67 
68  void ShowTrigger();
69  void SetTrigger(const G4String value, const G4bool status);
70  void EnableTrigger(const G4String value) { SetTrigger(value, true); };
71  void DisableTrigger(const G4String value) { SetTrigger(value, false); };
72  void SetPrintHits(bool value) {printhits = value;};
73 
74 private:
75 
76  void Initialize();
77  G4double GetDistance(G4ThreeVector,G4ThreeVector);
79  G4double CalculateRate(G4double xsec, G4int PEs);
80 
81  bool printhits;
82 
83  // Event action messenger
85 
86  // Trigger mask
87  std::vector<G4bool> fTrigger;
88  std::vector<G4String> fTriggerName;
89  std::map < G4String, EQweakSimTriggerMode > kMapTriggerMode;
90 
91 
109 
112 
113  // Print hits for some subsystems during debugging
114  //static const G4bool print_GEM_WirePlaneHit = false;
115  static const G4bool print_VDC_WirePlaneHit = false;
116  static const G4bool print_VDC_DriftCellHit = false;
117  static const G4bool print_TriggerScintillator_DetectorHit = false;
118  static const G4bool print_Cerenkov_DetectorHit = false;
119 
120  //-----------------------------------------
121 
122  static const int PmtMaxSize = 18;
123 
124 };
125 
126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
127 
128 #endif
129 
void EnableTrigger(const G4String value)
void EndOfEventAction(const G4Event *evt)
std::vector< G4bool > fTrigger
static const G4bool print_VDC_WirePlaneHit
void SetPrintHits(bool value)
QweakSimEventAction(QweakSimAnalysis *AN, QweakSimUserInformation *myUI)
Constructor.
QweakSimAnalysis * analysis
G4double GetDistance(G4ThreeVector, G4ThreeVector)
static const int PmtMaxSize
Handling of the output ROOT file.
void SetTrigger(const G4String value, const G4bool status)
EQweakSimTriggerMode
Messenger for filling//storing the hit event structure at the end of an event.
static const G4bool print_VDC_DriftCellHit
std::map< G4String, EQweakSimTriggerMode > kMapTriggerMode
virtual ~QweakSimEventAction()
Destructor.
std::vector< G4String > fTriggerName
G4double CalculateRate(G4double xsec, G4int PEs)
static const G4bool print_TriggerScintillator_DetectorHit
QweakSimEventActionMessenger * fEventActionMessenger
void BeginOfEventAction(const G4Event *evt)
static const G4bool print_Cerenkov_DetectorHit
void DisableTrigger(const G4String value)
Mainly filling/storing the hit event structure at the end of an event.
QweakSimUserInformation * myUserInfo