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
+2 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03CalorHit.cc,v 1.1.10.1 1999/12/07 20:47:29 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03CalorHit.cc,v 1.2 1999/12/15 14:49:25 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: ExN03CalorimeterSD.cc,v 1.2.8.1 1999/12/07 20:47:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03CalorimeterSD.cc,v 1.3 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -79,7 +79,7 @@ G4bool ExN03CalorimeterSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist)
if (physVol == Detector->GetGap ()) calHit->AddGap(edep,stepl);
HitID[LayerNumber] = CalCollection->insert(calHit) - 1;
if (verboseLevel>0)
G4cout << " New Calorimeter Hit on layer: " << LayerNumber << endl;
G4cout << " New Calorimeter Hit on layer: " << LayerNumber << G4endl;
}
else
{
@@ -88,7 +88,7 @@ G4bool ExN03CalorimeterSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist)
if (physVol == Detector->GetGap())
(*CalCollection)[HitID[LayerNumber]]->AddGap(edep,stepl);
if (verboseLevel>0)
G4cout << " Energy added to Layer: " << LayerNumber << endl;
G4cout << " Energy added to Layer: " << LayerNumber << G4endl;
}
return true;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03DetectorConstruction.cc,v 1.2.8.1 1999/12/07 20:47:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03DetectorConstruction.cc,v 1.4 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -211,7 +211,7 @@ G4Material* beam = new G4Material(name="Beam", density, ncomponents=1,
kStateGas,temperature,pressure);
beam->AddMaterial(Air, fractionmass=1.);
G4cout << *(G4Material::GetMaterialTable()) << endl;
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
//default materials of the calorimeter
AbsorberMaterial = Pb;
@@ -371,11 +371,12 @@ G4VPhysicalVolume* ExN03DetectorConstruction::ConstructCalorimeter()
void ExN03DetectorConstruction::PrintCalorParameters()
{
G4cout << "\n The calorimeter is made of " << NbOfLayers << " layers of: [ "
<< AbsorberThickness/mm << "mm of " << AbsorberMaterial->GetName()
<< " + "
<< GapThickness/mm << "mm of " << GapMaterial->GetName() << " ] "
<< endl;
G4cout << "\n------------------------------------------------------------"
<< "\n---> The calorimeter is " << NbOfLayers << " layers of: [ "
<< AbsorberThickness/mm << "mm of " << AbsorberMaterial->GetName()
<< " + "
<< GapThickness/mm << "mm of " << GapMaterial->GetName() << " ] "
<< "\n------------------------------------------------------------\n";
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03DetectorMessenger.cc,v 1.2.8.1 1999/12/07 20:47:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03DetectorMessenger.cc,v 1.3 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
+40 -37
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.4.6.1.2.1 1999/12/07 20:47:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03EventAction.cc,v 1.8 2000/01/24 14:46:01 stesting Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -57,7 +57,7 @@ void ExN03EventAction::BeginOfEventAction(const G4Event* evt)
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
{
G4cout << "\n---> Event: " << evtNb << endl;
G4cout << "\n---> Event: " << evtNb << G4endl;
HepRandom::showEngineStatus();
}
@@ -72,41 +72,46 @@ void ExN03EventAction::BeginOfEventAction(const G4Event* evt)
void ExN03EventAction::EndOfEventAction(const G4Event* evt)
{
G4cout << ">>> Event " << evt->GetEventID() << endl;
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." << endl;
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: " << setw(7) << G4BestUnit(totEAbs,"Energy")
<< " total track length: " << setw(7) << G4BestUnit(totLAbs,"Length")
<< endl
<< " Gap: total energy: " << setw(7) << G4BestUnit(totEGap,"Energy")
<< " total track length: " << setw(7) << G4BestUnit(totLGap,"Length")
<< endl;
}
G4int event_id = evt->GetEventID();
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
G4int n_trajectories = 0;
if(trajectoryContainer)
{ n_trajectories = trajectoryContainer->entries(); }
G4cout << " " << n_trajectories
<< " trajectories stored in this event." << endl;
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
if (event_id < 100 || event_id%100 == 0) {
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())
{
@@ -120,5 +125,3 @@ void ExN03EventAction::EndOfEventAction(const G4Event* evt)
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03EventActionMessenger.cc,v 1.2.8.1 1999/12/07 20:47:30 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03EventActionMessenger.cc,v 1.3 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
+4 -4
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.4.6.1 1999/12/07 20:47:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03PhysicsList.cc,v 1.6 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -28,7 +28,7 @@
ExN03PhysicsList::ExN03PhysicsList(): G4VUserPhysicsList()
{
currentDefaultCut = defaultCutValue = 2.0*mm;
currentDefaultCut = defaultCutValue = 1.0*mm;
cutForGamma = defaultCutValue;
cutForElectron = defaultCutValue;
cutForProton = defaultCutValue;
@@ -226,7 +226,7 @@ void ExN03PhysicsList::SetCuts()
if (verboseLevel >0){
G4cout << "ExN03PhysicsList::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+,
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03PrimaryGeneratorAction.cc,v 1.1.10.1 1999/12/07 20:47:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03PrimaryGeneratorAction.cc,v 1.2 1999/12/15 14:49:25 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: ExN03PrimaryGeneratorMessenger.cc,v 1.2.8.1 1999/12/07 20:47:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03PrimaryGeneratorMessenger.cc,v 1.3 1999/12/15 14:49:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
+3 -3
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03RunAction.cc,v 1.6.4.1 1999/12/07 20:47:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03RunAction.cc,v 1.7 1999/12/15 14:49:26 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -36,7 +36,7 @@ ExN03RunAction::~ExN03RunAction()
void ExN03RunAction::BeginOfRunAction(const G4Run* aRun)
{
G4cout << "### Run " << aRun->GetRunID() << " start." << endl;
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
if (G4VVisManager::GetConcreteInstance())
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ExN03SteppingAction.cc,v 1.2.8.1 1999/12/07 20:47:31 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03SteppingAction.cc,v 1.3 1999/12/15 14:49:26 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -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: ExN03SteppingVerbose.cc,v 1.2 1999/12/15 14:49:26 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
//---------------------------------------------------------------
//
// ExN03SteppingVerbose.cc
//
// 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)
//
//---------------------------------------------------------------
#include "ExN03SteppingVerbose.hh"
#include "G4SteppingManager.hh"
#include "G4UnitsTable.hh"
////////////////////////////////////////////////
ExN03SteppingVerbose::ExN03SteppingVerbose()
////////////////////////////////////////////////
{
}
//////////////////////////////////////////////////
ExN03SteppingVerbose::~ExN03SteppingVerbose()
//////////////////////////////////////////////////
{
}
/////////////////////////////////////////
void ExN03SteppingVerbose::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 ExN03SteppingVerbose::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);
}
+3 -3
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.2.8.1 1999/12/07 20:47:32 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ExN03VisManager.cc,v 1.3 1999/12/15 14:49:26 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison 24th January 1998.
@@ -123,7 +123,7 @@ void ExN03VisManager::RegisterGraphicsSystems () {
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."
<< endl;
<< G4endl;
PrintAvailableGraphicsSystems ();
}
}