32 #include "DetectorConstruction.hh"
33 #include "PrimaryGeneratorAction.hh"
34 #include "HistoManager.hh"
48 fDetector(det), fParticle(0), fEkin(0.)
74 std::map<G4String,G4int>::iterator it1 =
fProcCounter1.find(procName);
84 std::map<G4String,G4int>::iterator it2 =
fProcCounter2.find(procName);
109 if (Ekin < emin) data.
fEmin = Ekin;
111 if (Ekin > emax) data.
fEmax = Ekin;
126 if (Ekin < emin) data.
fEmin = Ekin;
128 if (Ekin > emax) data.
fEmax = Ekin;
147 const Run* localRun =
static_cast<const Run*
>(run);
163 std::map<G4String,G4int>::const_iterator itp1;
168 G4int localCount = itp1->second;
179 std::map<G4String,G4int>::const_iterator itp2;
184 G4int localCount = itp2->second;
194 std::map<G4String,ParticleData>::const_iterator itc;
199 const ParticleData& localData = itc->second;
202 = ParticleData(localData.fCount,
209 data.fCount += localData.fCount;
210 data.fEmean += localData.fEmean;
212 if (emin < data.fEmin) data.fEmin =
emin;
214 if (emax > data.fEmax) data.fEmax =
emax;
219 std::map<G4String,ParticleData>::const_iterator itn;
224 const ParticleData& localData = itn->second;
227 = ParticleData(localData.fCount,
234 data.fCount += localData.fCount;
235 data.fEmean += localData.fEmean;
237 if (emin < data.fEmin) data.fEmin =
emin;
239 if (emax > data.fEmax) data.fEmax =
emax;
259 G4cout <<
"\n Target : Length = "
265 G4cout <<
"\n Detector : Length = "
279 if (rmsEdep>0.) rmsEdep = std::sqrt(rmsEdep);
282 G4cout <<
"\n Mean energy deposit in target, in time window = "
283 <<
G4BestUnit(fEdepTarget,
"Energy") <<
"; rms = "
291 if (rmsEdep>0.) rmsEdep = std::sqrt(rmsEdep);
294 G4cout <<
" Mean energy deposit in detector, in time window = "
295 <<
G4BestUnit(fEdepDetect,
"Energy") <<
"; rms = "
301 G4cout <<
"\n Process calls frequency in target :" <<
G4endl;
303 std::map<G4String,G4int>::iterator it1;
306 G4int count = it1->second;
307 G4String space =
" ";
if (++index%3 == 0) space =
"\n";
308 G4cout <<
" " << std::setw(20) << procName <<
"="<< std::setw(7) << count
315 G4cout <<
"\n Process calls frequency in detector:" <<
G4endl;
317 std::map<G4String,G4int>::iterator it2;
320 G4int count = it2->second;
321 G4String space =
" ";
if (++index%3 == 0) space =
"\n";
322 G4cout <<
" " << std::setw(20) << procName <<
"="<< std::setw(7) << count
329 G4cout <<
"\n List of generated particles in target:" <<
G4endl;
331 std::map<G4String,ParticleData>::iterator itc;
334 ParticleData data = itc->second;
335 G4int count = data.fCount;
340 G4cout <<
" " << std::setw(13) << name <<
": " << std::setw(7) << count
341 <<
" Emean = " << std::setw(wid) <<
G4BestUnit(eMean,
"Energy")
349 G4cout <<
"\n List of generated particles in detector:" <<
G4endl;
351 std::map<G4String,ParticleData>::iterator itn;
354 ParticleData data = itn->second;
355 G4int count = data.fCount;
360 G4cout <<
" " << std::setw(13) << name <<
": " << std::setw(7) << count
361 <<
" Emean = " << std::setw(wid) <<
G4BestUnit(eMean,
"Energy")
387 pTable->
FindProcess(
"Radioactivation",
"GenericIon");
394 std::ofstream outfile (fileName, std::ios::out );
396 std::vector<G4RadioactivityTable*> theTables =
399 for (
size_t i = 0 ; i < theTables.size(); i++) {
401 outfile <<
"Radioactivities in decay window no. " << i <<
G4endl;
402 outfile <<
"Z \tA \tE \tActivity (decays/window) \tError (decays/window) "
405 map<G4ThreeVector,G4TwoVector> *aMap = theTables[i]->GetTheMap();
406 map<G4ThreeVector,G4TwoVector>::iterator iter;
407 for (iter=aMap->begin(); iter != aMap->end(); iter++) {
408 rate = iter->second.x()/
nevent;
409 error = std::sqrt(iter->second.y())/nevent;
410 if (rate < 0.) rate = 0.;
411 outfile << iter->first.x() <<
"\t"<< iter->first.y() <<
"\t"
412 << iter->first.z() <<
"\t" << rate <<
"\t" << error <<
G4endl;