ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RE06RunAction.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RE06RunAction.cc
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
28
//
29
//
30
31
#include "
RE06RunAction.hh
"
32
#include "
RE06Run.hh
"
33
34
#include "
G4RegionStore.hh
"
35
#include "
G4Region.hh
"
36
#include "
G4ProductionCuts.hh
"
37
#include "
G4ios.hh
"
38
#include "
G4UnitsTable.hh
"
39
40
#include "
G4VSteppingVerbose.hh
"
41
#include "
RE06SteppingVerbose.hh
"
42
43
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44
45
RE06RunAction::RE06RunAction
()
46
:
G4UserRunAction
()
47
{;}
48
49
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50
51
RE06RunAction::~RE06RunAction
()
52
{;}
53
54
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55
56
G4Run
*
RE06RunAction::GenerateRun
()
57
{
return
new
RE06Run
; }
58
59
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
60
61
void
RE06RunAction::BeginOfRunAction
(
const
G4Run
*)
62
{
63
RE06SteppingVerbose
* sv
64
= (
RE06SteppingVerbose
*)(
G4VSteppingVerbose::GetInstance
());
65
66
sv->
InitializeTimers
();
67
68
}
69
70
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71
72
void
RE06RunAction::EndOfRunAction
(
const
G4Run
* aRun)
73
{
74
static
G4String
regName[3] = {
"Calor-A"
,
"Calor-B"
,
"Calor-C"
};
75
76
const
RE06Run
* theRun = (
const
RE06Run
*)aRun;
77
78
if
(
IsMaster
()) {
79
80
G4cout
81
<<
"############################################################"
<<
G4endl
;
82
G4cout
83
<<
" Run Summary - Number of events : "
<< theRun->
GetNumberOfEvent
()
84
<<
G4endl
;
85
G4cout
86
<<
"############################################################"
<<
G4endl
;
87
88
G4double
nEvt = (
G4double
)(theRun->
GetNumberOfEvent
());
89
for
(
size_t
i=0;i<3;i++)
90
{
91
size_t
ih1 = 2*i;
92
size_t
ih2 = 2*i+1;
93
94
G4Region
* region =
G4RegionStore::GetInstance
()->
GetRegion
(regName[i]);
95
G4ProductionCuts
* cuts = region->
GetProductionCuts
();
96
G4cout
<<
"Region : "
<< region->
GetName
() <<
G4endl
;
97
G4cout
<<
" Production thresholds :"
<< G4endl <<
" "
98
<<
" gamma "
<<
G4BestUnit
(cuts->
GetProductionCut
(
"gamma"
),
"Length"
)
99
<<
" e- "
<<
G4BestUnit
(cuts->
GetProductionCut
(
"e-"
),
"Length"
)
100
<<
" e+ "
<<
G4BestUnit
(cuts->
GetProductionCut
(
"e+"
),
"Length"
)
101
<< G4endl;
102
G4cout
<<
" Energy deposition in an event :"
<< G4endl <<
" "
103
<<
" Absorber "
<<
G4BestUnit
((theRun->
GetTotalE
(ih1))/nEvt,
"Energy"
)
104
<<
" Gap "
<<
G4BestUnit
((theRun->
GetTotalE
(ih2))/nEvt,
"Energy"
)
105
<<
G4endl
;
106
G4cout
<<
" Number of secondaries in an event :"
<< G4endl <<
" "
107
<<
" gamma in Absorber "
<< (theRun->
GetNGamma
(ih1))/nEvt
108
<<
" in Gap "
<< (theRun->
GetNGamma
(ih2))/nEvt << G4endl <<
" "
109
<<
" e- in Absorber "
<< (theRun->
GetNElectron
(ih1))/nEvt
110
<<
" in Gap "
<< (theRun->
GetNElectron
(ih2))/nEvt << G4endl <<
" "
111
<<
" e+ in Absorber "
<< (theRun->
GetNPositron
(ih1))/nEvt
112
<<
" in Gap "
<< (theRun->
GetNPositron
(ih2))/nEvt << G4endl;
113
G4cout
<<
" Minimum kinetic energy of generated secondaries :"
<< G4endl
114
<<
" "
<<
" gamma in Absorber "
115
<<
G4BestUnit
(theRun->
GetEMinGamma
(ih1),
"Energy"
)
116
<<
" in Gap "
<<
G4BestUnit
(theRun->
GetEMinGamma
(ih2),
"Energy"
)
117
<< G4endl <<
" "
118
<<
" e- in Absorber "
119
<<
G4BestUnit
(theRun->
GetEMinElectron
(ih1),
"Energy"
)
120
<<
" in Gap "
<<
G4BestUnit
(theRun->
GetEMinElectron
(ih2),
"Energy"
)
121
<< G4endl <<
" "
122
<<
" e+ in Absorber "
123
<<
G4BestUnit
(theRun->
GetEMinPositron
(ih1),
"Energy"
)
124
<<
" in Gap "
<<
G4BestUnit
(theRun->
GetEMinPositron
(ih2),
"Energy"
)
125
<< G4endl;
126
G4cout
<<
" Total track length of e+/e- in an event :"
<< G4endl
127
<<
" "
128
<<
" Absorber "
<<
G4BestUnit
((theRun->
GetTotalL
(ih1))/nEvt,
"Length"
)
129
<<
" Gap "
<<
G4BestUnit
((theRun->
GetTotalL
(ih2))/nEvt,
"Length"
)
130
<<
G4endl
;
131
G4cout
<<
" Total number of steps of e+/e- in an event :"
<< G4endl
132
<<
" "
133
<<
" Absorber "
<< (theRun->
GetNStep
(ih1))/nEvt
134
<<
" Gap "
<< (theRun->
GetNStep
(ih2))/nEvt
135
<< G4endl;
136
G4cout
137
<<
"------------------------------------------------------------"
138
<<
G4endl
;
139
G4cout
<<
"Scores in parallel geometry"
<<
G4endl
;
140
G4cout
141
<<
"layer eDep/evt nGamma/evt nElec/evt nPosi/evt stpLen/evt nStep/evt"
142
<<
G4endl
;
143
for
(
size_t
k
=0;
k
<20;
k
++)
144
{
145
G4cout
<< std::setw(8) <<
k
;
146
for
(
size_t
j=0;j<6;j++) {
147
G4cout
<<
" "
<< std::setw(10) << (theRun->
GetParaValue
(i,j,k))/nEvt;
148
}
149
G4cout
<<
G4endl
;
150
}
151
G4cout
152
<<
"############################################################"
153
<<
G4endl
;
154
}
155
}
else
{
156
157
G4cout
<<
"CPU Time spent by each region"
<<
G4endl
;
158
RE06SteppingVerbose
* sv
159
= (
RE06SteppingVerbose
*)(
G4VSteppingVerbose::GetInstance
());
160
sv->
Report
();
161
162
}
163
}
164
165
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
examples
extended
runAndEvent
RE06
src
RE06RunAction.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:11
using
1.8.2 with
ECCE GitHub integration