Import Geant4 7.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 11:11:55 +02:00
parent e083ffb441
commit 516dbf1a58
5914 changed files with 202605 additions and 71141 deletions
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01DetectorConstruction.cc,v 1.7 2003/10/14 18:15:26 perl Exp $
// $Id: A01DetectorConstruction.cc,v 1.8 2004/12/03 15:30:34 gcosmo Exp $
// --------------------------------------------------------------
//
@@ -153,8 +153,8 @@ G4VPhysicalVolume* A01DetectorConstruction::Construct()
G4VSolid* secondArmSolid = new G4Box("secondArmBox",2.*m,2.*m,3.5*m);
G4LogicalVolume* secondArmLogical
= new G4LogicalVolume(secondArmSolid,air,"secondArmLogical",0,0,0);
G4double x = -5.*m * sin(armAngle);
G4double z = 5.*m * cos(armAngle);
G4double x = -5.*m * std::sin(armAngle);
G4double z = 5.*m * std::cos(armAngle);
secondArmPhys
= new G4PVPlacement(armRotation,G4ThreeVector(x,0.,z),secondArmLogical,
"secondArmPhys",worldLogical,0,0);
@@ -450,8 +450,8 @@ void A01DetectorConstruction::SetArmAngle(G4double val)
armAngle = val;
*armRotation = G4RotationMatrix(); // make it unit vector
armRotation->rotateY(armAngle);
G4double x = -5.*m * sin(armAngle);
G4double z = 5.*m * cos(armAngle);
G4double x = -5.*m * std::sin(armAngle);
G4double z = 5.*m * std::cos(armAngle);
secondArmPhys->SetTranslation(G4ThreeVector(x,0.,z));
// tell G4RunManager that we change the geometry
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01EMPhysics.cc,v 1.6 2004/01/06 02:53:22 tkoi Exp $
// $Id: A01EMPhysics.cc,v 1.7 2004/11/23 04:02:02 tkoi Exp $
// --------------------------------------------------------------
//
//
@@ -55,22 +55,8 @@ A01EMPhysics::~A01EMPhysics()
#include "G4NeutrinoE.hh"
#include "G4AntiNeutrinoE.hh"
void A01EMPhysics::ConstructParticle()
{
// gamma
G4Gamma::GammaDefinition();
// electron
G4Electron::ElectronDefinition();
G4Positron::PositronDefinition();
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
}
#include "G4ProcessManager.hh"
void A01EMPhysics::ConstructProcess()
{
G4ProcessManager * pManager = 0;
@@ -20,9 +20,10 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01GeneralPhysics.cc,v 1.4 2003/06/16 16:47:02 gunter Exp $
// $Id: A01GeneralPhysics.cc,v 1.5 2004/11/23 04:02:02 tkoi Exp $
// --------------------------------------------------------------
//
// 22-Nov-2004 Construt ALL Particles by T. Koi
#include "A01GeneralPhysics.hh"
@@ -40,31 +41,66 @@ A01GeneralPhysics::~A01GeneralPhysics()
{
}
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
// Bosons
#include "G4ChargedGeantino.hh"
#include "G4Geantino.hh"
#include "G4BaryonConstructor.hh"
#include "G4BosonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
void A01GeneralPhysics::ConstructParticle()
{
// pseudo-particles
G4Geantino::GeantinoDefinition();
G4ChargedGeantino::ChargedGeantinoDefinition();
// In Alphabetical Order
// Construct all barions
G4BaryonConstructor* baryonConstructor = new G4BaryonConstructor();
baryonConstructor -> ConstructParticle();
delete baryonConstructor;
// Construct all bosons (including geantinos)
G4BosonConstructor* bosonConstructor = new G4BosonConstructor();
bosonConstructor -> ConstructParticle();
delete bosonConstructor;
// Construct all ions
G4IonConstructor* ionConstructor = new G4IonConstructor();
ionConstructor -> ConstructParticle();
delete ionConstructor;
// Construct all leptons
G4LeptonConstructor* leptonConstructor = new G4LeptonConstructor();
leptonConstructor -> ConstructParticle();
delete leptonConstructor;
// Construct all mesons
G4MesonConstructor* mesonConstructor = new G4MesonConstructor();
mesonConstructor -> ConstructParticle();
delete mesonConstructor;
// Construct resonaces and quarks
G4ShortLivedConstructor* shortLivedConstructor = new G4ShortLivedConstructor();
shortLivedConstructor -> ConstructParticle();
delete shortLivedConstructor;
}
#include "G4Decay.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
void A01GeneralPhysics::ConstructProcess()
{
// Add Decay Process
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (fDecayProcess.IsApplicable(*particle)) {
pmanager ->AddProcess(&fDecayProcess);
if (theDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(theDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager ->SetProcessOrdering(&fDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(&fDecayProcess, idxAtRest);
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01HadronPhysics.cc,v 1.6 2003/10/13 02:13:38 tkoi Exp $
// $Id: A01HadronPhysics.cc,v 1.7 2004/11/23 04:02:02 tkoi Exp $
// --------------------------------------------------------------
//
// 09-Oct-2003 Hadron Physics List with Parameterization Model by T. Koi
@@ -45,26 +45,6 @@ A01HadronPhysics::~A01HadronPhysics()
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
void A01HadronPhysics::ConstructParticle()
{
// Construct all mesons
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
// Construct all barions
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
// Construct resonaces and quarks
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
void A01HadronPhysics::ConstructProcess()
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01IonPhysics.cc,v 1.7 2004/01/06 02:53:22 tkoi Exp $
// $Id: A01IonPhysics.cc,v 1.8 2004/11/23 04:02:03 tkoi Exp $
// --------------------------------------------------------------
//
// 13-Oct-2003 Add Comment for Ionisation of Generic Ion by T. Koi
@@ -46,17 +46,6 @@ A01IonPhysics::~A01IonPhysics()
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
// Nuclei
#include "G4IonConstructor.hh"
void A01IonPhysics::ConstructParticle()
{
// Construct light ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
#include "G4ProcessManager.hh"
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01MagneticField.cc,v 1.4 2003/10/12 14:08:14 asaim Exp $
// $Id: A01MagneticField.cc,v 1.5 2004/12/03 15:30:34 gcosmo Exp $
// --------------------------------------------------------------
//
@@ -42,7 +42,7 @@ void A01MagneticField::GetFieldValue(const double Point[3],double *Bfield) const
{
Bfield[0] = 0.;
Bfield[2] = 0.;
if(abs(Point[1])<ymax && (sqr(Point[0])+sqr(Point[2]))<rmax_sq)
if(std::abs(Point[1])<ymax && (sqr(Point[0])+sqr(Point[2]))<rmax_sq)
{ Bfield[1] = By; }
else
{ Bfield[1] = 0.; }
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01MuonPhysics.cc,v 1.6 2004/01/06 02:53:22 tkoi Exp $
// $Id: A01MuonPhysics.cc,v 1.7 2004/11/23 04:02:03 tkoi Exp $
// --------------------------------------------------------------
//
// 09-Oct-2003 mu+- tau+- processes are changed by T. Koi
@@ -49,27 +49,6 @@ A01MuonPhysics::~A01MuonPhysics()
#include "G4MuonMinus.hh"
#include "G4TauMinus.hh"
#include "G4TauPlus.hh"
#include "G4NeutrinoTau.hh"
#include "G4AntiNeutrinoTau.hh"
#include "G4NeutrinoMu.hh"
#include "G4AntiNeutrinoMu.hh"
void A01MuonPhysics::ConstructParticle()
{
// Mu
G4MuonPlus::MuonPlusDefinition();
G4MuonMinus::MuonMinusDefinition();
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
// Tau
G4TauMinus::TauMinusDefinition();
G4TauPlus::TauPlusDefinition();
G4NeutrinoTau::NeutrinoTauDefinition();
G4AntiNeutrinoTau::AntiNeutrinoTauDefinition();
}
#include "G4ProcessManager.hh"
@@ -20,11 +20,13 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01PhysicsList.cc,v 1.6 2004/01/30 00:56:55 tkoi Exp $
// $Id: A01PhysicsList.cc,v 1.7 2004/11/23 04:02:03 tkoi Exp $
// --------------------------------------------------------------
//
// 28-Jan-04 Add QGSP_BERT and QGSP_BIC for hadronic lists. T. Koi
// 22-Nov-04 Comment out QGSP_BERT and QGSP_BIC
// Output Notificaiton message
// All Particles are created in GeneralPhysics
#include "A01PhysicsList.hh"
@@ -47,30 +49,44 @@
#include "A01HadronPhysics.hh"
#include "A01IonPhysics.hh"
#include "HadronPhysicsQGSP_BERT.hh"
#include "HadronPhysicsQGSP_BIC.hh"
//#include "HadronPhysicsQGSP_BERT.hh"
//#include "HadronPhysicsQGSP_BIC.hh"
A01PhysicsList::A01PhysicsList(): G4VModularPhysicsList()
{
G4cout << "You are using the A01PhysicsList" << G4endl;
G4cout << "Full set of particles (barions bosons and mesons) will be created and" << G4endl;
G4cout << "Standard EM Physics and Low & High Energy parameterized models will be applied." << G4endl;
G4cout << "A01PhysicsList is optimized for robustness" << G4endl;
G4cout << "and not for any particular usage." << G4endl;
G4cout << "For the hadronic physics, educated guesses of physics list are prepared for various use cases." << G4endl;
G4cout << "When you will start REAL calculations for your own interest," << G4endl;
G4cout << "please consider the usage of hadronic_lists instead of A01PhysicsLists." << G4endl;
G4cout << "More information can also be found from the Geant4 HyperNews." << G4endl;
G4cout << "http://geant4-hn.slac.stanford.edu:5090/Geant4-HyperNews/index" << G4endl;
G4cout << "" << G4endl;
// default cut value (1.0mm)
defaultCutValue = 1.0*mm;
SetVerboseLevel(1);
// General Physics
// General Physics ( Create ALL Particle and apply Decay )
RegisterPhysics( new A01GeneralPhysics("general") );
// EM Physics
// EM Physics ( Apply related Processes to gamma and e-/+)
RegisterPhysics( new A01EMPhysics("standard EM"));
// Muon Physics
// Muon Physics ( Apply related processes to mu and tau
RegisterPhysics( new A01MuonPhysics("muon"));
// Hadron Physics
//RegisterPhysics( new A01HadronPhysics("hadron"));
RegisterPhysics( new HadronPhysicsQGSP_BERT("hadron"));
// Hadron Physics ( Apply related processes to hadrons )
RegisterPhysics( new A01HadronPhysics("hadron"));
// We do not use hadronic lists since v7.
//RegisterPhysics( new HadronPhysicsQGSP_BERT("hadron"));
//RegisterPhysics( new HadronPhysicsQGSP_BIC("hadron"));
// Ion Physics
// Ion Physics ( Apply related processes to ions )
RegisterPhysics( new A01IonPhysics("ion"));
}
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01PrimaryGeneratorAction.cc,v 1.3 2002/12/13 11:34:34 gunter Exp $
// $Id: A01PrimaryGeneratorAction.cc,v 1.4 2004/12/03 15:30:34 gcosmo Exp $
// --------------------------------------------------------------
//
@@ -100,11 +100,11 @@ void A01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
G4double pp = momentum + (G4UniformRand()-0.5)*sigmaMomentum;
G4double mass = particle->GetPDGMass();
G4double Ekin = sqrt(pp*pp+mass*mass)-mass;
G4double Ekin = std::sqrt(pp*pp+mass*mass)-mass;
particleGun->SetParticleEnergy(Ekin);
G4double angle = (G4UniformRand()-0.5)*sigmaAngle;
particleGun->SetParticleMomentumDirection(G4ThreeVector(sin(angle),0.,cos(angle)));
particleGun->SetParticleMomentumDirection(G4ThreeVector(std::sin(angle),0.,std::cos(angle)));
particleGun->GeneratePrimaryVertex(anEvent);
}