Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: ExN03CalorHit.cc,v 1.2 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: ExN03CalorimeterSD.cc,v 1.3 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: ExN03DetectorConstruction.cc,v 1.4 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: ExN03DetectorMessenger.cc,v 1.3 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
+36 -51
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03EventAction.cc,v 1.8 2000/01/24 14:46:01 stesting Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: ExN03EventAction.cc,v 1.10 2000/06/05 09:54:37 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
@@ -37,7 +37,7 @@
ExN03EventAction::ExN03EventAction()
:calorimeterCollID(-1),drawFlag("all"),eventMessenger(NULL),
printModulo(10000)
printModulo(1)
{
eventMessenger = new ExN03EventActionMessenger(this);
}
@@ -57,7 +57,7 @@ void ExN03EventAction::BeginOfEventAction(const G4Event* evt)
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
{
G4cout << "\n---> Event: " << evtNb << G4endl;
G4cout << "\n---> Begin of event: " << evtNb << G4endl;
HepRandom::showEngineStatus();
}
@@ -72,56 +72,41 @@ void ExN03EventAction::BeginOfEventAction(const G4Event* evt)
void ExN03EventAction::EndOfEventAction(const G4Event* evt)
{
G4int event_id = evt->GetEventID();
G4int evtNb = evt->GetEventID();
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
G4int n_trajectories = 0;
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
ExN03CalorHitsCollection* CHC = NULL;
G4int n_hit = 0;
G4double totEAbs=0, totLAbs=0, totEGap=0, totLGap=0;
if (HCE) CHC = (ExN03CalorHitsCollection*)(HCE->GetHC(calorimeterCollID));
if (event_id < 100 || event_id%100 == 0) {
if (CHC)
{
n_hit = CHC->entries();
for (G4int i=0;i<n_hit;i++)
{
totEAbs += (*CHC)[i]->GetEdepAbs();
totLAbs += (*CHC)[i]->GetTrakAbs();
totEGap += (*CHC)[i]->GetEdepGap();
totLGap += (*CHC)[i]->GetTrakGap();
}
}
if (evtNb%printModulo == 0) {
G4cout << "---> End of event: " << evtNb << G4endl;
G4cout << ">>> Event " << evt->GetEventID() << G4endl;
G4cout << " " << n_trajectories
<< " trajectories stored in this event." << G4endl;
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
ExN03CalorHitsCollection* CHC = NULL;
if (HCE)
CHC = (ExN03CalorHitsCollection*)(HCE->GetHC(calorimeterCollID));
if (CHC)
{
int n_hit = CHC->entries();
G4cout << " " << n_hit
<< " hits are stored in ExN03CalorHitsCollection." << G4endl;
G4double totEAbs=0, totLAbs=0, totEGap=0, totLGap=0;
for (int i=0;i<n_hit;i++)
{
totEAbs += (*CHC)[i]->GetEdepAbs();
totLAbs += (*CHC)[i]->GetTrakAbs();
totEGap += (*CHC)[i]->GetEdepGap();
totLGap += (*CHC)[i]->GetTrakGap();
}
G4cout
<< " Absorber: total energy: " << G4std::setw(7) << G4BestUnit(totEAbs,"Energy")
<< " total track length: " << G4std::setw(7) << G4BestUnit(totLAbs,"Length")
<< G4endl
<< " Gap: total energy: " << G4std::setw(7) << G4BestUnit(totEGap,"Energy")
<< " total track length: " << G4std::setw(7) << G4BestUnit(totLGap,"Length")
<< G4endl;
}
}
if(G4VVisManager::GetConcreteInstance())
{
for(G4int i=0; i<n_trajectories; i++)
{ G4Trajectory* trj = (G4Trajectory *)((*(evt->GetTrajectoryContainer()))[i]);
if (drawFlag == "all") trj->DrawTrajectory(50);
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
trj->DrawTrajectory(50);
}
}
G4cout
<< " Absorber: total energy: " << G4std::setw(7) << G4BestUnit(totEAbs,"Energy")
<< " total track length: " << G4std::setw(7) << G4BestUnit(totLAbs,"Length")
<< G4endl
<< " Gap: total energy: " << G4std::setw(7) << G4BestUnit(totEGap,"Energy")
<< " total track length: " << G4std::setw(7) << G4BestUnit(totLGap,"Length")
<< G4endl;
G4cout << "\n " << n_hit
<< " hits are stored in ExN03CalorHitsCollection." << G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: ExN03EventActionMessenger.cc,v 1.3 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
+94 -32
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03PhysicsList.cc,v 1.6 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: ExN03PhysicsList.cc,v 1.8 2000/05/24 09:53:05 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
@@ -96,7 +96,6 @@ void ExN03PhysicsList::ConstructMesons()
G4PionZero::PionZeroDefinition();
G4Eta::EtaDefinition();
G4EtaPrime::EtaPrimeDefinition();
G4RhoZero::RhoZeroDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
G4KaonZero::KaonZeroDefinition();
@@ -155,42 +154,104 @@ void ExN03PhysicsList::ConstructEM()
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
//gamma
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
pmanager->AddDiscreteProcess(new G4ComptonScattering());
// gamma
pmanager->AddDiscreteProcess(new G4GammaConversion());
pmanager->AddDiscreteProcess(new G4ComptonScattering());
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
} else if (particleName == "e-") {
//electron
pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
pmanager->AddProcess(new G4eIonisation(), -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung(), -1,-1,3);
//electron
G4VProcess* theeminusMultipleScattering = new G4MultipleScattering();
G4VProcess* theeminusIonisation = new G4eIonisation();
G4VProcess* theeminusBremsstrahlung = new G4eBremsstrahlung();
//
// add processes
pmanager->AddProcess(theeminusMultipleScattering);
pmanager->AddProcess(theeminusIonisation);
pmanager->AddProcess(theeminusBremsstrahlung);
//
// set ordering for AlongStepDoIt
pmanager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
pmanager->SetProcessOrdering(theeminusIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
pmanager->SetProcessOrdering(theeminusIonisation, idxPostStep,2);
pmanager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep,3);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
pmanager->AddProcess(new G4eIonisation(), -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung(), -1,-1,3);
pmanager->AddProcess(new G4eplusAnnihilation(), 0,-1,4);
//positron
G4VProcess* theeplusMultipleScattering = new G4MultipleScattering();
G4VProcess* theeplusIonisation = new G4eIonisation();
G4VProcess* theeplusBremsstrahlung = new G4eBremsstrahlung();
G4VProcess* theeplusAnnihilation = new G4eplusAnnihilation();
//
// add processes
pmanager->AddProcess(theeplusMultipleScattering);
pmanager->AddProcess(theeplusIonisation);
pmanager->AddProcess(theeplusBremsstrahlung);
pmanager->AddProcess(theeplusAnnihilation);
//
// set ordering for AtRestDoIt
pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
//
// set ordering for AlongStepDoIt
pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
pmanager->SetProcessOrdering(theeplusIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
pmanager->SetProcessOrdering(theeplusIonisation, idxPostStep,2);
pmanager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep,3);
pmanager->SetProcessOrdering(theeplusAnnihilation, idxPostStep,4);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
pmanager->AddProcess(new G4MultipleScattering(),-1, 1,1);
pmanager->AddProcess(new G4MuIonisation(), -1, 2,2);
pmanager->AddProcess(new G4MuBremsstrahlung(), -1,-1,3);
pmanager->AddProcess(new G4MuPairProduction(), -1,-1,4);
} else if ((!particle->IsShortLived()) &&
//muon
G4VProcess* aMultipleScattering = new G4MultipleScattering();
G4VProcess* aBremsstrahlung = new G4MuBremsstrahlung();
G4VProcess* aPairProduction = new G4MuPairProduction();
G4VProcess* anIonisation = new G4MuIonisation();
//
// add processes
pmanager->AddProcess(anIonisation);
pmanager->AddProcess(aMultipleScattering);
pmanager->AddProcess(aBremsstrahlung);
pmanager->AddProcess(aPairProduction);
//
// set ordering for AlongStepDoIt
pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);
pmanager->SetProcessOrdering(aBremsstrahlung, idxPostStep,3);
pmanager->SetProcessOrdering(aPairProduction, idxPostStep,4);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(), -1,2,2);
// all others charged particles except geantino
G4VProcess* aMultipleScattering = new G4MultipleScattering();
G4VProcess* anIonisation = new G4hIonisation();
//
// add processes
pmanager->AddProcess(anIonisation);
pmanager->AddProcess(aMultipleScattering);
//
// set ordering for AlongStepDoIt
pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
//
// set ordering for PostStepDoIt
pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4Decay.hh"
@@ -248,39 +309,40 @@ void ExN03PhysicsList::SetCuts()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExN03PhysicsList::SetCutForGamma(G4double cut)
void ExN03PhysicsList::SetCutForGamma(G4double cut)
{
ResetCuts();
cutForGamma = cut;
}
void ExN03PhysicsList::SetCutForElectron(G4double cut)
void ExN03PhysicsList::SetCutForElectron(G4double cut)
{
ResetCuts();
cutForElectron = cut;
}
void ExN03PhysicsList::SetCutForProton(G4double cut)
void ExN03PhysicsList::SetCutForProton(G4double cut)
{
ResetCuts();
cutForProton = cut;
}
G4double ExN03PhysicsList::GetCutForGamma() const
G4double ExN03PhysicsList::GetCutForGamma() const
{
return cutForGamma;
}
G4double ExN03PhysicsList::GetCutForElectron() const
G4double ExN03PhysicsList::GetCutForElectron() const
{
return cutForElectron;
}
G4double ExN03PhysicsList::GetCutForProton() const
G4double ExN03PhysicsList::GetCutForProton() const
{
return cutForGamma;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: ExN03PrimaryGeneratorAction.cc,v 1.2 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: ExN03PrimaryGeneratorMessenger.cc,v 1.3 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
+1 -1
View File
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: ExN03RunAction.cc,v 1.7 1999/12/15 14:49:26 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: ExN03SteppingAction.cc,v 1.3 1999/12/15 14:49:26 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// GEANT4 tag $Name: geant4-02-00 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03SteppingVerbose.cc,v 1.2 1999/12/15 14:49:26 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: ExN03SteppingVerbose.cc,v 1.3 2000/02/28 18:10:15 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
//---------------------------------------------------------------
@@ -15,10 +15,6 @@
//
// Description:
// Implementation of the ExN03SteppingVerbose 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)
//
//---------------------------------------------------------------
+10 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03VisManager.cc,v 1.3 1999/12/15 14:49:26 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: ExN03VisManager.cc,v 1.4 2000/06/29 07:16:21 gcosmo Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// John Allison 24th January 1998.
@@ -66,6 +66,10 @@
#include "G4VRML2File.hh"
#endif
#ifdef G4VIS_USE_RAYTRACER
#include "G4RayTracer.hh"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExN03VisManager::ExN03VisManager () {}
@@ -120,6 +124,10 @@ void ExN03VisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4VRML2File);
#endif
#ifdef G4VIS_USE_RAYTRACER
RegisterGraphicsSystem (new G4RayTracer);
#endif
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."