Import Geant4 1.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:34:16 +02:00
parent ca1c8cb059
commit 103bda00c8
2654 changed files with 29719 additions and 20203 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5CalorHit.cc,v 1.1.4.1 1999/12/07 20:47:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5CalorHit.cc,v 1.2 1999/12/15 14:49:09 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5CalorimeterSD.cc,v 1.1.4.1 1999/12/07 20:47:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5CalorimeterSD.cc,v 1.2 1999/12/15 14:49:09 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -77,14 +77,14 @@ G4bool Em5CalorimeterSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist)
if (physVol == Detector->GetAbsorber()) calHit->AddAbs(edep,stepl);
HitID[Em5Number] = CalCollection->insert(calHit) - 1;
if (verboseLevel>0)
G4cout << " New Calorimeter Hit on Em5: " << Em5Number << endl;
G4cout << " New Calorimeter Hit on Em5: " << Em5Number << G4endl;
}
else
{
if (physVol == Detector->GetAbsorber())
(*CalCollection)[HitID[Em5Number]]->AddAbs(edep,stepl);
if (verboseLevel>0)
G4cout << " Energy added to Em5: " << Em5Number << endl;
G4cout << " Energy added to Em5: " << Em5Number << G4endl;
}
return true;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5DetectorConstruction.cc,v 1.1.4.1 1999/12/07 20:47:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5DetectorConstruction.cc,v 1.4 2000/01/20 15:34:39 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -88,12 +88,21 @@ G4double temperature, pressure;
a = 1.01*g/mole;
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
a = 12.01*g/mole;
G4Element* elC = new G4Element(name="Carbon" ,symbol="C" , z= 6., a);
a = 14.01*g/mole;
G4Element* elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
a = 16.00*g/mole;
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
a = 39.95*g/mole;
G4Element* elAr = new G4Element(name="Argon" ,symbol="Ar", z= 18., a);
a = 131.29*g/mole;
G4Element* elXe = new G4Element(name="Xenon" ,symbol="Xe", z= 54., a);
//
// define simple materials
//
@@ -110,8 +119,8 @@ a = 28.09*g/mole;
G4Material* Si = new G4Material(name="Silicon", z=14., a, density);
density = 1.390*g/cm3;
a = 39.95*g/mole;
G4Material* lAr = new G4Material(name="liquidArgon", z=18., a, density);
G4Material* lAr = new G4Material(name="liquidArgon", density, ncomponents=1);
lAr->AddElement(elAr, natoms=1);
density = 7.870*g/cm3;
a = 55.85*g/mole;
@@ -147,6 +156,47 @@ G4Material* Air = new G4Material(name="Air" , density, ncomponents=2);
Air->AddElement(elN, fractionmass=0.7);
Air->AddElement(elO, fractionmass=0.3);
//
// examples of gas
//
density = 5.458*mg/cm3;
G4Material* Xe = new G4Material(name="XenonGas" , density, ncomponents=1,
kStateGas,temperature=293.15*kelvin, pressure=1*atmosphere);
Xe->AddElement(elXe, natoms=1);
density = 1.977*mg/cm3;
G4Material* CO2 = new G4Material(name="CarbonicGas", density, ncomponents=2);
CO2->AddElement(elC, natoms=1);
CO2->AddElement(elO, natoms=2);
density = 1.8223*mg/cm3;
G4Material* ArCO2 = new G4Material(name="ArgonCO2", density, ncomponents=2);
ArCO2->AddElement (elAr, fractionmass=0.7844);
ArCO2->AddMaterial(CO2, fractionmass=0.2156);
//another way to define mixture of gas per volume
density = 1.8223*mg/cm3;
G4Material* NewArCO2 = new G4Material(name="NewArgonCO2", density, ncomponents=3);
NewArCO2->AddElement (elAr, natoms=8);
NewArCO2->AddElement (elC, natoms=2);
NewArCO2->AddElement (elO, natoms=4);
//Argon-CH4
density = 1.709*mg/cm3;
G4Material* ArCH4 = new G4Material(name="ArgonCH4", density, ncomponents=3);
ArCH4->AddElement (elAr, natoms=93);
ArCH4->AddElement (elC, natoms=7);
ArCH4->AddElement (elH, natoms=28);
//Xenon-methane-propane
density = 4.9196*mg/cm3;
G4Material* XeCH = new G4Material(name="XenonMethanePropane", density, ncomponents=3,
kStateGas,temperature=293.15*kelvin, pressure=1*atmosphere);
XeCH->AddElement (elXe, natoms=875);
XeCH->AddElement (elC, natoms=225);
XeCH->AddElement (elH, natoms=700);
//
// example of vacuum
//
@@ -157,7 +207,7 @@ temperature = 2.73*kelvin;
G4Material* Vacuum = new G4Material(name="Galactic", z=1., a=1.01*g/mole, density,
kStateGas,temperature,pressure);
G4cout << *(G4Material::GetMaterialTable()) << endl;
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
//default materials of the calorimeter
AbsorberMaterial = Si;
@@ -242,13 +292,13 @@ void Em5DetectorConstruction::PrintCalorParameters()
G4cout << "\n The WORLD is made of "
<< G4BestUnit(WorldSizeX,"Length") << " of " << WorldMaterial->GetName();
G4cout << ". The transverse size (YZ) of the world is "
<< G4BestUnit(WorldSizeYZ,"Length") << endl;
<< G4BestUnit(WorldSizeYZ,"Length") << G4endl;
G4cout << " The ABSORBER is made of "
<<G4BestUnit(AbsorberThickness,"Length")<< " of " << AbsorberMaterial->GetName();
G4cout << ". The transverse size (YZ) is "
<< G4BestUnit(AbsorberSizeYZ,"Length") << endl;
<< G4BestUnit(AbsorberSizeYZ,"Length") << G4endl;
G4cout << " X position of the middle of the absorber " << G4BestUnit(XposAbs,"Length");
G4cout << endl;
G4cout << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5DetectorMessenger.cc,v 1.1.4.1 1999/12/07 20:47:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5DetectorMessenger.cc,v 1.2 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5EventAction.cc,v 1.1.2.1.2.1 1999/12/07 20:47:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5EventAction.cc,v 1.3 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -57,10 +57,10 @@ void Em5EventAction::BeginOfEventAction(const G4Event* evt)
{
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
G4cout << "\n---> Begin of Event: " << evtNb << endl;
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
if(verboselevel>1)
G4cout << "<<< Event " << evtNb << " started." << endl;
G4cout << "<<< Event " << evtNb << " started." << G4endl;
if (calorimeterCollID==-1)
{
@@ -93,7 +93,7 @@ void Em5EventAction::EndOfEventAction(const G4Event* evt)
int n_hit = CHC->entries();
// if(verboselevel==2)
// G4cout << " " << n_hit
// << " hits are stored in Em5CalorHitsCollection." << endl;
// << " hits are stored in Em5CalorHitsCollection." << G4endl;
G4double totEAbs=0, totLAbs=0;
for (int i=0;i<n_hit;i++)
@@ -102,11 +102,11 @@ void Em5EventAction::EndOfEventAction(const G4Event* evt)
}
if(verboselevel==2)
G4cout
<< " Absorber: total energy: " << setw(7) <<
<< " Absorber: total energy: " << G4std::setw(7) <<
G4BestUnit(totEAbs,"Energy")
<< " total track length: " << setw(7) <<
<< " total track length: " << G4std::setw(7) <<
G4BestUnit(totLAbs,"Length")
<< endl;
<< G4endl;
// count event, add deposits to the sum ...
runaction->CountEvent() ;
@@ -114,7 +114,7 @@ void Em5EventAction::EndOfEventAction(const G4Event* evt)
runaction->AddnStepsCharged(nstepCharged) ;
runaction->AddnStepsNeutral(nstepNeutral) ;
if(verboselevel==2)
G4cout << " Ncharged=" << Nch << " , Nneutral=" << Nne << endl;
G4cout << " Ncharged=" << Nch << " , Nneutral=" << Nne << G4endl;
runaction->CountParticles(Nch,Nne);
runaction->AddEP(NE,NP);
runaction->AddTrRef(Transmitted,Reflected) ;
@@ -141,7 +141,7 @@ void Em5EventAction::EndOfEventAction(const G4Event* evt)
}
if(verboselevel>0)
G4cout << "<<< Event " << evt->GetEventID() << " ended." << endl;
G4cout << "<<< Event " << evt->GetEventID() << " ended." << G4endl;
//save rndm status
@@ -151,7 +151,7 @@ void Em5EventAction::EndOfEventAction(const G4Event* evt)
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
{
G4cout << "\n---> End of Event: " << evtNb << endl;
G4cout << "\n---> End of Event: " << evtNb << G4endl;
HepRandom::showEngineStatus();
}
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5EventActionMessenger.cc,v 1.1.4.1 1999/12/07 20:47:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5EventActionMessenger.cc,v 1.2 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,12 +5,16 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5PhysicsList.cc,v 1.1.4.1 1999/12/07 20:47:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5PhysicsList.cc,v 1.5 2000/01/20 15:34:40 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// Always place it in front!
//
////#include "G4Timer.hh"
#include "Em5PhysicsList.hh"
#include "Em5DetectorConstruction.hh"
#include "Em5PhysicsListMessenger.hh"
@@ -23,9 +27,8 @@
#include "G4ParticleTable.hh"
#include "G4Material.hh"
#include "G4EnergyLossTables.hh"
#include "G4Timer.hh"
#include "G4ios.hh"
#include <iomanip.h>
#include "g4std/iomanip"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -233,8 +236,8 @@ void Em5PhysicsList::ConstructGeneral()
void Em5PhysicsList::SetCuts()
{
G4Timer theTimer ;
theTimer.Start() ;
////G4Timer theTimer ;
////theTimer.Start() ;
// reactualise cutValues
if (currentDefaultCut != defaultCutValue)
@@ -246,7 +249,7 @@ void Em5PhysicsList::SetCuts()
if (verboseLevel >0){
G4cout << "Em5PhysicsList::SetCuts:";
G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << endl;
G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
}
// set cut values for gamma at first and for e- second and next for e+,
// because some processes for e+/e- need cut values for gamma
@@ -268,10 +271,10 @@ void Em5PhysicsList::SetCuts()
if (verboseLevel>0) DumpCutValuesTable();
theTimer.Stop();
G4cout.precision(6);
G4cout << endl ;
G4cout << "total time(SetCuts)=" << theTimer.GetUserElapsed() << " s " <<endl;
////theTimer.Stop();
////G4cout.precision(6);
////G4cout << G4endl ;
////G4cout << "total time(SetCuts)=" << theTimer.GetUserElapsed() << " s " <<G4endl;
}
@@ -343,10 +346,10 @@ void Em5PhysicsList::GetRange(G4double val)
G4double cut;
part = theParticleTable->FindParticle("e-");
cut = G4EnergyLossTables::GetRange(part,val,currMat);
G4cout << "material : " << currMat->GetName() << endl;
G4cout << "particle : " << part->GetParticleName() << endl;
G4cout << "energy : " << val / keV << " (keV)" << endl;
G4cout << "range : " << cut / mm << " (mm)" << endl;
G4cout << "material : " << currMat->GetName() << G4endl;
G4cout << "particle : " << part->GetParticleName() << G4endl;
G4cout << "energy : " << val / keV << " (keV)" << G4endl;
G4cout << "range : " << cut / mm << " (mm)" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -354,8 +357,8 @@ void Em5PhysicsList::GetRange(G4double val)
void Em5PhysicsList::SetMaxStep(G4double step)
{
MaxChargedStep = step ;
G4cout << " MaxChargedStep=" << MaxChargedStep << endl;
G4cout << endl;
G4cout << " MaxChargedStep=" << MaxChargedStep << G4endl;
G4cout << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5PhysicsListMessenger.cc,v 1.1.4.1 1999/12/07 20:47:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5PhysicsListMessenger.cc,v 1.2 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5PrimaryGeneratorAction.cc,v 1.1.4.1 1999/12/07 20:47:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5PrimaryGeneratorAction.cc,v 1.2 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5PrimaryGeneratorMessenger.cc,v 1.1.4.1 1999/12/07 20:47:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5PrimaryGeneratorMessenger.cc,v 1.2 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5RunAction.cc,v 1.1.4.1 1999/12/07 20:47:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5RunAction.cc,v 1.4 2000/01/20 15:34:40 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -20,22 +20,28 @@
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
#include <iomanip.h>
#include "g4std/iomanip"
#include "Randomize.hh"
#ifndef G4NOHIST
#include "CLHEP/Hist/HBookFile.h"
#include <assert.h>
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em5RunAction::Em5RunAction()
:histName("histfile"),nbinStep(0.),nbinEn(0.),nbinTt(0.),nbinTb(0.),
nbinTsec(0.),nbinTh(0.),nbinThback(0.),nbinR(0.),nbinGamma(0.),
nbinvertexz(0.),histo1(0),histo2(0),histo3(0),histo4(0),histo5(0),
histo6(0),histo7(0),histo8(0),histo9(0),histo10(0)
:histName("histfile"),nbinStep(0),nbinEn(0),nbinTt(0),nbinTb(0),
nbinTsec(0),nbinTh(0),nbinThback(0),nbinR(0),nbinGamma(0),nbinvertexz(0)
{
runMessenger = new Em5RunMessenger(this);
saveRndm = 1;
saveRndm = 1;
#ifndef G4NOHIST
histo1=0; histo2=0; histo3=0; histo4=0; histo5=0; histo6=0; histo7=0;
histo8=0; histo9=0; histo10=0;hi2bis=0;
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -43,24 +49,26 @@ Em5RunAction::Em5RunAction()
Em5RunAction::~Em5RunAction()
{
delete runMessenger;
if(histo1) delete histo1 ;
if(histo2) delete histo2 ;
if(histo3) delete histo3 ;
if(histo4) delete histo4 ;
if(histo5) delete histo5 ;
if(histo6) delete histo6 ;
if(histo7) delete histo7 ;
if(histo8) delete histo8 ;
if(histo9) delete histo9 ;
if(histo10) delete histo10 ;
#ifndef G4NOHIST
if(histo1) delete histo1 ;
if(histo2) {delete histo2 ; delete hi2bis;}
if(histo3) delete histo3 ;
if(histo4) delete histo4 ;
if(histo5) delete histo5 ;
if(histo6) delete histo6 ;
if(histo7) delete histo7 ;
if(histo8) delete histo8 ;
if(histo9) delete histo9 ;
if(histo10) delete histo10;
delete hbookManager;
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em5RunAction::bookHisto()
{
#ifndef G4NOHIST
// init hbook
hbookManager = new HBookFile(histName, 68);
assert (hbookManager != 0);
@@ -77,6 +85,10 @@ void Em5RunAction::bookHisto()
histo2 = hbookManager->histogram("energy deposit in absorber(in MeV)"
,nbinEn,Enlow,Enhigh) ;
assert (histo2 != 0);
hi2bis = hbookManager->histogram("energy deposit: normalized distribution"
,nbinEn,Enlow,Enhigh) ;
assert (hi2bis != 0);
}
if(nbinTh>0)
{
@@ -127,13 +139,14 @@ void Em5RunAction::bookHisto()
,nbinGamma,log10(ElowGamma),log10(EhighGamma)) ;
assert (histo10 != 0);
}
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em5RunAction::BeginOfRunAction(const G4Run* aRun)
{
G4cout << "### Run " << aRun->GetRunID() << " start." << endl;
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
// save Rndm status
if (saveRndm > 0)
@@ -147,8 +160,7 @@ void Em5RunAction::BeginOfRunAction(const G4Run* aRun)
if(pVVisManager)
{
UI->ApplyCommand("/vis/clear/view");
UI->ApplyCommand("/vis/draw/current");
UI->ApplyCommand("/vis/scene/notifyHandlers");
}
EnergySumAbs = 0. ;
@@ -350,87 +362,91 @@ void Em5RunAction::EndOfRunAction(const G4Run* aRun)
Transmitted /=TotNbofEvents ;
Reflected /=TotNbofEvents ;
G4cout << " ================== run summary =====================" << endl;
G4cout << " ================== run summary =====================" << G4endl;
G4int prec = G4cout.precision(6);
G4cout << " end of Run TotNbofEvents = " <<
TotNbofEvents << endl ;
TotNbofEvents << G4endl ;
G4cout << " mean charged track length in absorber=" <<
tlSumAbs/mm << " +- " << sAbs/mm <<
" mm " << endl;
G4cout << endl;
" mm " << G4endl;
G4cout << G4endl;
G4cout << " mean energy deposit in absorber=" <<
EnergySumAbs/MeV << " +- " << sigAbs/MeV <<
" MeV " << endl ;
G4cout << endl ;
" MeV " << G4endl ;
G4cout << G4endl ;
G4cout << " mean number of steps in absorber (charged) =" <<
nStepSumCharged << " +- " << sigch <<
" " << endl ;
" " << G4endl ;
G4cout << " mean number of steps in absorber (neutral) =" <<
nStepSumNeutral << " +- " << signe <<
" " << endl ;
G4cout << endl ;
" " << G4endl ;
G4cout << G4endl ;
G4cout << " mean number of charged secondaries = " <<
SumCharged << " +- " << sigcharged << endl;
G4cout << endl ;
SumCharged << " +- " << sigcharged << G4endl;
G4cout << G4endl ;
G4cout << " mean number of neutral secondaries = " <<
SumNeutral << " +- " << signeutral << endl;
G4cout << endl ;
SumNeutral << " +- " << signeutral << G4endl;
G4cout << G4endl ;
G4cout << " mean number of e-s =" << Selectron <<
" and e+s =" << Spositron << endl;
G4cout << endl;
" and e+s =" << Spositron << G4endl;
G4cout << G4endl;
G4cout << "(number) transmission coeff=" << Transmitted <<
" reflection coeff=" << Reflected << endl;
G4cout << endl;
" reflection coeff=" << Reflected << G4endl;
G4cout << G4endl;
if(nbinStep>0)
{G4double E , dnorm, norm ;
G4cout << " step number/event distribution " << endl ;
G4cout << " step number/event distribution " << G4endl ;
G4cout << "#entries=" << entryStep << " #underflows=" << underStep <<
" #overflows=" << overStep << endl ;
" #overflows=" << overStep << G4endl ;
if( entryStep>0.)
{
E = Steplow - dStep ;
norm = TotNbofEvents ;
G4cout << " bin nb nsteplow entries normalized " << endl ;
G4cout << " bin nb nsteplow entries normalized " << G4endl ;
for(G4int iss=0; iss<nbinStep; iss++)
{
E += dStep ;
dnorm = distStep[iss]/norm;
G4cout << setw(5) << iss << setw(10) << E <<
setw(12) << distStep[iss] <<
setw(12) << dnorm << endl ;
G4cout << G4std::setw(5) << iss << G4std::setw(10) << E <<
G4std::setw(12) << distStep[iss] <<
G4std::setw(12) << dnorm << G4endl ;
}
G4cout << endl;
G4cout << G4endl;
}
}
if(nbinEn>0)
{G4double E , dnorm, norm,fmax,Emp,width ;
Emp=-999.999 ;
G4cout << " energy deposit distribution " << endl ;
G4cout << " energy deposit distribution " << G4endl ;
G4cout << "#entries=" << entryEn << " #underflows=" << underEn <<
" #overflows=" << overEn << endl ;
" #overflows=" << overEn << G4endl ;
if( entryEn>0.)
{
E = Enlow - dEn ;
norm = TotNbofEvents*dEn ;
G4cout << " bin nb Elow entries normalized " << endl ;
G4cout << " bin nb Elow entries normalized " << G4endl ;
fmax = 0. ;
for(G4int ien=0; ien<nbinEn; ien++)
{
E += dEn ;
#ifndef G4NOHIST
hi2bis->accumulate(E+0.5*dEn,distEn[ien]/TotNbofEvents);
#endif
if(distEn[ien]>fmax)
{
fmax=distEn[ien];
Emp = E ;
}
dnorm = distEn[ien]/norm;
G4cout << setw(5) << ien << setw(10) << E <<
setw(12) << distEn[ien] <<
setw(12) << dnorm << endl ;
G4cout << G4std::setw(5) << ien << G4std::setw(10) << E <<
G4std::setw(12) << distEn[ien] <<
G4std::setw(12) << dnorm << G4endl ;
}
G4cout << endl;
G4cout << G4endl;
G4int ii ;
G4double E1,E2 ;
E1=-1.e6 ;
@@ -456,16 +472,16 @@ void Em5RunAction::EndOfRunAction(const G4Run* aRun)
if(distEn[i2] >= 0.5*fmax)
E2=E ;
}
G4cout << " Emp = " << setw(15) << Emp/MeV << " width="
<< setw(15) << (E2-E1)/MeV << " MeV " << endl;
G4cout << endl ;
G4cout << " Emp = " << G4std::setw(15) << Emp/MeV << " width="
<< G4std::setw(15) << (E2-E1)/MeV << " MeV " << G4endl;
G4cout << G4endl ;
}
}
if(nbinTt>0)
{G4double E , dnorm, norm ,sig;
G4cout << " transmitted energy distribution " << endl ;
G4cout << " transmitted energy distribution " << G4endl ;
G4cout << "#entries=" << entryTt << " #underflows=" << underTt <<
" #overflows=" << overTt << endl ;
" #overflows=" << overTt << G4endl ;
if( entryTt>0.)
{
Ttmean /= entryTt;
@@ -475,26 +491,26 @@ void Em5RunAction::EndOfRunAction(const G4Run* aRun)
else
sig=sqrt(sig/entryTt) ;
G4cout << " mean energy of transmitted particles=" << Ttmean/keV <<
" +- " << sig/keV << " keV." << endl;
" +- " << sig/keV << " keV." << G4endl;
E = Ttlow - dTt ;
norm = TotNbofEvents*dTt ;
G4cout << " bin nb Elow entries normalized " << endl ;
G4cout << " bin nb Elow entries normalized " << G4endl ;
for(G4int itt=0; itt<nbinTt; itt++)
{
E += dTt ;
dnorm = distTt[itt]/norm;
G4cout << setw(5) << itt << setw(10) << E <<
setw(12) << distTt[itt] <<
setw(12) << dnorm << endl ;
G4cout << G4std::setw(5) << itt << G4std::setw(10) << E <<
G4std::setw(12) << distTt[itt] <<
G4std::setw(12) << dnorm << G4endl ;
}
G4cout << endl;
G4cout << G4endl;
}
}
if(nbinTb>0)
{G4double E , dnorm, norm ,sig;
G4cout << " backscattered energy distribution " << endl ;
G4cout << " backscattered energy distribution " << G4endl ;
G4cout << "#entries=" << entryTb << " #underflows=" << underTb <<
" #overflows=" << overTb << endl ;
" #overflows=" << overTb << G4endl ;
if( entryTb>0.)
{
Tbmean /= entryTb;
@@ -504,48 +520,48 @@ void Em5RunAction::EndOfRunAction(const G4Run* aRun)
else
sig=sqrt(sig/entryTb) ;
G4cout << " mean energy of backscattered particles=" << Tbmean/keV <<
" +- " << sig/keV << " keV." << endl;
" +- " << sig/keV << " keV." << G4endl;
E = Tblow - dTb ;
norm = TotNbofEvents*dTb ;
G4cout << " bin nb Elow entries normalized " << endl ;
G4cout << " bin nb Elow entries normalized " << G4endl ;
for(G4int itt=0; itt<nbinTb; itt++)
{
E += dTb ;
dnorm = distTb[itt]/norm;
G4cout << setw(5) << itt << setw(10) << E <<
setw(12) << distTb[itt] <<
setw(12) << dnorm << endl ;
G4cout << G4std::setw(5) << itt << G4std::setw(10) << E <<
G4std::setw(12) << distTb[itt] <<
G4std::setw(12) << dnorm << G4endl ;
}
G4cout << endl;
G4cout << G4endl;
}
}
if(nbinTsec>0)
{G4double E , dnorm, norm ;
G4cout << " energy distribution of charged secondaries " << endl ;
G4cout << " energy distribution of charged secondaries " << G4endl ;
G4cout << "#entries=" << entryTsec << " #underflows=" << underTsec <<
" #overflows=" << overTsec << endl ;
" #overflows=" << overTsec << G4endl ;
if( entryTsec>0.)
{
E = Tseclow - dTsec ;
norm = TotNbofEvents*dTsec ;
G4cout << " bin nb Elow entries normalized " << endl ;
G4cout << " bin nb Elow entries normalized " << G4endl ;
for(G4int itt=0; itt<nbinTsec; itt++)
{
E += dTsec ;
dnorm = distTsec[itt]/norm;
G4cout << setw(5) << itt << setw(10) << E <<
setw(12) << distTsec[itt] <<
setw(12) << dnorm << endl ;
G4cout << G4std::setw(5) << itt << G4std::setw(10) << E <<
G4std::setw(12) << distTsec[itt] <<
G4std::setw(12) << dnorm << G4endl ;
}
G4cout << endl;
G4cout << G4endl;
}
}
if(nbinR >0)
{G4double R , dnorm, norm,sig ;
G4cout << " R distribution " << endl ;
G4cout << " R distribution " << G4endl ;
G4cout << "#entries=" << entryR << " #underflows=" << underR <<
" #overflows=" << overR << endl ;
" #overflows=" << overR << G4endl ;
if( entryR >0.)
{
Rmean /= entryR;
@@ -553,27 +569,27 @@ void Em5RunAction::EndOfRunAction(const G4Run* aRun)
if(sig<=0.) sig=0. ;
else sig = sqrt(sig/entryR) ;
G4cout << " mean lateral displacement at exit=" << Rmean/mm << " +- "
<< sig/mm << " mm." << endl ;
<< sig/mm << " mm." << G4endl ;
R = Rlow - dR ;
norm = TotNbofEvents*dR ;
G4cout << " bin nb Rlow entries normalized " << endl ;
G4cout << " bin nb Rlow entries normalized " << G4endl ;
for(G4int ier=0; ier<nbinR ; ier++)
{
R+= dR ;
dnorm = distR[ier]/norm;
G4cout << setw(5) << ier << setw(10) << R <<
setw(12) << distR[ier] <<
setw(12) << dnorm << endl ;
G4cout << G4std::setw(5) << ier << G4std::setw(10) << R <<
G4std::setw(12) << distR[ier] <<
G4std::setw(12) << dnorm << G4endl ;
}
G4cout << endl;
G4cout << G4endl;
}
}
if(nbinTh>0)
{G4double Th,Thdeg, dnorm, norm,fac0,fnorm,pere,Thpere,Thmean,sum;
G4cout << " angle distribution " << endl ;
G4cout << " angle distribution " << G4endl ;
G4cout << "#entries=" << entryTh << " #underflows=" << underTh <<
" #overflows=" << overTh << endl ;
" #overflows=" << overTh << G4endl ;
if( entryTh>0.)
{
Th= Thlow - dTh ;
@@ -585,7 +601,7 @@ void Em5RunAction::EndOfRunAction(const G4Run* aRun)
pere = 1./exp(1.) ;
G4cout << " bin nb Thlowdeg Thlowrad " <<
" entries normalized " << endl ;
" entries normalized " << G4endl ;
Thpere = 0. ;
sum = 0. ;
Thmean = 0. ;
@@ -599,27 +615,27 @@ void Em5RunAction::EndOfRunAction(const G4Run* aRun)
fnorm = fac0*distTh[ien] ;
if( fnorm > pere)
Thpere = Th ;
G4cout << setw(5) << ien << setw(10) << Thdeg << " " <<
setw(10) << Th << " " <<
setw(12) << distTh[ien] << " " <<
setw(12) << dnorm << " " << setw(12) << fnorm <<endl ;
G4cout << G4std::setw(5) << ien << G4std::setw(10) << Thdeg << " " <<
G4std::setw(10) << Th << " " <<
G4std::setw(12) << distTh[ien] << " " <<
G4std::setw(12) << dnorm << " " << G4std::setw(12) << fnorm <<G4endl ;
}
Thmean /= sum ;
G4cout << endl;
G4cout << G4endl;
G4cout << " mean = " << Thmean << " rad or " << 180.*Thmean/pi <<
" deg." << endl;
" deg." << G4endl;
G4cout << " theta(1/e)=" << Thpere << " - " << Thpere+dTh << " rad "
<< " or " << 180.*Thpere/pi << " - " << 180.*(Thpere+dTh)/pi
<< " deg." << endl;
G4cout << endl;
<< " deg." << G4endl;
G4cout << G4endl;
}
}
if(nbinThback>0)
{G4double Thb,Thdegb, dnormb, normb,fac0b,fnormb,pereb,Thpereb,Thmeanb,sumb;
G4cout << " backscattering angle distribution " << endl ;
G4cout << " backscattering angle distribution " << G4endl ;
G4cout << "#entries=" << entryThback << " #underflows=" << underThback <<
" #overflows=" << overThback << endl ;
" #overflows=" << overThback << G4endl ;
if( entryThback>0.)
{
Thb= Thlowback - dThback ;
@@ -631,7 +647,7 @@ void Em5RunAction::EndOfRunAction(const G4Run* aRun)
pereb = 1./exp(1.) ;
G4cout << " bin nb Thlowdeg Thlowrad " <<
" entries normalized " << endl ;
" entries normalized " << G4endl ;
Thpereb = 0. ;
sumb = 0. ;
Thmeanb = 0. ;
@@ -645,75 +661,77 @@ void Em5RunAction::EndOfRunAction(const G4Run* aRun)
fnormb = fac0b*distThback[ien] ;
if( fnormb > pereb)
Thpereb = Thb ;
G4cout << setw(5) << ien << setw(10) << Thdegb << " " <<
setw(10) << Thb << " " <<
setw(12) << distThback[ien] << " " <<
setw(12) << dnormb << " " << setw(12) << fnormb <<endl ;
G4cout << G4std::setw(5) << ien << G4std::setw(10) << Thdegb << " " <<
G4std::setw(10) << Thb << " " <<
G4std::setw(12) << distThback[ien] << " " <<
G4std::setw(12) << dnormb << " " << G4std::setw(12) << fnormb <<G4endl ;
}
Thmeanb /= sumb ;
G4cout << endl;
G4cout << G4endl;
G4cout << " mean = " << Thmeanb << " rad or " << 180.*Thmeanb/pi <<
" deg." << endl;
" deg." << G4endl;
G4cout << " theta(1/e)=" << Thpereb << " - " << Thpereb+dThback << " rad "
<< " or " << 180.*Thpereb/pi << " - " << 180.*(Thpereb+dThback)/pi
<< " deg." << endl;
G4cout << endl;
<< " deg." << G4endl;
G4cout << G4endl;
}
}
if(nbinGamma>0)
{G4double E , fact,dnorm, norm ;
G4cout << " gamma energy distribution " << endl ;
G4cout << " gamma energy distribution " << G4endl ;
G4cout << "#entries=" << entryGamma << " #underflows=" << underGamma <<
" #overflows=" << overGamma << endl ;
" #overflows=" << overGamma << G4endl ;
if( entryGamma>0.)
{
fact=exp(dEGamma) ;
E = ElowGamma/fact ;
norm = TotNbofEvents*dEGamma;
G4cout << " bin nb Elow entries normalized " << endl ;
G4cout << " bin nb Elow entries normalized " << G4endl ;
for(G4int itt=0; itt<nbinGamma; itt++)
{
E *= fact ;
dnorm = distGamma[itt]/norm;
G4cout << setw(5) << itt << setw(13) << E <<
setw(12) << distGamma[itt] <<
setw(15) << dnorm << endl ;
G4cout << G4std::setw(5) << itt << G4std::setw(13) << E <<
G4std::setw(12) << distGamma[itt] <<
G4std::setw(15) << dnorm << G4endl ;
}
G4cout << endl;
G4cout << G4endl;
}
}
if(nbinvertexz >0)
{G4double z , dnorm, norm ;
G4cout << " vertex Z distribution " << endl ;
G4cout << " vertex Z distribution " << G4endl ;
G4cout << "#entries=" << entryvertexz << " #underflows=" << undervertexz <<
" #overflows=" << oververtexz << endl ;
" #overflows=" << oververtexz << G4endl ;
if( entryvertexz >0.)
{
z =zlow - dz ;
norm = TotNbofEvents*dz ;
G4cout << " bin nb zlow entries normalized " << endl ;
G4cout << " bin nb zlow entries normalized " << G4endl ;
for(G4int iez=0; iez<nbinvertexz ; iez++)
{
z+= dz ;
if(abs(z)<1.e-12) z=0.;
dnorm = distvertexz[iez]/norm;
G4cout << setw(5) << iez << setw(10) << z <<
setw(12) << distvertexz[iez] <<
setw(12) << dnorm << endl ;
G4cout << G4std::setw(5) << iez << G4std::setw(10) << z <<
G4std::setw(12) << distvertexz[iez] <<
G4std::setw(12) << dnorm << G4endl ;
}
G4cout << endl;
G4cout << G4endl;
}
}
G4cout.precision(prec);
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/show/view");
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
#ifndef G4NOHIST
// Write histogram file
hbookManager->write();
#endif
// save Rndm status
if (saveRndm == 1)
@@ -777,7 +795,7 @@ void Em5RunAction::FillNbOfSteps(G4double ns)
G4double n,bin ;
G4int ibin;
if(histo1)
if(nbinStep>0)
{
entryStep += 1. ;
@@ -792,7 +810,9 @@ void Em5RunAction::FillNbOfSteps(G4double ns)
ibin= bin ;
distStep[ibin] += 1. ;
}
histo1->accumulate(ns) ;
#ifndef G4NOHIST
histo1->accumulate(ns);
#endif
}
}
@@ -803,7 +823,7 @@ void Em5RunAction::FillEn(G4double En)
G4double bin ;
G4int ibin;
if(histo2)
if(nbinEn>0)
{
entryEn += 1. ;
@@ -817,7 +837,9 @@ void Em5RunAction::FillEn(G4double En)
ibin= bin ;
distEn[ibin] += 1. ;
}
histo2->accumulate(En/MeV) ;
#ifndef G4NOHIST
histo2->accumulate(En/MeV);
#endif
}
}
@@ -828,7 +850,7 @@ void Em5RunAction::FillTt(G4double En)
G4double bin ;
G4int ibin;
if(histo5)
if(nbinTt>0)
{
entryTt += 1. ;
Ttmean += En ;
@@ -844,7 +866,9 @@ void Em5RunAction::FillTt(G4double En)
ibin= bin ;
distTt[ibin] += 1. ;
}
histo5->accumulate(En/MeV) ;
#ifndef G4NOHIST
histo5->accumulate(En/MeV);
#endif
}
}
@@ -855,7 +879,7 @@ void Em5RunAction::FillTb(G4double En)
G4double bin ;
G4int ibin;
if(histo7)
if(nbinTb>0)
{
entryTb += 1. ;
Tbmean += En ;
@@ -871,7 +895,9 @@ void Em5RunAction::FillTb(G4double En)
ibin= bin ;
distTb[ibin] += 1. ;
}
#ifndef G4NOHIST
histo7->accumulate(En/MeV) ;
#endif
}
}
@@ -882,7 +908,7 @@ void Em5RunAction::FillTsec(G4double En)
G4double bin ;
G4int ibin;
if(histo8)
if(nbinTsec>0)
{
entryTsec += 1. ;
@@ -896,7 +922,9 @@ void Em5RunAction::FillTsec(G4double En)
ibin= bin ;
distTsec[ibin] += 1. ;
}
#ifndef G4NOHIST
histo8->accumulate(En/MeV) ;
#endif
}
}
@@ -907,7 +935,7 @@ void Em5RunAction::FillGammaSpectrum(G4double En)
G4double bin ;
G4int ibin;
if(histo10)
if(nbinGamma>0)
{
entryGamma += 1. ;
@@ -921,7 +949,9 @@ void Em5RunAction::FillGammaSpectrum(G4double En)
ibin= bin ;
distGamma[ibin] += 1. ;
}
#ifndef G4NOHIST
histo10->accumulate(log10(En/MeV)) ;
#endif
}
}
@@ -935,7 +965,7 @@ void Em5RunAction::FillTh(G4double Th)
G4double bin,Thbin ,wg;
G4int ibin;
if(histo3)
if(nbinTh>0)
{
entryTh += 1. ;
@@ -956,13 +986,14 @@ void Em5RunAction::FillTh(G4double Th)
{
G4double thdeg=Th*180./pi;
G4cout << "theta < 0.001*dth (from plot excluded) theta="
<< setw(12) << setprecision(4) << thdeg << endl;
<< G4std::setw(12) << G4std::setprecision(4) << thdeg << G4endl;
wg=0. ;
}
distTh[ibin] += wg ;
}
#ifndef G4NOHIST
histo3->accumulate(Th/deg, wg) ;
#endif
}
}
@@ -976,7 +1007,7 @@ void Em5RunAction::FillThBack(G4double Th)
G4double bin,Thbin,wg ;
G4int ibin;
if(histo6)
if(nbinThback>0)
{
entryThback += 1. ;
@@ -995,12 +1026,14 @@ void Em5RunAction::FillThBack(G4double Th)
{
G4double thdeg=Th*180./pi;
G4cout << "theta < 0.001*dth (from plot excluded) theta="
<< setw(12) << setprecision(4) << thdeg << endl;
<< G4std::setw(12) << G4std::setprecision(4) << thdeg << G4endl;
wg=0. ;
}
distThback[ibin] += wg ;
}
#ifndef G4NOHIST
histo6->accumulate(Th/deg, wg) ;
#endif
}
}
@@ -1012,7 +1045,7 @@ void Em5RunAction::FillR(G4double R )
G4double bin ;
G4int ibin;
if(histo4)
if(nbinR>0)
{
entryR += 1. ;
Rmean += R ;
@@ -1028,7 +1061,9 @@ void Em5RunAction::FillR(G4double R )
ibin= bin ;
distR[ibin] += 1. ;
}
#ifndef G4NOHIST
histo4->accumulate(R/mm) ;
#endif
}
}
@@ -1039,7 +1074,7 @@ void Em5RunAction::Fillvertexz(G4double z )
G4double bin ;
G4int ibin;
if(histo9)
if(nbinvertexz>0)
{
entryvertexz += 1. ;
@@ -1053,7 +1088,9 @@ void Em5RunAction::Fillvertexz(G4double z )
ibin= bin ;
distvertexz[ibin] += 1. ;
}
#ifndef G4NOHIST
histo9->accumulate(z/mm) ;
#endif
}
}
@@ -1062,195 +1099,195 @@ void Em5RunAction::Fillvertexz(G4double z )
void Em5RunAction::SethistName(G4String name)
{
histName = name ;
G4cout << " hist file = " << histName << endl;
G4cout << " hist file = " << histName << G4endl;
}
void Em5RunAction::SetnbinStep(G4int nbin)
{
nbinStep = nbin ;
if(nbinStep>0)
G4cout << " Nb of bins in #step plot = " << nbinStep << endl ;
G4cout << " Nb of bins in #step plot = " << nbinStep << G4endl ;
}
void Em5RunAction::SetSteplow(G4double low)
{
Steplow = low ;
if(nbinStep>0)
G4cout << " low in the #step plot = " << Steplow << endl ;
G4cout << " low in the #step plot = " << Steplow << G4endl ;
}
void Em5RunAction::SetStephigh(G4double high)
{
Stephigh = high ;
if(nbinStep>0)
G4cout << " high in the #step plot = " << Stephigh << endl ;
G4cout << " high in the #step plot = " << Stephigh << G4endl ;
}
void Em5RunAction::SetnbinEn(G4int nbin)
{
nbinEn = nbin ;
if(nbinEn>0)
G4cout << " Nb of bins in Edep plot = " << nbinEn << endl ;
G4cout << " Nb of bins in Edep plot = " << nbinEn << G4endl ;
}
void Em5RunAction::SetEnlow(G4double Elow)
{
Enlow = Elow ;
if(nbinEn>0)
G4cout << " Elow in the Edep plot = " << Enlow << endl ;
G4cout << " Elow in the Edep plot = " << Enlow << G4endl ;
}
void Em5RunAction::SetEnhigh(G4double Ehigh)
{
Enhigh = Ehigh ;
if(nbinEn>0)
G4cout << " Ehigh in the Edep plot = " << Enhigh << endl ;
G4cout << " Ehigh in the Edep plot = " << Enhigh << G4endl ;
}
void Em5RunAction::SetnbinGamma(G4int nbin)
{
nbinGamma = nbin ;
if(nbinGamma>0)
G4cout << " Nb of bins in gamma spectrum plot = " << nbinGamma << endl ;
G4cout << " Nb of bins in gamma spectrum plot = " << nbinGamma << G4endl ;
}
void Em5RunAction::SetElowGamma(G4double Elow)
{
ElowGamma = Elow ;
if(nbinGamma>0)
G4cout << " Elow in the gamma spectrum plot = " << ElowGamma << endl ;
G4cout << " Elow in the gamma spectrum plot = " << ElowGamma << G4endl ;
}
void Em5RunAction::SetEhighGamma(G4double Ehigh)
{
EhighGamma = Ehigh ;
if(nbinGamma>0)
G4cout << " Ehigh in the gamma spectrum plot = " << EhighGamma << endl ;
G4cout << " Ehigh in the gamma spectrum plot = " << EhighGamma << G4endl ;
}
void Em5RunAction::SetnbinTt(G4int nbin)
{
nbinTt = nbin ;
if(nbinTt>0)
G4cout << " Nb of bins in Etransmisssion plot = " << nbinTt << endl ;
G4cout << " Nb of bins in Etransmisssion plot = " << nbinTt << G4endl ;
}
void Em5RunAction::SetTtlow(G4double Elow)
{
Ttlow = Elow ;
if(nbinTt>0)
G4cout << " Elow in the Etransmission plot = " << Ttlow << endl ;
G4cout << " Elow in the Etransmission plot = " << Ttlow << G4endl ;
}
void Em5RunAction::SetTthigh(G4double Ehigh)
{
Tthigh = Ehigh ;
if(nbinTt>0)
G4cout << " Ehigh in the Etransmission plot = " << Tthigh << endl ;
G4cout << " Ehigh in the Etransmission plot = " << Tthigh << G4endl ;
}
void Em5RunAction::SetnbinTb(G4int nbin)
{
nbinTb = nbin ;
if(nbinTb>0)
G4cout << " Nb of bins in Ebackscattered plot = " << nbinTb << endl ;
G4cout << " Nb of bins in Ebackscattered plot = " << nbinTb << G4endl ;
}
void Em5RunAction::SetTblow(G4double Elow)
{
Tblow = Elow ;
if(nbinTb>0)
G4cout << " Elow in the Ebackscattered plot = " << Tblow << endl ;
G4cout << " Elow in the Ebackscattered plot = " << Tblow << G4endl ;
}
void Em5RunAction::SetTbhigh(G4double Ehigh)
{
Tbhigh = Ehigh ;
if(nbinTb>0)
G4cout << " Ehigh in the Ebackscattered plot = " << Tbhigh << endl ;
G4cout << " Ehigh in the Ebackscattered plot = " << Tbhigh << G4endl ;
}
void Em5RunAction::SetnbinTsec(G4int nbin)
{
nbinTsec = nbin ;
if(nbinTsec>0)
G4cout << " Nb of bins in Tsecondary plot = " << nbinTsec << endl ;
G4cout << " Nb of bins in Tsecondary plot = " << nbinTsec << G4endl ;
}
void Em5RunAction::SetTseclow(G4double Elow)
{
Tseclow = Elow ;
if(nbinTsec>0)
G4cout << " Elow in the Tsecondary plot = " << Tseclow << endl ;
G4cout << " Elow in the Tsecondary plot = " << Tseclow << G4endl ;
}
void Em5RunAction::SetTsechigh(G4double Ehigh)
{
Tsechigh = Ehigh ;
if(nbinTsec>0)
G4cout << " Ehigh in the Tsecondary plot = " << Tsechigh << endl ;
G4cout << " Ehigh in the Tsecondary plot = " << Tsechigh << G4endl ;
}
void Em5RunAction::SetnbinR(G4int nbin)
{
nbinR = nbin ;
if(nbinR>0)
G4cout << " Nb of bins in R plot = " << nbinR << endl ;
G4cout << " Nb of bins in R plot = " << nbinR << G4endl ;
}
void Em5RunAction::SetRlow(G4double rlow)
{
Rlow = rlow ;
if(nbinR>0)
G4cout << " Rlow in the R plot = " << Rlow << endl ;
G4cout << " Rlow in the R plot = " << Rlow << G4endl ;
}
void Em5RunAction::SetRhigh(G4double rhigh)
{
Rhigh = rhigh ;
if(nbinR>0)
G4cout << " Rhigh in the R plot = " << Rhigh << endl ;
G4cout << " Rhigh in the R plot = " << Rhigh << G4endl ;
}
void Em5RunAction::Setnbinzvertex(G4int nbin)
{
nbinvertexz = nbin ;
if(nbinvertexz>0)
G4cout << " Nb of bins in Z plot = " << nbinvertexz << endl ;
G4cout << " Nb of bins in Z plot = " << nbinvertexz << G4endl ;
}
void Em5RunAction::Setzlow(G4double z)
{
zlow = z ;
if(nbinvertexz>0)
G4cout << " zlow in the Z plot = " << zlow << endl ;
G4cout << " zlow in the Z plot = " << zlow << G4endl ;
}
void Em5RunAction::Setzhigh(G4double z)
{
zhigh = z ;
if(nbinvertexz>0)
G4cout << " zhigh in the Z plot = " << zhigh << endl ;
G4cout << " zhigh in the Z plot = " << zhigh << G4endl ;
}
void Em5RunAction::SetnbinTh(G4int nbin)
{
nbinTh = nbin ;
if(nbinTh>0)
G4cout << " Nb of bins in Theta plot = " << nbinTh << endl ;
G4cout << " Nb of bins in Theta plot = " << nbinTh << G4endl ;
}
void Em5RunAction::SetThlow(G4double Tlow)
{
Thlow = Tlow ;
if(nbinTh>0)
G4cout << " Tlow in the Theta plot = " << Thlow << endl ;
G4cout << " Tlow in the Theta plot = " << Thlow << G4endl ;
}
void Em5RunAction::SetThhigh(G4double Thigh)
{
Thhigh = Thigh ;
if(nbinTh>0)
G4cout << " Thigh in the Theta plot = " << Thhigh << endl ;
G4cout << " Thigh in the Theta plot = " << Thhigh << G4endl ;
}
void Em5RunAction::SetnbinThBack(G4int nbin)
{
nbinThback = nbin ;
if(nbinThback>0)
G4cout << " Nb of bins in Theta plot = " << nbinThback << endl ;
G4cout << " Nb of bins in Theta plot = " << nbinThback << G4endl ;
}
void Em5RunAction::SetThlowBack(G4double Tlow)
{
Thlowback = Tlow ;
if(nbinThback>0)
G4cout << " Tlow in the Theta plot = " << Thlowback << endl ;
G4cout << " Tlow in the Theta plot = " << Thlowback << G4endl ;
}
void Em5RunAction::SetThhighBack(G4double Thigh)
{
Thhighback = Thigh ;
if(nbinThback>0)
G4cout << " Thigh in the Theta plot = " << Thhighback << endl ;
G4cout << " Thigh in the Theta plot = " << Thhighback << G4endl ;
}
void Em5RunAction::CountParticles(G4double nch,G4double nne)
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5RunMessenger.cc,v 1.1.4.1 1999/12/07 20:47:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5RunMessenger.cc,v 1.2 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -363,7 +363,7 @@ void Em5RunMessenger::SetNewValue(G4UIcommand* command,G4String newValues)
runAction->SetRndmFreq(RndmSaveCmd->GetNewIntValue(newValues));
if (command == RndmReadCmd)
{ G4cout << "\n---> rndm status restored from file: " << newValues << endl;
{ G4cout << "\n---> rndm status restored from file: " << newValues << G4endl;
HepRandom::restoreEngineStatus(newValues);
HepRandom::showEngineStatus();
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5StepCut.cc,v 1.1.4.1 1999/12/07 20:47:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5StepCut.cc,v 1.2 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -24,7 +24,7 @@ Em5StepCut::Em5StepCut(const G4String& aName)
: G4VDiscreteProcess(aName),MaxChargedStep(DBL_MAX)
{
if (verboseLevel>0) {
G4cout << GetProcessName() << " is created "<< endl;
G4cout << GetProcessName() << " is created "<< G4endl;
}
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5SteppingAction.cc,v 1.1.4.1 1999/12/07 20:47:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5SteppingAction.cc,v 1.2 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -25,7 +25,7 @@
#include "G4EventManager.hh"
#include "Em5SteppingMessenger.hh"
#include "G4ios.hh"
#include <iomanip.h>
#include "g4std/iomanip"
#include "G4UImanager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5SteppingMessenger.cc,v 1.1.4.1 1999/12/07 20:47:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5SteppingMessenger.cc,v 1.2 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,170 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5SteppingVerbose.cc,v 1.2 1999/12/15 14:49:10 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
//---------------------------------------------------------------
//
// Em5SteppingVerbose.cc
//
// Description:
// Implementation of the Em5SteppingVerbose class
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
//
//---------------------------------------------------------------
#include "Em5SteppingVerbose.hh"
#include "G4SteppingManager.hh"
#include "G4UnitsTable.hh"
////////////////////////////////////////////////
Em5SteppingVerbose::Em5SteppingVerbose()
////////////////////////////////////////////////
{
}
//////////////////////////////////////////////////
Em5SteppingVerbose::~Em5SteppingVerbose()
//////////////////////////////////////////////////
{
}
/////////////////////////////////////////
void Em5SteppingVerbose::StepInfo()
/////////////////////////////////////////
{
CopyState();
G4int prec = G4cout.precision(3);
if( verboseLevel >= 1 ){
if( verboseLevel >= 4 ) VerboseTrack();
if( verboseLevel >= 3 ){
G4cout << G4endl;
G4cout << G4std::setw( 5) << "#Step#" << " "
<< G4std::setw( 6) << "X" << " "
<< G4std::setw( 6) << "Y" << " "
<< G4std::setw( 6) << "Z" << " "
<< G4std::setw( 9) << "KineE" << " "
<< G4std::setw( 9) << "dEStep" << " "
<< G4std::setw(10) << "StepLeng"
<< G4std::setw(10) << "TrakLeng"
<< G4std::setw(10) << "NextVolu"
<< G4std::setw(10) << "Process" << G4endl;
}
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
// if( fStepStatus != fWorldBoundary){
if( fTrack->GetNextVolume() != 0 ) {
G4cout << G4std::setw(10) << fTrack->GetNextVolume()->GetName();
} else {
G4cout << G4std::setw(10) << "OutOfWorld";
}
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL){
G4cout << G4std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
->GetProcessName();
} else {
G4cout << "User Limit";
}
G4cout << G4endl;
if( verboseLevel == 2 ){
G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
fN2ndariesAlongStepDoIt +
fN2ndariesPostStepDoIt;
if(tN2ndariesTot>0){
G4cout << " :----- List of 2ndaries - "
<< "#SpawnInStep=" << G4std::setw(3) << tN2ndariesTot
<< "(Rest=" << G4std::setw(2) << fN2ndariesAtRestDoIt
<< ",Along=" << G4std::setw(2) << fN2ndariesAlongStepDoIt
<< ",Post=" << G4std::setw(2) << fN2ndariesPostStepDoIt
<< "), "
<< "#SpawnTotal=" << G4std::setw(3) << (*fSecondary).entries()
<< " ---------------"
<< G4endl;
for(G4int lp1=(*fSecondary).entries()-tN2ndariesTot;
lp1<(*fSecondary).entries(); lp1++){
G4cout << " : "
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
<< G4std::setw(10)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
G4cout << G4endl;
}
G4cout << " :-----------------------------"
<< "----------------------------------"
<< "-- EndOf2ndaries Info ---------------"
<< G4endl;
}
}
}
G4cout.precision(prec);
}
////////////////////////////////////////////////
void Em5SteppingVerbose::TrackingStarted()
////////////////////////////////////////////////
{
CopyState();
G4int prec = G4cout.precision(3);
if( verboseLevel > 0 ){
G4cout << G4std::setw( 5) << "Step#" << " "
<< G4std::setw( 6) << "X" << " "
<< G4std::setw( 6) << "Y" << " "
<< G4std::setw( 6) << "Z" << " "
<< G4std::setw( 9) << "KineE" << " "
<< G4std::setw( 9) << "dEStep" << " "
<< G4std::setw(10) << "StepLeng"
<< G4std::setw(10) << "TrakLeng"
<< G4std::setw(10) << "NextVolu"
<< G4std::setw(10) << "Process" << G4endl;
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
if(fTrack->GetNextVolume()){
G4cout << G4std::setw(10) << fTrack->GetNextVolume()->GetName() << " ";
} else {
G4cout << G4std::setw(10) << "OutOfWorld" << " ";
}
G4cout << G4std::setw(10) << "initStep" << G4endl;
}
G4cout.precision(prec);
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em5VisManager.cc,v 1.1.4.1 1999/12/07 20:47:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em5VisManager.cc,v 1.2 1999/12/15 14:49:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison 24th January 1998.
@@ -131,7 +131,7 @@ void Em5VisManager::RegisterGraphicsSystems () {
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."
<< endl;
<< G4endl;
PrintAvailableGraphicsSystems ();
}
}