33 #include "RunAction.hh"
35 #include "DetectorConstruction.hh"
36 #include "PrimaryGeneratorAction.hh"
56 fGamma(0), fElectron(0), fPositron(0),
57 fDetector(det), fPrimary(prim), fProcCounter(0), fAnalysisManager(0),
59 fPhotonStats(), fElectronStats(), fPositronStats()
131 const G4String id[] = {
"h1",
"h2",
"h3",
"h4",
"h5",
132 "h6",
"h7",
"h8",
"h9",
"h10",
"h11",
"h12"};
134 {
"Gamma Energy distribution",
135 "Gamma Cos(Theta) distribution",
136 "Gamma Phi angular distribution",
137 "Gamma longitudinal Polarization",
138 "Electron Energy distribution",
139 "Electron Cos(Theta) distribution",
140 "Electron Phi angular distribution",
141 "Electron longitudinal Polarization",
142 "Positron Energy distribution",
143 "Positron Cos(Theta) distribution",
144 "Positron Phi angular distribution",
145 "Positron longitudinal Polarization"
149 for(
int i=0; i<12; ++i) {
151 if(0==j) { vmin = 0.; vmax = 12.*
MeV; }
152 else if(1==j) { vmin = -1.; vmax = 1.; }
153 else if(2==j) { vmin = 0.; vmax =
pi; }
154 else { vmin = -1.5; vmax = 1.5; }
166 for(
int i=0; i<12; ++i) {
184 while ((i<nbProc)&&((*
fProcCounter)[i]->GetName()!=procName)) i++;
187 (*fProcCounter)[i]->Count();
195 if (NbOfEvents == 0)
return;
206 G4cout <<
"\n The run consists of " << NbOfEvents <<
" "<< Particle <<
" of "
209 << material->
GetName() <<
" (density: "
213 G4cout <<
"\n Process calls frequency --->\n";
215 G4String procName = (*fProcCounter)[i]->GetName();
216 G4int count = (*fProcCounter)[i]->GetCounter();
217 G4cout <<
"\t" << procName <<
" = " << count<<
"\n";
257 fTotalNumber(0), fTotalNumber2(0),
258 fSumEnergy(0), fSumEnergy2(0),
259 fSumPolarization(0), fSumPolarization2(0),
260 fSumCosTheta(0), fSumCosTheta2(0)
272 fTotalNumber+=fCurrentNumber;
273 fTotalNumber2+=fCurrentNumber*fCurrentNumber;
283 fSumEnergy+=kinEnergy;
284 fSumEnergy2+=kinEnergy*kinEnergy;
285 fSumPolarization+=longitudinalPolarization;
286 fSumPolarization2+=longitudinalPolarization*longitudinalPolarization;
287 fSumCosTheta+=costheta;
288 fSumCosTheta2+=costheta*costheta;
295 G4cout<<
"Mean Number per Event :"
297 if (fTotalNumber==0) fTotalNumber=1;
298 G4double energyMean=fSumEnergy/fTotalNumber;
299 G4double energyRms=std::sqrt(fSumEnergy2/fTotalNumber-energyMean*energyMean);
301 <<
" +- "<<
G4BestUnit(energyRms,
"Energy")<<
"\n";
302 G4double polarizationMean=fSumPolarization/fTotalNumber;
304 std::sqrt(fSumPolarization2/fTotalNumber-polarizationMean*polarizationMean);
305 G4cout<<
"Mean Polarization :"<< polarizationMean
306 <<
" +- "<<polarizationRms<<
"\n";
314 fTotalNumber=fTotalNumber2=0;
315 fSumEnergy=fSumEnergy2=0;
316 fSumPolarization=fSumPolarization2=0;
317 fSumCosTheta=fSumCosTheta2=0;