Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
RE06RunAction Class Reference

#include <RE06RunAction.hh>

Inheritance diagram for RE06RunAction:
G4UserRunAction

Public Member Functions

 RE06RunAction ()
 
virtual ~RE06RunAction ()
 
G4RunGenerateRun ()
 
virtual void BeginOfRunAction (const G4Run *)
 
virtual void EndOfRunAction (const G4Run *)
 
- Public Member Functions inherited from G4UserRunAction
 G4UserRunAction ()
 
virtual ~G4UserRunAction ()
 
void SetMaster (G4bool val=true)
 
G4bool IsMaster () const
 

Additional Inherited Members

- Protected Attributes inherited from G4UserRunAction
G4bool isMaster
 

Detailed Description

Definition at line 40 of file RE06RunAction.hh.

Constructor & Destructor Documentation

RE06RunAction::RE06RunAction ( )

Definition at line 46 of file RE06RunAction.cc.

47  : G4UserRunAction()
48 {;}
RE06RunAction::~RE06RunAction ( )
virtual

Definition at line 52 of file RE06RunAction.cc.

53 {;}

Member Function Documentation

void RE06RunAction::BeginOfRunAction ( const G4Run )
virtual

Reimplemented from G4UserRunAction.

Definition at line 62 of file RE06RunAction.cc.

References G4VSteppingVerbose::GetInstance(), and RE06SteppingVerbose::InitializeTimers().

63 {
66 
67  sv->InitializeTimers();
68 
69 }
static G4VSteppingVerbose * GetInstance()
void RE06RunAction::EndOfRunAction ( const G4Run aRun)
virtual

Reimplemented from G4UserRunAction.

Definition at line 73 of file RE06RunAction.cc.

References G4BestUnit, G4cout, G4endl, RE06Run::GetEMinElectron(), RE06Run::GetEMinGamma(), RE06Run::GetEMinPositron(), G4RegionStore::GetInstance(), G4VSteppingVerbose::GetInstance(), G4Region::GetName(), RE06Run::GetNElectron(), RE06Run::GetNGamma(), RE06Run::GetNPositron(), RE06Run::GetNStep(), G4Run::GetNumberOfEvent(), RE06Run::GetParaValue(), G4ProductionCuts::GetProductionCut(), G4Region::GetProductionCuts(), G4RegionStore::GetRegion(), RE06Run::GetTotalE(), RE06Run::GetTotalL(), G4UserRunAction::IsMaster(), and RE06SteppingVerbose::Report().

