Import Geant4 3.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:10:37 +02:00
parent 137e303ecc
commit 36c080dca6
3464 changed files with 119310 additions and 52696 deletions
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3CalorHit.cc,v 1.2 1999/12/15 14:49:02 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3CalorHit.cc,v 1.2.4.1 2001/06/28 19:06:57 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3CalorimeterSD.cc,v 1.2 1999/12/15 14:49:03 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3CalorimeterSD.cc,v 1.2.4.1 2001/06/28 19:06:58 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3DetectorConstruction.cc,v 1.2 1999/12/15 14:49:03 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3DetectorConstruction.cc,v 1.3.2.1 2001/06/28 19:06:58 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -28,6 +44,7 @@
#include "G4TransportationManager.hh"
#include "G4SDManager.hh"
#include "G4RunManager.hh"
#include "G4UserLimits.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
@@ -57,6 +74,9 @@ Em3DetectorConstruction::Em3DetectorConstruction()
NbOfLayers = 50;
CalorSizeYZ = 40.*cm;
ComputeCalorParameters();
// create UserLimits
userLimits = new G4UserLimits();
// create commands for interactive definition of the calorimeter
detectorMessenger = new Em3DetectorMessenger(this);
@@ -65,7 +85,7 @@ Em3DetectorConstruction::Em3DetectorConstruction()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em3DetectorConstruction::~Em3DetectorConstruction()
{ delete detectorMessenger;}
{ delete userLimits; delete detectorMessenger;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -132,7 +152,7 @@ density = 1.390*g/cm3;
a = 39.95*g/mole;
G4Material* lAr = new G4Material(name="liquidArgon", z=18., a, density);
density = 7.700*g/cm3;
density = 7.870*g/cm3;
a = 55.85*g/mole;
G4Material* Fe = new G4Material(name="Iron" , z=26., a, density);
@@ -144,6 +164,10 @@ density = 19.30*g/cm3;
a = 183.85*g/mole;
G4Material* W = new G4Material(name="Tungsten" , z=74., a, density);
density = 19.32*g/cm3;
a = 196.97*g/mole;
G4Material* Au = new G4Material(name="Gold" , z=79., a, density);
density = 11.35*g/cm3;
a = 207.19*g/mole;
G4Material* Pb = new G4Material(name="Lead" , z=82., a, density);
@@ -322,7 +346,7 @@ G4VPhysicalVolume* Em3DetectorConstruction::ConstructCalorimeter()
// Absorbers
//
for (G4int j=0; j<MaxAbsor; j++)
{ solidAbsor[j]=NULL; logicAbsor[j]=NULL; physiAbsor[j]=NULL;}
{ solidAbsor[j]=NULL; logicAbsor[j]=NULL; physiAbsor[j]=NULL;}
G4double xfront = -0.5*LayerThickness;
for (G4int k=0; k<NbOfAbsor; k++)
@@ -332,6 +356,8 @@ G4VPhysicalVolume* Em3DetectorConstruction::ConstructCalorimeter()
logicAbsor[k] = new G4LogicalVolume(solidAbsor[k], //its solid
AbsorMaterial[k], //its material
"Absorber"); //its name
logicAbsor[k]->SetUserLimits(userLimits);
G4double xcenter = xfront+0.5*AbsorThickness[k];
xfront += AbsorThickness[k];
@@ -485,6 +511,20 @@ void Em3DetectorConstruction::SetMagField(G4double fieldValue)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em3DetectorConstruction::SetMaxStepSize(G4double val)
{
// set the maximum allowed step size
//
if (val <= DBL_MIN)
{ G4cout << "\n --->warning from SetMaxStepSize: maxStep "
<< val << " out of range. Command refused" << G4endl;
return;
}
userLimits->SetMaxAllowedStep(val);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em3DetectorConstruction::UpdateGeometry()
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3DetectorMessenger.cc,v 1.2 1999/12/15 14:49:03 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3DetectorMessenger.cc,v 1.3.2.1 2001/06/28 19:06:58 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -83,13 +99,20 @@ Em3DetectorMessenger::Em3DetectorMessenger(Em3DetectorConstruction * Em3Det)
MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
MagFieldCmd->SetParameterName("Bz",false);
MagFieldCmd->SetUnitCategory("Magnetic flux density");
MagFieldCmd->AvailableForStates(Idle);
MagFieldCmd->AvailableForStates(Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/calor/update",this);
UpdateCmd->SetGuidance("Update calorimeter geometry.");
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
UpdateCmd->AvailableForStates(Idle);
MaxStepCmd = new G4UIcmdWithADoubleAndUnit("/tracking/stepMax",this);
MaxStepCmd->SetGuidance("Set max allowed step size");
MaxStepCmd->SetParameterName("Size",false);
MaxStepCmd->SetRange("Size>0.");
MaxStepCmd->SetUnitCategory("Length");
MaxStepCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -102,6 +125,7 @@ Em3DetectorMessenger::~Em3DetectorMessenger()
delete AbsorCmd;
delete MagFieldCmd;
delete UpdateCmd;
delete MaxStepCmd;
delete Em3detDir;
}
@@ -136,6 +160,9 @@ void Em3DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
if( command == UpdateCmd )
{ Em3Detector->UpdateGeometry();}
if( command == MaxStepCmd )
{ Em3Detector->SetMaxStepSize(MaxStepCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3EventAction.cc,v 1.8 2001/03/26 16:01:58 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3EventAction.cc,v 1.9.2.1 2001/06/28 19:06:58 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -20,9 +36,6 @@
#include "Em3DetectorConstruction.hh"
#include "Em3CalorHit.hh"
#include "Em3EventActionMessenger.hh"
#include "g4rw/tvordvec.h"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4HCofThisEvent.hh"
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3EventActionMessenger.cc,v 1.2 1999/12/15 14:49:04 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3EventActionMessenger.cc,v 1.2.4.1 2001/06/28 19:06:59 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3PhysicsList.cc,v 1.5 2000/04/17 12:05:39 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3PhysicsList.cc,v 1.5.4.1 2001/06/28 19:06:59 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3PhysicsListMessenger.cc,v 1.1 2000/04/17 12:05:40 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3PhysicsListMessenger.cc,v 1.1.4.1 2001/06/28 19:06:59 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3PrimaryGeneratorAction.cc,v 1.2 1999/12/15 14:49:04 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3PrimaryGeneratorAction.cc,v 1.3.2.1 2001/06/28 19:06:59 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -22,6 +38,7 @@
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -32,6 +49,7 @@ Em3PrimaryGeneratorAction::Em3PrimaryGeneratorAction(
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
SetDefaultKinematic();
rndmBeam = 0.;
//create a messenger for this class
gunMessenger = new Em3PrimaryGeneratorMessenger(this);
@@ -65,8 +83,20 @@ void Em3PrimaryGeneratorAction::SetDefaultKinematic()
void Em3PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
//this function is called at the begining of event
//
particleGun->GeneratePrimaryVertex(anEvent);
//
//randomize the beam, if requested.
if (rndmBeam > 0.)
{
G4ThreeVector oldPosition = particleGun->GetParticlePosition();
G4double rbeam = 0.5*(Em3Detector->GetCalorSizeYZ())*rndmBeam;
G4double x0 = oldPosition.x();
G4double y0 = oldPosition.y() + (2*G4UniformRand()-1.)*rbeam;
G4double z0 = oldPosition.z() + (2*G4UniformRand()-1.)*rbeam;
particleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
particleGun->GeneratePrimaryVertex(anEvent);
particleGun->SetParticlePosition(oldPosition);
}
else particleGun->GeneratePrimaryVertex(anEvent);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3PrimaryGeneratorMessenger.cc,v 1.2 1999/12/15 14:49:04 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3PrimaryGeneratorMessenger.cc,v 1.3.2.1 2001/06/28 19:06:59 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -17,6 +33,7 @@
#include "Em3PrimaryGeneratorAction.hh"
#include "G4UIcmdWithoutParameter.hh"
#include "G4UIcmdWithADouble.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -26,6 +43,13 @@ Em3PrimaryGeneratorMessenger::Em3PrimaryGeneratorMessenger(Em3PrimaryGeneratorAc
DefaultCmd = new G4UIcmdWithoutParameter("/gun/setDefault",this);
DefaultCmd->SetGuidance("set/reset the kinematic defined in PrimaryGenerator");
DefaultCmd->AvailableForStates(PreInit,Idle);
RndmCmd = new G4UIcmdWithADouble("/gun/rndm",this);
RndmCmd->SetGuidance("random lateral extension on the beam");
RndmCmd->SetGuidance("in fraction of 0.5*sizeYZ");
RndmCmd->SetParameterName("rBeam",false);
RndmCmd->SetRange("rBeam>=0.&&rBeam<=1.");
RndmCmd->AvailableForStates(Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -33,14 +57,18 @@ Em3PrimaryGeneratorMessenger::Em3PrimaryGeneratorMessenger(Em3PrimaryGeneratorAc
Em3PrimaryGeneratorMessenger::~Em3PrimaryGeneratorMessenger()
{
delete DefaultCmd;
delete RndmCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em3PrimaryGeneratorMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
void Em3PrimaryGeneratorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if( command == DefaultCmd )
{ Em3Action->SetDefaultKinematic();}
if( command == RndmCmd )
{ Em3Action->SetRndmBeam(RndmCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3RunAction.cc,v 1.8 2001/03/26 16:01:58 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3RunAction.cc,v 1.11.2.1 2001/06/28 19:06:59 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -86,7 +102,11 @@ void Em3RunAction::BeginOfRunAction(const G4Run* aRun)
//histograms
//
bookHisto();
bookHisto();
//example of print dEdx tables
//
////PrintDedxTables();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -179,3 +199,83 @@ void Em3RunAction::EndOfRunAction(const G4Run* aRun)
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4EnergyLossTables.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em3RunAction::PrintDedxTables()
{
//Print dE/dx tables with binning identical to the Geant3 JMATE bank.
//The printout is readable as Geant3 ffread data cards (by the Geant3 program g4mat).
//
const G4double tkmin=10*keV, tkmax=10*TeV;
const G4int nbin=90;
G4double tk[nbin];
const G4int ncolumn = 5;
//compute the kinetic energies
//
const G4double dp = log10(tkmax/tkmin)/nbin;
const G4double dt = pow(10.,dp);
tk[0] = tkmin;
for (G4int i=1; i<nbin; ++i) tk[i] = tk[i-1]*dt;
//print the kinetic energies
//
G4long oldform = G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
G4int oldprec = G4cout.precision(3);
G4cout << "\n kinetic energies \n ";
for (G4int j=0; j<nbin; ++j) {
G4cout << G4BestUnit(tk[j],"Energy") << "\t";
if ((j+1)%ncolumn == 0) G4cout << "\n ";
}
G4cout << G4endl;
//print the dE/dx tables
//
G4cout.setf(G4std::ios::scientific,G4std::ios::floatfield);
G4ParticleDefinition*
part = G4ParticleTable::GetParticleTable()->FindParticle("mu+");
for (G4int iab=0;iab < Detector->GetNbOfAbsor(); iab++)
{
G4Material* mat = Detector->GetAbsorMaterial(iab);
G4cout << "\nLIST";
G4cout << "\nC \nC dE/dx (MeV/cm) for " << part->GetParticleName() << " in "
<< mat ->GetName() << "\nC";
G4cout << "\nKINE (" << part->GetParticleName() << ")";
G4cout << "\nMATE (" << mat ->GetName() << ")";
G4cout.precision(2);
G4cout << "\nERAN " << tkmin/GeV << " (ekmin)\t"
<< tkmax/GeV << " (ekmax)\t"
<< nbin << " (nekbin)";
G4double cutgam = (G4Gamma::Gamma()->GetCutsInEnergy())[mat->GetIndex()];
if (cutgam < tkmin) cutgam = tkmin; if (cutgam > tkmax) cutgam = tkmax;
G4double cutele = (G4Electron::Electron()->GetCutsInEnergy())[mat->GetIndex()];
if (cutele < tkmin) cutele = tkmin; if (cutele > tkmax) cutele = tkmax;
G4cout << "\nCUTS " << cutgam/GeV << " (cutgam)\t" << cutele/GeV << " (cutele)";
G4cout.precision(6);
G4cout << "\nG4VAL \n ";
for (G4int l=0;l<nbin; ++l)
{
G4double dedx = G4EnergyLossTables::GetDEDX(part,tk[l],mat);
G4cout << dedx/(MeV/cm) << "\t";
if ((l+1)%ncolumn == 0) G4cout << "\n ";
}
G4cout << G4endl;
}
G4cout.precision(oldprec);
G4cout.setf(oldform,G4std::ios::floatfield);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3RunActionMessenger.cc,v 1.5 2001/03/26 16:01:59 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3RunActionMessenger.cc,v 1.5.2.1 2001/06/28 19:06:59 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3SteppingAction.cc,v 1.3 2001/02/20 12:34:44 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3SteppingAction.cc,v 1.3.2.1 2001/06/28 19:06:59 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3SteppingVerbose.cc,v 1.6 2001/02/19 14:07:37 maire Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3SteppingVerbose.cc,v 1.6.2.1 2001/06/28 19:06:59 gunter Exp $
// GEANT4 tag $Name: $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -1,12 +1,28 @@
// 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.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: Em3VisManager.cc,v 1.2 1999/12/15 14:49:05 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: Em3VisManager.cc,v 1.3.2.1 2001/06/28 19:06:59 gunter Exp $
// GEANT4 tag $Name: $
//
//
// John Allison 24th January 1998.
@@ -20,6 +36,10 @@
// Supported drivers...
#ifdef G4VIS_USE_ASCIITREE
#include "G4ASCIITree.hh"
#endif
#ifdef G4VIS_USE_DAWN
#include "G4FukuiRenderer.hh"
#endif
@@ -56,8 +76,8 @@
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_RAYX
#include "G4RayX.hh"
#ifdef G4VIS_USE_RAYTRACER
#include "G4RayTracer.hh"
#endif
#ifdef G4VIS_USE_VRML
@@ -78,6 +98,10 @@ Em3VisManager::Em3VisManager () {}
void Em3VisManager::RegisterGraphicsSystems () {
#ifdef G4VIS_USE_ASCIITREE
RegisterGraphicsSystem (new G4ASCIITree);
#endif
#ifdef G4VIS_USE_DAWN
RegisterGraphicsSystem (new G4FukuiRenderer);
#endif
@@ -114,8 +138,8 @@ void Em3VisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4OpenInventorWin32);
#endif
#ifdef G4VIS_USE_RAYX
RegisterGraphicsSystem (new G4RayX);
#ifdef G4VIS_USE_RAYTRACER
RegisterGraphicsSystem (new G4RayTracer);
#endif
#ifdef G4VIS_USE_VRML