Geant4  10.00.p02
Em10RunAction.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 //
30 // $Id: Em10RunAction.cc 67268 2013-02-13 11:38:40Z ihrivnac $
31 //
32 //
33 
34 
35 #include "Em10RunAction.hh"
36 #include "Em10RunMessenger.hh"
37 
38 #include "G4Run.hh"
39 #include "G4UImanager.hh"
40 #include "G4VVisManager.hh"
41 #include "G4ios.hh"
42 #include <iomanip>
43 
44 #include "G4PhysicalConstants.hh"
45 #include "G4SystemOfUnits.hh"
46 #include "Randomize.hh"
47 
49 
51  :G4UserRunAction(),
52  histName("histfile"),nbinStep(0),nbinEn(0),nbinTt(0),nbinTb(0),
53  nbinTsec(0),nbinTh(0),nbinThback(0),nbinR(0),nbinGamma(0),
54  nbinvertexz(0)
55 {
56  runMessenger = new Em10RunMessenger(this);
57  saveRndm = 1;
58 
68  oververtexz=0.;
69 }
70 
72 
74 {
75  delete runMessenger;
76 }
77 
79 
81 {
82 }
83 
85 
87 {
88  G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
89 
90  // save Rndm status
91  if (saveRndm > 0)
92  {
93  CLHEP::HepRandom::showEngineStatus();
94  CLHEP::HepRandom::saveEngineStatus("beginOfRun.rndm");
95  }
97 
99 
100  if(pVVisManager) UI->ApplyCommand("/vis/scene/notifyHandlers");
101 
102 
103  EnergySumAbs = 0. ;
104  EnergySquareSumAbs = 0.;
105  tlSumAbs = 0. ;
106  tlsquareSumAbs = 0. ;
107  nStepSumCharged = 0. ;
108  nStepSum2Charged= 0. ;
109  nStepSumNeutral = 0. ;
110  nStepSum2Neutral= 0. ;
111  TotNbofEvents = 0. ;
112  SumCharged=0.;
113  SumNeutral=0.;
114  Sum2Charged=0.;
115  Sum2Neutral=0.;
116  Selectron=0.;
117  Spositron=0.;
118 
119  Transmitted=0.;
120  Reflected =0.;
121 
122  // plot definitions
123 
124  if(nbinStep>0)
125  {
127  entryStep=0.;
128  underStep=0.;
129  overStep=0.;
130  for(G4int ist=0; ist<200; ist++)
131  {
132  distStep[ist]=0.;
133  }
134  }
135  if(nbinEn>0)
136  {
137  dEn = (Enhigh-Enlow)/nbinEn ;
138  entryEn=0.;
139  underEn=0.;
140  overEn=0.;
141 
142  for (G4int ien=0; ien<200; ien++) distEn[ien]=0.;
143  }
144  if(nbinTt>0)
145  {
146  dTt = (Tthigh-Ttlow)/nbinTt ;
147  entryTt=0.;
148  underTt=0.;
149  overTt=0.;
150 
151  for (G4int itt=0; itt<200; itt++) distTt[itt]=0.;
152 
153  Ttmean=0.;
154  Tt2mean=0.;
155  }
156  if(nbinTb>0)
157  {
158  dTb = (Tbhigh-Tblow)/nbinTb ;
159  entryTb=0.;
160  underTb=0.;
161  overTb=0.;
162  for (G4int itt=0; itt<200; itt++)
163  {
164  distTb[itt]=0.;
165  }
166  Tbmean=0.;
167  Tb2mean=0.;
168  }
169  if(nbinTsec>0)
170  {
172  entryTsec=0.;
173  underTsec=0.;
174  overTsec=0.;
175  for (G4int its=0; its<200; its++)
176  {
177  distTsec[its]=0.;
178  }
179  }
180  if(nbinTh>0)
181  {
182  dTh = (Thhigh-Thlow)/nbinTh ;
183  entryTh=0.;
184  underTh=0.;
185  overTh=0.;
186  for (G4int ith=0; ith<200; ith++)
187  {
188  distTh[ith]=0.;
189  }
190  }
191 
192  if(nbinThback>0)
193  {
195  entryThback=0.;
196  underThback=0.;
197  overThback=0.;
198  for (G4int ithback=0; ithback<200; ithback++)
199  {
200  distThback[ithback]=0.;
201  }
202  }
203 
204 
205  if(nbinR >0)
206  {
207  dR = (Rhigh-Rlow)/nbinR ;
208  entryR =0.;
209  underR =0.;
210  overR =0.;
211  for (G4int ir =0; ir<200; ir++)
212  {
213  distR[ir]=0.;
214  }
215  Rmean=0.;
216  R2mean=0.;
217  }
218 
219  if(nbinGamma>0)
220  {
221  dEGamma = std::log(EhighGamma/ElowGamma)/nbinGamma ;
222  entryGamma = 0.;
223  underGamma=0.;
224  overGamma=0.;
225  for (G4int ig=0; ig<200; ig++)
226  {
227  distGamma[ig]=0.;
228  }
229  }
230  if(nbinvertexz>0)
231  {
233  entryvertexz=0.;
234  undervertexz=0.;
235  oververtexz=0.;
236  for(G4int iz=0; iz<200; iz++)
237  {
238  distvertexz[iz]=0.;
239  }
240  }
241 
242  bookHisto();
243 }
244 
246 
248 {
249  G4double sAbs,sigAbs,sigstep,sigcharged,signeutral;
250  if(0.0 >= TotNbofEvents) { return; }
251 
254  if(sAbs>0.)
255  sAbs = std::sqrt(sAbs/TotNbofEvents) ;
256  else
257  sAbs = 0. ;
258 
261  if(sigAbs>0.)
262  sigAbs = std::sqrt(sigAbs/TotNbofEvents);
263  else
264  sigAbs = 0.;
265 
268  if(sigstep>0.)
269  sigstep = std::sqrt(sigstep/TotNbofEvents);
270  else
271  sigstep = 0.;
272  G4double sigch=sigstep ;
273 
276  if(sigstep>0.)
277  sigstep = std::sqrt(sigstep/TotNbofEvents);
278  else
279  sigstep = 0.;
280  G4double signe=sigstep ;
281 
284  if(sigcharged>0.)
285  sigcharged = std::sqrt(sigcharged/TotNbofEvents);
286  else
287  sigcharged = 0. ;
288 
291  if(signeutral>0.)
292  signeutral = std::sqrt(signeutral/TotNbofEvents);
293  else
294  signeutral = 0. ;
295 
298 
301  G4cout << " ================== run summary =====================" << G4endl;
302  G4int prec = G4cout.precision(6);
303  G4cout << " end of Run TotNbofEvents = " <<
304  TotNbofEvents << G4endl ;
305  G4cout << " mean charged track length in absorber=" <<
306  tlSumAbs/mm << " +- " << sAbs/mm <<
307  " mm " << G4endl;
308  G4cout << G4endl;
309  G4cout << " mean energy deposit in absorber=" <<
310  EnergySumAbs/MeV << " +- " << sigAbs/MeV <<
311  " MeV " << G4endl ;
312  G4cout << G4endl ;
313  G4cout << " mean number of steps in absorber (charged) =" <<
314  nStepSumCharged << " +- " << sigch <<
315  " " << G4endl ;
316  G4cout << " mean number of steps in absorber (neutral) =" <<
317  nStepSumNeutral << " +- " << signe <<
318  " " << G4endl ;
319  G4cout << G4endl ;
320  G4cout << " mean number of charged secondaries = " <<
321  SumCharged << " +- " << sigcharged << G4endl;
322  G4cout << G4endl ;
323  G4cout << " mean number of neutral secondaries = " <<
324  SumNeutral << " +- " << signeutral << G4endl;
325  G4cout << G4endl ;
326 
327  G4cout << " mean number of e-s =" << Selectron <<
328  " and e+s =" << Spositron << G4endl;
329  G4cout << G4endl;
330 
331  G4cout << "(number) transmission coeff=" << Transmitted <<
332  " reflection coeff=" << Reflected << G4endl;
333  G4cout << G4endl;
334 
335  if(nbinStep>0)
336  {G4double E , dnorm, norm ;
337  G4cout << " step number/event distribution " << G4endl ;
338  G4cout << "#entries=" << entryStep << " #underflows=" << underStep <<
339  " #overflows=" << overStep << G4endl ;
340  if( entryStep>0.)
341  {
342  E = Steplow - dStep ;
343  norm = TotNbofEvents ;
344  G4cout << " bin nb nsteplow entries normalized " << G4endl ;
345  for(G4int iss=0; iss<nbinStep; iss++)
346  {
347  E += dStep ;
348  dnorm = distStep[iss]/norm;
349  G4cout << std::setw(5) << iss << std::setw(10) << E <<
350  std::setw(12) << distStep[iss] <<
351  std::setw(12) << dnorm << G4endl ;
352  }
353  G4cout << G4endl;
354  }
355  }
356  if(nbinEn > 0)
357  {
358  std::ofstream fileOut("distribution.out", std::ios::out ) ;
359  fileOut.setf( std::ios::scientific, std::ios::floatfield );
360 
361  std::ofstream normOut("normDist.out", std::ios::out ) ;
362  normOut.setf( std::ios::scientific, std::ios::floatfield );
363 
364  G4double E , dnorm, norm,fmax,Emp ;
365  Emp=-999.999 ;
366  G4cout << " energy deposit distribution " << G4endl ;
367  G4cout << "#entries=" << entryEn << " #underflows=" << underEn <<
368  " #overflows=" << overEn << G4endl ;
369  if( entryEn>0.)
370  {
371  E = Enlow - dEn ;
372  norm = TotNbofEvents*1.0 ; // *dEn ;
373  G4cout << " bin nb Elow entries normalized " << G4endl ;
374  fmax = 0. ;
375 
376  for(G4int ien=0; ien<nbinEn; ien++)
377  {
378  E += dEn ;
379 
380  if(distEn[ien]>fmax)
381  {
382  fmax = distEn[ien] ;
383  Emp = E ; // most probable roughly
384  }
385  dnorm = distEn[ien]/norm;
386 
387  G4cout << std::setw(5) << ien << std::setw(10) << E/keV <<
388  std::setw(12) << distEn[ien] <<
389  std::setw(12) << dnorm << G4endl ;
390 
391  fileOut << E/keV << "\t"<< distEn[ien] << G4endl ;
392  normOut << E/keV << "\t"<< dnorm << G4endl ;
393  }
394  G4cout << G4endl;
395  G4int ii ;
396  G4double E1,E2 ;
397  E1=-1.e6 ;
398  E2=+1.e6 ;
399  E = Enlow -dEn ;
400  ii = -1;
401 
402  for(G4int i1=0; i1<nbinEn; i1++)
403  {
404  E += dEn ;
405  if(ii<0)
406  {
407  if(distEn[i1] >= 0.5*fmax)
408  {
409  E1=E ;
410  ii=i1 ;
411  }
412  }
413  }
414  E = Enlow -dEn ;
415 
416  for(G4int i2=0; i2<nbinEn; i2++)
417  {
418  E += dEn ;
419 
420  if(distEn[i2] >= 0.5*fmax) E2=E ;
421  }
422  G4cout << " Emp = " << std::setw(15) << Emp/MeV << " width="
423  << std::setw(15) << (E2-E1)/MeV << " MeV " << G4endl;
424  G4cout << G4endl ;
425  }
426  }
427  if(nbinTt>0)
428  {
429  G4double E , dnorm, norm ,sig;
430  G4cout << " transmitted energy distribution " << G4endl ;
431  G4cout << "#entries=" << entryTt << " #underflows=" << underTt <<
432  " #overflows=" << overTt << G4endl ;
433  if( entryTt>0.)
434  {
435  Ttmean /= entryTt;
437  if(sig<=0.)
438  sig=0.;
439  else
440  sig=std::sqrt(sig/entryTt) ;
441  G4cout << " mean energy of transmitted particles=" << Ttmean/keV <<
442  " +- " << sig/keV << " keV." << G4endl;
443  E = Ttlow - dTt ;
444  norm = TotNbofEvents*dTt ;
445  G4cout << " bin nb Elow entries normalized " << G4endl ;
446  for(G4int itt=0; itt<nbinTt; itt++)
447  {
448  E += dTt ;
449  dnorm = distTt[itt]/norm;
450  G4cout << std::setw(5) << itt << std::setw(10) << E <<
451  std::setw(12) << distTt[itt] <<
452  std::setw(12) << dnorm << G4endl ;
453  }
454  G4cout << G4endl;
455  }
456  }
457  if(nbinTb>0)
458  {
459  G4double E , dnorm, norm ,sig;
460  G4cout << " backscattered energy distribution " << G4endl ;
461  G4cout << "#entries=" << entryTb << " #underflows=" << underTb <<
462  " #overflows=" << overTb << G4endl ;
463  if( entryTb>0.)
464  {
465  Tbmean /= entryTb;
467  if(sig<=0.)
468  sig=0.;
469  else
470  sig=std::sqrt(sig/entryTb) ;
471  G4cout << " mean energy of backscattered particles=" << Tbmean/keV <<
472  " +- " << sig/keV << " keV." << G4endl;
473  E = Tblow - dTb ;
474  norm = TotNbofEvents*dTb ;
475  G4cout << " bin nb Elow entries normalized " << G4endl ;
476  for(G4int itt=0; itt<nbinTb; itt++)
477  {
478  E += dTb ;
479  dnorm = distTb[itt]/norm;
480  G4cout << std::setw(5) << itt << std::setw(10) << E <<
481  std::setw(12) << distTb[itt] <<
482  std::setw(12) << dnorm << G4endl ;
483  }
484  G4cout << G4endl;
485  }
486  }
487  if(nbinTsec>0)
488  {G4double E , dnorm, norm ;
489  G4cout << " energy distribution of charged secondaries " << G4endl ;
490  G4cout << "#entries=" << entryTsec << " #underflows=" << underTsec <<
491  " #overflows=" << overTsec << G4endl ;
492  if( entryTsec>0.)
493  {
494  E = Tseclow - dTsec ;
495  norm = TotNbofEvents*dTsec ;
496  G4cout << " bin nb Elow entries normalized " << G4endl ;
497  for(G4int itt=0; itt<nbinTsec; itt++)
498  {
499  E += dTsec ;
500  dnorm = distTsec[itt]/norm;
501  G4cout << std::setw(5) << itt << std::setw(10) << E <<
502  std::setw(12) << distTsec[itt] <<
503  std::setw(12) << dnorm << G4endl ;
504  }
505  G4cout << G4endl;
506  }
507  }
508 
509  if(nbinR >0)
510  {G4double R , dnorm, norm,sig ;
511  G4cout << " R distribution " << G4endl ;
512  G4cout << "#entries=" << entryR << " #underflows=" << underR <<
513  " #overflows=" << overR << G4endl ;
514  if( entryR >0.)
515  {
516  Rmean /= entryR;
517  sig = R2mean/entryR - Rmean*Rmean;
518  if(sig<=0.) sig=0. ;
519  else sig = std::sqrt(sig/entryR) ;
520  G4cout << " mean lateral displacement at exit=" << Rmean/mm << " +- "
521  << sig/mm << " mm." << G4endl ;
522  R = Rlow - dR ;
523  norm = TotNbofEvents*dR ;
524  G4cout << " bin nb Rlow entries normalized " << G4endl ;
525  for(G4int ier=0; ier<nbinR ; ier++)
526  {
527  R+= dR ;
528  dnorm = distR[ier]/norm;
529  G4cout << std::setw(5) << ier << std::setw(10) << R <<
530  std::setw(12) << distR[ier] <<
531  std::setw(12) << dnorm << G4endl ;
532  }
533  G4cout << G4endl;
534  }
535  }
536 
537  if(nbinTh>0)
538  {G4double Th,Thdeg, dnorm, norm,fac0,fnorm,pere,Thpere,Thmean,sum;
539  G4cout << " angle distribution " << G4endl ;
540  G4cout << "#entries=" << entryTh << " #underflows=" << underTh <<
541  " #overflows=" << overTh << G4endl ;
542  if( entryTh>0.)
543  {
544  Th= Thlow - dTh ;
545  norm = TotNbofEvents ;
546  if(distTh[0] == 0.)
547  fac0 = 1. ;
548  else
549  fac0 = 1./distTh[0] ;
550  pere = 1./std::exp(1.) ;
551 
552  G4cout << " bin nb Thlowdeg Thlowrad " <<
553  " entries normalized " << G4endl ;
554  Thpere = 0. ;
555  sum = 0. ;
556  Thmean = 0. ;
557  for(G4int ien=0; ien<nbinTh; ien++)
558  {
559  Th+= dTh ;
560  Thdeg = Th*180./pi ;
561  sum += distTh[ien] ;
562  Thmean += distTh[ien]*(Th+0.5*dTh) ;
563  dnorm = distTh[ien]/norm;
564  fnorm = fac0*distTh[ien] ;
565  if( fnorm > pere)
566  Thpere = Th ;
567  G4cout << std::setw(5) << ien << std::setw(10) << Thdeg << " " <<
568  std::setw(10) << Th << " " <<
569  std::setw(12) << distTh[ien] << " " <<
570  std::setw(12) << dnorm << " " << std::setw(12) << fnorm <<G4endl ;
571  }
572  Thmean /= sum ;
573  G4cout << G4endl;
574  G4cout << " mean = " << Thmean << " rad or " << 180.*Thmean/pi <<
575  " deg." << G4endl;
576  G4cout << " theta(1/e)=" << Thpere << " - " << Thpere+dTh << " rad "
577  << " or " << 180.*Thpere/pi << " - " << 180.*(Thpere+dTh)/pi
578  << " deg." << G4endl;
579  G4cout << G4endl;
580  }
581  }
582 
583  if(nbinThback>0)
584  {G4double Thb,Thdegb, dnormb, normb,fac0b,fnormb,pereb,Thpereb,Thmeanb,sumb;
585  G4cout << " backscattering angle distribution " << G4endl ;
586  G4cout << "#entries=" << entryThback << " #underflows=" << underThback <<
587  " #overflows=" << overThback << G4endl ;
588  if( entryThback>0.)
589  {
590  Thb= Thlowback - dThback ;
591  normb = TotNbofEvents ;
592  if(distThback[0] == 0.)
593  fac0b = 1. ;
594  else
595  fac0b = 1./distThback[0] ;
596  pereb = 1./std::exp(1.) ;
597 
598  G4cout << " bin nb Thlowdeg Thlowrad " <<
599  " entries normalized " << G4endl ;
600  Thpereb = 0. ;
601  sumb = 0. ;
602  Thmeanb = 0. ;
603  for(G4int ien=0; ien<nbinThback; ien++)
604  {
605  Thb+= dThback ;
606  Thdegb = Thb*180./pi ;
607  sumb += distThback[ien] ;
608  Thmeanb += distThback[ien]*(Thb+0.5*dThback) ;
609  dnormb = distThback[ien]/normb;
610  fnormb = fac0b*distThback[ien] ;
611  if( fnormb > pereb)
612  Thpereb = Thb ;
613  G4cout << std::setw(5) << ien << std::setw(10) << Thdegb << " " <<
614  std::setw(10) << Thb << " " <<
615  std::setw(12) << distThback[ien] << " " <<
616  std::setw(12) << dnormb << " " << std::setw(12) << fnormb <<G4endl ;
617  }
618  Thmeanb /= sumb ;
619  G4cout << G4endl;
620  G4cout << " mean = " << Thmeanb << " rad or " << 180.*Thmeanb/pi <<
621  " deg." << G4endl;
622  G4cout << " theta(1/e)=" << Thpereb << " - " << Thpereb+dThback << " rad "
623  << " or " << 180.*Thpereb/pi << " - " << 180.*(Thpereb+dThback)/pi
624  << " deg." << G4endl;
625  G4cout << G4endl;
626  }
627  }
628 
629  if(nbinGamma>0)
630  {G4double E , fact,dnorm, norm ;
631  G4cout << " gamma energy distribution " << G4endl ;
632  G4cout << "#entries=" << entryGamma << " #underflows=" << underGamma <<
633  " #overflows=" << overGamma << G4endl ;
634  if( entryGamma>0.)
635  {
636  fact=std::exp(dEGamma) ;
637  E = ElowGamma/fact ;
638  norm = TotNbofEvents*dEGamma;
639  G4cout << " bin nb Elow entries normalized " << G4endl ;
640  for(G4int itt=0; itt<nbinGamma; itt++)
641  {
642  E *= fact ;
643  dnorm = distGamma[itt]/norm;
644  G4cout << std::setw(5) << itt << std::setw(13) << E <<
645  std::setw(12) << distGamma[itt] <<
646  std::setw(15) << dnorm << G4endl ;
647  }
648  G4cout << G4endl;
649  }
650  }
651 
652  if(nbinvertexz >0)
653  {G4double z , dnorm, norm ;
654  G4cout << " vertex Z distribution " << G4endl ;
655  G4cout << "#entries=" << entryvertexz << " #underflows=" << undervertexz <<
656  " #overflows=" << oververtexz << G4endl ;
657  if( entryvertexz >0.)
658  {
659  z =zlow - dz ;
660  norm = TotNbofEvents*dz ;
661  G4cout << " bin nb zlow entries normalized " << G4endl ;
662  for(G4int iez=0; iez<nbinvertexz ; iez++)
663  {
664  z+= dz ;
665  if(std::fabs(z)<1.e-12) z=0.;
666  dnorm = distvertexz[iez]/norm;
667  G4cout << std::setw(5) << iez << std::setw(10) << z <<
668  std::setw(12) << distvertexz[iez] <<
669  std::setw(12) << dnorm << G4endl ;
670  }
671  G4cout << G4endl;
672  }
673  }
674 
675  G4cout.precision(prec);
676 
678  {
679  G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
680  }
681 
682  // save Rndm status
683 
684  if (saveRndm == 1)
685  {
686  CLHEP::HepRandom::showEngineStatus();
687  CLHEP::HepRandom::saveEngineStatus("endOfRun.rndm");
688  }
689 }
690 
692 
694 {
695  TotNbofEvents += 1. ;
696 }
697 
699 
701 {
702  nStepSumCharged += nstp;
703  nStepSum2Charged += nstp*nstp;
704 }
705 
707 
709 {
710  nStepSumNeutral += nstp;
711  nStepSum2Neutral += nstp*nstp;
712 }
713 
715 
717 {
718  EnergySumAbs += Eabs;
719  EnergySquareSumAbs += Eabs*Eabs;
720 }
721 
723 
725 {
726  tlSumAbs += tlabs;
727  tlsquareSumAbs += tlabs*tlabs ;
728 }
729 
731 
733 {
734  Transmitted += tr ;
735  Reflected += ref;
736 }
737 
739 
741 {
742 }
743 
745 
747 {
748  G4double bin ;
749  G4int ibin;
750 
751  entryEn += 1. ;
752  if(Enlow < Enhigh) {
753 
754  if(En < Enlow) underEn += 1. ;
755  else if( En >= Enhigh) overEn += 1. ;
756  else
757  {
758  bin = (En-Enlow)/dEn;
759  ibin= (G4int)bin;
760  if(ibin < 0) { ibin = 0; }
761  if(ibin > 199) { ibin = 199; }
762  distEn[ibin] += 1.;
763  }
764  }
765 }
766 
768 
770 {
771 }
772 
774 
776 {
777 }
778 
780 
782 {
783 }
784 
786 
788 {
789 }
790 
792 
794 {
795 }
796 
798 
800 {
801 }
802 
804 
806 {
807 }
808 
810 
812 {
813 }
814 
816 
818 {
819  histName = name ;
820  G4cout << " hist file = " << histName << G4endl;
821 }
822 
824 {
825  if(nbin> 0 && nbin<= 200) {
826  nbinStep = nbin;
827  G4cout << " Nb of bins in #step plot = " << nbinStep << G4endl ;
828  }
829 }
830 
832 {
833  if(low >= 0.0){
834  Steplow = low ;
835  G4cout << " low in the #step plot = " << Steplow << G4endl ;
836  }
837 }
839 {
840  if(high > 0.0) {
841  Stephigh = high;
842  G4cout << " high in the #step plot = " << Stephigh << G4endl ;
843  }
844 }
845 
847 
849 {
850  if(nbin > 0 && nbin <= 200) {
851  nbinEn = nbin;
852  G4cout << " Nb of bins in Edep plot = " << nbinEn << G4endl ;
853  }
854 }
855 
857 {
858  if(Elow >= 0.0) {
859  Enlow = Elow ;
860  G4cout << " Elow in the Edep plot = " << Enlow << G4endl ;
861  }
862 }
863 
865 {
866  if(Ehigh > 0.0) {
867  Enhigh = Ehigh ;
868  G4cout << " Ehigh in the Edep plot = " << Enhigh << G4endl ;
869  }
870 }
871 
873 
875 {
876  if(nbin > 0 && nbin <= 200) {
877  nbinGamma = nbin;
878  G4cout << " Nb of bins in gamma spectrum plot = " << nbinGamma << G4endl ;
879  }
880 }
881 
883 {
884  if(Elow >= 0.0) {
885  ElowGamma = Elow;
886  G4cout << " Elow in the gamma spectrum plot = " << ElowGamma << G4endl ;
887  }
888 }
889 
891 {
892  if(Ehigh > 0.0) {
893  EhighGamma = Ehigh;
894  G4cout << " Ehigh in the gamma spectrum plot = " << EhighGamma << G4endl ;
895  }
896 }
897 
899 {
900  if(nbin > 0 && nbin <= 200) {
901  nbinTt = nbin;
902  G4cout << " Nb of bins in Etransmisssion plot = " << nbinTt << G4endl ;
903  }
904 }
905 
907 {
908  if(Elow >= 0.0) {
909  Ttlow = Elow;
910  G4cout << " Elow in the Etransmission plot = " << Ttlow << G4endl ;
911  }
912 }
913 
915 {
916  if(Ehigh > 0.0) {
917  Tthigh = Ehigh;
918  G4cout << " Ehigh in the Etransmission plot = " << Tthigh << G4endl ;
919  }
920 }
921 
923 {
924  if(nbin > 0 && nbin <= 200) {
925  nbinTb = nbin;
926  G4cout << " Nb of bins in Ebackscattered plot = " << nbinTb << G4endl ;
927  }
928 }
929 
931 {
932 
933  Tblow = Elow ;
934  G4cout << " Elow in the Ebackscattered plot = " << Tblow << G4endl ;
935 }
936 
938 {
939  Tbhigh = Ehigh ;
940  G4cout << " Ehigh in the Ebackscattered plot = " << Tbhigh << G4endl ;
941 }
942 
944 {
945  if(nbin > 0 && nbin <= 200) {
946  nbinTsec = nbin;
947  G4cout << " Nb of bins in Tsecondary plot = " << nbinTsec << G4endl ;
948  }
949 }
950 
952 {
953  Tseclow = Elow ;
954  G4cout << " Elow in the Tsecondary plot = " << Tseclow << G4endl ;
955 }
956 
958 {
959  Tsechigh = Ehigh ;
960  G4cout << " Ehigh in the Tsecondary plot = " << Tsechigh << G4endl ;
961 }
962 
964 {
965  if(nbin > 0 && nbin <= 200) {
966  nbinR = nbin;
967  G4cout << " Nb of bins in R plot = " << nbinR << G4endl ;
968  }
969 }
970 
972 {
973  Rlow = rlow ;
974  G4cout << " Rlow in the R plot = " << Rlow << G4endl ;
975 }
976 
978 {
979  Rhigh = rhigh ;
980  G4cout << " Rhigh in the R plot = " << Rhigh << G4endl ;
981 }
982 
984 {
985  if(nbin > 0 && nbin <= 200) {
986  nbinvertexz = nbin;
987  G4cout << " Nb of bins in Z plot = " << nbinvertexz << G4endl ;
988  }
989 }
990 
992 {
993  zlow = z ;
994  G4cout << " zlow in the Z plot = " << zlow << G4endl ;
995 }
996 
998 {
999  zhigh = z ;
1000  G4cout << " zhigh in the Z plot = " << zhigh << G4endl ;
1001 }
1002 
1004 {
1005  if(nbin > 0 && nbin <= 200) {
1006  nbinTh = nbin;
1007  G4cout << " Nb of bins in Theta plot = " << nbinTh << G4endl ;
1008  }
1009 }
1010 
1012 {
1013  Thlow = Tlow ;
1014  G4cout << " Tlow in the Theta plot = " << Thlow << G4endl ;
1015 }
1016 
1018 {
1019  Thhigh = Thigh ;
1020  G4cout << " Thigh in the Theta plot = " << Thhigh << G4endl ;
1021 }
1022 
1024 {
1025  if(nbin > 0 && nbin <= 200) {
1026  nbinThback = nbin;
1027  G4cout << " Nb of bins in Theta plot = " << nbinThback << G4endl ;
1028  }
1029 }
1030 
1032 {
1033  Thlowback = Tlow ;
1034  G4cout << " Tlow in the Theta plot = " << Thlowback << G4endl ;
1035 }
1036 
1038 {
1039  Thhighback = Thigh ;
1040  G4cout << " Thigh in the Theta plot = " << Thhighback << G4endl ;
1041 }
1042 
1044 {
1045  SumCharged += nch ;
1046  SumNeutral += nne ;
1047  Sum2Charged += nch*nch ;
1048  Sum2Neutral += nne*nne ;
1049 }
1050 
1052 {
1053  Selectron += nele;
1054  Spositron += npos;
1055 }
1056 
1057 //
1058 //
G4double nStepSumCharged
void Fillvertexz(G4double z)
void SetThhigh(G4double Thhigh)
G4double distvertexz[200]
G4double Sum2Charged
static const double MeV
Definition: G4SIunits.hh:193
G4double entryThback
void SetEnhigh(G4double Enhigh)
void SethistName(G4String name)
G4double underTh
G4double TotNbofEvents
void SetnbinR(G4int nbin)
G4double Transmitted
G4double dEGamma
void SetTblow(G4double Tblow)
Definition of the Em10RunAction class.
G4double entryGamma
G4double distTsec[200]
void SetnbinTh(G4int nbin)
void SetEhighGamma(G4double Ehigh)
G4double distTh[200]
static G4VVisManager * GetConcreteInstance()
G4double underEn
G4double entryTb
G4double z
Definition: TRTMaterials.hh:39
G4double overTsec
G4String name
Definition: TRTMaterials.hh:40
G4double distTt[200]
void SetnbinGamma(G4int nbin)
G4double Thlowback
const G4double pi
void Setzlow(G4double z)
void FillTh(G4double Th)
G4double dThback
void SetnbinTt(G4int nbin)
G4double distEn[200]
G4double distStep[200]
void FillNbOfSteps(G4double nstep)
G4double overThback
G4double Stephigh
void FillThBack(G4double Th)
G4double SumCharged
int G4int
Definition: G4Types.hh:78
void CountParticles(G4double, G4double)
void SetTtlow(G4double Ttlow)
G4double entryEn
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
void FillEn(G4double En)
void FillR(G4double R)
void Setzhigh(G4double z)
G4double overGamma
static const double prec
Definition: RanecuEngine.cc:51
G4double distGamma[200]
G4GLOB_DLL std::ostream G4cout
void SetRlow(G4double Rlow)
G4double Selectron
void SetnbinTsec(G4int nbin)
G4double nStepSum2Neutral
Definition of the Em10RunMessenger class.
G4double distThback[200]
G4double underStep
G4double EhighGamma
void SetTbhigh(G4double Tbhigh)
G4double undervertexz
void SetnbinEn(G4int nbin)
G4double tlSumAbs
G4double Sum2Neutral
G4double nStepSum2Charged
G4double distTb[200]
G4double ElowGamma
void BeginOfRunAction(const G4Run *)
void SetnbinTb(G4int nbin)
G4double iz
Definition: TRTMaterials.hh:39
G4double distR[200]
G4String histName
void EndOfRunAction(const G4Run *)
G4int GetRunID() const
Definition: G4Run.hh:76
void SetSteplow(G4double Slow)
void SetnbinStep(G4int nbin)
Definition: G4Run.hh:46
G4double oververtexz
G4double tlsquareSumAbs
void AddEdeps(G4double Eabs)
void FillTt(G4double Tt)
G4double underTsec
G4double entryvertexz
G4double Steplow
G4double Thhighback
G4double nStepSumNeutral
void SetnbinThBack(G4int nbin)
void SetEnlow(G4double Elow)
G4double entryTsec
G4double underThback
G4double entryTh
G4double entryTt
G4double Reflected
G4double SumNeutral
void SetTthigh(G4double Tthigh)
G4double Tseclow
G4double Tt2mean
G4double Spositron
G4double EnergySumAbs
void SetTseclow(G4double Tlow)
G4double underTt
Em10RunMessenger * runMessenger
void SetTsechigh(G4double Thigh)
void AddTrRef(G4double tr, G4double ref)
G4double entryStep
void FillTsec(G4double T)
void FillGammaSpectrum(G4double E)
#define G4endl
Definition: G4ios.hh:61
void SetStephigh(G4double Shigh)
void AddnStepsNeutral(G4double ns)
void Setnbinzvertex(G4int nbin)
static const double keV
Definition: G4SIunits.hh:195
G4double underGamma
double G4double
Definition: G4Types.hh:76
G4double Tsechigh
void SetElowGamma(G4double Elow)
void SetThlowBack(G4double Thlow)
void AddnStepsCharged(G4double ns)
void AddTrackLength(G4double tlabs)
static const double mm
Definition: G4SIunits.hh:102
void AddEP(G4double, G4double)
G4double Tb2mean
void FillTb(G4double Tt)
G4double overStep
G4double EnergySquareSumAbs
void SetRhigh(G4double Rhigh)
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:432
G4double underTb
void SetThhighBack(G4double Thhigh)
void SetThlow(G4double Thlow)