47 assert (0 != detector);
74 std::map<G4int, G4THitsMap<G4double>* >::iterator iter = fMap.begin();
76 while (iter != fMap.end()) {
89 if (!eventHitCollection)
return;
92 std::map< G4int, G4THitsMap<G4double>* >::iterator iter = fMap.begin();
94 while (iter != fMap.end()) {
95 G4int id = iter->first;
102 assert (0 != eventHitsMap);
105 *(iter->second) += *eventHitsMap;
114 std::vector<G4String>
title;
115 title.push_back(
"Radius");
118 std::map< G4int, std::vector<G4double> > output;
120 G4int nThetaBins = 233;
123 G4int nEnergyBins = fMap.size();
128 for (i=0; i<nThetaBins; i++) {
129 for (j=0; j<nEnergyBins; j++) {
130 output[i].push_back(0);
137 std::map< G4int, G4THitsMap<G4double>* >::const_iterator iter = fMap.begin();
139 while (iter != fMap.end()) {
142 title.push_back(hitMap->
GetName());
144 std::map<G4int,G4double*>* myMap = hitMap->
GetMap();
146 for (j=0; j<nThetaBins; j++) {
148 if (0 != current) output[j][i] = (*current);
155 Print(title, output, outputFileSpec);
158 void ElectronRun::Print(
const std::vector<G4String>&
title,
159 const std::map<
G4int, std::vector<G4double> >&myMap,
163 std::ofstream
outFile(outputFileSpec);
166 std::vector<G4String>::const_iterator titleIter = title.begin();
168 while (titleIter != title.end()) {
169 G4cout << std::setw(8)<<*titleIter<<
" ";
176 std::map< G4int, std::vector<G4double> >::const_iterator iter = myMap.begin();
178 while (iter != myMap.end()) {
179 G4cout << std::setw(8)<<std::setprecision(3)<< iter->first<<
" ";
181 std::vector<G4double>::const_iterator energyBinIter = iter->second.begin();
188 G4int ringNum = iter->first;
189 G4double areaCorrection = 233.*233. / ( (ringNum+1)*(ringNum+1) - ringNum*ringNum );
192 while (energyBinIter != iter->second.end()) {
194 if (counter < 2) value = value*areaCorrection;
195 G4cout << std::setw(10)<<std::setprecision(5)<< value*
mm*
mm<<
" ";
197 if (counter < 3)
outFile <<
",";