54 std::map<G4int, G4THitsMap<G4double>* >::iterator iter =
fMap.begin();
56 while (iter !=
fMap.end()) {
69 if (!eventHitCollection)
return;
72 std::map< G4int, G4THitsMap<G4double>* >::iterator iter =
fMap.begin();
74 while (iter !=
fMap.end()) {
75 G4int id = iter->first;
82 assert (0 != eventHitsMap);
85 *(iter->second) += *eventHitsMap;
98 std::vector<G4String> title;
99 title.push_back(
"Radius");
102 std::map< G4int, std::vector<G4double> > output;
104 G4int nThetaBins = 233;
112 for (i=0; i<nThetaBins; i++) {
113 for (j=0; j<nEnergyBins; j++) {
114 output[i].push_back(0);
121 std::map< G4int, G4THitsMap<G4double>* >::const_iterator iter =
fMap.begin();
123 while (iter !=
fMap.end()) {
126 title.push_back(hitMap->
GetName());
128 std::map<G4int,G4double*>* myMap = hitMap->
GetMap();
130 for (j=0; j<nThetaBins; j++) {
132 if (0 != current) output[j][i] = (*current);
139 Print(title, output, outputFileSpec);
145 const std::map<
G4int, std::vector<G4double> >&myMap,
149 std::ofstream outFile(outputFileSpec);
152 std::vector<G4String>::const_iterator titleIter = title.begin();
154 while (titleIter != title.end()) {
155 G4cout << std::setw(8)<<*titleIter<<
" ";
162 std::map< G4int, std::vector<G4double> >::const_iterator iter = myMap.begin();
164 while (iter != myMap.end()) {
165 G4cout << std::setw(8)<<std::setprecision(3)<< iter->first<<
" ";
167 std::vector<G4double>::const_iterator energyBinIter = iter->second.begin();
176 G4int ringNum = iter->first;
177 G4double areaCorrection = 233.*233. /
178 ( (ringNum+1)*(ringNum+1) - ringNum*ringNum );
181 while (energyBinIter != iter->second.end()) {
183 if (counter < 2) value = value*areaCorrection;
184 G4cout << std::setw(10)<<std::setprecision(5)<< value*
mm*
mm<<
" ";
185 outFile << value*mm*
mm;
186 if (counter < 3) outFile <<
",";
203 const std::map< G4int, G4THitsMap<G4double>* >& localMap = localRun->
fMap;
204 std::map< G4int, G4THitsMap<G4double>* >::const_iterator iter = localMap.begin();
205 for ( ; iter != localMap.end() ; ++iter)
206 (*(
fMap[iter->first])) += (*(iter->second));
Definition of the ElectronRun class.
virtual void Merge(const G4Run *)
G4VHitsCollection * GetHC(G4int i)
void Print(const std::vector< G4String > &title, const std::map< G4int, std::vector< G4double > > &out, G4String &) const
G4GLOB_DLL std::ostream G4cout
virtual void RecordEvent(const G4Event *)
std::map< G4int, G4THitsMap< G4double > * > fMap
std::map< G4int, T * > * GetMap() const
void DumpData(G4String &) const
G4HCofThisEvent * GetHCofThisEvent() const
virtual void RecordEvent(const G4Event *)
virtual void Merge(const G4Run *)