Import Geant4 5.1.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Em3CalorHit.cc,v 1.4 2001/10/22 10:58:54 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Em3CalorimeterSD.cc,v 1.4 2001/10/22 10:58:54 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: Em3DetectorConstruction.cc,v 1.6 2002/12/12 11:19:37 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: Em3DetectorConstruction.cc,v 1.12 2003/03/28 15:16:15 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -55,16 +55,15 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3DetectorConstruction::Em3DetectorConstruction()
|
||||
:solidWorld(NULL),logicWorld(NULL),physiWorld(NULL),
|
||||
solidCalor(NULL),logicCalor(NULL),physiCalor(NULL),
|
||||
solidLayer(NULL),logicLayer(NULL),physiLayer(NULL),
|
||||
defaultMaterial(NULL),
|
||||
magField(NULL),calorimeterSD(NULL)
|
||||
:defaultMaterial(0),solidWorld(0),logicWorld(0),physiWorld(0),
|
||||
solidCalor(0),logicCalor(0),physiCalor(0),
|
||||
solidLayer(0),logicLayer(0),physiLayer(0),
|
||||
magField(0),calorimeterSD(0)
|
||||
{
|
||||
for (G4int i=0; i<MaxAbsor; i++)
|
||||
{
|
||||
AbsorMaterial[i]=NULL; AbsorThickness[i]=0.;
|
||||
solidAbsor[i]=NULL;logicAbsor[i]=NULL;physiAbsor[i]=NULL;
|
||||
AbsorMaterial[i]=0; AbsorThickness[i]=0.;
|
||||
solidAbsor[i]=0;logicAbsor[i]=0;physiAbsor[i]=0;
|
||||
}
|
||||
//
|
||||
// default parameter values of the calorimeter
|
||||
@@ -74,207 +73,223 @@ Em3DetectorConstruction::Em3DetectorConstruction()
|
||||
NbOfLayers = 50;
|
||||
CalorSizeYZ = 40.*cm;
|
||||
ComputeCalorParameters();
|
||||
|
||||
DefineMaterials();
|
||||
|
||||
// create UserLimits
|
||||
userLimits = new G4UserLimits();
|
||||
|
||||
// create commands for interactive definition of the calorimeter
|
||||
// create commands for interactive definition of the calorimeter
|
||||
detectorMessenger = new Em3DetectorMessenger(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3DetectorConstruction::~Em3DetectorConstruction()
|
||||
{ delete userLimits; delete detectorMessenger;}
|
||||
{
|
||||
delete userLimits;
|
||||
delete detectorMessenger;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VPhysicalVolume* Em3DetectorConstruction::Construct()
|
||||
{
|
||||
DefineMaterials();
|
||||
return ConstructCalorimeter();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
{
|
||||
//This function illustrates the possible ways to define materials
|
||||
|
||||
G4String name, symbol; //a=mass of a mole;
|
||||
G4double a, z, density; //z=mean number of protons;
|
||||
G4int iz, n; //iz=number of protons in an isotope;
|
||||
|
||||
G4String name, symbol; //a=mass of a mole;
|
||||
G4double a, z, density; //z=mean number of protons;
|
||||
G4int iz, n; //iz=number of protons in an isotope;
|
||||
// n=number of nucleons in an isotope;
|
||||
|
||||
G4int ncomponents, natoms;
|
||||
G4double abundance, fractionmass;
|
||||
G4double temperature, pressure;
|
||||
G4int ncomponents, natoms;
|
||||
G4double abundance, fractionmass;
|
||||
G4double temperature, pressure;
|
||||
|
||||
//
|
||||
// define Elements
|
||||
//
|
||||
//
|
||||
// define Elements
|
||||
//
|
||||
|
||||
a = 1.008*g/mole;
|
||||
G4Element* H = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
|
||||
a = 1.008*g/mole;
|
||||
G4Element* H = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
|
||||
|
||||
a = 12.01*g/mole;
|
||||
G4Element* C = new G4Element(name="Carbon" ,symbol="C" , z= 6., a);
|
||||
a = 12.01*g/mole;
|
||||
G4Element* C = new G4Element(name="Carbon" ,symbol="C" , z= 6., a);
|
||||
|
||||
a = 14.01*g/mole;
|
||||
G4Element* N = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
|
||||
a = 14.01*g/mole;
|
||||
G4Element* N = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
|
||||
|
||||
a = 16.00*g/mole;
|
||||
G4Element* O = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
|
||||
a = 16.00*g/mole;
|
||||
G4Element* O = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
|
||||
|
||||
a = 28.09*g/mole;
|
||||
G4Element* Si = new G4Element(name="Silicon",symbol="Si" , z= 14., a);
|
||||
a = 28.09*g/mole;
|
||||
G4Element* Si = new G4Element(name="Silicon",symbol="Si" , z= 14., a);
|
||||
|
||||
//
|
||||
// define an Element from isotopes, by relative abundance
|
||||
//
|
||||
a = 126.90*g/mole;
|
||||
G4Element* I = new G4Element(name="Iodine" ,symbol="I" , z= 53., a);
|
||||
|
||||
G4Isotope* U5 = new G4Isotope(name="U235", iz=92, n=235, a=235.01*g/mole);
|
||||
G4Isotope* U8 = new G4Isotope(name="U238", iz=92, n=238, a=238.03*g/mole);
|
||||
a = 132.90*g/mole;
|
||||
G4Element* Cs = new G4Element(name="Cesium" ,symbol="Cs" , z= 55., a);
|
||||
|
||||
G4Element* U = new G4Element(name="enriched Uranium",symbol="U",ncomponents=2);
|
||||
U->AddIsotope(U5, abundance= 90.*perCent);
|
||||
U->AddIsotope(U8, abundance= 10.*perCent);
|
||||
//
|
||||
// define an Element from isotopes, by relative abundance
|
||||
//
|
||||
|
||||
//
|
||||
// define simple materials
|
||||
//
|
||||
G4Isotope* U5 = new G4Isotope(name="U235", iz=92, n=235, a=235.01*g/mole);
|
||||
G4Isotope* U8 = new G4Isotope(name="U238", iz=92, n=238, a=238.03*g/mole);
|
||||
|
||||
density = 70.8*mg/cm3;
|
||||
a = 1.008*g/mole;
|
||||
G4Material* lH2 = new G4Material(name="liquidH2", z=1., a, density);
|
||||
G4Element* U = new G4Element(name="enriched Uranium",symbol="U",ncomponents=2);
|
||||
U->AddIsotope(U5, abundance= 90.*perCent);
|
||||
U->AddIsotope(U8, abundance= 10.*perCent);
|
||||
|
||||
density = 2.700*g/cm3;
|
||||
a = 26.98*g/mole;
|
||||
G4Material* Al = new G4Material(name="Aluminium", z=13., a, density);
|
||||
//
|
||||
// define simple materials
|
||||
//
|
||||
|
||||
density = 1.390*g/cm3;
|
||||
a = 39.95*g/mole;
|
||||
G4Material* lAr = new G4Material(name="liquidArgon", z=18., a, density);
|
||||
density = 70.8*mg/cm3;
|
||||
a = 1.008*g/mole;
|
||||
G4Material* lH2 = new G4Material(name="liquidH2", z=1., a, density);
|
||||
|
||||
density = 7.870*g/cm3;
|
||||
a = 55.85*g/mole;
|
||||
G4Material* Fe = new G4Material(name="Iron" , z=26., a, density);
|
||||
density = 2.700*g/cm3;
|
||||
a = 26.98*g/mole;
|
||||
G4Material* Al = new G4Material(name="Aluminium", z=13., a, density);
|
||||
|
||||
density = 8.960*g/cm3;
|
||||
a = 63.55*g/mole;
|
||||
G4Material* Cu = new G4Material(name="Copper" , z=29., a, density);
|
||||
density = 1.390*g/cm3;
|
||||
a = 39.95*g/mole;
|
||||
G4Material* lAr = new G4Material(name="liquidArgon", z=18., a, density);
|
||||
|
||||
density = 19.30*g/cm3;
|
||||
a = 183.85*g/mole;
|
||||
G4Material* W = new G4Material(name="Tungsten" , z=74., a, density);
|
||||
density = 7.870*g/cm3;
|
||||
a = 55.85*g/mole;
|
||||
G4Material* Fe = new G4Material(name="Iron" , z=26., a, density);
|
||||
|
||||
density = 19.32*g/cm3;
|
||||
a = 196.97*g/mole;
|
||||
G4Material* Au = new G4Material(name="Gold" , z=79., a, density);
|
||||
density = 8.960*g/cm3;
|
||||
a = 63.55*g/mole;
|
||||
G4Material* Cu = new G4Material(name="Copper" , z=29., a, density);
|
||||
|
||||
density = 11.35*g/cm3;
|
||||
a = 207.19*g/mole;
|
||||
G4Material* Pb = new G4Material(name="Lead" , z=82., a, density);
|
||||
density = 19.30*g/cm3;
|
||||
a = 183.85*g/mole;
|
||||
G4Material* W = new G4Material(name="Tungsten" , z=74., a, density);
|
||||
|
||||
density = 18.95*g/cm3;
|
||||
a = 238.03*g/mole;
|
||||
G4Material* Ur = new G4Material(name="Uranium" , z=92., a, density);
|
||||
density = 19.32*g/cm3;
|
||||
a = 196.97*g/mole;
|
||||
G4Material* Au = new G4Material(name="Gold" , z=79., a, density);
|
||||
|
||||
//
|
||||
// define a material from elements. case 1: chemical molecule
|
||||
//
|
||||
|
||||
density = 1.000*g/cm3;
|
||||
G4Material* H2O = new G4Material(name="Water", density, ncomponents=2);
|
||||
H2O->AddElement(H, natoms=2);
|
||||
H2O->AddElement(O, natoms=1);
|
||||
density = 11.35*g/cm3;
|
||||
a = 207.19*g/mole;
|
||||
G4Material* Pb = new G4Material(name="Lead" , z=82., a, density);
|
||||
|
||||
density = 1.032*g/cm3;
|
||||
G4Material* Sci = new G4Material(name="Scintillator", density, ncomponents=2);
|
||||
Sci->AddElement(C, natoms=9);
|
||||
Sci->AddElement(H, natoms=10);
|
||||
density = 18.95*g/cm3;
|
||||
a = 238.03*g/mole;
|
||||
G4Material* Ur = new G4Material(name="Uranium" , z=92., a, density);
|
||||
|
||||
density = 2.330*g/cm3;
|
||||
G4Material* Sili = new G4Material(name="Silicium", density, ncomponents=1);
|
||||
Sili->AddElement(Si, natoms=1);
|
||||
//
|
||||
// define a material from elements. case 1: chemical molecule
|
||||
//
|
||||
|
||||
density = 2.200*g/cm3;
|
||||
G4Material* SiO2 = new G4Material(name="quartz", density, ncomponents=2);
|
||||
SiO2->AddElement(Si, natoms=1);
|
||||
SiO2->AddElement(O , natoms=2);
|
||||
density = 1.000*g/cm3;
|
||||
G4Material* H2O = new G4Material(name="Water", density, ncomponents=2);
|
||||
H2O->AddElement(H, natoms=2);
|
||||
H2O->AddElement(O, natoms=1);
|
||||
H2O->SetChemicalFormula("H_2O");
|
||||
H2O->GetIonisation()->SetMeanExcitationEnergy(75.0*eV);
|
||||
|
||||
density = 1.700*g/cm3;
|
||||
G4Material* G10 = new G4Material(name="NemaG10", density, ncomponents=4);
|
||||
G10->AddElement(Si, natoms=1);
|
||||
G10->AddElement(O , natoms=2);
|
||||
G10->AddElement(C , natoms=3);
|
||||
G10->AddElement(H , natoms=3);
|
||||
density = 1.032*g/cm3;
|
||||
G4Material* Sci = new G4Material(name="Scintillator", density, ncomponents=2);
|
||||
Sci->AddElement(C, natoms=9);
|
||||
Sci->AddElement(H, natoms=10);
|
||||
|
||||
density = 2.330*g/cm3;
|
||||
G4Material* Sili = new G4Material(name="Silicium", density, ncomponents=1);
|
||||
Sili->AddElement(Si, natoms=1);
|
||||
|
||||
//
|
||||
// define a material from elements. case 2: mixture by fractional mass
|
||||
//
|
||||
density = 2.200*g/cm3;
|
||||
G4Material* SiO2 = new G4Material(name="quartz", density, ncomponents=2);
|
||||
SiO2->AddElement(Si, natoms=1);
|
||||
SiO2->AddElement(O , natoms=2);
|
||||
|
||||
density = 1.290*mg/cm3;
|
||||
G4Material* Air = new G4Material(name="Air" , density, ncomponents=2);
|
||||
Air->AddElement(N, fractionmass=0.7);
|
||||
Air->AddElement(O, fractionmass=0.3);
|
||||
density = 1.700*g/cm3;
|
||||
G4Material* G10 = new G4Material(name="NemaG10", density, ncomponents=4);
|
||||
G10->AddElement(Si, natoms=1);
|
||||
G10->AddElement(O , natoms=2);
|
||||
G10->AddElement(C , natoms=3);
|
||||
G10->AddElement(H , natoms=3);
|
||||
|
||||
density = 1.205*mg/cm3;
|
||||
pressure = 1.*atmosphere;
|
||||
temperature = 293.*kelvin;
|
||||
G4Material* Air20 = new G4Material(name="Air20" , density, ncomponents=2,
|
||||
density = 4.534*g/cm3;
|
||||
G4Material* CsI = new G4Material(name="CsI", density, ncomponents=2);
|
||||
CsI->AddElement(Cs, natoms=1);
|
||||
CsI->AddElement(I , natoms=1);
|
||||
CsI->GetIonisation()->SetMeanExcitationEnergy(415.689*eV);
|
||||
|
||||
//
|
||||
// define a material from elements. case 2: mixture by fractional mass
|
||||
//
|
||||
|
||||
density = 1.290*mg/cm3;
|
||||
G4Material* Air = new G4Material(name="Air" , density, ncomponents=2);
|
||||
Air->AddElement(N, fractionmass=0.7);
|
||||
Air->AddElement(O, fractionmass=0.3);
|
||||
|
||||
density = 1.205*mg/cm3;
|
||||
pressure = 1.*atmosphere;
|
||||
temperature = 293.*kelvin;
|
||||
G4Material* Air20 = new G4Material(name="Air20" , density, ncomponents=2,
|
||||
kStateGas,temperature,pressure);
|
||||
Air20->AddElement(N, fractionmass=0.7);
|
||||
Air20->AddElement(O, fractionmass=0.3);
|
||||
Air20->AddElement(N, fractionmass=0.7);
|
||||
Air20->AddElement(O, fractionmass=0.3);
|
||||
|
||||
//
|
||||
// define a material from elements and/or others materials (mixture of mixtures)
|
||||
//
|
||||
//
|
||||
// define a material from elements and/or others materials (mixture of mixtures)
|
||||
//
|
||||
|
||||
density = 0.200*g/cm3;
|
||||
G4Material* Aerog = new G4Material(name="Aerogel", density, ncomponents=3);
|
||||
Aerog->AddMaterial(SiO2, fractionmass=62.5*perCent);
|
||||
Aerog->AddMaterial(H2O , fractionmass=37.4*perCent);
|
||||
Aerog->AddElement (C , fractionmass= 0.1*perCent);
|
||||
density = 0.200*g/cm3;
|
||||
G4Material* Aerog = new G4Material(name="Aerogel", density, ncomponents=3);
|
||||
Aerog->AddMaterial(SiO2, fractionmass=62.5*perCent);
|
||||
Aerog->AddMaterial(H2O , fractionmass=37.4*perCent);
|
||||
Aerog->AddElement (C , fractionmass= 0.1*perCent);
|
||||
|
||||
//
|
||||
// examples of gas in non STP conditions
|
||||
//
|
||||
//
|
||||
// examples of gas in non STP conditions
|
||||
//
|
||||
|
||||
density = 27.*mg/cm3;
|
||||
pressure = 50.*atmosphere;
|
||||
temperature = 325.*kelvin;
|
||||
G4Material* CO2 = new G4Material(name="CarbonicGas", density, ncomponents=2,
|
||||
density = 27.*mg/cm3;
|
||||
pressure = 50.*atmosphere;
|
||||
temperature = 325.*kelvin;
|
||||
G4Material* CO2 = new G4Material(name="CarbonicGas", density, ncomponents=2,
|
||||
kStateGas,temperature,pressure);
|
||||
CO2->AddElement(C, natoms=1);
|
||||
CO2->AddElement(O, natoms=2);
|
||||
|
||||
density = 0.3*mg/cm3;
|
||||
pressure = 2.*atmosphere;
|
||||
temperature = 500.*kelvin;
|
||||
G4Material* steam = new G4Material(name="WaterSteam", density, ncomponents=1,
|
||||
CO2->AddElement(C, natoms=1);
|
||||
CO2->AddElement(O, natoms=2);
|
||||
|
||||
density = 0.3*mg/cm3;
|
||||
pressure = 2.*atmosphere;
|
||||
temperature = 500.*kelvin;
|
||||
G4Material* steam = new G4Material(name="WaterSteam", density, ncomponents=1,
|
||||
kStateGas,temperature,pressure);
|
||||
steam->AddMaterial(H2O, fractionmass=1.);
|
||||
steam->AddMaterial(H2O, fractionmass=1.);
|
||||
|
||||
//
|
||||
// examples of vacuum
|
||||
//
|
||||
//
|
||||
// examples of vacuum
|
||||
//
|
||||
|
||||
density = universe_mean_density; //from PhysicalConstants.h
|
||||
pressure = 3.e-18*pascal;
|
||||
temperature = 2.73*kelvin;
|
||||
G4Material* vacuum = new G4Material(name="Galactic",z=1.,a=1.008*g/mole,density,
|
||||
density = universe_mean_density; //from PhysicalConstants.h
|
||||
pressure = 3.e-18*pascal;
|
||||
temperature = 2.73*kelvin;
|
||||
G4Material* vacuum = new G4Material(name="Galactic",z=1.,a=1.008*g/mole,density,
|
||||
kStateGas,temperature,pressure);
|
||||
|
||||
density = 1.e-5*g/cm3;
|
||||
pressure = 2.e-2*bar;
|
||||
temperature = STP_Temperature; //from PhysicalConstants.h
|
||||
G4Material* beam = new G4Material(name="Beam", density, ncomponents=1,
|
||||
density = 1.e-5*g/cm3;
|
||||
pressure = 2.e-2*bar;
|
||||
temperature = STP_Temperature; //from PhysicalConstants.h
|
||||
G4Material* beam = new G4Material(name="Beam", density, ncomponents=1,
|
||||
kStateGas,temperature,pressure);
|
||||
beam->AddMaterial(Air, fractionmass=1.);
|
||||
beam->AddMaterial(Air, fractionmass=1.);
|
||||
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
|
||||
//default materials of the calorimeter
|
||||
AbsorMaterial[0] = Pb;
|
||||
@@ -283,107 +298,119 @@ G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
G4VPhysicalVolume* Em3DetectorConstruction::ConstructCalorimeter()
|
||||
{
|
||||
// complete the Calor parameters definition
|
||||
// complete the Calor parameters definition
|
||||
ComputeCalorParameters();
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
// World
|
||||
//
|
||||
if(solidWorld) delete solidWorld;
|
||||
if(logicWorld) delete logicWorld;
|
||||
if(physiWorld) delete physiWorld;
|
||||
|
||||
solidWorld = new G4Box("World", //its name
|
||||
WorldSizeX/2,WorldSizeYZ/2,WorldSizeYZ/2); //its size
|
||||
|
||||
|
||||
logicWorld = new G4LogicalVolume(solidWorld, //its solid
|
||||
defaultMaterial, //its material
|
||||
"World"); //its name
|
||||
|
||||
|
||||
physiWorld = new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
logicWorld, //its logical volume
|
||||
"World", //its name
|
||||
logicWorld, //its logical volume
|
||||
NULL, //its mother volume
|
||||
0, //its mother volume
|
||||
false, //no boolean operation
|
||||
0); //copy number
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
// Calorimeter
|
||||
//
|
||||
solidCalor=NULL; logicCalor=NULL; physiCalor=NULL;
|
||||
|
||||
//
|
||||
if(solidCalor) delete solidCalor;
|
||||
if(logicCalor) delete logicCalor;
|
||||
if(physiCalor) delete physiCalor;
|
||||
|
||||
solidCalor = new G4Box("Calorimeter", //its name
|
||||
CalorThickness/2,CalorSizeYZ/2,CalorSizeYZ/2);//size
|
||||
|
||||
|
||||
logicCalor = new G4LogicalVolume(solidCalor, //its solid
|
||||
defaultMaterial, //its material
|
||||
"Calorimeter"); //its name
|
||||
|
||||
|
||||
physiCalor = new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
logicCalor, //its logical volume
|
||||
"Calorimeter", //its name
|
||||
logicCalor, //its logical volume
|
||||
physiWorld, //its mother volume
|
||||
logicWorld, //its mother volume
|
||||
false, //no boolean operation
|
||||
0); //copy number
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
// Layers
|
||||
//
|
||||
solidLayer=NULL; logicLayer=NULL; physiLayer=NULL;
|
||||
|
||||
if(solidLayer) delete solidLayer;
|
||||
if(logicLayer) delete logicLayer;
|
||||
if(physiLayer) delete physiLayer;
|
||||
|
||||
solidLayer = new G4Box("Layer", //its name
|
||||
LayerThickness/2,CalorSizeYZ/2,CalorSizeYZ/2); //size
|
||||
|
||||
|
||||
logicLayer = new G4LogicalVolume(solidLayer, //its solid
|
||||
defaultMaterial, //its material
|
||||
"Layer"); //its name
|
||||
if (NbOfLayers > 1)
|
||||
if (NbOfLayers > 1)
|
||||
physiLayer = new G4PVReplica("Layer", //its name
|
||||
logicLayer, //its logical volume
|
||||
physiCalor, //its mother
|
||||
logicCalor, //its mother
|
||||
kXAxis, //axis of replication
|
||||
NbOfLayers, //number of replica
|
||||
LayerThickness); //witdth of replica
|
||||
else
|
||||
physiLayer = new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
logicLayer, //its logical volume
|
||||
"Layer", //its name
|
||||
logicLayer, //its logical volume
|
||||
physiCalor, //its mother volume
|
||||
logicCalor, //its mother volume
|
||||
false, //no boolean operation
|
||||
0); //copy number
|
||||
|
||||
//
|
||||
//
|
||||
// Absorbers
|
||||
//
|
||||
for (G4int j=0; j<MaxAbsor; j++)
|
||||
{ solidAbsor[j]=NULL; logicAbsor[j]=NULL; physiAbsor[j]=NULL;}
|
||||
for (G4int j=0; j<MaxAbsor; j++)
|
||||
{
|
||||
if(solidAbsor[j]) delete solidAbsor[j];
|
||||
if(logicAbsor[j]) delete logicAbsor[j];
|
||||
if(physiAbsor[j]) delete physiAbsor[j];
|
||||
}
|
||||
|
||||
G4double xfront = -0.5*LayerThickness;
|
||||
G4double xfront = -0.5*LayerThickness;
|
||||
for (G4int k=0; k<NbOfAbsor; k++)
|
||||
{ solidAbsor[k] = new G4Box("Absorber", //its name
|
||||
AbsorThickness[k]/2,CalorSizeYZ/2,CalorSizeYZ/2);
|
||||
|
||||
AbsorThickness[k]/2,CalorSizeYZ/2,CalorSizeYZ/2);
|
||||
|
||||
logicAbsor[k] = new G4LogicalVolume(solidAbsor[k], //its solid
|
||||
AbsorMaterial[k], //its material
|
||||
"Absorber"); //its name
|
||||
|
||||
AbsorMaterial[k]->GetName());
|
||||
|
||||
logicAbsor[k]->SetUserLimits(userLimits);
|
||||
|
||||
G4double xcenter = xfront+0.5*AbsorThickness[k];
|
||||
xfront += AbsorThickness[k];
|
||||
xfront += AbsorThickness[k];
|
||||
physiAbsor[k] = new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(xcenter,0.,0.), //its position
|
||||
"Absorber", //its name
|
||||
logicAbsor[k], //its logical volume
|
||||
physiLayer, //its mother
|
||||
false, //no boulean operat
|
||||
k); //copy number
|
||||
|
||||
G4ThreeVector(xcenter,0.,0.), //its position
|
||||
logicAbsor[k], //its logical volume
|
||||
AbsorMaterial[k]->GetName(), //its name
|
||||
logicLayer, //its mother
|
||||
false, //no boulean operat
|
||||
k); //copy number
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
// Sensitive Detectors: all Absorbers
|
||||
//
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
@@ -393,17 +420,17 @@ G4VPhysicalVolume* Em3DetectorConstruction::ConstructCalorimeter()
|
||||
calorimeterSD = new Em3CalorimeterSD("CalorSD",this);
|
||||
SDman->AddNewDetector( calorimeterSD );
|
||||
}
|
||||
for (G4int l=0; l<NbOfAbsor; l++)
|
||||
for (G4int l=0; l<NbOfAbsor; l++)
|
||||
logicAbsor[l]->SetSensitiveDetector(calorimeterSD);
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
// Visualization attributes
|
||||
//
|
||||
////logicWorld->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
logicCalor->SetVisAttributes(simpleBoxVisAtt);
|
||||
|
||||
|
||||
//
|
||||
//always return the physical World
|
||||
//
|
||||
@@ -418,7 +445,7 @@ void Em3DetectorConstruction::PrintCalorParameters()
|
||||
G4cout << "\n-------------------------------------------------------------"
|
||||
<< "\n ---> The calorimeter is " << NbOfLayers << " layers of:";
|
||||
for (G4int i=0; i<NbOfAbsor; i++)
|
||||
{
|
||||
{
|
||||
G4cout << "\n \t" << G4std::setw(12) << AbsorMaterial[i]->GetName() <<": "
|
||||
<< G4std::setw(6) << G4BestUnit(AbsorThickness[i],"Length");
|
||||
}
|
||||
@@ -432,11 +459,11 @@ void Em3DetectorConstruction::SetNbOfAbsor(G4int ival)
|
||||
// set the number of Absorbers
|
||||
//
|
||||
if (ival < 1 || ival > MaxAbsor)
|
||||
{ G4cout << "\n ---> warning from SetNbOfAbsor: "
|
||||
<< ival << " must be at least 1 and and most " << MaxAbsor
|
||||
{ G4cout << "\n ---> warning from SetNbOfAbsor: "
|
||||
<< ival << " must be at least 1 and and most " << MaxAbsor
|
||||
<< ". Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
NbOfAbsor = ival;
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -446,13 +473,13 @@ void Em3DetectorConstruction::SetAbsorMaterial(G4int ival,G4String material)
|
||||
// search the material by its name
|
||||
//
|
||||
if (ival >= NbOfAbsor)
|
||||
{ G4cout << "\n --->warning from SetAbsorMaterial: absor number "
|
||||
{ G4cout << "\n --->warning from SetAbsorMaterial: absor number "
|
||||
<< ival << " out of range. Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(material);
|
||||
if (pttoMaterial) AbsorMaterial[ival] = pttoMaterial;
|
||||
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(material);
|
||||
if (pttoMaterial) AbsorMaterial[ival] = pttoMaterial;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -462,17 +489,17 @@ void Em3DetectorConstruction::SetAbsorThickness(G4int ival,G4double val)
|
||||
// change Absorber thickness
|
||||
//
|
||||
if (ival >= NbOfAbsor)
|
||||
{ G4cout << "\n --->warning from SetAbsorThickness: absor number "
|
||||
{ G4cout << "\n --->warning from SetAbsorThickness: absor number "
|
||||
<< ival << " out of range. Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
if (val <= DBL_MIN)
|
||||
{ G4cout << "\n --->warning from SetAbsorThickness: thickness "
|
||||
{ G4cout << "\n --->warning from SetAbsorThickness: thickness "
|
||||
<< val << " out of range. Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
AbsorThickness[ival] = val;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -481,12 +508,12 @@ void Em3DetectorConstruction::SetCalorSizeYZ(G4double val)
|
||||
// change the transverse size
|
||||
//
|
||||
if (val <= DBL_MIN)
|
||||
{ G4cout << "\n --->warning from SetCalorSizeYZ: thickness "
|
||||
{ G4cout << "\n --->warning from SetCalorSizeYZ: thickness "
|
||||
<< val << " out of range. Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
CalorSizeYZ = val;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -495,10 +522,10 @@ void Em3DetectorConstruction::SetNbOfLayers(G4int ival)
|
||||
// set the number of Layers
|
||||
//
|
||||
if (ival < 1)
|
||||
{ G4cout << "\n --->warning from SetNbOfLayers: "
|
||||
{ G4cout << "\n --->warning from SetNbOfLayers: "
|
||||
<< ival << " must be at least 1. Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
NbOfLayers = ival;
|
||||
}
|
||||
|
||||
@@ -508,17 +535,17 @@ void Em3DetectorConstruction::SetMagField(G4double fieldValue)
|
||||
{
|
||||
//apply a global uniform magnetic field along Z axis
|
||||
//
|
||||
G4FieldManager* fieldMgr
|
||||
G4FieldManager* fieldMgr
|
||||
= G4TransportationManager::GetTransportationManager()->GetFieldManager();
|
||||
|
||||
|
||||
if(magField) delete magField; //delete the existing magn field
|
||||
|
||||
|
||||
if(fieldValue!=0.) // create a new one if non nul
|
||||
{ magField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
|
||||
{ magField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
|
||||
fieldMgr->SetDetectorField(magField);
|
||||
fieldMgr->CreateChordFinder(magField);
|
||||
} else {
|
||||
magField = NULL;
|
||||
magField = 0;
|
||||
fieldMgr->SetDetectorField(magField);
|
||||
}
|
||||
}
|
||||
@@ -530,18 +557,24 @@ void Em3DetectorConstruction::SetMaxStepSize(G4double val)
|
||||
// set the maximum allowed step size
|
||||
//
|
||||
if (val <= DBL_MIN)
|
||||
{ G4cout << "\n --->warning from SetMaxStepSize: maxStep "
|
||||
{ G4cout << "\n --->warning from SetMaxStepSize: maxStep "
|
||||
<< val << " out of range. Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
userLimits->SetMaxAllowedStep(val);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3DetectorConstruction::UpdateGeometry()
|
||||
{
|
||||
G4RunManager::GetRunManager()->DefineWorldVolume(ConstructCalorimeter());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3DetectorConstruction::UpdateGeometry()
|
||||
{
|
||||
G4bool first = true;
|
||||
if (physiWorld) first = false;
|
||||
G4VPhysicalVolume* v = ConstructCalorimeter();
|
||||
G4RunManager* rm = G4RunManager::GetRunManager();
|
||||
rm->GeometryHasBeenModified();
|
||||
rm->DefineWorldVolume(v);
|
||||
if (!first) rm->ResetNavigator();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: Em3DetectorMessenger.cc,v 1.8 2002/12/12 11:19:38 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: Em3DetectorMessenger.cc,v 1.9 2003/03/06 11:16:40 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -92,7 +92,7 @@ Em3DetectorMessenger::Em3DetectorMessenger(Em3DetectorConstruction * Em3Det)
|
||||
unitPrm->SetParameterCandidates(unitList);
|
||||
AbsorCmd->SetParameter(unitPrm);
|
||||
//
|
||||
AbsorCmd->AvailableForStates(G4State_Idle);
|
||||
AbsorCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
|
||||
MagFieldCmd->SetGuidance("Define magnetic field.");
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Em3EventAction.cc,v 1.13 2002/06/05 12:13:04 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Em3EventActionMessenger.cc,v 1.7 2002/12/12 11:19:38 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: Em3PhysListEmModel.cc,v 1.1 2003/02/26 16:12:36 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "Em3PhysListEmModel.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
|
||||
#include "G4MultipleScatteringSTD.hh"
|
||||
|
||||
#include "G4eIonisationSTD.hh"
|
||||
#include "G4eBremsstrahlungSTD.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
|
||||
#include "G4MuIonisationSTD.hh"
|
||||
#include "G4MuBremsstrahlungSTD.hh"
|
||||
#include "G4MuPairProductionSTD.hh"
|
||||
|
||||
#include "G4hIonisationSTD.hh"
|
||||
#include "G4ionIonisation.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3PhysListEmModel::Em3PhysListEmModel(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3PhysListEmModel::~Em3PhysListEmModel()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysListEmModel::ConstructProcess()
|
||||
{
|
||||
// Add EM processes realised on base of prototype of model approach design
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
if (particleName == "gamma") {
|
||||
// gamma
|
||||
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
|
||||
pmanager->AddDiscreteProcess(new G4ComptonScattering);
|
||||
pmanager->AddDiscreteProcess(new G4GammaConversion);
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
//electron
|
||||
pmanager->AddProcess(new G4MultipleScatteringSTD, -1, 1,1);
|
||||
pmanager->AddProcess(new G4eIonisationSTD, -1, 2,2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlungSTD, -1,-1,3);
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
//positron
|
||||
pmanager->AddProcess(new G4MultipleScatteringSTD, -1, 1,1);
|
||||
pmanager->AddProcess(new G4eIonisationSTD, -1, 2,2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlungSTD, -1,-1,3);
|
||||
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
|
||||
|
||||
} else if( particleName == "mu+" ||
|
||||
particleName == "mu-" ) {
|
||||
//muon
|
||||
pmanager->AddProcess(new G4MultipleScatteringSTD,-1, 1,1);
|
||||
pmanager->AddProcess(new G4MuIonisationSTD, -1, 2,2);
|
||||
pmanager->AddProcess(new G4MuBremsstrahlungSTD, -1,-1,3);
|
||||
pmanager->AddProcess(new G4MuPairProductionSTD, -1,-1,4);
|
||||
|
||||
} else if( particleName == "GenericIon" ) {
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScatteringSTD,-1,1,1);
|
||||
pmanager->AddProcess(new G4ionIonisation, -1,2,2);
|
||||
|
||||
} else if ((!particle->IsShortLived()) &&
|
||||
(particle->GetPDGCharge() != 0.0) &&
|
||||
(particle->GetParticleName() != "chargedgeantino")) {
|
||||
//all others charged particles except geantino
|
||||
pmanager->AddProcess(new G4MultipleScatteringSTD,-1,1,1);
|
||||
pmanager->AddProcess(new G4hIonisationSTD, -1,2,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: Em3PhysListEmStandard.cc,v 1.1 2003/02/26 16:12:36 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "Em3PhysListEmStandard.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
|
||||
#include "G4MultipleScattering.hh"
|
||||
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuBremsstrahlung.hh"
|
||||
#include "G4MuPairProduction.hh"
|
||||
|
||||
#include "G4hIonisation.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3PhysListEmStandard::Em3PhysListEmStandard(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3PhysListEmStandard::~Em3PhysListEmStandard()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysListEmStandard::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
if (particleName == "gamma") {
|
||||
// gamma
|
||||
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
|
||||
pmanager->AddDiscreteProcess(new G4ComptonScattering);
|
||||
pmanager->AddDiscreteProcess(new G4GammaConversion);
|
||||
|
||||
} 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);
|
||||
|
||||
} 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);
|
||||
|
||||
} 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()) &&
|
||||
(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: Em3PhysListGeneral.cc,v 1.1 2003/02/26 16:12:37 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "Em3PhysListGeneral.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3PhysListGeneral::Em3PhysListGeneral(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3PhysListGeneral::~Em3PhysListGeneral()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysListGeneral::ConstructProcess()
|
||||
{
|
||||
// Add Decay Process
|
||||
|
||||
G4Decay* fDecayProcess = new G4Decay();
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
if (fDecayProcess->IsApplicable(*particle)) {
|
||||
|
||||
pmanager ->AddProcess(fDecayProcess);
|
||||
|
||||
// set ordering for PostStepDoIt and AtRestDoIt
|
||||
pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
|
||||
pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: Em3PhysListParticles.cc,v 1.3 2003/03/10 18:16:49 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "Em3PhysListParticles.hh"
|
||||
|
||||
// Bosons
|
||||
#include "G4ChargedGeantino.hh"
|
||||
#include "G4Geantino.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
|
||||
// leptons
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4NeutrinoMu.hh"
|
||||
#include "G4AntiNeutrinoMu.hh"
|
||||
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4AntiNeutrinoE.hh"
|
||||
|
||||
// Mesons
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4Eta.hh"
|
||||
#include "G4EtaPrime.hh"
|
||||
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4KaonZero.hh"
|
||||
#include "G4AntiKaonZero.hh"
|
||||
#include "G4KaonZeroLong.hh"
|
||||
#include "G4KaonZeroShort.hh"
|
||||
|
||||
// Baryons
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4AntiNeutron.hh"
|
||||
|
||||
// Nuclei
|
||||
#include "G4Alpha.hh"
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
#include "G4He3.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
#include "IonC12.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3PhysListParticles::Em3PhysListParticles(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3PhysListParticles::~Em3PhysListParticles()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysListParticles::ConstructParticle()
|
||||
{
|
||||
|
||||
// pseudo-particles
|
||||
G4Geantino::GeantinoDefinition();
|
||||
G4ChargedGeantino::ChargedGeantinoDefinition();
|
||||
|
||||
// gamma
|
||||
G4Gamma::GammaDefinition();
|
||||
|
||||
// optical photon
|
||||
G4OpticalPhoton::OpticalPhotonDefinition();
|
||||
|
||||
// leptons
|
||||
G4Electron::ElectronDefinition();
|
||||
G4Positron::PositronDefinition();
|
||||
G4MuonPlus::MuonPlusDefinition();
|
||||
G4MuonMinus::MuonMinusDefinition();
|
||||
|
||||
G4NeutrinoE::NeutrinoEDefinition();
|
||||
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
|
||||
G4NeutrinoMu::NeutrinoMuDefinition();
|
||||
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
||||
|
||||
// mesons
|
||||
G4PionPlus::PionPlusDefinition();
|
||||
G4PionMinus::PionMinusDefinition();
|
||||
G4PionZero::PionZeroDefinition();
|
||||
G4Eta::EtaDefinition();
|
||||
G4EtaPrime::EtaPrimeDefinition();
|
||||
G4KaonPlus::KaonPlusDefinition();
|
||||
G4KaonMinus::KaonMinusDefinition();
|
||||
G4KaonZero::KaonZeroDefinition();
|
||||
G4AntiKaonZero::AntiKaonZeroDefinition();
|
||||
G4KaonZeroLong::KaonZeroLongDefinition();
|
||||
G4KaonZeroShort::KaonZeroShortDefinition();
|
||||
|
||||
// barions
|
||||
G4Proton::ProtonDefinition();
|
||||
G4AntiProton::AntiProtonDefinition();
|
||||
G4Neutron::NeutronDefinition();
|
||||
G4AntiNeutron::AntiNeutronDefinition();
|
||||
|
||||
// ions
|
||||
G4Deuteron::DeuteronDefinition();
|
||||
G4Triton::TritonDefinition();
|
||||
G4He3::He3Definition();
|
||||
G4Alpha::AlphaDefinition();
|
||||
G4GenericIon::GenericIonDefinition();
|
||||
IonC12::IonDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: Em3PhysicsList.cc,v 1.9 2002/12/12 11:19:38 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -32,209 +28,91 @@
|
||||
#include "Em3PhysicsList.hh"
|
||||
#include "Em3PhysicsListMessenger.hh"
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleWithCuts.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "Em3PhysListParticles.hh"
|
||||
#include "Em3PhysListGeneral.hh"
|
||||
#include "Em3PhysListEmStandard.hh"
|
||||
#include "Em3PhysListEmModel.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3PhysicsList::Em3PhysicsList(): G4VUserPhysicsList()
|
||||
Em3PhysicsList::Em3PhysicsList() : G4VModularPhysicsList()
|
||||
{
|
||||
currentDefaultCut = defaultCutValue = 0.5*mm;
|
||||
cutForGamma = defaultCutValue;
|
||||
cutForElectron = defaultCutValue;
|
||||
cutForProton = defaultCutValue;
|
||||
|
||||
currentDefaultCut = 1.0*mm;
|
||||
cutForGamma = currentDefaultCut;
|
||||
cutForElectron = currentDefaultCut;
|
||||
cutForPositron = currentDefaultCut;
|
||||
|
||||
pMessenger = new Em3PhysicsListMessenger(this);
|
||||
|
||||
SetVerboseLevel(1);
|
||||
|
||||
// Particles
|
||||
particleList = new Em3PhysListParticles("particles");
|
||||
|
||||
// General Physics
|
||||
generalPhysicsList = new Em3PhysListGeneral("general");
|
||||
|
||||
// EM physics
|
||||
emName = G4String("standard");
|
||||
emPhysicsList = new Em3PhysListEmStandard(emName);
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Em3PhysicsList::~Em3PhysicsList()
|
||||
{delete pMessenger;}
|
||||
{
|
||||
delete pMessenger;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysicsList::ConstructParticle()
|
||||
{
|
||||
// In this method, static member functions should be called
|
||||
// for all particles which you want to use.
|
||||
// This ensures that objects of these particle types will be
|
||||
// created in the program.
|
||||
|
||||
ConstructBosons();
|
||||
ConstructLeptons();
|
||||
ConstructMesons();
|
||||
ConstructBarions();
|
||||
ConstructIons();
|
||||
particleList->ConstructParticle();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysicsList::ConstructBosons()
|
||||
{
|
||||
// pseudo-particles
|
||||
G4Geantino::GeantinoDefinition();
|
||||
G4ChargedGeantino::ChargedGeantinoDefinition();
|
||||
|
||||
// gamma
|
||||
G4Gamma::GammaDefinition();
|
||||
|
||||
// optical photon
|
||||
G4OpticalPhoton::OpticalPhotonDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysicsList::ConstructLeptons()
|
||||
{
|
||||
// leptons
|
||||
G4Electron::ElectronDefinition();
|
||||
G4Positron::PositronDefinition();
|
||||
G4MuonPlus::MuonPlusDefinition();
|
||||
G4MuonMinus::MuonMinusDefinition();
|
||||
|
||||
G4NeutrinoE::NeutrinoEDefinition();
|
||||
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
|
||||
G4NeutrinoMu::NeutrinoMuDefinition();
|
||||
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysicsList::ConstructMesons()
|
||||
{
|
||||
// mesons
|
||||
G4PionPlus::PionPlusDefinition();
|
||||
G4PionMinus::PionMinusDefinition();
|
||||
G4PionZero::PionZeroDefinition();
|
||||
G4Eta::EtaDefinition();
|
||||
G4EtaPrime::EtaPrimeDefinition();
|
||||
G4KaonPlus::KaonPlusDefinition();
|
||||
G4KaonMinus::KaonMinusDefinition();
|
||||
G4KaonZero::KaonZeroDefinition();
|
||||
G4AntiKaonZero::AntiKaonZeroDefinition();
|
||||
G4KaonZeroLong::KaonZeroLongDefinition();
|
||||
G4KaonZeroShort::KaonZeroShortDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysicsList::ConstructBarions()
|
||||
{
|
||||
// barions
|
||||
G4Proton::ProtonDefinition();
|
||||
G4AntiProton::AntiProtonDefinition();
|
||||
G4Neutron::NeutronDefinition();
|
||||
G4AntiNeutron::AntiNeutronDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysicsList::ConstructIons()
|
||||
{
|
||||
// Ions
|
||||
G4Alpha::AlphaDefinition();
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysicsList::ConstructProcess()
|
||||
{
|
||||
AddTransportation();
|
||||
ConstructEM();
|
||||
ConstructGeneral();
|
||||
generalPhysicsList->ConstructProcess();
|
||||
emPhysicsList->ConstructProcess();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
|
||||
#include "G4MultipleScattering.hh"
|
||||
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuBremsstrahlung.hh"
|
||||
#include "G4MuPairProduction.hh"
|
||||
|
||||
#include "G4hIonisation.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysicsList::ConstructEM()
|
||||
void Em3PhysicsList::AddPhysicsList(const G4String& name)
|
||||
{
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
if (particleName == "gamma") {
|
||||
//gamma
|
||||
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
|
||||
pmanager->AddDiscreteProcess(new G4ComptonScattering);
|
||||
pmanager->AddDiscreteProcess(new G4GammaConversion);
|
||||
|
||||
} 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);
|
||||
|
||||
} 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);
|
||||
|
||||
} 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()) &&
|
||||
(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);
|
||||
}
|
||||
if (verboseLevel>1) {
|
||||
G4cout << "Em3PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
if (name == emName) return;
|
||||
|
||||
#include "G4Decay.hh"
|
||||
if (name == "standard") {
|
||||
|
||||
void Em3PhysicsList::ConstructGeneral()
|
||||
{
|
||||
// Add Decay Process
|
||||
G4Decay* theDecayProcess = new G4Decay();
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
if (theDecayProcess->IsApplicable(*particle)) {
|
||||
pmanager ->AddProcess(theDecayProcess);
|
||||
// set ordering for PostStepDoIt and AtRestDoIt
|
||||
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
|
||||
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
|
||||
}
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new Em3PhysListEmStandard(name);
|
||||
|
||||
} else if (name == "model") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new Em3PhysListEmModel(name);
|
||||
|
||||
} else {
|
||||
|
||||
G4cout << "Em3PhysicsList::AddPhysicsList: <" << name << ">"
|
||||
<< " is not defined"
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,15 +120,7 @@ void Em3PhysicsList::ConstructGeneral()
|
||||
|
||||
void Em3PhysicsList::SetCuts()
|
||||
{
|
||||
// reactualise cutValues
|
||||
if (currentDefaultCut != defaultCutValue)
|
||||
{
|
||||
if(cutForGamma == currentDefaultCut) cutForGamma = defaultCutValue;
|
||||
if(cutForElectron == currentDefaultCut) cutForElectron = defaultCutValue;
|
||||
if(cutForProton == currentDefaultCut) cutForProton = defaultCutValue;
|
||||
currentDefaultCut = defaultCutValue;
|
||||
}
|
||||
|
||||
|
||||
if (verboseLevel >0){
|
||||
G4cout << "Em3PhysicsList::SetCuts:";
|
||||
G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
|
||||
@@ -260,15 +130,8 @@ void Em3PhysicsList::SetCuts()
|
||||
// because some processes for e+/e- need cut values for gamma
|
||||
SetCutValue(cutForGamma, "gamma");
|
||||
SetCutValue(cutForElectron, "e-");
|
||||
SetCutValue(cutForElectron, "e+");
|
||||
|
||||
// set cut values for proton and anti_proton before all other hadrons
|
||||
// because some processes for hadrons need cut values for proton/anti_proton
|
||||
SetCutValue(cutForProton, "proton");
|
||||
SetCutValue(cutForProton, "anti_proton");
|
||||
|
||||
SetCutValueForOthers(defaultCutValue);
|
||||
|
||||
SetCutValue(cutForPositron, "e+");
|
||||
|
||||
if (verboseLevel>0) DumpCutValuesTable();
|
||||
}
|
||||
|
||||
@@ -276,23 +139,25 @@ void Em3PhysicsList::SetCuts()
|
||||
|
||||
void Em3PhysicsList::SetCutForGamma(G4double cut)
|
||||
{
|
||||
ResetCuts();
|
||||
cutForGamma = cut;
|
||||
}
|
||||
|
||||
void Em3PhysicsList::SetCutForElectron(G4double cut)
|
||||
{
|
||||
ResetCuts();
|
||||
cutForElectron = cut;
|
||||
}
|
||||
|
||||
void Em3PhysicsList::SetCutForProton(G4double cut)
|
||||
{
|
||||
ResetCuts();
|
||||
cutForProton = cut;
|
||||
SetParticleCuts(cutForGamma, G4Gamma::Gamma());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysicsList::SetCutForElectron(G4double cut)
|
||||
{
|
||||
cutForElectron = cut;
|
||||
SetParticleCuts(cutForElectron, G4Electron::Electron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Em3PhysicsList::SetCutForPositron(G4double cut)
|
||||
{
|
||||
cutForPositron = cut;
|
||||
SetParticleCuts(cutForPositron, G4Positron::Positron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: Em3PhysicsListMessenger.cc,v 1.5 2002/12/12 11:19:38 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: Em3PhysicsListMessenger.cc,v 1.6 2003/02/20 15:52:02 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "Em3PhysicsList.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -54,11 +55,23 @@ Em3PhysicsListMessenger::Em3PhysicsListMessenger(Em3PhysicsList* pPhys)
|
||||
electCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
protoCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setPCut",this);
|
||||
protoCutCmd->SetGuidance("Set proton cut.");
|
||||
protoCutCmd->SetGuidance("Set positron cut.");
|
||||
protoCutCmd->SetParameterName("Pcut",false);
|
||||
protoCutCmd->SetUnitCategory("Length");
|
||||
protoCutCmd->SetRange("Pcut>0.0");
|
||||
protoCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
allCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setCuts",this);
|
||||
allCutCmd->SetGuidance("Set cut for all.");
|
||||
allCutCmd->SetParameterName("cut",false);
|
||||
allCutCmd->SetUnitCategory("Length");
|
||||
allCutCmd->SetRange("cut>0.0");
|
||||
allCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
pListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this);
|
||||
pListCmd->SetGuidance("Add modula physics list.");
|
||||
pListCmd->SetParameterName("PList",false);
|
||||
pListCmd->AvailableForStates(G4State_PreInit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -68,6 +81,8 @@ Em3PhysicsListMessenger::~Em3PhysicsListMessenger()
|
||||
delete gammaCutCmd;
|
||||
delete electCutCmd;
|
||||
delete protoCutCmd;
|
||||
delete allCutCmd;
|
||||
delete pListCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -82,7 +97,18 @@ void Em3PhysicsListMessenger::SetNewValue(G4UIcommand* command,
|
||||
{ pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == protoCutCmd )
|
||||
{ pPhysicsList->SetCutForProton(protoCutCmd->GetNewDoubleValue(newValue));}
|
||||
{ pPhysicsList->SetCutForPositron(protoCutCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == allCutCmd )
|
||||
{
|
||||
G4double cut = allCutCmd->GetNewDoubleValue(newValue);
|
||||
pPhysicsList->SetCutForGamma(cut);
|
||||
pPhysicsList->SetCutForElectron(cut);
|
||||
pPhysicsList->SetCutForPositron(cut);
|
||||
}
|
||||
|
||||
if( command == pListCmd )
|
||||
{ pPhysicsList->AddPhysicsList(newValue);}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Em3PrimaryGeneratorAction.cc,v 1.5 2001/10/22 10:58:57 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Em3PrimaryGeneratorMessenger.cc,v 1.7 2002/12/12 11:19:38 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: Em3RunAction.cc,v 1.19 2002/12/12 11:19:38 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: Em3RunAction.cc,v 1.22 2003/03/17 17:30:53 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
#include "Randomize.hh"
|
||||
#include "g4std/iomanip"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#ifndef G4NOHIST
|
||||
#include "AIDA/AIDA.h"
|
||||
@@ -118,7 +119,7 @@ void Em3RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
|
||||
//example of print dEdx tables
|
||||
//
|
||||
////PrintDedxTables();
|
||||
////PrintDedxTables();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -201,12 +202,12 @@ void Em3RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
<< G4std::setw( 5) << G4BestUnit( rmsLAbs,"Length")
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
|
||||
G4cout << "\n-------------------------------------------------------------";
|
||||
G4cout << G4endl;
|
||||
G4cout << G4endl;
|
||||
G4cout.setf(mode,G4std::ios::floatfield);
|
||||
G4cout.precision(prec);
|
||||
|
||||
|
||||
// show Rndm status
|
||||
HepRandom::showEngineStatus();
|
||||
}
|
||||
@@ -225,18 +226,18 @@ 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 program g4mat).
|
||||
//
|
||||
//
|
||||
const G4double tkmin=10*keV, tkmax=10*TeV;
|
||||
const G4int nbin=90;
|
||||
const G4int nbin=90;
|
||||
G4double tk[nbin];
|
||||
|
||||
const G4int ncolumn = 5;
|
||||
|
||||
|
||||
const G4int ncolumn = 5;
|
||||
|
||||
//compute the kinetic energies
|
||||
//
|
||||
//
|
||||
const G4double dp = log10(tkmax/tkmin)/nbin;
|
||||
const G4double dt = pow(10.,dp);
|
||||
tk[0] = tkmin;
|
||||
tk[0] = tkmin;
|
||||
for (G4int i=1; i<nbin; ++i) tk[i] = tk[i-1]*dt;
|
||||
|
||||
//print the kinetic energies
|
||||
@@ -244,58 +245,67 @@ void Em3RunAction::PrintDedxTables()
|
||||
#ifdef G4USE_STD_NAMESPACE
|
||||
G4std::ios::fmtflags mode = G4cout.flags();
|
||||
G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
|
||||
#else
|
||||
#else
|
||||
long mode = G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
|
||||
#endif
|
||||
G4int prec = G4cout.precision(3);
|
||||
|
||||
|
||||
G4cout << "\n kinetic energies \n ";
|
||||
for (G4int j=0; j<nbin; ++j) {
|
||||
G4cout << G4BestUnit(tk[j],"Energy") << "\t";
|
||||
G4cout << G4BestUnit(tk[j],"Energy") << "\t";
|
||||
if ((j+1)%ncolumn == 0) G4cout << "\n ";
|
||||
}
|
||||
G4cout << G4endl;
|
||||
G4cout << G4endl;
|
||||
|
||||
//print the dE/dx tables
|
||||
//
|
||||
G4cout.setf(G4std::ios::scientific,G4std::ios::floatfield);
|
||||
|
||||
G4ParticleDefinition*
|
||||
|
||||
G4ParticleDefinition*
|
||||
part = G4ParticleTable::GetParticleTable()->FindParticle("mu+");
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
|
||||
|
||||
for (G4int iab=0;iab < Detector->GetNbOfAbsor(); iab++)
|
||||
{
|
||||
G4Material* mat = Detector->GetAbsorMaterial(iab);
|
||||
G4int index = mat->GetIndex();
|
||||
const G4MaterialCutsCouple* couple =
|
||||
theCoupleTable->GetMaterialCutsCouple(index);
|
||||
G4cout << "\nLIST";
|
||||
G4cout << "\nC \nC dE/dx (MeV/cm) for " << part->GetParticleName()
|
||||
G4cout << "\nC \nC dE/dx (MeV/cm) for " << part->GetParticleName()
|
||||
<< " in " << mat ->GetName() << "\nC";
|
||||
G4cout << "\nKINE (" << part->GetParticleName() << ")";
|
||||
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()->GetEnergyCuts())[mat->GetIndex()];
|
||||
if (cutgam < tkmin) cutgam = tkmin; if (cutgam > tkmax) cutgam = tkmax;
|
||||
G4double cutele = (G4Electron::Electron()
|
||||
->GetEnergyCuts())[mat->GetIndex()];
|
||||
if (cutele < tkmin) cutele = tkmin; if (cutele > tkmax) cutele = tkmax;
|
||||
G4cout << "\nCUTS " << cutgam/GeV << " (cutgam)\t"
|
||||
G4double cutgam =
|
||||
(*(theCoupleTable->GetEnergyCutsVector(idxG4GammaCut)))[index];
|
||||
if (cutgam < tkmin) cutgam = tkmin;
|
||||
if (cutgam > tkmax) cutgam = tkmax;
|
||||
G4double cutele =
|
||||
(*(theCoupleTable->GetEnergyCutsVector(idxG4ElectronCut)))[index];
|
||||
if (cutele < tkmin) cutele = tkmin;
|
||||
if (cutele > tkmax) cutele = tkmax;
|
||||
G4cout << "\nCUTS " << cutgam/GeV << " (cutgam)\t"
|
||||
<< cutele/GeV << " (cutele)";
|
||||
|
||||
G4cout.precision(6);
|
||||
|
||||
G4cout.precision(6);
|
||||
G4cout << "\nG4VAL \n ";
|
||||
for (G4int l=0;l<nbin; ++l)
|
||||
{
|
||||
G4double dedx = G4EnergyLossTables::GetDEDX(part,tk[l],mat);
|
||||
G4double dedx = G4EnergyLossTables::GetDEDX(part,tk[l],couple);
|
||||
G4cout << dedx/(MeV/cm) << "\t";
|
||||
if ((l+1)%ncolumn == 0) G4cout << "\n ";
|
||||
}
|
||||
G4cout << G4endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
|
||||
G4cout.precision(prec);
|
||||
G4cout.setf(mode,G4std::ios::floatfield);
|
||||
G4cout.setf(mode,G4std::ios::floatfield);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Em3RunActionMessenger.cc,v 1.10 2002/12/12 11:19:39 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Em3SteppingAction.cc,v 1.5 2001/10/22 10:58:59 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: Em3SteppingVerbose.cc,v 1.8 2001/10/22 10:58:59 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: Em3SteppingVerbose.cc,v 1.9 2003/02/10 16:51:49 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -73,7 +73,8 @@ void Em3SteppingVerbose::StepInfo()
|
||||
<< 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");
|
||||
<< G4std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
|
||||
<< " ";
|
||||
|
||||
// if( fStepStatus != fWorldBoundary){
|
||||
if( fTrack->GetNextVolume() != 0 ) {
|
||||
@@ -161,7 +162,8 @@ G4int prec = G4cout.precision(3);
|
||||
<< 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");
|
||||
<< G4std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
|
||||
<< " ";
|
||||
|
||||
if(fTrack->GetNextVolume()){
|
||||
G4cout << G4std::setw(10) << fTrack->GetVolume()->GetName();
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Em3VisManager.cc,v 1.7 2002/11/13 21:39:52 duns Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 24th January 1998.
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: IonC12.cc,v 1.1 2003/03/10 18:16:50 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/iomanip"
|
||||
|
||||
#include "IonC12.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
IonC12::IonC12(
|
||||
const G4String& aName, G4double mass,
|
||||
G4double width, G4double charge,
|
||||
G4int iSpin, G4int iParity,
|
||||
G4int iConjugation, G4int iIsospin,
|
||||
G4int iIsospin3, G4int gParity,
|
||||
const G4String& pType, G4int lepton,
|
||||
G4int baryon, G4int encoding,
|
||||
G4bool stable, G4double lifetime,
|
||||
G4DecayTable *decaytable )
|
||||
: G4VIon( aName,mass,width,charge,iSpin,iParity,
|
||||
iConjugation,iIsospin,iIsospin3,gParity,pType,
|
||||
lepton,baryon,encoding,stable,lifetime,decaytable )
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
IonC12::~IonC12() { }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
// static member definition
|
||||
//
|
||||
// Arguments for constructor are as follows
|
||||
// name mass width charge
|
||||
// 2*spin parity C-conjugation
|
||||
// 2*Isospin 2*Isospin3 G-parity
|
||||
// type lepton number baryon number PDG encoding
|
||||
// stable lifetime decay table
|
||||
|
||||
IonC12 IonC12::theIon(
|
||||
"ionC12", 11.17793*GeV, 0.0*MeV, +6.0*eplus,
|
||||
0, +1, 0,
|
||||
0, 0, 0,
|
||||
"static_nucleus", 0, +12, 0,
|
||||
true, -1.0, 0
|
||||
);
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
IonC12* IonC12::IonDefinition() {return &theIon;}
|
||||
|
||||
IonC12* IonC12::Ion() {return &theIon;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
Reference in New Issue
Block a user