LBNERunManager.hh
Go to the documentation of this file.
1 //
2 // LBNERunManager.hh
3 //
4 
5 #ifndef LBNERunManager_h
6 #define LBNERunManager_h 1
7 
8 #include "G4RunManager.hh"
9 #include "LBNERunAction.hh"
10 #include "LBNEEventAction.hh"
11 #include "LBNETrackingAction.hh"
12 #include "LBNESteppingAction.hh"
13 #include "LBNEStackingAction.hh"
14 
16 
17 class LBNERunManager : public G4RunManager
18 {
19 public:
21  virtual ~LBNERunManager();
22 
23  virtual void InitializeGeometry();
24  virtual void InitializePhysics();
25  virtual void BeamOn(G4int n_event,const char* macroFile=0,G4int n_select=-1);
26  inline G4int GetNumberOfEvents(){
27  return numberOfEventToBeProcessed;
28  }
29 
30  G4int nEvents;
31 
32 
33 protected:
36  G4String fPhysicsListName; // such that we can write it onto the Dk2Nu Meta tree at a later point.
37 // G4String fPhysicsListNameDefault; //a default value, for possible later usage. P.L., Sept 2014.
43 
44 // LBNEPrimaryGeneratorAction * primaryGeneratorAction;
45 
51  bool fUseFluka;
52  bool fUseMars;
57  bool fCreateTrkPlaneH1Output; //Amit Bashyal
58  bool fCreateTrkPlaneH2Output; //Amit Bashyal
59  bool fCreateTrkPlaneDPOutput; //Amit Bashyal
62  bool fCreateTargetOutput; //Amit Bashyal
63  bool fCreateAlcoveTrackingOutput;//Jeremy Lopez
64  bool fUseRealisticNearDetectorVolume;// Laura Fields
66 
67 public:
68 
69  inline void SetNptInputFileName(G4String &aName) { fMarsOrFlukaInputFileName = aName; }
70 
72  { return dynamic_cast<LBNEPrimaryGeneratorAction*>(userPrimaryGeneratorAction); }
73 
75  { return dynamic_cast<LBNESteppingAction*> (userSteppingAction); }
76 
77  inline void SetUseFlukaInput(bool t) { fUseFluka = t; }
78  inline void SetUseMarsInput(bool t) { fUseMars = t; }
79 
80  inline bool GetUseFlukaInput() const {return fUseFluka;}
81  inline bool GetUseMarsInput() const {return fUseMars;}
82  inline G4String GetNptInputFileName() const {return fMarsOrFlukaInputFileName;}
83 
84  inline void SetOutputNtpFileName(G4String &aName) {fNptOutputFileName = aName;}
85  inline G4String GetOutputNtpFileName() const {return fNptOutputFileName;}
86  inline void SetOutputDk2NuFileName(G4String &aName) {fDk2NuOutputFileName = aName;}
87  inline G4String GetOutputDk2NuFileName() const {return fDk2NuOutputFileName;}
88  inline void SetOutputASCIIFileName(G4String &aName) {fAsciiOutputFileName = aName;}
89  inline G4String GetOutputASCIIFileName() const {return fAsciiOutputFileName;}
90 
91  inline bool GetCreateOutput() const { return fCreateOutput; }
92  inline void SetCreateOutput(bool t) { fCreateOutput = t;}
93  inline bool GetCreateDk2NuOutput() const { return fCreateDk2NuOutput; }
94  inline void SetCreateDk2NuOutput(bool t) { fCreateDk2NuOutput = t;}
95  inline bool GetCreateASCIIOutput() const { return fCreateAsciiOutput; }
96  inline void SetCreateASCIIOutput(bool t) { fCreateAsciiOutput = t;}
97  inline bool GetCreateTrkPlaneOutput() const { return fCreateTrkPlaneOutput; }
98  inline void SetCreateTrkPlaneOutput(bool t) { fCreateTrkPlaneOutput = t;}
100  inline void SetUseRealisticNearDetectorVolume(bool t) { fUseRealisticNearDetectorVolume = t;}
102  inline void SetCreateTrackingTargetOutASCII(bool t) {
103  fCreateTrackingTargetOutASCII = t;
104  if (t) {
105  const LBNESteppingAction *stepAct
106  = reinterpret_cast<const LBNESteppingAction *>(G4RunManager::GetUserSteppingAction());
108  const LBNETrackingAction *trackAct
109  = reinterpret_cast<const LBNETrackingAction *>(G4RunManager::GetUserTrackingAction());
110  trackAct->OpenHadronAtVertex();
111  const LBNEStackingAction *stackAct
112  = reinterpret_cast<const LBNEStackingAction *>(G4RunManager::GetUserStackingAction());
113  stackAct->OpenHadronAtVertex();
114  }
115  }
116  inline G4String GetPhysicsListName() const {return fPhysicsListName; }
117  inline void SetPhysicsListName(G4String &t) {fPhysicsListName = t;}
118  inline G4String GetDetectorLocationFileName() const { return fDetectorLocationFileName; }
119  inline void SetDetectorLocationFileName(G4String &sDetLocName) { fDetectorLocationFileName = sDetLocName;}
120  inline bool GetCreateTargetOutput() const {return fCreateTargetOutput;}
121  inline void SetCreateTargetOutput(bool t) {fCreateTargetOutput = t;}
125  inline void SetCreateTrkPlaneH1Output (bool t) {fCreateTrkPlaneH1Output = t;}
126  inline void SetCreateTrkPlaneH2Output (bool t) {fCreateTrkPlaneH2Output = t;}
127  inline void SetCreateTrkPlaneDPOutput (bool t) {fCreateTrkPlaneDPOutput = t;}
129  inline void SetCreateAlcoveTrackingOutput (bool t) {fCreateAlcoveTrackingOutput = t;}
130 // Why keeping two event counters ? One in the Base class (numberOfEventToProcessed) and nEvent here...
131 // Note available in v4.9.3...
132  inline void SetNumberOfEventsLBNE( int n ) {nEvents = n;}
133  inline int GetNumberOfEventsLBNE() { return nEvents;}
134 
135  inline int GetVerboseLevel() const {return fVerboseLevel; }
136 
137 };
138 
139 #endif
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
LBNEPrimaryGeneratorAction * GetLBNEPrimaryGeneratorAction()
bool GetCreateTrkPlaneH1Output() const
void SetOutputASCIIFileName(G4String &aName)
bool fPhysicsInitializedHere
void SetUseRealisticNearDetectorVolume(bool t)
void SetCreateTrkPlaneOutput(bool t)
bool GetCreateAlcoveTrackingOutput() const
void SetCreateAlcoveTrackingOutput(bool t)
G4String GetDetectorLocationFileName() const
G4String GetPhysicsListName() const
bool GetCreateASCIIOutput() const
bool fCreateAlcoveTrackingOutput
bool fCreateTrkPlaneOutput
void OpenHadronAtVertex() const
void SetNumberOfEventsLBNE(int n)
bool GetCreateTrkPlaneDPOutput() const
LBNEStackingAction * fLBNEStackingAction
void SetOutputNtpFileName(G4String &aName)
bool GetUseMarsInput() const
bool fCreateTrackingOutput
bool GetCreateTargetOutput() const
G4String fNptOutputFileName
bool fCreateTrackingTargetOutASCII
bool fCreateTrkPlaneDPOutput
void InitiateHadronFluxFromTargetASCII() const
LBNERunAction * fLBNERunAction
G4int GetNumberOfEvents()
bool fCreateTrkPlaneH2Output
void SetCreateDk2NuOutput(bool t)
int GetNumberOfEventsLBNE()
G4String GetOutputASCIIFileName() const
void SetUseMarsInput(bool t)
bool GetCreateTrkPlaneOutput() const
LBNETrackingAction * fLBNETrackingAction
void SetCreateTrkPlaneDPOutput(bool t)
G4String fMarsOrFlukaInputFileName
virtual void InitializeGeometry()
bool fGeometryIntializedHere
void SetPhysicsListName(G4String &t)
LBNESteppingAction * GetLBNESteppingManager()
bool fCreateTrkPlaneH1Output
G4String GetOutputNtpFileName() const
virtual void InitializePhysics()
virtual ~LBNERunManager()
void OpenHadronAtVertex() const
bool GetCreateOutput() const
G4String fDetectorLocationFileName
bool fUseRealisticNearDetectorVolume
G4String GetOutputDk2NuFileName() const
LBNEEventAction * fLBNEEventAction
int GetVerboseLevel() const
void SetCreateTrkPlaneH1Output(bool t)
void SetOutputDk2NuFileName(G4String &aName)
LBNESteppingAction * fLBNESteppingAction
void SetUseFlukaInput(bool t)
void SetCreateTrackingTargetOutASCII(bool t)
bool GetUseFlukaInput() const
void SetCreateOutput(bool t)
bool GetUseRealisticNearDetectorVolume() const
void SetDetectorLocationFileName(G4String &sDetLocName)
G4String fPhysicsListName
bool GetCreateTrackingTargetOutASCII() const
bool GetCreateDk2NuOutput() const
void SetCreateTrkPlaneH2Output(bool t)
void SetNptInputFileName(G4String &aName)
void SetCreateASCIIOutput(bool t)
void SetCreateTargetOutput(bool t)
G4String fAsciiOutputFileName
G4String GetNptInputFileName() const
G4String fDk2NuOutputFileName
bool GetCreateTrkPlaneH2Output() const