geant4-B1-example  1.0
 All Classes Files Functions Variables Pages
B1RunAction.hh
Go to the documentation of this file.
1 /// file B1RunAction.hh
2 /// brief Definition of the B1RunAction class
3 
4 #ifndef B1RunAction_h
5 #define B1RunAction_h 1
6 
7 #include "G4UserRunAction.hh"
8 #include "G4Parameter.hh"
9 #include "globals.hh"
10 
11 class G4Run;
12 // it seems be implemented in B1RunAction.cc by #include G4Run.hh
13 
14 
15 /*!
16  @brief Run action class ( run is the biggest unit)
17 
18  In BeginOfRunAction(), it sets up the dose unit, <br>
19  and Register our fEdep and fEdep2 parameters by parameterManager.<br>
20 
21  In EndOfRunAction(), it calculates the dose in the selected volume<br>
22  from the energy deposit accumulated via stepping and event actions.<br>
23  The computed dose is then printed on the screen.<br>
24 */
25 class B1RunAction : public G4UserRunAction
26 {
27  public:
28  B1RunAction();
29  virtual ~B1RunAction();
30 
31  // virtual G4Run* GenerateRun();
32 
33  // BeginOfRunAction() is invoked at the begining of BeamOn() method,
34  // and it provides run number identification.
35  // EndOfRunAction() is invoked at the end of BeamOn() method.
36  virtual void BeginOfRunAction(const G4Run*);
37 
38  // It retreive the information ( mass, nofEvents )
39  // and calculate the dose, rms, etc..
40  // also it print the summary.
41  virtual void EndOfRunAction(const G4Run*);
42 
43 
44  void AddEdep (G4double edep);
45 
46  private:
47  G4Parameter<G4double> fEdep; // Edep = energy deposit
48  G4Parameter<G4double> fEdep2;
49  // G4Parameter<T> is a templated class,
50  // it has the Reset() method.
51  // We will use G4ParamterManager class's RegisterParameter()
52  // to regist the G4Parameter obj.
53 };
54 
55 #endif
56 
virtual void EndOfRunAction(const G4Run *)
Definition: B1RunAction.cc:84
Run action class ( run is the biggest unit)
Definition: B1RunAction.hh:25
void AddEdep(G4double edep)
for a user event action object to update fEdep and fEdep2. fEdep represents the energy deposit of a...
Definition: B1RunAction.cc:188
virtual void BeginOfRunAction(const G4Run *)
Definition: B1RunAction.cc:58
virtual ~B1RunAction()
do nothing..
Definition: B1RunAction.cc:48