205 assert(NbOfEvents*kinEnergy > 0);
207 fChargedStep /=
G4double(NbOfEvents);
208 fNeutralStep /=
G4double(NbOfEvents);
211 G4double norme = 100./(NbOfEvents*(kinEnergy+mass));
217 MyVector MeanELongit(f_nLbin), rmsELongit(f_nLbin);
218 MyVector MeanELongitCumul(f_nLbin), rmsELongitCumul(f_nLbin);
223 for (i=0; i<f_nLbin; i++) {
224 MeanELongit[i] = norme*fSumELongit[i];
226 norme*std::sqrt(std::abs(NbOfEvents*fSumE2Longit[i]
227 - fSumELongit[i]*fSumELongit[i]));
229 MeanELongitCumul[i] = norme*fSumELongitCumul[i];
230 rmsELongitCumul[i] = norme*std::sqrt(std::abs(NbOfEvents*
231 fSumE2LongitCumul[i] - fSumELongitCumul[i]*fSumELongitCumul[i]));
233 analysisManager->FillH1(4, bin,MeanELongit[i]/dLradl);
234 analysisManager->FillH1(5, bin, rmsELongit[i]/dLradl);
236 analysisManager->FillH1(6, bin,MeanELongitCumul[i]);
237 analysisManager->FillH1(7, bin, rmsELongitCumul[i]);
244 MyVector MeanERadial(f_nRbin), rmsERadial(f_nRbin);
245 MyVector MeanERadialCumul(f_nRbin), rmsERadialCumul(f_nRbin);
247 for (i=0; i<f_nRbin; i++) {
248 MeanERadial[i] = norme*fSumERadial[i];
249 rmsERadial[i] = norme*std::sqrt(std::abs(NbOfEvents*fSumE2Radial[i]
250 - fSumERadial[i]*fSumERadial[i]));
252 MeanERadialCumul[i] = norme*fSumERadialCumul[i];
254 norme*std::sqrt(std::abs(NbOfEvents*fSumE2RadialCumul[i]
255 - fSumERadialCumul[i]*fSumERadialCumul[i]));
258 analysisManager->FillH1(8, bin,MeanERadial[i]/dRradl);
259 analysisManager->FillH1(9, bin, rmsERadial[i]/dRradl);
261 analysisManager->FillH1(10, bin,MeanERadialCumul[i]);
262 analysisManager->FillH1(11, bin, rmsERadialCumul[i]);
269 if ((MeanERadialCumul[0] <= EMoliere) &&
270 (MeanERadialCumul[f_nRbin-1] >= EMoliere)) {
272 while( (imin < f_nRbin-1) && (MeanERadialCumul[imin] < EMoliere) )
274 G4double ratio = (EMoliere - MeanERadialCumul[imin]) /
275 (MeanERadialCumul[imin+1] - MeanERadialCumul[imin]);
276 iMoliere = 1. + imin + ratio;
282 G4double MeanChargTrLength = norme*fSumChargTrLength;
284 norme*std::sqrt(std::fabs(NbOfEvents*fSum2ChargTrLength
285 - fSumChargTrLength*fSumChargTrLength));
287 G4double MeanNeutrTrLength = norme*fSumNeutrTrLength;
289 norme*std::sqrt(std::fabs(NbOfEvents*fSum2NeutrTrLength
290 - fSumNeutrTrLength*fSumNeutrTrLength));
293 std::ios::fmtflags mode =
G4cout.flags();
294 G4cout.setf(std::ios::fixed,std::ios::floatfield);
299 G4cout <<
" LOGITUDINAL PROFILE "
300 <<
" CUMULATIVE LOGITUDINAL PROFILE" <<
G4endl <<
G4endl;
302 G4cout <<
" bin " <<
" Mean rms "
303 <<
" bin " <<
" Mean rms \n" <<
G4endl;
305 for (i=0; i<f_nLbin; i++) {
306 G4double inf=i*dLradl, sup=inf+dLradl;
308 G4cout << std::setw(8) << inf <<
"->"
309 << std::setw(5) << sup <<
" radl: "
310 << std::setw(7) << MeanELongit[i] <<
"% "
311 << std::setw(9) << rmsELongit[i] <<
"% "
312 <<
" 0->" << std::setw(5) << sup <<
" radl: "
313 << std::setw(7) << MeanELongitCumul[i] <<
"% "
314 << std::setw(7) << rmsELongitCumul[i] <<
"% "
320 G4cout <<
" RADIAL PROFILE "
321 <<
" CUMULATIVE RADIAL PROFILE" << G4endl <<
G4endl;
323 G4cout <<
" bin " <<
" Mean rms "
324 <<
" bin " <<
" Mean rms \n" <<
G4endl;
326 for (i=0; i<f_nRbin; i++) {
327 G4double inf=i*dRradl, sup=inf+dRradl;
329 G4cout << std::setw(8) << inf <<
"->"
330 << std::setw(5) << sup <<
" radl: "
331 << std::setw(7) << MeanERadial[i] <<
"% "
332 << std::setw(9) << rmsERadial[i] <<
"% "
333 <<
" 0->" << std::setw(5) << sup <<
" radl: "
334 << std::setw(7) << MeanERadialCumul[i] <<
"% "
335 << std::setw(7) << rmsERadialCumul[i] <<
"% "
342 G4cout <<
" Total number of events: " << NbOfEvents <<
"\n"
343 <<
" Mean number of charged steps: " << fChargedStep <<
G4endl;
344 G4cout <<
" Mean number of neutral steps: " << fNeutralStep
347 G4cout <<
" energy deposit : "
348 << std::setw(7) << MeanELongitCumul[f_nLbin-1] <<
" % E0 +- "
349 << std::setw(7) << rmsELongitCumul[f_nLbin-1] <<
" % E0" <<
G4endl;
350 G4cout <<
" charged traklen: "
351 << std::setw(7) << MeanChargTrLength <<
" radl +- "
352 << std::setw(7) << rmsChargTrLength <<
" radl" <<
G4endl;
353 G4cout <<
" neutral traklen: "
354 << std::setw(7) << MeanNeutrTrLength <<
" radl +- "
355 << std::setw(7) << rmsNeutrTrLength <<
" radl" <<
G4endl;
357 if (iMoliere > 0. ) {
360 G4cout <<
"\n " << EMoliere <<
" % confinement: radius = "
361 << RMoliere1 <<
" radl ("
365 G4cout.setf(mode,std::ios::floatfield);
374 G4double e = MeanELongitCumul[nLbin-1]/100.;
375 G4double r = rmsELongitCumul[nLbin-1]/100.;
void EmAcceptanceGauss(const G4String &title, G4int stat, G4double avr, G4double avr0, G4double rms, G4double limit)
void BeginOfAcceptance(const G4String &title, G4int stat)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
G4int GetNumberOfEvent() const
G4Material * GetMaterial()
std::vector< G4double > MyVector
G4double GetRadlen() const
G4double GetPDGMass() const
G4ParticleGun * GetParticleGun()
G4ParticleDefinition * GetParticleDefinition() const
G4CsvAnalysisManager G4AnalysisManager
G4double GetParticleEnergy() const