74 {
75  static G4String regName[3] = {"Calor-A","Calor-B","Calor-C"};
76 
77  const RE06Run* theRun = (const RE06Run*)aRun;
78 
79  if(IsMaster()) {
80 
81  G4cout
82  << "############################################################" << G4endl;
83  G4cout
84  << " Run Summary - Number of events : " << theRun->GetNumberOfEvent()
85  << G4endl;
86  G4cout
87  << "############################################################" << G4endl;
88 
89  G4double nEvt = (G4double)(theRun->GetNumberOfEvent());
90  for(size_t i=0;i<3;i++)
91  {
92  size_t ih1 = 2*i;
93  size_t ih2 = 2*i+1;
94 
95  G4Region* region = G4RegionStore::GetInstance()->GetRegion(regName[i]);
96  G4ProductionCuts* cuts = region->GetProductionCuts();
97  G4cout << "Region : " << region->GetName() << G4endl;
98  G4cout << " Production thresholds :" << G4endl << " "
99  << " gamma " << G4BestUnit(cuts->GetProductionCut("gamma"),"Length")
100  << " e- " << G4BestUnit(cuts->GetProductionCut("e-"),"Length")
101  << " e+ " << G4BestUnit(cuts->GetProductionCut("e+"),"Length")
102  << G4endl;
103  G4cout << " Energy deposition in an event :" << G4endl << " "
104  << " Absorber " << G4BestUnit((theRun->GetTotalE(ih1))/nEvt,"Energy")
105  << " Gap " << G4BestUnit((theRun->GetTotalE(ih2))/nEvt,"Energy")
106  << G4endl;
107  G4cout << " Number of secondaries in an event :" << G4endl << " "
108  << " gamma in Absorber " << (theRun->GetNGamma(ih1))/nEvt
109  << " in Gap " << (theRun->GetNGamma(ih2))/nEvt << G4endl << " "
110  << " e- in Absorber " << (theRun->GetNElectron(ih1))/nEvt
111  << " in Gap " << (theRun->GetNElectron(ih2))/nEvt << G4endl << " "
112  << " e+ in Absorber " << (theRun->GetNPositron(ih1))/nEvt
113  << " in Gap " << (theRun->GetNPositron(ih2))/nEvt << G4endl;
114  G4cout << " Minimum kinetic energy of generated secondaries :" << G4endl
115  << " " << " gamma in Absorber "
116  << G4BestUnit(theRun->GetEMinGamma(ih1),"Energy")
117  << " in Gap " << G4BestUnit(theRun->GetEMinGamma(ih2),"Energy")
118  << G4endl << " "
119  << " e- in Absorber "
120  << G4BestUnit(theRun->GetEMinElectron(ih1),"Energy")
121  << " in Gap " << G4BestUnit(theRun->GetEMinElectron(ih2),"Energy")
122  << G4endl << " "
123  << " e+ in Absorber "
124  << G4BestUnit(theRun->GetEMinPositron(ih1),"Energy")
125  << " in Gap " << G4BestUnit(theRun->GetEMinPositron(ih2),"Energy")
126  << G4endl;
127  G4cout << " Total track length of e+/e- in an event :" << G4endl
128  << " "
129  << " Absorber " << G4BestUnit((theRun->GetTotalL(ih1))/nEvt,"Length")
130  << " Gap " << G4BestUnit((theRun->GetTotalL(ih2))/nEvt,"Length")
131  << G4endl;
132  G4cout << " Total number of steps of e+/e- in an event :" << G4endl
133  << " "
134  << " Absorber " << (theRun->GetNStep(ih1))/nEvt
135  << " Gap " << (theRun->GetNStep(ih2))/nEvt
136  << G4endl;
137  G4cout
138  << "------------------------------------------------------------"
139  << G4endl;
140  G4cout << "Scores in parallel geometry" << G4endl;
141  G4cout
142  << "layer eDep/evt nGamma/evt nElec/evt nPosi/evt stpLen/evt nStep/evt"
143  << G4endl;
144  for(size_t k=0;k<20;k++)
145  {
146  G4cout << std::setw(8) << k;
147  for(size_t j=0;j<6;j++) {
148  G4cout << " " << std::setw(10) << (theRun->GetParaValue(i,j,k))/nEvt;
149  }
150  G4cout << G4endl;
151  }
152  G4cout
153  << "############################################################"
154  << G4endl;
155  }
156  } else {
157 
158  G4cout << "CPU Time spent by each region" << G4endl;
161  sv->Report();
162 
163  }
164 }
G4ProductionCuts * GetProductionCuts() const
G4double GetNGamma(G4int i) const
Definition: RE06Run.hh:52
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
const G4String & GetName() const
static G4VSteppingVerbose * GetInstance()
G4double GetEMinElectron(G4int i) const
Definition: RE06Run.hh:59
G4double GetNElectron(G4int i) const
Definition: RE06Run.hh:53
G4double GetNPositron(G4int i) const
Definition: RE06Run.hh:54
G4double GetProductionCut(G4int index) const
G4double GetNStep(G4int i) const
Definition: RE06Run.hh:56
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4double GetEMinPositron(G4int i) const
Definition: RE06Run.hh:60
static G4RegionStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
G4int GetNumberOfEvent() const
Definition: G4Run.hh:79
G4bool IsMaster() const
G4double GetParaValue(G4int i, G4int j, G4int k) const
Definition: RE06Run.hh:62
G4double GetTotalL(G4int i) const
Definition: RE06Run.hh:55
G4double GetTotalE(G4int i) const
Definition: RE06Run.hh:51
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double GetEMinGamma(G4int i) const
Definition: RE06Run.hh:58
G4Run * RE06RunAction::GenerateRun ( void  )
virtual

Reimplemented from G4UserRunAction.

Definition at line 57 of file RE06RunAction.cc.

58 { return new RE06Run; }

The documentation for this class was generated from the following files: