User run class.
More...
#include <Doxymodules_runAndEvent.h>
User run class.
(Description) An example implementation for the multi-functional-detector and primitive scorers. This RE02Run class has collections which accumulate event information into run information.
Definition at line 60 of file Doxymodules_runAndEvent.h.
◆ RE02Run()
RE02Run::RE02Run |
( |
const std::vector< G4String > |
mfdName | ) |
|
Definition at line 69 of file RE02Run.cc.
70{
72
73
74
75
76 G4int nMfd = mfdName.size();
77 for ( G4int idet = 0; idet < nMfd ; idet++){
79
82
83 if ( mfd ){
84
85 for (G4int icol = 0; icol < mfd->GetNumberOfPrimitives(); icol++){
86
88
89
90
91
92 G4String collectionName = scorer->GetName();
93 G4String fullCollectionName = detName+
"/"+collectionName;
94 G4int collectionID = pSDman->GetCollectionID(fullCollectionName);
95
96 if ( collectionID >= 0 ){
97 G4cout << "++ "<<fullCollectionName<< " id " << collectionID
98 << G4endl;
99
100
102 fCollID.push_back(collectionID);
104 }else{
105 G4cout << "** collection " << fullCollectionName << " not found. "
106 << G4endl;
107 }
108 }
109 }
110 }
111}
std::vector< G4String > fCollName
std::vector< G4THitsMap< G4double > * > fRunMap
std::vector< G4int > fCollID
◆ ~RE02Run()
Definition at line 117 of file RE02Run.cc.
118{
119
121 for ( G4int i = 0; i < nMap; i++){
123 }
127}
◆ RecordEvent()
void RE02Run::RecordEvent |
( |
const G4Event * |
aEvent | ) |
|
|
virtual |
Definition at line 134 of file RE02Run.cc.
135{
136 numberOfEvent++;
137
138
139
140
142 if (!pHCE) return;
143
144
145
146
148 for ( G4int i = 0; i < nCol ; i++ ){
152 }else{
153 G4cout <<" Error evtMap Not Found "<< i << G4endl;
154 }
155 if ( evtMap ) {
156
158
159 }
160 }
161}
◆ Merge()
void RE02Run::Merge |
( |
const G4Run * |
aRun | ) |
|
|
virtual |
Definition at line 165 of file RE02Run.cc.
165 {
167
168
169
170
171 G4int nCol = localRun->
fCollID.size();
172 for ( G4int i = 0; i < nCol ; i++ ){
173 if ( localRun->
fCollID[i] >= 0 ){
175 }
176 }
177
178 G4Run::Merge(aRun);
179}
◆ GetNumberOfHitsMap()
G4int RE02Run::GetNumberOfHitsMap |
( |
| ) |
const |
|
inline |
◆ GetHitsMap() [1/3]
G4THitsMap< G4double > * RE02Run::GetHitsMap |
( |
G4int |
i | ) |
|
|
inline |
◆ GetHitsMap() [2/3]
Definition at line 188 of file RE02Run.cc.
189 {
190 G4String fullName = detName+
"/"+colName;
192}
G4THitsMap< G4double > * GetHitsMap(G4int i)
◆ GetHitsMap() [3/3]
Definition at line 200 of file RE02Run.cc.
200 {
202 for ( G4int i = 0; i < nCol; i++){
205 }
206 }
207 return NULL;
208}
◆ DumpAllScorer()
void RE02Run::DumpAllScorer |
( |
| ) |
|
Definition at line 215 of file RE02Run.cc.
215 {
216
217
219
220 for ( G4int i = 0; i < n ; i++ ){
222 if ( runMap ) {
223 G4cout << " PrimitiveScorer RUN "
224 << runMap->GetSDname() <<","<< runMap->GetName() << G4endl;
225 G4cout << " Number of entries " << runMap->entries() << G4endl;
226
227
228
229
230
231
232 }
233 }
234}
G4int GetNumberOfHitsMap() const
◆ fCollName
std::vector<G4String> RE02Run::fCollName |
|
private |
◆ fCollID
std::vector<G4int> RE02Run::fCollID |
|
private |
◆ fRunMap
std::vector<G4THitsMap<G4double>*> RE02Run::fRunMap |
|
private |
The documentation for this class was generated from the following files: