Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/DetectorConstruction.cc
|
||||
/// \brief Implementation of the DetectorConstruction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: DetectorConstruction.cc 68263 2013-03-20 10:16:46Z maire $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -58,6 +58,9 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorConstruction::DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fWorldMaterial(0),fAbsorMaterial(0),fMagField(0),fLAbsor(0),
|
||||
fDetectorMessenger(0)
|
||||
{
|
||||
// default parameter values
|
||||
fAbsorSizeX = fAbsorSizeYZ = 20*cm;
|
||||
@@ -160,41 +163,41 @@ G4VPhysicalVolume* DetectorConstruction::ConstructVolumes()
|
||||
// World
|
||||
//
|
||||
G4Box*
|
||||
sWorld = new G4Box("World", //name
|
||||
fWorldSizeX/2,fWorldSizeYZ/2,fWorldSizeYZ/2); //dimensions
|
||||
sWorld = new G4Box("World", //name
|
||||
fWorldSizeX/2,fWorldSizeYZ/2,fWorldSizeYZ/2); //dimensions
|
||||
|
||||
G4LogicalVolume*
|
||||
G4LogicalVolume*
|
||||
lWorld = new G4LogicalVolume(sWorld, //shape
|
||||
fWorldMaterial, //material
|
||||
"World"); //name
|
||||
"World"); //name
|
||||
|
||||
G4VPhysicalVolume*
|
||||
pWorld = new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
lWorld, //logical volume
|
||||
"World", //name
|
||||
0, //mother volume
|
||||
false, //no boolean operation
|
||||
0); //copy number
|
||||
pWorld = new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
lWorld, //logical volume
|
||||
"World", //name
|
||||
0, //mother volume
|
||||
false, //no boolean operation
|
||||
0); //copy number
|
||||
//
|
||||
// Absorber
|
||||
//
|
||||
G4Box*
|
||||
sAbsor = new G4Box("Absorber", //name
|
||||
fAbsorSizeX/2,fAbsorSizeYZ/2,fAbsorSizeYZ/2); //dimensions
|
||||
sAbsor = new G4Box("Absorber", //name
|
||||
fAbsorSizeX/2,fAbsorSizeYZ/2,fAbsorSizeYZ/2); //dimensions
|
||||
|
||||
fLAbsor = new G4LogicalVolume(sAbsor, //shape
|
||||
fAbsorMaterial, //material
|
||||
fLAbsor = new G4LogicalVolume(sAbsor, //shape
|
||||
fAbsorMaterial, //material
|
||||
"Absorber"); //name
|
||||
|
||||
|
||||
new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
fLAbsor, //logical volume
|
||||
"Absorber", //name
|
||||
lWorld, //mother volume
|
||||
false, //no boolean operation
|
||||
0); //copy number
|
||||
new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
fLAbsor, //logical volume
|
||||
"Absorber", //name
|
||||
lWorld, //mother volume
|
||||
false, //no boolean operation
|
||||
0); //copy number
|
||||
//
|
||||
// Tallies (optional)
|
||||
//
|
||||
@@ -202,17 +205,17 @@ G4VPhysicalVolume* DetectorConstruction::ConstructVolumes()
|
||||
for (G4int j=1; j<=fTallyNumber; j++) {
|
||||
|
||||
G4Box* sTally = new G4Box("Tally",
|
||||
fTallySize[j].x()/2,fTallySize[j].y()/2,fTallySize[j].z()/2);
|
||||
fTallySize[j].x()/2,fTallySize[j].y()/2,fTallySize[j].z()/2);
|
||||
|
||||
fLTally[j] = new G4LogicalVolume(sTally,fTallyMaterial[j],"Tally");
|
||||
|
||||
new G4PVPlacement(0, //no rotation
|
||||
fTallyPosition[j], //position
|
||||
fLTally[j], //logical volume
|
||||
"Tally", //name
|
||||
fLAbsor, //mother volume
|
||||
false, //no boolean operation
|
||||
j); //copy number
|
||||
fTallyPosition[j], //position
|
||||
fLTally[j], //logical volume
|
||||
"Tally", //name
|
||||
fLAbsor, //mother volume
|
||||
false, //no boolean operation
|
||||
j); //copy number
|
||||
|
||||
fTallyMass[j] = fTallySize[j].x()*fTallySize[j].y()*fTallySize[j].z()
|
||||
*(fTallyMaterial[j]->GetDensity());
|
||||
@@ -242,7 +245,7 @@ void DetectorConstruction::PrintParameters()
|
||||
for (G4int j=1; j<=fTallyNumber; j++) {
|
||||
G4cout << "fTally " << j << ": "
|
||||
<< fTallyMaterial[j]->GetName()
|
||||
<< ", mass = " << G4BestUnit(fTallyMass[j],"Mass")
|
||||
<< ", mass = " << G4BestUnit(fTallyMass[j],"Mass")
|
||||
<< " size = " << G4BestUnit(fTallySize[j],"Length")
|
||||
<< " position = " << G4BestUnit(fTallyPosition[j],"Length")
|
||||
<< G4endl;
|
||||
@@ -296,7 +299,7 @@ void DetectorConstruction::SetMagField(G4double fieldValue)
|
||||
|
||||
if (fieldValue!=0.) // create a new one if non nul
|
||||
{
|
||||
fMagField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
|
||||
fMagField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
|
||||
fieldMgr->SetDetectorField(fMagField);
|
||||
fieldMgr->CreateChordFinder(fMagField);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/DetectorMessenger.cc
|
||||
/// \brief Implementation of the DetectorMessenger class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: DetectorMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -45,7 +45,17 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
|
||||
:fDetector(Det)
|
||||
:G4UImessenger(),fDetector(Det),
|
||||
fTestemDir(0),
|
||||
fDetDir(0),
|
||||
fMaterCmd(0),
|
||||
fSizeXCmd(0),
|
||||
fSizeYZCmd(0),
|
||||
fMagFieldCmd(0),
|
||||
fTalNbCmd(0),
|
||||
fTalDefCmd(0),
|
||||
fTalPosiCmd(0),
|
||||
fUpdateCmd(0)
|
||||
{
|
||||
fTestemDir = new G4UIdirectory("/testem/");
|
||||
fTestemDir->SetGuidance(" detector control.");
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/EventAction.cc
|
||||
/// \brief Implementation of the EventAction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: EventAction.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -40,7 +40,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
EventAction::EventAction()
|
||||
:fDrawFlag("none"),fPrintModulo(10000),fEventMessenger(0)
|
||||
:G4UserEventAction(),fDrawFlag("none"),fPrintModulo(10000),fEventMessenger(0)
|
||||
{
|
||||
fEventMessenger = new EventActionMessenger(this);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/EventActionMessenger.cc
|
||||
/// \brief Implementation of the EventActionMessenger class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: EventActionMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -41,7 +41,10 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
EventActionMessenger::EventActionMessenger(EventAction* EvAct)
|
||||
:fEventAction(EvAct)
|
||||
:G4UImessenger(),fEventAction(EvAct),
|
||||
fEventDir(0),
|
||||
fDrawCmd(0),
|
||||
fPrintCmd(0)
|
||||
{
|
||||
fEventDir = new G4UIdirectory("/testem/event/");
|
||||
fEventDir->SetGuidance("event control");
|
||||
|
||||
@@ -23,20 +23,18 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file electromagnetic/TestEm7/src/G4LindhardPartition.cc
|
||||
/// \brief Implementation of the G4LindhardPartition class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
/*
|
||||
* G4LindhardPartition.cc
|
||||
* \file electromagnetic/TestEm7/src/G4LindhardPartition.cc
|
||||
* \brief Implementation of the G4LindhardPartition class
|
||||
*
|
||||
* Created by Marcus Mendenhall on 1/14/08.
|
||||
* 2008 Vanderbilt University, Nashville, TN, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// $Id: G4LindhardPartition.cc 68263 2013-03-20 10:16:46Z maire $
|
||||
|
||||
#include "G4LindhardPartition.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
@@ -96,9 +94,11 @@ G4double G4LindhardRobinsonPartition::PartitionNIEL(
|
||||
G4double asum=a1+a2;
|
||||
|
||||
G4double el=30.724*z1*z2*std::sqrt(zpow)*asum/a2;
|
||||
G4double fl=0.0793*z23[z1]*std::sqrt(z2*asum*asum*asum/(a1*a1*a1*a2))/std::pow(zpow, 0.75);
|
||||
G4double fl=0.0793*z23[z1]*std::sqrt(z2*asum*asum*asum/(a1*a1*a1*a2))
|
||||
/std::pow(zpow, 0.75);
|
||||
G4double eps=(energy/eV)*(1.0/el);
|
||||
|
||||
return 1.0/(1+fl*(3.4008*std::pow(eps, 0.16667)+0.40244*std::pow(eps, 0.75)+eps));
|
||||
return
|
||||
1.0/(1+fl*(3.4008*std::pow(eps, 0.16667)+0.40244*std::pow(eps, 0.75)+eps));
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/G4ScreenedNuclearRecoil.cc
|
||||
/// \brief Implementation of the G4ScreenedNuclearRecoil class
|
||||
//
|
||||
//
|
||||
// G4ScreenedNuclearRecoil.cc,v 1.57 2008/05/07 11:51:26 marcus Exp
|
||||
// GEANT4 tag
|
||||
// $Id: G4ScreenedNuclearRecoil.cc 66854 2013-01-14 16:56:24Z vnivanch $
|
||||
//
|
||||
//
|
||||
// Class Description
|
||||
@@ -107,7 +105,6 @@ const char* G4ScreenedCoulombCrossSectionInfo::CVSFileVers() { return
|
||||
|
||||
#include "G4EmProcessSubType.hh"
|
||||
|
||||
#include "G4RangeTest.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
@@ -290,10 +287,10 @@ void G4ScreenedCoulombCrossSection::BuildMFPTables()
|
||||
|
||||
G4ScreenedNuclearRecoil::
|
||||
G4ScreenedNuclearRecoil(const G4String& processName,
|
||||
const G4String &ScreeningKey,
|
||||
G4bool GenerateRecoils,
|
||||
G4double RecoilCutoff, G4double PhysicsCutoff) :
|
||||
G4VDiscreteProcess(processName),
|
||||
const G4String &ScreeningKey,
|
||||
G4bool GenerateRecoils,
|
||||
G4double RecoilCutoff, G4double PhysicsCutoff) :
|
||||
G4VDiscreteProcess(processName, fElectromagnetic),
|
||||
screeningKey(ScreeningKey),
|
||||
generateRecoils(GenerateRecoils), avoidReactions(1),
|
||||
recoilCutoff(RecoilCutoff), physicsCutoff(PhysicsCutoff),
|
||||
@@ -705,6 +702,18 @@ IsApplicable(const G4ParticleDefinition& aParticleType)
|
||||
aParticleType.GetParticleType() == "static_nucleus";
|
||||
}
|
||||
|
||||
void
|
||||
G4ScreenedNuclearRecoil::
|
||||
BuildPhysicsTable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
G4String nam = aParticleType.GetParticleName();
|
||||
if(nam == "GenericIon" || nam == "proton"
|
||||
|| nam == "deuteron" || nam == "triton" || nam == "alpha" || nam == "He3") {
|
||||
G4cout << G4endl << GetProcessName() << ": for " << nam
|
||||
<< " SubType= " << GetProcessSubType()
|
||||
<< " maxEnergy(MeV)= " << processMaxEnergy/MeV << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G4ScreenedNuclearRecoil::
|
||||
|
||||
@@ -23,7 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
/// \file electromagnetic/TestEm7/src/PhysListEmStandard.cc
|
||||
/// \brief Implementation of the PhysListEmStandard class
|
||||
//
|
||||
// $Id: PhysListEmStandard.cc 68585 2013-04-01 23:35:07Z adotti $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -40,7 +43,6 @@
|
||||
#include "G4KleinNishinaModel.hh"
|
||||
|
||||
#include "G4eMultipleScattering.hh"
|
||||
#include "G4UrbanMscModel96.hh"
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
@@ -86,9 +88,9 @@ void PhysListEmStandard::ConstructProcess()
|
||||
|
||||
// Add standard EM Processes
|
||||
//
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
aParticleIterator->reset();
|
||||
while( (*aParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = aParticleIterator->value();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
if (particleName == "gamma") {
|
||||
@@ -96,15 +98,13 @@ void PhysListEmStandard::ConstructProcess()
|
||||
////ph->RegisterProcess(new G4RayleighScattering, particle);
|
||||
ph->RegisterProcess(new G4PhotoElectricEffect, particle);
|
||||
G4ComptonScattering* cs = new G4ComptonScattering;
|
||||
cs->SetModel(new G4KleinNishinaModel());
|
||||
cs->SetEmModel(new G4KleinNishinaModel());
|
||||
ph->RegisterProcess(cs, particle);
|
||||
ph->RegisterProcess(new G4GammaConversion, particle);
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
|
||||
G4eMultipleScattering* msc = new G4eMultipleScattering();
|
||||
msc -> AddEmModel(0, new G4UrbanMscModel96());
|
||||
ph->RegisterProcess(msc, particle);
|
||||
ph->RegisterProcess(new G4eMultipleScattering(), particle);
|
||||
//
|
||||
G4eIonisation* eIoni = new G4eIonisation();
|
||||
eIoni->SetStepFunction(0.1, 100*um);
|
||||
@@ -114,9 +114,7 @@ void PhysListEmStandard::ConstructProcess()
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
|
||||
G4eMultipleScattering* msc = new G4eMultipleScattering();
|
||||
msc -> AddEmModel(0, new G4UrbanMscModel96());
|
||||
ph->RegisterProcess(msc, particle);
|
||||
ph->RegisterProcess(new G4eMultipleScattering(), particle);
|
||||
//
|
||||
G4eIonisation* eIoni = new G4eIonisation();
|
||||
eIoni->SetStepFunction(0.1, 100*um);
|
||||
|
||||
@@ -26,47 +26,66 @@
|
||||
/// \file electromagnetic/TestEm7/src/PhysListEmStandardNR.cc
|
||||
/// \brief Implementation of the PhysListEmStandardNR class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: PhysListEmStandardNR.cc 73200 2013-08-22 08:16:44Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysListEmStandardNR.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4LossTableManager.hh"
|
||||
#include "G4EmProcessOptions.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
|
||||
#include "G4ScreenedNuclearRecoil.hh"
|
||||
#include "G4RayleighScattering.hh"
|
||||
#include "G4PEEffectFluoModel.hh"
|
||||
#include "G4KleinNishinaModel.hh"
|
||||
#include "G4LowEPComptonModel.hh"
|
||||
#include "G4PenelopeGammaConversionModel.hh"
|
||||
#include "G4LivermorePhotoElectricModel.hh"
|
||||
|
||||
#include "G4eMultipleScattering.hh"
|
||||
#include "G4MuMultipleScattering.hh"
|
||||
#include "G4hMultipleScattering.hh"
|
||||
#include "G4CoulombScattering.hh"
|
||||
#include "G4eCoulombScatteringModel.hh"
|
||||
#include "G4UrbanMscModel.hh"
|
||||
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
#include "G4Generator2BS.hh"
|
||||
#include "G4SeltzerBergerModel.hh"
|
||||
#include "G4PenelopeIonisationModel.hh"
|
||||
#include "G4UniversalFluctuation.hh"
|
||||
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
#include "G4UAtomicDeexcitation.hh"
|
||||
|
||||
#include "G4MuMultipleScattering.hh"
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuBremsstrahlung.hh"
|
||||
#include "G4MuPairProduction.hh"
|
||||
|
||||
#include "G4hMultipleScattering.hh"
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4ionIonisation.hh"
|
||||
#include "G4IonFluctuations.hh"
|
||||
#include "G4CoulombScattering.hh"
|
||||
#include "G4IonParametrisedLossModel.hh"
|
||||
|
||||
#include "G4DummyModel.hh"
|
||||
#include "G4ScreenedNuclearRecoil.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PhysicsListHelper.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEmStandardNR::PhysListEmStandardNR(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
{
|
||||
G4LossTableManager::Instance();
|
||||
SetPhysicsType(bElectromagnetic);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -77,102 +96,162 @@ PhysListEmStandardNR::~PhysListEmStandardNR()
|
||||
|
||||
void PhysListEmStandardNR::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes
|
||||
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
|
||||
|
||||
// muon & hadron bremsstrahlung and pair production
|
||||
G4MuBremsstrahlung* mub = new G4MuBremsstrahlung();
|
||||
G4MuPairProduction* mup = new G4MuPairProduction();
|
||||
|
||||
G4ScreenedNuclearRecoil* nucr = new G4ScreenedNuclearRecoil();
|
||||
G4double energyLimit = 100.*MeV;
|
||||
nucr->SetMaxEnergyForScattering(energyLimit);
|
||||
G4eCoulombScatteringModel* csm = new G4eCoulombScatteringModel();
|
||||
csm->SetActivationLowEnergyLimit(energyLimit);
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
aParticleIterator->reset();
|
||||
while( (*aParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = aParticleIterator->value();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
if (particleName == "gamma") {
|
||||
// gamma
|
||||
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
|
||||
pmanager->AddDiscreteProcess(new G4ComptonScattering);
|
||||
pmanager->AddDiscreteProcess(new G4GammaConversion);
|
||||
|
||||
// Compton scattering
|
||||
G4ComptonScattering* cs = new G4ComptonScattering;
|
||||
cs->SetEmModel(new G4KleinNishinaModel(),1);
|
||||
ph->RegisterProcess(cs, particle);
|
||||
|
||||
// Photoelectric
|
||||
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
|
||||
G4VEmModel* theLivermorePEModel = new G4LivermorePhotoElectricModel();
|
||||
theLivermorePEModel->SetHighEnergyLimit(10*GeV);
|
||||
pe->SetEmModel(theLivermorePEModel,1);
|
||||
ph->RegisterProcess(pe, particle);
|
||||
|
||||
// Gamma conversion
|
||||
G4GammaConversion* gc = new G4GammaConversion();
|
||||
G4VEmModel* thePenelopeGCModel = new G4PenelopeGammaConversionModel();
|
||||
thePenelopeGCModel->SetHighEnergyLimit(1*GeV);
|
||||
gc->SetEmModel(thePenelopeGCModel,1);
|
||||
ph->RegisterProcess(gc, particle);
|
||||
|
||||
// Rayleigh scattering
|
||||
ph->RegisterProcess(new G4RayleighScattering(), particle);
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
//electron
|
||||
pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
|
||||
|
||||
// ionisation
|
||||
G4eIonisation* eIoni = new G4eIonisation();
|
||||
eIoni->SetStepFunction(0.2, 100*um);
|
||||
|
||||
// bremsstrahlung
|
||||
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
|
||||
|
||||
ph->RegisterProcess(new G4eMultipleScattering(), particle);
|
||||
ph->RegisterProcess(eIoni, particle);
|
||||
ph->RegisterProcess(eBrem, particle);
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
//positron
|
||||
pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
|
||||
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4);
|
||||
// ionisation
|
||||
G4eIonisation* eIoni = new G4eIonisation();
|
||||
eIoni->SetStepFunction(0.2, 100*um);
|
||||
|
||||
// bremsstrahlung
|
||||
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
|
||||
|
||||
ph->RegisterProcess(new G4eMultipleScattering(), particle);
|
||||
ph->RegisterProcess(eIoni, particle);
|
||||
ph->RegisterProcess(eBrem, particle);
|
||||
|
||||
// annihilation at rest and in flight
|
||||
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
|
||||
|
||||
} else if (particleName == "mu+" ||
|
||||
particleName == "mu-" ) {
|
||||
//muon
|
||||
pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4MuIonisation, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3);
|
||||
pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4);
|
||||
|
||||
G4MuIonisation* muIoni = new G4MuIonisation();
|
||||
muIoni->SetStepFunction(0.2, 50*um);
|
||||
|
||||
ph->RegisterProcess(muIoni, particle);
|
||||
ph->RegisterProcess(mub, particle);
|
||||
ph->RegisterProcess(mup, particle);
|
||||
ph->RegisterProcess(new G4CoulombScattering(), particle);
|
||||
|
||||
} else if (particleName == "alpha" || particleName == "He3") {
|
||||
|
||||
G4hMultipleScattering* msc = new G4hMultipleScattering();
|
||||
G4DummyModel* dm = new G4DummyModel();
|
||||
dm->SetLowEnergyLimit(0.0);
|
||||
dm->SetHighEnergyLimit(energyLimit);
|
||||
msc->AddEmModel(0, dm);
|
||||
pmanager->AddProcess(msc, -1, 1,1);
|
||||
G4UrbanMscModel* model = new G4UrbanMscModel();
|
||||
model->SetActivationLowEnergyLimit(energyLimit);
|
||||
msc->SetEmModel(model, 1);
|
||||
ph->RegisterProcess(msc, particle);
|
||||
|
||||
G4ionIonisation* ion = new G4ionIonisation();
|
||||
pmanager->AddProcess(ion, -1, 2, 2);
|
||||
G4ionIonisation* ionIoni = new G4ionIonisation();
|
||||
ionIoni->SetStepFunction(0.1, 10*um);
|
||||
ph->RegisterProcess(ionIoni, particle);
|
||||
|
||||
pmanager->AddDiscreteProcess(nucr);
|
||||
ph->RegisterProcess(nucr, particle);
|
||||
|
||||
} else if (particleName == "GenericIon" ) {
|
||||
|
||||
G4hMultipleScattering* msc = new G4hMultipleScattering();
|
||||
G4DummyModel* dm = new G4DummyModel();
|
||||
dm->SetLowEnergyLimit(0.0);
|
||||
dm->SetHighEnergyLimit(energyLimit);
|
||||
msc->AddEmModel(0, dm);
|
||||
pmanager->AddProcess(msc, -1, 1,1);
|
||||
G4UrbanMscModel* model = new G4UrbanMscModel();
|
||||
model->SetActivationLowEnergyLimit(energyLimit);
|
||||
msc->SetEmModel(model, 1);
|
||||
ph->RegisterProcess(msc, particle);
|
||||
|
||||
G4ionIonisation* ion = new G4ionIonisation();
|
||||
ion->SetStepFunction(0.1, um);
|
||||
pmanager->AddProcess(ion, -1, 2, 2);
|
||||
|
||||
pmanager->AddDiscreteProcess(nucr);
|
||||
G4ionIonisation* ionIoni = new G4ionIonisation();
|
||||
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
|
||||
ionIoni->SetStepFunction(0.1, 1*um);
|
||||
ph->RegisterProcess(ionIoni, particle);
|
||||
|
||||
ph->RegisterProcess(nucr, particle);
|
||||
|
||||
} else if (particleName == "proton" ||
|
||||
particleName == "deuteron" ||
|
||||
particleName == "triton") {
|
||||
|
||||
G4hMultipleScattering* msc = new G4hMultipleScattering();
|
||||
G4DummyModel* dm = new G4DummyModel();
|
||||
dm->SetLowEnergyLimit(0.0);
|
||||
dm->SetHighEnergyLimit(energyLimit);
|
||||
msc->AddEmModel(0, dm);
|
||||
pmanager->AddProcess(msc, -1, 1,1);
|
||||
G4UrbanMscModel* model = new G4UrbanMscModel();
|
||||
model->SetActivationLowEnergyLimit(energyLimit);
|
||||
msc->SetEmModel(model, 1);
|
||||
ph->RegisterProcess(msc, particle);
|
||||
|
||||
G4hIonisation* hion = new G4hIonisation();
|
||||
hion->SetFluctModel(new G4IonFluctuations());
|
||||
hion->SetStepFunction(0.1, 10.*um);
|
||||
pmanager->AddProcess(hion, -1, 2, 2);
|
||||
G4hIonisation* hIoni = new G4hIonisation();
|
||||
hIoni->SetStepFunction(0.05, 1*um);
|
||||
ph->RegisterProcess(hIoni, particle);
|
||||
|
||||
ph->RegisterProcess(nucr, particle);
|
||||
|
||||
pmanager->AddDiscreteProcess(nucr);
|
||||
|
||||
} else if ((!particle->IsShortLived()) &&
|
||||
(particle->GetPDGCharge() != 0.0) &&
|
||||
(particle->GetParticleName() != "chargedgeantino")) {
|
||||
//all others charged particles except geantino
|
||||
pmanager->AddProcess(new G4hMultipleScattering,-1, 1,1);
|
||||
pmanager->AddProcess(new G4hIonisation, -1, 2,2);
|
||||
|
||||
ph->RegisterProcess(new G4hMultipleScattering(), particle);
|
||||
ph->RegisterProcess(new G4hIonisation(), particle);
|
||||
}
|
||||
}
|
||||
G4EmProcessOptions opt;
|
||||
opt.SetMinEnergy(0.01*keV);
|
||||
opt.SetMaxEnergy(100.*GeV);
|
||||
opt.SetDEDXBinning(200);
|
||||
opt.SetLambdaBinning(200);
|
||||
|
||||
// Em options
|
||||
//
|
||||
// Main options and setting parameters are shown here.
|
||||
// Several of them have default values.
|
||||
//
|
||||
G4EmProcessOptions emOptions;
|
||||
|
||||
//physics tables
|
||||
//
|
||||
emOptions.SetMinEnergy(10*eV);
|
||||
emOptions.SetMaxEnergy(10*TeV);
|
||||
emOptions.SetDEDXBinning(12*20);
|
||||
emOptions.SetLambdaBinning(12*20);
|
||||
|
||||
// scattering
|
||||
emOptions.SetPolarAngleLimit(0.0);
|
||||
|
||||
// Deexcitation
|
||||
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
|
||||
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
|
||||
de->SetFluo(true);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -26,26 +26,43 @@
|
||||
/// \file electromagnetic/TestEm7/src/PhysListEmStandardSS.cc
|
||||
/// \brief Implementation of the PhysListEmStandardSS class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: PhysListEmStandardSS.cc 68585 2013-04-01 23:35:07Z adotti $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysListEmStandardSS.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4LossTableManager.hh"
|
||||
#include "G4EmProcessOptions.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
#include "G4RayleighScattering.hh"
|
||||
#include "G4PEEffectFluoModel.hh"
|
||||
#include "G4KleinNishinaModel.hh"
|
||||
#include "G4LowEPComptonModel.hh"
|
||||
#include "G4PenelopeGammaConversionModel.hh"
|
||||
#include "G4LivermorePhotoElectricModel.hh"
|
||||
|
||||
#include "G4eMultipleScattering.hh"
|
||||
#include "G4MuMultipleScattering.hh"
|
||||
#include "G4hMultipleScattering.hh"
|
||||
#include "G4CoulombScattering.hh"
|
||||
#include "G4IonCoulombScatteringModel.hh"
|
||||
#include "G4eCoulombScatteringModel.hh"
|
||||
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4Generator2BS.hh"
|
||||
#include "G4SeltzerBergerModel.hh"
|
||||
#include "G4PenelopeIonisationModel.hh"
|
||||
#include "G4UniversalFluctuation.hh"
|
||||
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
#include "G4UAtomicDeexcitation.hh"
|
||||
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuBremsstrahlung.hh"
|
||||
@@ -53,16 +70,19 @@
|
||||
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4ionIonisation.hh"
|
||||
#include "G4IonParametrisedLossModel.hh"
|
||||
|
||||
#include "G4EmProcessOptions.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PhysicsListHelper.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEmStandardSS::PhysListEmStandardSS(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
{
|
||||
G4LossTableManager::Instance();
|
||||
SetPhysicsType(bElectromagnetic);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -73,63 +93,120 @@ PhysListEmStandardSS::~PhysListEmStandardSS()
|
||||
|
||||
void PhysListEmStandardSS::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes
|
||||
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
// muon & hadron bremsstrahlung and pair production
|
||||
G4MuBremsstrahlung* mub = new G4MuBremsstrahlung();
|
||||
G4MuPairProduction* mup = new G4MuPairProduction();
|
||||
|
||||
aParticleIterator->reset();
|
||||
while( (*aParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = aParticleIterator->value();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
if (particleName == "gamma") {
|
||||
// gamma
|
||||
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
|
||||
pmanager->AddDiscreteProcess(new G4ComptonScattering);
|
||||
pmanager->AddDiscreteProcess(new G4GammaConversion);
|
||||
|
||||
// Compton scattering
|
||||
G4ComptonScattering* cs = new G4ComptonScattering;
|
||||
cs->SetEmModel(new G4KleinNishinaModel(),1);
|
||||
G4VEmModel* theLowEPComptonModel = new G4LowEPComptonModel();
|
||||
theLowEPComptonModel->SetHighEnergyLimit(20*MeV);
|
||||
cs->AddEmModel(0, theLowEPComptonModel);
|
||||
ph->RegisterProcess(cs, particle);
|
||||
|
||||
// Photoelectric
|
||||
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
|
||||
G4VEmModel* theLivermorePEModel = new G4LivermorePhotoElectricModel();
|
||||
theLivermorePEModel->SetHighEnergyLimit(10*GeV);
|
||||
pe->SetEmModel(theLivermorePEModel,1);
|
||||
ph->RegisterProcess(pe, particle);
|
||||
|
||||
// Gamma conversion
|
||||
G4GammaConversion* gc = new G4GammaConversion();
|
||||
G4VEmModel* thePenelopeGCModel = new G4PenelopeGammaConversionModel();
|
||||
thePenelopeGCModel->SetHighEnergyLimit(1*GeV);
|
||||
gc->SetEmModel(thePenelopeGCModel,1);
|
||||
ph->RegisterProcess(gc, particle);
|
||||
|
||||
// Rayleigh scattering
|
||||
ph->RegisterProcess(new G4RayleighScattering(), particle);
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
//electron
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 2, 2);
|
||||
pmanager->AddDiscreteProcess(new G4CoulombScattering);
|
||||
|
||||
// ionisation
|
||||
G4eIonisation* eIoni = new G4eIonisation();
|
||||
eIoni->SetStepFunction(0.2, 100*um);
|
||||
G4VEmModel* theIoniPenelope = new G4PenelopeIonisationModel();
|
||||
theIoniPenelope->SetHighEnergyLimit(0.1*MeV);
|
||||
eIoni->AddEmModel(0, theIoniPenelope, new G4UniversalFluctuation());
|
||||
|
||||
// bremsstrahlung
|
||||
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
|
||||
|
||||
ph->RegisterProcess(eIoni, particle);
|
||||
ph->RegisterProcess(eBrem, particle);
|
||||
ph->RegisterProcess(new G4CoulombScattering(), particle);
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
//positron
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 3);
|
||||
pmanager->AddDiscreteProcess(new G4CoulombScattering);
|
||||
// ionisation
|
||||
G4eIonisation* eIoni = new G4eIonisation();
|
||||
eIoni->SetStepFunction(0.2, 100*um);
|
||||
G4VEmModel* theIoniPenelope = new G4PenelopeIonisationModel();
|
||||
theIoniPenelope->SetHighEnergyLimit(0.1*MeV);
|
||||
eIoni->AddEmModel(0, theIoniPenelope, new G4UniversalFluctuation());
|
||||
|
||||
// bremsstrahlung
|
||||
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
|
||||
|
||||
ph->RegisterProcess(eIoni, particle);
|
||||
ph->RegisterProcess(eBrem, particle);
|
||||
ph->RegisterProcess(new G4CoulombScattering(), particle);
|
||||
|
||||
// annihilation at rest and in flight
|
||||
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
|
||||
|
||||
} else if (particleName == "mu+" ||
|
||||
particleName == "mu-" ) {
|
||||
//muon
|
||||
pmanager->AddProcess(new G4MuIonisation, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4MuPairProduction, -1, 3, 3);
|
||||
pmanager->AddDiscreteProcess(new G4CoulombScattering);
|
||||
|
||||
G4MuIonisation* muIoni = new G4MuIonisation();
|
||||
muIoni->SetStepFunction(0.2, 50*um);
|
||||
|
||||
ph->RegisterProcess(muIoni, particle);
|
||||
ph->RegisterProcess(mub, particle);
|
||||
ph->RegisterProcess(mup, particle);
|
||||
ph->RegisterProcess(new G4CoulombScattering(), particle);
|
||||
|
||||
} else if (particleName == "alpha" || particleName == "He3") {
|
||||
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
|
||||
|
||||
G4ionIonisation* ionIoni = new G4ionIonisation();
|
||||
ionIoni->SetStepFunction(0.1, 10*um);
|
||||
ph->RegisterProcess(ionIoni, particle);
|
||||
|
||||
G4CoulombScattering* cs = new G4CoulombScattering();
|
||||
//cs->AddEmModel(0, new G4IonCoulombScatteringModel());
|
||||
cs->SetBuildTableFlag(false);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
ph->RegisterProcess(cs, particle);
|
||||
|
||||
} else if (particleName == "GenericIon" ) {
|
||||
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
|
||||
|
||||
G4ionIonisation* ionIoni = new G4ionIonisation();
|
||||
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
|
||||
ionIoni->SetStepFunction(0.1, 1*um);
|
||||
ph->RegisterProcess(ionIoni, particle);
|
||||
|
||||
G4CoulombScattering* cs = new G4CoulombScattering();
|
||||
//cs->AddEmModel(0, new G4IonCoulombScatteringModel());
|
||||
cs->SetBuildTableFlag(false);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
ph->RegisterProcess(cs, particle);
|
||||
|
||||
} else if ((!particle->IsShortLived()) &&
|
||||
(particle->GetPDGCharge() != 0.0) &&
|
||||
(particle->GetParticleName() != "chargedgeantino")) {
|
||||
//all others charged particles except geantino
|
||||
|
||||
ph->RegisterProcess(new G4hIonisation(), particle);
|
||||
G4CoulombScattering* cs = new G4CoulombScattering();
|
||||
pmanager->AddProcess(new G4hIonisation, -1, 1, 1);
|
||||
cs->SetBuildTableFlag(false);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
ph->RegisterProcess(cs, particle);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,23 +219,18 @@ void PhysListEmStandardSS::ConstructProcess()
|
||||
|
||||
//physics tables
|
||||
//
|
||||
emOptions.SetMinEnergy(100*eV); //default
|
||||
emOptions.SetMaxEnergy(100*TeV); //default
|
||||
emOptions.SetDEDXBinning(12*20); //default=12*7
|
||||
emOptions.SetLambdaBinning(12*20); //default=12*7
|
||||
// emOptions.SetSplineFlag(true); //default
|
||||
|
||||
//energy loss
|
||||
//
|
||||
//emOptions.SetStepFunction(0.2, 100*um); //default=(0.2, 1*mm)
|
||||
//emOptions.SetLinearLossLimit(1.e-2); //default
|
||||
|
||||
//ionization
|
||||
//
|
||||
emOptions.SetSubCutoff(false); //default
|
||||
emOptions.SetMinEnergy(10*eV);
|
||||
emOptions.SetMaxEnergy(10*TeV);
|
||||
emOptions.SetDEDXBinning(12*20);
|
||||
emOptions.SetLambdaBinning(12*20);
|
||||
|
||||
// scattering
|
||||
emOptions.SetPolarAngleLimit(0.0);
|
||||
|
||||
// Deexcitation
|
||||
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
|
||||
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
|
||||
de->SetFluo(true);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/PhysicsList.cc
|
||||
/// \brief Implementation of the PhysicsList class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: PhysicsList.cc 68585 2013-04-01 23:35:07Z adotti $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -50,9 +50,8 @@
|
||||
#include "G4HadronElasticPhysics.hh"
|
||||
#include "G4HadronDElasticPhysics.hh"
|
||||
#include "G4HadronHElasticPhysics.hh"
|
||||
#include "G4HadronQElasticPhysics.hh"
|
||||
#include "G4HadronInelasticQBBC.hh"
|
||||
#include "G4IonBinaryCascadePhysics.hh"
|
||||
#include "G4IonPhysics.hh"
|
||||
|
||||
#include "G4LossTableManager.hh"
|
||||
#include "G4EmConfigurator.hh"
|
||||
@@ -75,7 +74,12 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsList::PhysicsList() : G4VModularPhysicsList()
|
||||
PhysicsList::PhysicsList() : G4VModularPhysicsList(),
|
||||
fEmPhysicsList(0),
|
||||
fDecPhysicsList(0),
|
||||
fHadronPhys(),
|
||||
fStepMaxProcess(0),
|
||||
fMessenger(0)
|
||||
{
|
||||
G4LossTableManager::Instance();
|
||||
defaultCutValue = 1.*mm;
|
||||
@@ -230,16 +234,12 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
fHadronPhys.push_back( new G4HadronHElasticPhysics());
|
||||
fHelIsRegisted = true;
|
||||
|
||||
} else if (name == "QElastic" && !fHelIsRegisted) {
|
||||
fHadronPhys.push_back( new G4HadronQElasticPhysics());
|
||||
fHelIsRegisted = true;
|
||||
|
||||
} else if (name == "binary" && !fBicIsRegisted) {
|
||||
fHadronPhys.push_back(new G4HadronInelasticQBBC());
|
||||
fBicIsRegisted = true;
|
||||
|
||||
} else if (name == "binary_ion" && !fBiciIsRegisted) {
|
||||
fHadronPhys.push_back(new G4IonBinaryCascadePhysics());
|
||||
fHadronPhys.push_back(new G4IonPhysics());
|
||||
fBiciIsRegisted = true;
|
||||
|
||||
} else {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/PhysicsListMessenger.cc
|
||||
/// \brief Implementation of the PhysicsListMessenger class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: PhysicsListMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -41,7 +41,13 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsListMessenger::PhysicsListMessenger(PhysicsList* phys)
|
||||
:fPhysicsList(phys)
|
||||
:G4UImessenger(),fPhysicsList(phys),
|
||||
fPhysDir(0),
|
||||
fGammaCutCmd(0),
|
||||
fElectCutCmd(0),
|
||||
fProtoCutCmd(0),
|
||||
fAllCutCmd(0),
|
||||
fListCmd(0)
|
||||
{
|
||||
fPhysDir = new G4UIdirectory("/testem/phys/");
|
||||
fPhysDir->SetGuidance("physics list commands");
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the PrimaryGeneratorAction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: PrimaryGeneratorAction.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -46,7 +46,12 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* det)
|
||||
:fDetector(det)
|
||||
:G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0),
|
||||
fDetector(det),
|
||||
fRndmBeam(0),
|
||||
fEbeamCumul(0),
|
||||
fGunMessenger(0)
|
||||
{
|
||||
fParticleGun = new G4ParticleGun(1);
|
||||
G4ParticleDefinition* particle
|
||||
@@ -55,9 +60,6 @@ PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* det)
|
||||
fParticleGun->SetParticleEnergy(160*MeV);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
|
||||
|
||||
fRndmBeam = 0.;
|
||||
fEbeamCumul = 0.;
|
||||
|
||||
//create a messenger for this class
|
||||
fGunMessenger = new PrimaryGeneratorMessenger(this);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/PrimaryGeneratorMessenger.cc
|
||||
/// \brief Implementation of the PrimaryGeneratorMessenger class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: PrimaryGeneratorMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -41,7 +41,9 @@
|
||||
|
||||
PrimaryGeneratorMessenger::PrimaryGeneratorMessenger(
|
||||
PrimaryGeneratorAction* Gun)
|
||||
:fAction(Gun)
|
||||
:G4UImessenger(),fAction(Gun),
|
||||
fGunDir(0),
|
||||
fRndmCmd(0)
|
||||
{
|
||||
fGunDir = new G4UIdirectory("/testem/gun/");
|
||||
fGunDir->SetGuidance("gun control");
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/RunAction.cc
|
||||
/// \brief Implementation of the RunAction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: RunAction.cc 72236 2013-07-12 08:38:55Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -49,7 +49,8 @@
|
||||
|
||||
RunAction::RunAction(DetectorConstruction* det, PhysicsList* phys,
|
||||
PrimaryGeneratorAction* kin)
|
||||
: fAnalysisManager(0), fDetector(det), fPhysics(phys), fKinematic(kin),
|
||||
: G4UserRunAction(),
|
||||
fAnalysisManager(0), fDetector(det), fPhysics(phys), fKinematic(kin),
|
||||
fTallyEdep(new G4double[MaxTally]), fProjRange(0.), fProjRange2(0.),
|
||||
fEdeptot(0.), fEniel(0.), fNbPrimarySteps(0), fRange(0)
|
||||
{
|
||||
@@ -69,9 +70,9 @@ RunAction::~RunAction()
|
||||
void RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
||||
|
||||
if(!fAnalysisManager) { BookHisto(); }
|
||||
|
||||
// save Rndm status
|
||||
////G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
CLHEP::HepRandom::showEngineStatus();
|
||||
|
||||
//initialize projected range, tallies, Ebeam, and book histograms
|
||||
@@ -164,19 +165,21 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
// normalize histograms
|
||||
//
|
||||
for (G4int j=1; j<3; j++) {
|
||||
G4double binWidth = fAnalysisManager->GetH1Width(j);
|
||||
G4double fac = (mm/MeV)/(nbofEvents * binWidth);
|
||||
fAnalysisManager->ScaleH1(j, fac);
|
||||
}
|
||||
fAnalysisManager->ScaleH1(3, 1./nbofEvents);
|
||||
|
||||
// save histograms
|
||||
if (fAnalysisManager->IsActive() ) {
|
||||
// normalize histograms
|
||||
//
|
||||
for (G4int j=1; j<3; j++) {
|
||||
G4double binWidth = fAnalysisManager->GetH1Width(j);
|
||||
G4double fac = (mm/MeV)/(nbofEvents * binWidth);
|
||||
fAnalysisManager->ScaleH1(j, fac);
|
||||
}
|
||||
fAnalysisManager->ScaleH1(3, 1./nbofEvents);
|
||||
|
||||
// save histograms
|
||||
fAnalysisManager->Write();
|
||||
fAnalysisManager->CloseFile();
|
||||
delete fAnalysisManager;
|
||||
fAnalysisManager = 0;
|
||||
}
|
||||
|
||||
// show Rndm status
|
||||
@@ -217,7 +220,7 @@ void RunAction::BookHisto()
|
||||
G4int ih = fAnalysisManager->CreateH1(id[k], title[k], nbins, vmin, vmax);
|
||||
G4bool activ = false;
|
||||
if (k == 1) activ = true;
|
||||
fAnalysisManager->SetActivation(G4VAnalysisManager::kH1, ih, activ);
|
||||
fAnalysisManager->SetH1Activation(ih, activ);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/StepMax.cc
|
||||
/// \brief Implementation of the StepMax class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: StepMax.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -37,7 +37,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
StepMax::StepMax(const G4String& processName)
|
||||
: G4VDiscreteProcess(processName),fMaxChargedStep(DBL_MAX)
|
||||
: G4VDiscreteProcess(processName),fMaxChargedStep(DBL_MAX),fMess(0)
|
||||
{
|
||||
fMess = new StepMaxMessenger(this);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/StepMaxMessenger.cc
|
||||
/// \brief Implementation of the StepMaxMessenger class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: StepMaxMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -39,7 +39,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
StepMaxMessenger::StepMaxMessenger(StepMax* stepM)
|
||||
:fStepMax(stepM)
|
||||
:G4UImessenger(),fStepMax(stepM),fStepMaxCmd(0)
|
||||
{
|
||||
fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/testem/stepMax",this);
|
||||
fStepMaxCmd->SetGuidance("Set max allowed step length");
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/SteppingAction.cc
|
||||
/// \brief Implementation of the SteppingAction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: SteppingAction.cc 70906 2013-06-07 10:36:44Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -41,7 +41,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
SteppingAction::SteppingAction(DetectorConstruction* det, RunAction* RuAct)
|
||||
:fDetector(det), fRunAction(RuAct)
|
||||
:G4UserSteppingAction(),fDetector(det), fRunAction(RuAct)
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -78,8 +78,8 @@ void SteppingAction::UserSteppingAction(const G4Step* step)
|
||||
G4double x2 = postPoint->GetPosition().x();
|
||||
G4double x = x1 + G4UniformRand()*(x2-x1) + 0.5*(fDetector->GetAbsorSizeX());
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
analysisManager->FillH1(1, x, edep);
|
||||
analysisManager->FillH1(2, x, edep);
|
||||
analysisManager->FillH1(1, x, edep);
|
||||
analysisManager->FillH1(2, x, edep);
|
||||
|
||||
//fill tallies
|
||||
//
|
||||
|
||||
@@ -23,24 +23,26 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file electromagnetic/TestEm7/src/SteppingVerbose.cc
|
||||
/// \file radioactivedecay/rdecay01/src/SteppingVerbose.cc
|
||||
/// \brief Implementation of the SteppingVerbose class
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: SteppingVerbose.cc 71603 2013-06-19 08:14:59Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "SteppingVerbose.hh"
|
||||
|
||||
#include "G4SteppingManager.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
SteppingVerbose::SteppingVerbose()
|
||||
{}
|
||||
: G4SteppingVerbose()
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -49,10 +51,46 @@ SteppingVerbose::~SteppingVerbose()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void SteppingVerbose::StepInfo()
|
||||
{
|
||||
void SteppingVerbose::TrackingStarted()
|
||||
{
|
||||
CopyState();
|
||||
|
||||
G4int prec = G4cout.precision(3);
|
||||
|
||||
//Step zero
|
||||
//
|
||||
if( verboseLevel > 0 ){
|
||||
G4cout << std::setw( 5) << "Step#" << " "
|
||||
<< std::setw( 6) << "X" << " "
|
||||
<< std::setw( 6) << "Y" << " "
|
||||
<< std::setw( 6) << "Z" << " "
|
||||
<< std::setw( 9) << "KineE" << " "
|
||||
<< std::setw( 9) << "dEStep" << " "
|
||||
<< std::setw(10) << "StepLeng"
|
||||
<< std::setw(10) << "TrakLeng"
|
||||
<< std::setw(10) << "Volume" << " "
|
||||
<< std::setw(10) << "Process" << G4endl;
|
||||
|
||||
G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
|
||||
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
|
||||
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
|
||||
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
|
||||
<< std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
|
||||
<< std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
|
||||
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
|
||||
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
|
||||
<< std::setw(10) << fTrack->GetVolume()->GetName()
|
||||
<< " initStep" << G4endl;
|
||||
}
|
||||
G4cout.precision(prec);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void SteppingVerbose::StepInfo()
|
||||
{
|
||||
CopyState();
|
||||
|
||||
G4int prec = G4cout.precision(3);
|
||||
|
||||
if( verboseLevel >= 1 ){
|
||||
@@ -89,30 +127,27 @@ void SteppingVerbose::StepInfo()
|
||||
G4cout << " " << std::setw(10) << procName;
|
||||
G4cout << G4endl;
|
||||
|
||||
if( verboseLevel == 2 ){
|
||||
G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
|
||||
fN2ndariesAlongStepDoIt +
|
||||
fN2ndariesPostStepDoIt;
|
||||
if(tN2ndariesTot>0){
|
||||
G4cout << "\n :----- List of secondaries ----------------"
|
||||
<< G4endl;
|
||||
if (verboseLevel == 2) {
|
||||
const std::vector<const G4Track*>* secondary
|
||||
= fStep->GetSecondaryInCurrentStep();
|
||||
size_t nbtrk = (*secondary).size();
|
||||
if (nbtrk) {
|
||||
G4cout << "\n :----- List of secondaries ----------------" << G4endl;
|
||||
G4cout.precision(4);
|
||||
for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
|
||||
lp1<(*fSecondary).size(); lp1++){
|
||||
for (size_t lp=0; lp<(*secondary).size(); lp++) {
|
||||
G4cout << " "
|
||||
<< std::setw(13)
|
||||
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
|
||||
<< (*secondary)[lp]->GetDefinition()->GetParticleName()
|
||||
<< ": energy ="
|
||||
<< std::setw(6)
|
||||
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
|
||||
<< G4BestUnit((*secondary)[lp]->GetKineticEnergy(),"Energy")
|
||||
<< " time ="
|
||||
<< std::setw(6)
|
||||
<< G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time");
|
||||
<< G4BestUnit((*secondary)[lp]->GetGlobalTime(),"Time");
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
G4cout << " :------------------------------------------\n"
|
||||
<< G4endl;
|
||||
G4cout << " :------------------------------------------\n" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,37 +156,3 @@ void SteppingVerbose::StepInfo()
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void SteppingVerbose::TrackingStarted()
|
||||
{
|
||||
|
||||
CopyState();
|
||||
G4int prec = G4cout.precision(3);
|
||||
if( verboseLevel > 0 ){
|
||||
|
||||
G4cout << std::setw( 5) << "Step#" << " "
|
||||
<< std::setw( 6) << "X" << " "
|
||||
<< std::setw( 6) << "Y" << " "
|
||||
<< std::setw( 6) << "Z" << " "
|
||||
<< std::setw( 9) << "KineE" << " "
|
||||
<< std::setw( 9) << "dEStep" << " "
|
||||
<< std::setw(10) << "StepLeng"
|
||||
<< std::setw(10) << "TrakLeng"
|
||||
<< std::setw(10) << "Volume" << " "
|
||||
<< std::setw(10) << "Process" << G4endl;
|
||||
|
||||
G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
|
||||
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
|
||||
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
|
||||
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
|
||||
<< std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
|
||||
<< std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
|
||||
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
|
||||
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
|
||||
<< std::setw(10) << fTrack->GetVolume()->GetName()
|
||||
<< " initStep" << G4endl;
|
||||
}
|
||||
G4cout.precision(prec);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file electromagnetic/TestEm7/src/TrackingAction.cc
|
||||
/// \brief Implementation of the TrackingAction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: TrackingAction.cc 67268 2013-02-13 11:38:40Z ihrivnac $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -39,7 +39,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
TrackingAction::TrackingAction(DetectorConstruction* det, RunAction* run)
|
||||
:fDetector(det), fRunAction(run)
|
||||
:G4UserTrackingAction(),fDetector(det), fRunAction(run)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user