File indexing completed on 2025-07-02 07:55:35
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef HadrontherapyEventAction_h
0030 #define HadrontherapyEventAction_h 1
0031
0032 #include "G4UserEventAction.hh"
0033 #include "globals.hh"
0034
0035 class HadrontherapyMatrix;
0036 class HadrontherapyEventActionMessenger;
0037
0038 class HadrontherapyEventAction : public G4UserEventAction
0039 {
0040 public:
0041 HadrontherapyEventAction();
0042 ~HadrontherapyEventAction();
0043
0044 public:
0045 void BeginOfEventAction(const G4Event*);
0046 void EndOfEventAction(const G4Event*);
0047
0048 void SetPrintModulo(G4int val)
0049 {
0050 printModulo = val;
0051 };
0052
0053 void SetDrawFlag(G4String val)
0054 {
0055 drawFlag = val;
0056 };
0057
0058 private:
0059 G4String drawFlag;
0060 G4int hitsCollectionID;
0061
0062 G4int printModulo;
0063 HadrontherapyEventActionMessenger* pointerEventMessenger;
0064 };
0065
0066 class B4aEventAction : public G4UserEventAction
0067 {
0068 public:
0069 B4aEventAction();
0070 virtual ~B4aEventAction();
0071
0072 virtual void BeginOfEventAction(const G4Event* event);
0073 virtual void EndOfEventAction(const G4Event* event);
0074
0075 void AddAbs(G4double de, G4double dl);
0076 void AddGap(G4double de, G4double dl);
0077
0078 private:
0079 G4double fEnergyAbs;
0080 G4double fEnergyGap;
0081 G4double fTrackLAbs;
0082 G4double fTrackLGap;
0083 };
0084
0085
0086
0087 inline void B4aEventAction::AddAbs(G4double de, G4double dl) {
0088 fEnergyAbs += de;
0089 fTrackLAbs += dl;
0090 }
0091
0092 inline void B4aEventAction::AddGap(G4double de, G4double dl) {
0093 fEnergyGap += de;
0094 fTrackLGap += dl;
0095 }
0096
0097
0098 #endif
0099
0100
0101