LBNERunAction.hh
Go to the documentation of this file.
1 //
2 // LBNERunAction.hh
3 //
4 
5 #ifndef LBNERunAction_h
6 #define LBNERunAction_h 1
7 
8 #include "G4UserRunAction.hh"
9 #include "globals.hh"
10 #include "LBNETrajectory.hh"
11 
12 class G4Run;
14 class LBNFDeDxMap;
15 
16 class LBNERunAction : public G4UserRunAction
17 {
18 public:
19  LBNERunAction();
21 
22  void BeginOfRunAction(const G4Run*);
23  void EndOfRunAction(const G4Run*);
24 
25  void CheckOKToRun();
26 
27  void CheckMemoryUsage(double VMLimit) const;
28 
29 private:
32  // Global information regarding energy deposition in the target.
35  mutable double fMeanEDepInGraphite;
36  mutable double fRMSEDepInGraphite;
37  mutable double fMeanEDepInArgonGasHorn1;
38  mutable double fRMSEDepInArgonGasHorn1;
39  mutable double fMeanEDepInArgonGasHorn2;
40  mutable double fRMSEDepInArgonGasHorn2;
41  mutable bool fDoComputeEDepInHorns;
43 
44 public:
45  inline void SetDebugLevel(bool t) { fVerboseLevel = t; }
46  inline bool GetDebugLevel() const { return fVerboseLevel; }
47  inline void SetDoComputeEDepInGraphite(bool t) const { fDoComputeEDepInGraphite = t;}
49  inline void storeEDepInGraphite(double edep) const { /* not really... */
50  fMeanEDepInGraphite += edep;
51  fRMSEDepInGraphite += edep*edep;
52  }
53  inline void SetDoComputeEDepInArgonGas(bool t) const { fDoComputeEDepInArgonGas = t;}
55  inline void storeEDepInArgonGas(double edepH1, double edepH2) const { /* not really... */
56  fMeanEDepInArgonGasHorn1 += edepH1;
57  fRMSEDepInArgonGasHorn1 += edepH1*edepH1;
58  fMeanEDepInArgonGasHorn2 += edepH2;
59  fRMSEDepInArgonGasHorn2 += edepH2*edepH2;
60  }
61  inline void SetDoComputeEDepInHorns(bool t) const { fDoComputeEDepInHorns = t;}
62  inline bool GetDoComputeEDepInHorns() const { return fDoComputeEDepInHorns;}
63  inline LBNFDeDxMap* GetG4MARSDeDxMap() const {return fG4MARSDeDxMap;}
64 };
65 
66 #endif
67 
double fRMSEDepInArgonGasHorn1
bool fDoComputeEDepInArgonGas
double fRMSEDepInGraphite
bool fDoComputeEDepInHorns
bool GetDoComputeEDepInGraphite() const
LBNFDeDxMap * fG4MARSDeDxMap
bool GetDoComputeEDepInArgonGas() const
void storeEDepInGraphite(double edep) const
LBNERunActionMessenger * runMessenger
void SetDoComputeEDepInGraphite(bool t) const
bool GetDebugLevel() const
LBNFDeDxMap * GetG4MARSDeDxMap() const
bool fDoComputeEDepInGraphite
bool GetDoComputeEDepInHorns() const
double fMeanEDepInArgonGasHorn2
double fRMSEDepInArgonGasHorn2
void storeEDepInArgonGas(double edepH1, double edepH2) const
void SetDebugLevel(bool t)
void SetDoComputeEDepInArgonGas(bool t) const
double fMeanEDepInArgonGasHorn1
double fMeanEDepInGraphite
void CheckMemoryUsage(double VMLimit) const
void EndOfRunAction(const G4Run *)
void SetDoComputeEDepInHorns(bool t) const
void BeginOfRunAction(const G4Run *)