Import Geant4 8.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:07:44 +02:00
parent fe73f43734
commit 75c7fd177d
764 changed files with 45230 additions and 95238 deletions
@@ -88,12 +88,11 @@ void HistoManager::bookHisto()
nTuple = false;
nHisto = 10;
// initialise acceptance
for(G4int i=0; i<nmax; i++) {
edep.push_back(0.0);
erms.push_back(0.0);
edeptrue.push_back(1.0);
rmstrue.push_back(1.0);
limittrue.push_back(DBL_MAX);
edeptrue[i] = 1.0;
rmstrue[i] = 1.0;
limittrue[i]= DBL_MAX;
}
histo->add1D("10",
@@ -135,11 +134,21 @@ void HistoManager::bookHisto()
void HistoManager::BeginOfRun()
{
// initilise scoring
n_evt = 0;
n_elec = 0;
n_posit= 0;
n_gam = 0;
n_step = 0;
for(G4int i=0; i<nmax; i++) {
stat[i] = 0;
edep[i] = 0.0;
erms[i] = 0.0;
edeptr[i] = 0.0;
ermstr[i] = 0.0;
}
histo->book();
if(verbose > 0) {
@@ -180,11 +189,28 @@ void HistoManager::EndOfRun()
G4cout << std::setprecision(4) << "Average number of gamma " << xg << G4endl;
G4cout << std::setprecision(4) << "Average number of e+ " << xp << G4endl;
G4cout << std::setprecision(4) << "Average number of steps " << xs << G4endl;
for(j=0; j<3; j++) {
G4cout << std::setprecision(4) << "Edep " << nam[j] << " = " << edep[j]
<< " +- " << erms[j]*std::sqrt(x);
if(edep[j] > 0.0)
G4cout << " res= " << f*erms[j]/edep[j] << " %";
G4double e = edep[j];
G4double s = erms[j];
G4double r = s*std::sqrt(x);
// compute trancated means
if(limittrue[j] < DBL_MAX) {
G4double n = G4double(stat[j]);
if(n > 0) n = 1.0/n;
e = edeptr[j]*n;
s = ermstr[j]*n;
r = s - e*e;
s = 0.0;
if(r > 0.0) s = std::sqrt(r)/beamEnergy;
e /= beamEnergy;
r = s*std::sqrt(n);
}
G4cout << std::setprecision(4) << "Edep " << nam[j] << " = " << e
<< " +- " << s;
if(e > 0.0) G4cout << " res= " << f*s/e << " %";
G4cout << G4endl;
}
G4cout<<"========================================================"<<G4endl;
@@ -254,13 +280,31 @@ void HistoManager::EndOfEvent()
float nn = (double)(Nvertex.size());
histo->fill(9,nn,1.0);
edep[0] += E[12];
erms[0] += E[12]*E[12];
G4double e0 = E[12];
edep[0] += e0;
erms[0] += e0*e0;
edep[1] += e9;
erms[1] += e9*e9;
edep[2] += e25;
erms[2] += e25*e25;
// trancated mean
if(limittrue[0]<DBL_MAX && std::abs(e0/beamEnergy-edeptrue[0])<rmstrue[0]*limittrue[0]) {
stat[0] += 1;
edeptr[0] += e0;
ermstr[0] += e0*e0;
}
if(limittrue[1]<DBL_MAX && std::abs(e9/beamEnergy-edeptrue[1])<rmstrue[1]*limittrue[1]) {
stat[1] += 1;
edeptr[1] += e9;
ermstr[1] += e9*e9;
}
if(limittrue[2]<DBL_MAX && std::abs(e25/beamEnergy-edeptrue[2])<rmstrue[2]*limittrue[2]) {
stat[2] += 1;
edeptr[2] += e25;
ermstr[2] += e25*e25;
}
if(nTuple) histo->addRow();
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: PhysListEmLivermore.cc,v 1.1 2006/11/17 17:45:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: PhysListEmLivermore.cc,v 1.2 2007/01/08 16:29:42 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -108,8 +108,8 @@ void PhysListEmLivermore::ConstructProcess()
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
///pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1);
///pmanager->AddProcess(new G4hLowEnergyIonisation, -1, 2, 2);
pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1);
pmanager->AddProcess(new G4hLowEnergyIonisation, -1, 2, 2);
}
}
}
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysicsList.cc,v 1.16 2006/11/22 19:09:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: PhysicsList.cc,v 1.17 2007/04/24 14:20:05 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
//---------------------------------------------------------------------------
//
@@ -178,14 +178,14 @@ void PhysicsList::AddPhysicsList(const G4String& name)
if (verboseLevel > 0)
G4cout << "PhysicsList::Set " << name << " EM physics" << G4endl;
} else if (name == "Livermore") {
} else if (name == "livermore") {
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmLivermore();
if (verboseLevel > 0)
G4cout << "PhysicsList::Set Livermore EM physics" << G4endl;
} else if (name == "Penelope") {
} else if (name == "penelope") {
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmPenelope();