Import Geant4 6.2.0 source tree
This commit is contained in:
Regular → Executable
+24
-8
@@ -21,31 +21,47 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: PhysListGeneral.cc,v 1.1 2003/10/08 17:28:47 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: DecaysBuilder.cc,v 1.1 2004/05/04 08:33:31 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: DecayBuilder
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysListGeneral.hh"
|
||||
#include "DecaysBuilder.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4Decay.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListGeneral::PhysListGeneral(const G4String& name)
|
||||
DecaysBuilder::DecaysBuilder(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListGeneral::~PhysListGeneral()
|
||||
DecaysBuilder::~DecaysBuilder()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListGeneral::ConstructProcess()
|
||||
void DecaysBuilder::ConstructParticle()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void DecaysBuilder::ConstructProcess()
|
||||
{
|
||||
// Add Decay Process
|
||||
|
||||
@@ -56,7 +72,7 @@ void PhysListGeneral::ConstructProcess()
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
if (fDecayProcess->IsApplicable(*particle)) {
|
||||
if (fDecayProcess->IsApplicable(*particle)) {
|
||||
|
||||
pmanager ->AddProcess(fDecayProcess);
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: DetectorConstruction.cc,v 1.2 2003/11/25 15:19:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: DetectorConstruction.cc,v 1.7 2004/06/18 15:43:41 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -56,7 +56,7 @@ DetectorConstruction::DetectorConstruction()
|
||||
{
|
||||
DefineMaterials();
|
||||
SetMaterial("PbWO4");
|
||||
detectorMessenger = new DetectorMessenger(this);
|
||||
detectorMessenger = new DetectorMessenger(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -109,7 +109,12 @@ void DetectorConstruction::DefineMaterials()
|
||||
|
||||
new G4Material("Aluminium", z=13., a= 26.98*g/mole, density= 2.7*g/cm3);
|
||||
|
||||
G4Material* Fe =
|
||||
new G4Material("Iron", z=26., a= 55.85*g/mole, density= 7.87*g/cm3);
|
||||
G4Material* Ni =
|
||||
new G4Material("Nickel", z=28., a= 58.69*g/mole, density= 8.96*g/cm3);
|
||||
G4Material* Cu =
|
||||
new G4Material("Copper", z=29., a= 63.54*g/mole, density= 8.96*g/cm3);
|
||||
|
||||
G4Material* BGO =
|
||||
new G4Material("BGO", density= 7.10*g/cm3, ncomponents=3);
|
||||
@@ -127,11 +132,20 @@ void DetectorConstruction::DefineMaterials()
|
||||
new G4Material("Tungsten", density= 19.30*g/cm3, ncomponents=1);
|
||||
w->AddElement(W, fractionmass=1.0);
|
||||
|
||||
G4Material* ma1 = new G4Material("FCal2Slugs",density = 18.6*g/cm3, 3);
|
||||
ma1->AddMaterial(w, fractionmass=0.97);
|
||||
ma1->AddMaterial(Fe,fractionmass=0.01);
|
||||
ma1->AddMaterial(Ni,fractionmass=0.02);
|
||||
|
||||
G4Material* ma2 = new G4Material("FCal2Abs",density = 10.*g/cm3, 2);
|
||||
ma2->AddMaterial(Cu, fractionmass=0.2);
|
||||
ma2->AddMaterial(ma1,fractionmass=0.8);
|
||||
|
||||
G4Material* pb =
|
||||
new G4Material("Lead", density= 11.35*g/cm3, ncomponents=1);
|
||||
pb->AddElement(Pb, fractionmass=1.0);
|
||||
|
||||
//// G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: DetectorMessenger.cc,v 1.1 2003/10/08 17:28:43 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: DetectorMessenger.cc,v 1.6 2004/06/18 15:43:41 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -42,41 +42,41 @@
|
||||
|
||||
DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
|
||||
:Detector(Det)
|
||||
{
|
||||
{
|
||||
testemDir = new G4UIdirectory("/testem/");
|
||||
testemDir->SetGuidance(" detector control.");
|
||||
|
||||
|
||||
MaterCmd = new G4UIcmdWithAString("/testem/det/setMat",this);
|
||||
MaterCmd->SetGuidance("Select Material.");
|
||||
MaterCmd->SetParameterName("material",false);
|
||||
MaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
LBinCmd = new G4UIcmdWith3Vector("/testem/det/setLbin",this);
|
||||
LBinCmd->SetGuidance("set longitudinal bining");
|
||||
LBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
|
||||
LBinCmd->SetParameterName("nLtot","dLradl"," ",true);
|
||||
LBinCmd->SetRange("nLtot>=1 && dLradl>0");
|
||||
LBinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
RBinCmd = new G4UIcmdWith3Vector("/testem/det/setRbin",this);
|
||||
RBinCmd->SetGuidance("set radial bining");
|
||||
RBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
|
||||
RBinCmd->SetParameterName("nRtot","dRradl"," ",true);
|
||||
RBinCmd->SetRange("nRtot>=1 && dRradl>0");
|
||||
RBinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
FieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
|
||||
|
||||
FieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
|
||||
FieldCmd->SetGuidance("Define magnetic field.");
|
||||
FieldCmd->SetGuidance("Magnetic field will be in Z direction.");
|
||||
FieldCmd->SetParameterName("Bz",false);
|
||||
FieldCmd->SetUnitCategory("Magnetic flux density");
|
||||
FieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
UpdateCmd = new G4UIcmdWithoutParameter("/testem/det/update",this);
|
||||
UpdateCmd->SetGuidance("Update geometry.");
|
||||
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
|
||||
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
|
||||
UpdateCmd->AvailableForStates(G4State_Idle);
|
||||
UpdateCmd->AvailableForStates(G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -86,27 +86,27 @@ DetectorMessenger::~DetectorMessenger()
|
||||
delete MaterCmd;
|
||||
delete LBinCmd;
|
||||
delete RBinCmd;
|
||||
delete FieldCmd;
|
||||
delete FieldCmd;
|
||||
delete UpdateCmd;
|
||||
delete testemDir;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
void DetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
if( command == MaterCmd )
|
||||
{ Detector->SetMaterial(newValue);}
|
||||
|
||||
if( command == LBinCmd )
|
||||
{ Detector->SetLBining(LBinCmd->GetNew3VectorValue(newValue));}
|
||||
|
||||
|
||||
if( command == RBinCmd )
|
||||
{ Detector->SetRBining(RBinCmd->GetNew3VectorValue(newValue));}
|
||||
|
||||
|
||||
if( command == FieldCmd )
|
||||
{ Detector->SetMagField(FieldCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
|
||||
if( command == UpdateCmd )
|
||||
{ Detector->UpdateGeometry();}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: EmAcceptance.cc,v 1.2 2004/06/20 01:28:13 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "EmAcceptance.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
EmAcceptance::EmAcceptance()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
EmAcceptance::~EmAcceptance()
|
||||
{}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void EmAcceptance::BeginOfAcceptance(const G4String& title, G4int stat)
|
||||
{
|
||||
G4cout << G4endl;
|
||||
G4cout << "<<<<<ACCEPTANCE>>>>> " << stat << " events for " << title << G4endl;
|
||||
isAccepted = true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void EmAcceptance::EndOfAcceptance()
|
||||
{
|
||||
G4String resume = "IS ACCEPTED";
|
||||
if(!isAccepted) resume = "IS NOT ACCEPTED";
|
||||
G4cout << "<<<<<END>>>>> " << resume << G4endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void EmAcceptance::EmAcceptanceGauss(const G4String& title, G4int stat,
|
||||
G4double avr, G4double avr0,
|
||||
G4double rms, G4double limit)
|
||||
{
|
||||
G4double x = sqrt((G4double)stat);
|
||||
G4double dde = avr - avr0;
|
||||
G4double de = dde*x/rms;
|
||||
|
||||
G4cout << title << ": " << avr << " del"<< title << "= " << dde << " nrms= " << de << G4endl;
|
||||
if(abs(de) > limit) isAccepted = false;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4EmHadronBuilder.cc,v 1.1 2004/05/04 08:33:32 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4EmHadronBuilder
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4EmHadronBuilder.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4MultipleScattering.hh"
|
||||
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4ionIonisation.hh"
|
||||
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmHadronBuilder::G4EmHadronBuilder(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmHadronBuilder::~G4EmHadronBuilder()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmHadronBuilder::ConstructParticle()
|
||||
{
|
||||
G4Electron::Electron();
|
||||
G4Proton::Proton();
|
||||
G4GenericIon::GenericIon();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmHadronBuilder::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes
|
||||
theParticleIterator->reset();
|
||||
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
|
||||
if(particle->GetPDGMass() > 110.*MeV) {
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
|
||||
if (particleName == "GenericIon") {
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
|
||||
pmanager->AddProcess(new G4ionIonisation, -1, 2,2);
|
||||
|
||||
} else if ((!particle->IsShortLived()) &&
|
||||
(particle->GetPDGCharge() != 0.0) &&
|
||||
(particle->GetParticleName() != "chargedgeantino")) {
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
|
||||
pmanager->AddProcess(new G4hIonisation, -1,2,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4EmHadronBuilder52.cc,v 1.1 2004/05/04 08:33:32 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4EmHadronBuilder52
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4EmHadronBuilder52.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4MultipleScattering52.hh"
|
||||
|
||||
#include "G4hIonisation52.hh"
|
||||
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmHadronBuilder52::G4EmHadronBuilder52(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmHadronBuilder52::~G4EmHadronBuilder52()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmHadronBuilder52::ConstructParticle()
|
||||
{
|
||||
G4Electron::Electron();
|
||||
G4Proton::Proton();
|
||||
G4GenericIon::GenericIon();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmHadronBuilder52::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes
|
||||
theParticleIterator->reset();
|
||||
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
|
||||
if(particle->GetPDGMass() > 110.*MeV) {
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
|
||||
if (particleName == "GenericIon") {
|
||||
|
||||
pmanager->AddProcess(new G4hIonisation52, -1, 1, 1);
|
||||
|
||||
} else if ((!particle->IsShortLived()) &&
|
||||
(particle->GetPDGCharge() != 0.0) &&
|
||||
(particle->GetParticleName() != "chargedgeantino")) {
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering52,-1,1,1);
|
||||
pmanager->AddProcess(new G4hIonisation52, -1,2,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4EmHighEnergyBuilder.cc,v 1.1 2004/05/04 08:33:34 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4EmHighEnergyBuilder
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4EmHighEnergyBuilder.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4AnnihiToMuPair.hh"
|
||||
#include "G4GammaConversionToMuons.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmHighEnergyBuilder::G4EmHighEnergyBuilder(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmHighEnergyBuilder::~G4EmHighEnergyBuilder()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmHighEnergyBuilder::ConstructParticle()
|
||||
{
|
||||
// Minimal set of particles
|
||||
G4Gamma::Gamma();
|
||||
G4Electron::Electron();
|
||||
G4Positron::Positron();
|
||||
G4MuonPlus::MuonPlus();
|
||||
G4MuonMinus::MuonMinus();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmHighEnergyBuilder::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes for gamma
|
||||
G4ParticleDefinition* particle = G4Gamma::Gamma();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
pmanager->AddDiscreteProcess( new G4GammaConversionToMuons() );
|
||||
|
||||
// Add standard EM Processes for e+
|
||||
particle = G4Positron::Positron();
|
||||
pmanager = particle->GetProcessManager();
|
||||
pmanager->AddDiscreteProcess( new G4AnnihiToMuPair() );
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4EmMuonBuilder.cc,v 1.1 2004/05/04 08:33:36 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4EmMuonBuilder
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4EmMuonBuilder.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4MultipleScattering.hh"
|
||||
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuBremsstrahlung.hh"
|
||||
#include "G4MuPairProduction.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmMuonBuilder::G4EmMuonBuilder(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmMuonBuilder::~G4EmMuonBuilder()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmMuonBuilder::ConstructParticle()
|
||||
{
|
||||
// Minimal set of particles
|
||||
G4Gamma::Gamma();
|
||||
G4Electron::Electron();
|
||||
G4Positron::Positron();
|
||||
G4MuonPlus::MuonPlus();
|
||||
G4MuonMinus::MuonMinus();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmMuonBuilder::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes for mu+
|
||||
const G4ParticleDefinition* particle = G4MuonPlus::MuonPlus();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
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);
|
||||
|
||||
|
||||
// Add standard EM Processes for mu-
|
||||
particle = G4MuonMinus::MuonMinus();
|
||||
pmanager = particle->GetProcessManager();
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4EmMuonBuilder52.cc,v 1.1 2004/05/04 08:33:37 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4EmMuonBuilder52
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4EmMuonBuilder52.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4MultipleScattering52.hh"
|
||||
|
||||
#include "G4MuIonisation52.hh"
|
||||
#include "G4MuBremsstrahlung52.hh"
|
||||
#include "G4MuPairProduction52.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmMuonBuilder52::G4EmMuonBuilder52(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmMuonBuilder52::~G4EmMuonBuilder52()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmMuonBuilder52::ConstructParticle()
|
||||
{
|
||||
// Minimal set of particles
|
||||
G4Gamma::Gamma();
|
||||
G4Electron::Electron();
|
||||
G4Positron::Positron();
|
||||
G4MuonPlus::MuonPlus();
|
||||
G4MuonMinus::MuonMinus();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmMuonBuilder52::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes for mu+
|
||||
const G4ParticleDefinition* particle = G4MuonPlus::MuonPlus();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering52,-1, 1,1);
|
||||
pmanager->AddProcess(new G4MuIonisation52, -1, 2,2);
|
||||
pmanager->AddProcess(new G4MuBremsstrahlung52, -1,-1,3);
|
||||
pmanager->AddProcess(new G4MuPairProduction52, -1,-1,4);
|
||||
|
||||
|
||||
// Add standard EM Processes for mu-
|
||||
particle = G4MuonMinus::MuonMinus();
|
||||
pmanager = particle->GetProcessManager();
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering52,-1, 1,1);
|
||||
pmanager->AddProcess(new G4MuIonisation52, -1, 2,2);
|
||||
pmanager->AddProcess(new G4MuBremsstrahlung52, -1,-1,3);
|
||||
pmanager->AddProcess(new G4MuPairProduction52, -1,-1,4);
|
||||
|
||||
}
|
||||
|
||||
//....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: G4EmQEDBuilder.cc,v 1.1 2004/05/04 08:33:37 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4EmQEDBuilder
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4EmQEDBuilder.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 "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmQEDBuilder::G4EmQEDBuilder(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmQEDBuilder::~G4EmQEDBuilder()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmQEDBuilder::ConstructParticle()
|
||||
{
|
||||
G4Gamma::Gamma();
|
||||
G4Electron::Electron();
|
||||
G4Positron::Positron();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmQEDBuilder::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes for gamma
|
||||
G4ParticleDefinition* particle = G4Gamma::Gamma();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
pmanager->AddDiscreteProcess( new G4PhotoElectricEffect() );
|
||||
pmanager->AddDiscreteProcess( new G4ComptonScattering() );
|
||||
pmanager->AddDiscreteProcess( new G4GammaConversion() );
|
||||
|
||||
// Add standard EM Processes for e-
|
||||
particle = G4Electron::Electron();
|
||||
pmanager = particle->GetProcessManager();
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1,-1,3);
|
||||
|
||||
// Add standard EM Processes for e+
|
||||
particle = G4Positron::Positron();
|
||||
pmanager = particle->GetProcessManager();
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
//....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: G4EmQEDBuilder52.cc,v 1.1 2004/05/04 08:33:38 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4EmQEDBuilder52
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4EmQEDBuilder52.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
|
||||
#include "G4MultipleScattering52.hh"
|
||||
|
||||
#include "G4eIonisation52.hh"
|
||||
#include "G4eBremsstrahlung52.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmQEDBuilder52::G4EmQEDBuilder52(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4EmQEDBuilder52::~G4EmQEDBuilder52()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmQEDBuilder52::ConstructParticle()
|
||||
{
|
||||
G4Gamma::Gamma();
|
||||
G4Electron::Electron();
|
||||
G4Positron::Positron();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmQEDBuilder52::ConstructProcess()
|
||||
{
|
||||
// Add standard EM Processes for gamma
|
||||
G4ParticleDefinition* particle = G4Gamma::Gamma();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
pmanager->AddDiscreteProcess( new G4PhotoElectricEffect() );
|
||||
pmanager->AddDiscreteProcess( new G4ComptonScattering() );
|
||||
pmanager->AddDiscreteProcess( new G4GammaConversion() );
|
||||
|
||||
// Add standard EM Processes for e-
|
||||
particle = G4Electron::Electron();
|
||||
pmanager = particle->GetProcessManager();
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering52, -1, 1,1);
|
||||
pmanager->AddProcess(new G4eIonisation52, -1, 2,2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung52, -1,-1,3);
|
||||
|
||||
// Add standard EM Processes for e+
|
||||
particle = G4Positron::Positron();
|
||||
pmanager = particle->GetProcessManager();
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering52, -1, 1,1);
|
||||
pmanager->AddProcess(new G4eIonisation52, -1, 2,2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung52, -1,-1,3);
|
||||
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Regular → Executable
+20
-6
@@ -21,13 +21,24 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: PhysListParticles.cc,v 1.1 2003/10/08 17:28:47 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: ParticlesBuilder.cc,v 1.1 2004/05/04 08:33:38 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: ParticleBuilder
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysListParticles.hh"
|
||||
#include "ParticlesBuilder.hh"
|
||||
|
||||
// Bosons
|
||||
#include "G4ChargedGeantino.hh"
|
||||
@@ -73,20 +84,22 @@
|
||||
#include "G4He3.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
//#include "IonC12.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListParticles::PhysListParticles(const G4String& name)
|
||||
ParticlesBuilder::ParticlesBuilder(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListParticles::~PhysListParticles()
|
||||
ParticlesBuilder::~ParticlesBuilder()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListParticles::ConstructParticle()
|
||||
void ParticlesBuilder::ConstructParticle()
|
||||
{
|
||||
|
||||
// pseudo-particles
|
||||
@@ -135,6 +148,7 @@ void PhysListParticles::ConstructParticle()
|
||||
G4He3::He3Definition();
|
||||
G4Alpha::AlphaDefinition();
|
||||
G4GenericIon::GenericIonDefinition();
|
||||
// IonC12::IonDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -1,119 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: PhysListEmG4v52.cc,v 1.2 2003/11/13 14:12:50 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysListEmG4v52.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
|
||||
#include "G4MultipleScattering52.hh"
|
||||
#include "G4MultipleScattering.hh"
|
||||
|
||||
#include "G4eIonisation52.hh"
|
||||
#include "G4eBremsstrahlung52.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
|
||||
#include "G4MuIonisation52.hh"
|
||||
#include "G4MuBremsstrahlung52.hh"
|
||||
#include "G4MuPairProduction52.hh"
|
||||
|
||||
#include "G4hIonisation52.hh"
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEmG4v52::PhysListEmG4v52(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEmG4v52::~PhysListEmG4v52()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListEmG4v52::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 G4MultipleScattering52, -1, 1,1);
|
||||
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
|
||||
pmanager->AddProcess(new G4eIonisation52, -1, 2,2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung52, -1,-1,3);
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
//positron
|
||||
pmanager->AddProcess(new G4MultipleScattering52, -1, 1,1);
|
||||
pmanager->AddProcess(new G4eIonisation52, -1, 2,2);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung52, -1,-1,3);
|
||||
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
|
||||
|
||||
} else if( particleName == "mu+" ||
|
||||
particleName == "mu-" ) {
|
||||
//muon
|
||||
pmanager->AddProcess(new G4MultipleScattering52,-1, 1,1);
|
||||
pmanager->AddProcess(new G4MuIonisation52, -1, 2,2);
|
||||
pmanager->AddProcess(new G4MuBremsstrahlung52, -1,-1,3);
|
||||
pmanager->AddProcess(new G4MuPairProduction52, -1,-1,4);
|
||||
|
||||
} else if( particleName == "GenericIon" ) {
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering52,-1,1,1);
|
||||
pmanager->AddProcess(new G4hIonisation52, -1,2,2);
|
||||
|
||||
} else if ((!particle->IsShortLived()) &&
|
||||
(particle->GetPDGCharge() != 0.0) &&
|
||||
(particle->GetParticleName() != "chargedgeantino")) {
|
||||
//all others charged particles except geantino
|
||||
pmanager->AddProcess(new G4MultipleScattering52,-1,1,1);
|
||||
pmanager->AddProcess(new G4hIonisation52, -1,2,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: PhysListEmStandard.cc,v 1.2 2003/10/24 12:08:28 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysListEmStandard.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"
|
||||
#include "G4ionIonisation.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEmStandard::PhysListEmStandard(const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEmStandard::~PhysListEmStandard()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysListEmStandard::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, 3,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, 3,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, 3,3);
|
||||
pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
|
||||
|
||||
} else if( particleName == "GenericIon" ) {
|
||||
pmanager->AddProcess(new G4MultipleScattering,-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 G4MultipleScattering,-1,1,1);
|
||||
pmanager->AddProcess(new G4hIonisation, -1,2,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -20,131 +20,144 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: PhysicsList.cc,v 1.1 2003/10/08 17:28:47 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: PhysicsList.cc,v 1.2 2004/05/04 07:36:41 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: PhysicsList
|
||||
//
|
||||
// Author: V.Ivanchenko 03.05.2004
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysicsList.hh"
|
||||
#include "PhysicsListMessenger.hh"
|
||||
|
||||
#include "PhysListParticles.hh"
|
||||
#include "PhysListGeneral.hh"
|
||||
#include "PhysListEmStandard.hh"
|
||||
#include "PhysListEmG4v52.hh"
|
||||
|
||||
#include "G4LossTableManager.hh"
|
||||
#include "ParticlesBuilder.hh"
|
||||
#include "G4EmQEDBuilder.hh"
|
||||
#include "G4EmMuonBuilder.hh"
|
||||
#include "G4EmHadronBuilder.hh"
|
||||
#include "G4EmHighEnergyBuilder.hh"
|
||||
#include "G4EmQEDBuilder52.hh"
|
||||
#include "G4EmMuonBuilder52.hh"
|
||||
#include "G4EmHadronBuilder52.hh"
|
||||
#include "DecaysBuilder.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4LossTableManager.hh"
|
||||
#include "G4EmProcessOptions.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsList::PhysicsList() : G4VModularPhysicsList()
|
||||
PhysicsList::PhysicsList() : G4VModularPhysicsList(),
|
||||
verbose(0),
|
||||
emBuilderIsRegisted(false)
|
||||
{
|
||||
G4LossTableManager::Instance();
|
||||
currentDefaultCut = 1.0*mm;
|
||||
cutForGamma = currentDefaultCut;
|
||||
cutForElectron = currentDefaultCut;
|
||||
cutForPositron = currentDefaultCut;
|
||||
defaultCutValue = 1.*mm;
|
||||
cutForGamma = defaultCutValue;
|
||||
cutForElectron = defaultCutValue;
|
||||
cutForPositron = defaultCutValue;
|
||||
|
||||
pMessenger = new PhysicsListMessenger(this);
|
||||
|
||||
SetVerboseLevel(1);
|
||||
|
||||
// Particles
|
||||
particleList = new PhysListParticles("particles");
|
||||
|
||||
// General Physics
|
||||
generalPhysicsList = new PhysListGeneral("general");
|
||||
|
||||
// EM physics
|
||||
emName = G4String("standard");
|
||||
emPhysicsList = new PhysListEmStandard(emName);
|
||||
|
||||
// Add Physics builders
|
||||
RegisterPhysics(new ParticlesBuilder());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsList::~PhysicsList()
|
||||
{
|
||||
delete pMessenger;
|
||||
}
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::ConstructParticle()
|
||||
{
|
||||
particleList->ConstructParticle();
|
||||
if(!emBuilderIsRegisted) AddPhysicsList("standard");
|
||||
G4VModularPhysicsList::ConstructParticle();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::ConstructProcess()
|
||||
{
|
||||
AddTransportation();
|
||||
generalPhysicsList->ConstructProcess();
|
||||
emPhysicsList->ConstructProcess();
|
||||
G4VModularPhysicsList::ConstructProcess();
|
||||
|
||||
// Define energy interval for loss processes
|
||||
G4EmProcessOptions emOptions;
|
||||
emOptions.SetMinEnergy(0.1*keV);
|
||||
emOptions.SetMaxEnergy(100.*GeV);
|
||||
emOptions.SetDEDXBinning(90);
|
||||
emOptions.SetLambdaBinning(90);
|
||||
emOptions.SetBuildPreciseRange(false);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
{
|
||||
if (verboseLevel>1) {
|
||||
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
|
||||
}
|
||||
|
||||
if (name == emName) return;
|
||||
G4bool yes = false;
|
||||
|
||||
if (name == "standard") {
|
||||
if ("standard" == name && !emBuilderIsRegisted) {
|
||||
RegisterPhysics(new G4EmQEDBuilder());
|
||||
RegisterPhysics(new G4EmMuonBuilder());
|
||||
RegisterPhysics(new G4EmHadronBuilder());
|
||||
RegisterPhysics(new DecaysBuilder());
|
||||
emBuilderIsRegisted = true;
|
||||
yes = true;
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new PhysListEmStandard(name);
|
||||
} else if ("g4v52" == name && !emBuilderIsRegisted) {
|
||||
RegisterPhysics(new G4EmQEDBuilder52());
|
||||
RegisterPhysics(new G4EmMuonBuilder52());
|
||||
RegisterPhysics(new G4EmHadronBuilder52());
|
||||
RegisterPhysics(new DecaysBuilder());
|
||||
emBuilderIsRegisted = true;
|
||||
yes = true;
|
||||
|
||||
} else if (name == "g4v52") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new PhysListEmG4v52(name);
|
||||
} else if ("high_energy" == name ) {
|
||||
RegisterPhysics(new G4EmHighEnergyBuilder());
|
||||
|
||||
} else {
|
||||
|
||||
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
|
||||
<< " is not defined"
|
||||
<< G4endl;
|
||||
G4cout << "PhysicsList::AddPhysicsList <" << name << ">"
|
||||
<< " fail - name is unknown " << G4endl;
|
||||
}
|
||||
if (verbose>0 && yes) {
|
||||
G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCuts()
|
||||
{
|
||||
if (verboseLevel >0){
|
||||
G4cout << "PhysicsList::SetCuts:";
|
||||
G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
|
||||
}
|
||||
{
|
||||
|
||||
// set cut values for gamma at first and for e- second and next for e+,
|
||||
// because some processes for e+/e- need cut values for gamma
|
||||
SetCutValue(cutForGamma, "gamma");
|
||||
SetCutValue(cutForElectron, "e-");
|
||||
SetCutValue(cutForPositron, "e+");
|
||||
|
||||
if (verboseLevel>0) DumpCutValuesTable();
|
||||
if (verbose>0) DumpCutValuesTable();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
void PhysicsList::SetVerbose(G4int val)
|
||||
{
|
||||
verbose = val;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForGamma(G4double cut)
|
||||
{
|
||||
cutForGamma = cut;
|
||||
SetParticleCuts(cutForGamma, G4Gamma::Gamma());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -152,7 +165,6 @@ void PhysicsList::SetCutForGamma(G4double cut)
|
||||
void PhysicsList::SetCutForElectron(G4double cut)
|
||||
{
|
||||
cutForElectron = cut;
|
||||
SetParticleCuts(cutForElectron, G4Electron::Electron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -160,8 +172,6 @@ void PhysicsList::SetCutForElectron(G4double cut)
|
||||
void PhysicsList::SetCutForPositron(G4double cut)
|
||||
{
|
||||
cutForPositron = cut;
|
||||
SetParticleCuts(cutForPositron, G4Positron::Positron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -20,14 +20,9 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: RunAction.cc,v 1.1 2003/10/08 17:28:47 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: RunAction.cc,v 1.9 2004/06/18 15:43:41 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
// 08.03.01 Hisaya: Adapted MyVector for STL
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -35,129 +30,136 @@
|
||||
|
||||
#include "DetectorConstruction.hh"
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
#include "RunActionMessenger.hh"
|
||||
#include "EmAcceptance.hh"
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
#include <iomanip>
|
||||
#include <assert.h>
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "AIDA/AIDA.h"
|
||||
#ifdef USE_AIDA
|
||||
#include "AIDA/AIDA.h"
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
RunAction::RunAction(DetectorConstruction* det,
|
||||
PrimaryGeneratorAction* kin)
|
||||
:Det(det),Kin(kin)
|
||||
{
|
||||
RunAction::RunAction(DetectorConstruction* det, PrimaryGeneratorAction* kin)
|
||||
:Det(det),Kin(kin)
|
||||
{
|
||||
runMessenger = new RunActionMessenger(this);
|
||||
|
||||
nLbin = Det->GetnLtot();
|
||||
dEdL.resize(nLbin, 0.0);
|
||||
sumELongit.resize(nLbin, 0.0);
|
||||
sumELongitCumul.resize(nLbin, 0.0);
|
||||
sumE2Longit.resize(nLbin, 0.0);
|
||||
sumELongitCumul.resize(nLbin, 0.0);
|
||||
sumE2Longit.resize(nLbin, 0.0);
|
||||
sumE2LongitCumul.resize(nLbin, 0.0);
|
||||
|
||||
|
||||
gammaFlux.resize(nLbin, 0.0);
|
||||
electronFlux.resize(nLbin, 0.0);
|
||||
positronFlux.resize(nLbin, 0.0);
|
||||
|
||||
|
||||
nRbin = Det->GetnRtot();
|
||||
dEdR.resize(nRbin, 0.0);
|
||||
sumERadial.resize(nRbin, 0.0);
|
||||
sumERadialCumul.resize(nRbin, 0.0);
|
||||
sumE2Radial.resize(nRbin, 0.0);
|
||||
sumE2RadialCumul.resize(nRbin, 0.0);
|
||||
|
||||
edeptrue = 1.;
|
||||
rmstrue = 1.;
|
||||
limittrue = DBL_MAX;
|
||||
|
||||
histoName = "testem2.paw";
|
||||
histoType = "hbook";
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
RunAction::~RunAction()
|
||||
{
|
||||
cleanHisto();
|
||||
cleanHisto();
|
||||
delete runMessenger;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RunAction::bookHisto()
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
// Creating the analysis factory
|
||||
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
|
||||
|
||||
// Creating the tree factory
|
||||
AIDA::ITreeFactory* tf = af->createTreeFactory();
|
||||
|
||||
// Creating a tree mapped to an hbook file.
|
||||
G4bool readOnly = false;
|
||||
G4bool createNew = true;
|
||||
tree = tf->create("testem2.paw", "hbook", readOnly, createNew);
|
||||
#ifdef USE_AIDA
|
||||
// Creating the analysis factory
|
||||
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
|
||||
|
||||
// Creating a histogram factory, whose histograms will be handled by the tree
|
||||
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
|
||||
// Creating the tree factory
|
||||
AIDA::ITreeFactory* tf = af->createTreeFactory();
|
||||
|
||||
// Creating a tree mapped to an hbook file.
|
||||
G4bool readOnly = false;
|
||||
G4bool createNew = true;
|
||||
tree = tf->create(histoName, histoType, readOnly, createNew);
|
||||
|
||||
// Creating a histogram factory, whose histograms will be handled by the tree
|
||||
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
|
||||
G4double Ekin = Kin->GetParticleGun()->GetParticleEnergy();
|
||||
G4double dLradl = Det->GetdLradl();
|
||||
G4double dRradl = Det->GetdRradl();
|
||||
|
||||
|
||||
histo[0] = hf->createHistogram1D( "1","total energy deposit(percent of Einc)",
|
||||
100,0.,100.);
|
||||
|
||||
|
||||
histo[1] = hf->createHistogram1D( "2","total charged tracklength (radl)",
|
||||
100,0.,100.*Ekin/GeV);
|
||||
|
||||
|
||||
histo[2] = hf->createHistogram1D( "3","total neutral tracklength (radl)",
|
||||
100,0.,1000.*Ekin/GeV);
|
||||
|
||||
|
||||
histo[3] = hf->createHistogram1D( "4","longit energy profile (% of E inc)",
|
||||
nLbin,0.,nLbin*dLradl);
|
||||
|
||||
|
||||
G4double Zmin=0.5*dLradl, Zmax=Zmin+nLbin*dLradl;
|
||||
histo[4] = hf->createHistogram1D( "5","cumul longit energy dep (% of E inc)",
|
||||
nLbin,Zmin,Zmax);
|
||||
|
||||
|
||||
histo[5] = hf->createHistogram1D( "6","rms on cumul longit Edep (% of E inc)",
|
||||
nLbin,Zmin,Zmax);
|
||||
|
||||
|
||||
histo[6] = hf->createHistogram1D( "7","nb of gamma per plane",
|
||||
nLbin,Zmin,Zmax);
|
||||
|
||||
|
||||
histo[7] = hf->createHistogram1D( "8","nb of positron per plane",
|
||||
nLbin,Zmin,Zmax);
|
||||
|
||||
|
||||
histo[8] = hf->createHistogram1D( "9","nb of electron per plane",
|
||||
nLbin,Zmin,Zmax);
|
||||
|
||||
|
||||
histo[9] = hf->createHistogram1D("10","radial energy profile (% of E inc)",
|
||||
nRbin,0.,nRbin*dRradl);
|
||||
|
||||
|
||||
G4double Rmin=0.5*dRradl, Rmax=Rmin+nRbin*dRradl;
|
||||
histo[10]= hf->createHistogram1D("11","cumul radial energy dep (% of E inc)",
|
||||
nRbin,Rmin,Rmax);
|
||||
|
||||
|
||||
histo[11]= hf->createHistogram1D("12","rms on cumul radial Edep (% of E inc)",
|
||||
nRbin,Rmin,Rmax);
|
||||
|
||||
|
||||
delete hf;
|
||||
delete tf;
|
||||
delete af;
|
||||
delete af;
|
||||
#endif
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RunAction::cleanHisto()
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
tree->commit(); // Writing the histograms to the file
|
||||
tree->close(); // and closing the tree (and the file)
|
||||
|
||||
delete tree;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -165,15 +167,15 @@ void RunAction::cleanHisto()
|
||||
void RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
||||
|
||||
|
||||
// save Rndm status
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
HepRandom::showEngineStatus();
|
||||
|
||||
//reshape arrays if needed
|
||||
//reshape arrays if needed
|
||||
//
|
||||
G4bool rebin(false);
|
||||
|
||||
|
||||
G4int nLtot = Det->GetnLtot();
|
||||
if(nLbin != nLtot)
|
||||
{dEdL.resize(nLbin=nLtot, 0.0);
|
||||
@@ -186,7 +188,7 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
positronFlux.resize(nLbin, 0.0);
|
||||
rebin=true;
|
||||
}
|
||||
|
||||
|
||||
G4int nRtot = Det->GetnRtot();
|
||||
if(nRbin != nRtot)
|
||||
{dEdR.resize(nRbin=nRtot, 0.0);
|
||||
@@ -196,15 +198,15 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
sumE2RadialCumul.resize(nRbin, 0.0);
|
||||
rebin=true;
|
||||
}
|
||||
|
||||
|
||||
//initialize arrays of cumulative energy deposition
|
||||
//
|
||||
//
|
||||
for (G4int i=0; i<nLbin; i++)
|
||||
sumELongit[i]=sumE2Longit[i]=sumELongitCumul[i]=sumE2LongitCumul[i]=0.;
|
||||
|
||||
|
||||
for (G4int j=0; j<nRbin; j++)
|
||||
sumELongit[j]=sumE2Longit[j]=sumELongitCumul[j]=sumE2LongitCumul[j]=0.;
|
||||
|
||||
|
||||
//initialize track length
|
||||
sumChargTrLength=sum2ChargTrLength=sumNeutrTrLength=sum2NeutrTrLength=0.;
|
||||
|
||||
@@ -212,11 +214,6 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
//
|
||||
if (aRun->GetRunID() == 0) bookHisto();
|
||||
else if (rebin) {cleanHisto(); bookHisto();}
|
||||
|
||||
//drawing
|
||||
//
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -225,8 +222,8 @@ void RunAction::fillPerEvent()
|
||||
{
|
||||
//accumulate statistic
|
||||
//
|
||||
G4double dLCumul = 0.;
|
||||
for (G4int i=0; i<nLbin; i++)
|
||||
G4double dLCumul = 0.;
|
||||
for (G4int i=0; i<nLbin; i++)
|
||||
{
|
||||
sumELongit[i] += dEdL[i];
|
||||
sumE2Longit[i] += dEdL[i]*dEdL[i];
|
||||
@@ -234,9 +231,9 @@ void RunAction::fillPerEvent()
|
||||
sumELongitCumul[i] += dLCumul;
|
||||
sumE2LongitCumul[i] += dLCumul*dLCumul;
|
||||
}
|
||||
|
||||
G4double dRCumul = 0.;
|
||||
for (G4int j=0; j<nRbin; j++)
|
||||
|
||||
G4double dRCumul = 0.;
|
||||
for (G4int j=0; j<nRbin; j++)
|
||||
{
|
||||
sumERadial[j] += dEdR[j];
|
||||
sumE2Radial[j] += dEdR[j]*dEdR[j];
|
||||
@@ -244,100 +241,97 @@ void RunAction::fillPerEvent()
|
||||
sumERadialCumul[j] += dRCumul;
|
||||
sumE2RadialCumul[j] += dRCumul*dRCumul;
|
||||
}
|
||||
|
||||
|
||||
sumChargTrLength += ChargTrLength;
|
||||
sum2ChargTrLength += ChargTrLength*ChargTrLength;
|
||||
sumNeutrTrLength += NeutrTrLength;
|
||||
sum2NeutrTrLength += NeutrTrLength*NeutrTrLength;
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
|
||||
#ifdef USE_AIDA
|
||||
//fill histograms
|
||||
//
|
||||
G4double Ekin=Kin->GetParticleGun()->GetParticleEnergy();
|
||||
G4double mass=Kin->GetParticleGun()->GetParticleDefinition()->GetPDGMass();
|
||||
G4double radl=Det->GetMaterial()->GetRadlen();
|
||||
|
||||
|
||||
histo[0]->fill(100.*dLCumul/(Ekin+mass));
|
||||
histo[1]->fill(ChargTrLength/radl);
|
||||
histo[2]->fill(NeutrTrLength/radl);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
|
||||
|
||||
//compute and print statistic
|
||||
//
|
||||
//
|
||||
G4int NbOfEvents = aRun->GetNumberOfEvent();
|
||||
G4double kinEnergy = Kin->GetParticleGun()->GetParticleEnergy();
|
||||
G4double kinEnergy = Kin->GetParticleGun()->GetParticleEnergy();
|
||||
assert(NbOfEvents*kinEnergy > 0);
|
||||
|
||||
|
||||
G4double mass=Kin->GetParticleGun()->GetParticleDefinition()->GetPDGMass();
|
||||
G4double norme = 100./(NbOfEvents*(kinEnergy+mass));
|
||||
|
||||
|
||||
//longitudinal
|
||||
//
|
||||
G4double dLradl = Det->GetdLradl();
|
||||
|
||||
G4double dLradl = Det->GetdLradl();
|
||||
|
||||
MyVector MeanELongit(nLbin), rmsELongit(nLbin);
|
||||
MyVector MeanELongitCumul(nLbin), rmsELongitCumul(nLbin);
|
||||
|
||||
G4int i;
|
||||
|
||||
G4int i;
|
||||
for (i=0; i<nLbin; i++)
|
||||
{
|
||||
MeanELongit[i] = norme*sumELongit[i];
|
||||
rmsELongit[i] = norme*sqrt(abs(NbOfEvents*sumE2Longit[i]
|
||||
- sumELongit[i]*sumELongit[i]));
|
||||
|
||||
|
||||
MeanELongitCumul[i] = norme*sumELongitCumul[i];
|
||||
rmsELongitCumul[i] = norme*sqrt(abs(NbOfEvents*sumE2LongitCumul[i]
|
||||
rmsELongitCumul[i] = norme*sqrt(abs(NbOfEvents*sumE2LongitCumul[i]
|
||||
- sumELongitCumul[i]*sumELongitCumul[i]));
|
||||
|
||||
gammaFlux [i] /= NbOfEvents;
|
||||
electronFlux[i] /= NbOfEvents;
|
||||
positronFlux[i] /= NbOfEvents;
|
||||
positronFlux[i] /= NbOfEvents;
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
G4double bin = i*dLradl;
|
||||
#ifdef USE_AIDA
|
||||
G4double bin = i*dLradl;
|
||||
histo[3]->fill(bin,MeanELongit[i]/dLradl);
|
||||
bin = (i+1)*dLradl;
|
||||
histo[4]->fill(bin,MeanELongitCumul[i]);
|
||||
histo[5]->fill(bin, rmsELongitCumul[i]);
|
||||
|
||||
|
||||
histo[6]->fill(bin, gammaFlux[i]);
|
||||
histo[7]->fill(bin, positronFlux[i]);
|
||||
histo[8]->fill(bin, electronFlux[i]);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//radial
|
||||
//
|
||||
G4double dRradl = Det->GetdRradl();
|
||||
|
||||
//
|
||||
G4double dRradl = Det->GetdRradl();
|
||||
|
||||
MyVector MeanERadial(nRbin), rmsERadial(nRbin);
|
||||
MyVector MeanERadialCumul(nRbin), rmsERadialCumul(nRbin);
|
||||
|
||||
|
||||
for (i=0; i<nRbin; i++)
|
||||
{
|
||||
MeanERadial[i] = norme*sumERadial[i];
|
||||
rmsERadial[i] = norme*sqrt(abs(NbOfEvents*sumE2Radial[i]
|
||||
- sumERadial[i]*sumERadial[i]));
|
||||
|
||||
|
||||
MeanERadialCumul[i] = norme*sumERadialCumul[i];
|
||||
rmsERadialCumul[i] = norme*sqrt(abs(NbOfEvents*sumE2RadialCumul[i]
|
||||
rmsERadialCumul[i] = norme*sqrt(abs(NbOfEvents*sumE2RadialCumul[i]
|
||||
- sumERadialCumul[i]*sumERadialCumul[i]));
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
G4double bin = i*dRradl;
|
||||
|
||||
#ifdef USE_AIDA
|
||||
G4double bin = i*dRradl;
|
||||
histo[ 9]->fill(bin,MeanERadial[i]/dRradl);
|
||||
bin = (i+1)*dRradl;
|
||||
histo[10]->fill(bin,MeanERadialCumul[i]);
|
||||
histo[11]->fill(bin, rmsERadialCumul[i]);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//track length
|
||||
@@ -346,76 +340,96 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
G4double MeanChargTrLength = norme*sumChargTrLength;
|
||||
G4double rmsChargTrLength = norme*sqrt(abs(NbOfEvents*sum2ChargTrLength
|
||||
- sumChargTrLength*sumChargTrLength));
|
||||
|
||||
|
||||
G4double MeanNeutrTrLength = norme*sumNeutrTrLength;
|
||||
G4double rmsNeutrTrLength = norme*sqrt(abs(NbOfEvents*sum2NeutrTrLength
|
||||
- sumNeutrTrLength*sumNeutrTrLength));
|
||||
|
||||
|
||||
//print
|
||||
//
|
||||
//
|
||||
|
||||
std::ios::fmtflags mode = G4cout.flags();
|
||||
G4cout.setf(std::ios::fixed,std::ios::floatfield);
|
||||
G4int prec = G4cout.precision(2);
|
||||
|
||||
|
||||
G4cout << " LATERAL PROFILE "
|
||||
<< " CUMULATIVE LATERAL PROFILE" << G4endl << G4endl;
|
||||
|
||||
G4cout << " bin " << " Mean rms "
|
||||
<< " CUMULATIVE LATERAL PROFILE" << G4endl << G4endl;
|
||||
|
||||
G4cout << " bin " << " Mean rms "
|
||||
<< " bin " << " Mean rms \n" << G4endl;
|
||||
|
||||
|
||||
for (i=0; i<nLbin; i++)
|
||||
{
|
||||
G4double inf=i*dLradl, sup=inf+dLradl;
|
||||
|
||||
G4cout << std::setw(8) << inf << "->"
|
||||
<< std::setw(5) << sup << " radl: "
|
||||
<< std::setw(7) << MeanELongit[i] << "% "
|
||||
|
||||
G4cout << std::setw(8) << inf << "->"
|
||||
<< std::setw(5) << sup << " radl: "
|
||||
<< std::setw(7) << MeanELongit[i] << "% "
|
||||
<< std::setw(9) << rmsELongit[i] << "% "
|
||||
<< " 0->" << std::setw(5) << sup << " radl: "
|
||||
<< std::setw(7) << MeanELongitCumul[i] << "% "
|
||||
<< std::setw(7) << rmsELongitCumul[i] << "% "
|
||||
<< " 0->" << std::setw(5) << sup << " radl: "
|
||||
<< std::setw(7) << MeanELongitCumul[i] << "% "
|
||||
<< std::setw(7) << rmsELongitCumul[i] << "% "
|
||||
<<G4endl;
|
||||
}
|
||||
|
||||
|
||||
G4cout << G4endl << G4endl << G4endl;
|
||||
|
||||
|
||||
G4cout << " RADIAL PROFILE "
|
||||
<< " CUMULATIVE RADIAL PROFILE" << G4endl << G4endl;
|
||||
|
||||
G4cout << " bin " << " Mean rms "
|
||||
<< " CUMULATIVE RADIAL PROFILE" << G4endl << G4endl;
|
||||
|
||||
G4cout << " bin " << " Mean rms "
|
||||
<< " bin " << " Mean rms \n" << G4endl;
|
||||
|
||||
|
||||
for (i=0; i<nRbin; i++)
|
||||
{
|
||||
G4double inf=i*dRradl, sup=inf+dRradl;
|
||||
|
||||
G4cout << std::setw(8) << inf << "->"
|
||||
<< std::setw(5) << sup << " radl: "
|
||||
<< std::setw(7) << MeanERadial[i] << "% "
|
||||
|
||||
G4cout << std::setw(8) << inf << "->"
|
||||
<< std::setw(5) << sup << " radl: "
|
||||
<< std::setw(7) << MeanERadial[i] << "% "
|
||||
<< std::setw(9) << rmsERadial[i] << "% "
|
||||
<< " 0->" << std::setw(5) << sup << " radl: "
|
||||
<< std::setw(7) << MeanERadialCumul[i] << "% "
|
||||
<< std::setw(7) << rmsERadialCumul[i] << "% "
|
||||
<< " 0->" << std::setw(5) << sup << " radl: "
|
||||
<< std::setw(7) << MeanERadialCumul[i] << "% "
|
||||
<< std::setw(7) << rmsERadialCumul[i] << "% "
|
||||
<<G4endl;
|
||||
}
|
||||
}
|
||||
G4cout << G4endl;
|
||||
G4cout << std::setw(37) << "SUMMARY" << G4endl;
|
||||
G4cout << std::setw(42) << "energy deposit : "
|
||||
G4cout << std::setw(42) << "energy deposit : "
|
||||
<< std::setw(7) << MeanELongitCumul[nLbin-1] << " % E0 +- "
|
||||
<< std::setw(7) << rmsELongitCumul[nLbin-1] << " % E0" << G4endl;
|
||||
G4cout << std::setw(42) << "charged traklen: "
|
||||
G4cout << std::setw(42) << "charged traklen: "
|
||||
<< std::setw(7) << MeanChargTrLength << " radl +- "
|
||||
<< std::setw(7) << rmsChargTrLength << " radl" << G4endl;
|
||||
G4cout << std::setw(42) << "neutral traklen: "
|
||||
G4cout << std::setw(42) << "neutral traklen: "
|
||||
<< std::setw(7) << MeanNeutrTrLength << " radl +- "
|
||||
<< std::setw(7) << rmsNeutrTrLength << " radl" << G4endl;
|
||||
|
||||
|
||||
G4cout.setf(mode,std::ios::floatfield);
|
||||
G4cout.precision(prec);
|
||||
|
||||
// show Rndm status
|
||||
HepRandom::showEngineStatus();
|
||||
|
||||
// Acceptance
|
||||
if(limittrue < DBL_MAX) {
|
||||
EmAcceptance acc;
|
||||
acc.BeginOfAcceptance("Total Energy in Absorber",NbOfEvents);
|
||||
G4double e = MeanELongitCumul[nLbin-1]/100.;
|
||||
G4double r = rmsELongitCumul[nLbin-1]/100.;
|
||||
acc.EmAcceptanceGauss("Edep",NbOfEvents,e,edeptrue,rmstrue,limittrue);
|
||||
acc.EmAcceptanceGauss("Erms",NbOfEvents,r,rmstrue,rmstrue,2.0*limittrue);
|
||||
acc.EndOfAcceptance();
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RunAction::SetEdepAndRMS(G4ThreeVector Value)
|
||||
{
|
||||
edeptrue = Value(0);
|
||||
rmstrue = Value(1);
|
||||
limittrue= Value(2);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: RunActionMessenger.cc,v 1.1 2004/06/18 15:43:41 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "RunActionMessenger.hh"
|
||||
|
||||
#include "RunAction.hh"
|
||||
#include "G4UIcmdWith3Vector.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
RunActionMessenger::RunActionMessenger(RunAction* run)
|
||||
:Run(run)
|
||||
{
|
||||
accCmd = new G4UIcmdWith3Vector("/testem/run/acceptance",this);
|
||||
accCmd->SetGuidance("set Edep and RMS");
|
||||
accCmd->SetGuidance("acceptance values for first layer");
|
||||
accCmd->SetParameterName("edep","rms","limit",true);
|
||||
accCmd->SetRange("edep>0 && edep<1 && rms>0");
|
||||
accCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
factoryCmd = new G4UIcmdWithAString("/testem/histo/fileName",this);
|
||||
factoryCmd->SetGuidance("set name for the histograms file");
|
||||
|
||||
fileCmd = new G4UIcmdWithAString("/testem/histo/fileType",this);
|
||||
fileCmd->SetGuidance("set type (hbook, root, XML) for the histograms file");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
RunActionMessenger::~RunActionMessenger()
|
||||
{
|
||||
delete accCmd;
|
||||
delete factoryCmd;
|
||||
delete fileCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RunActionMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if (command == accCmd )
|
||||
{ Run->SetEdepAndRMS(accCmd->GetNew3VectorValue(newValue));}
|
||||
|
||||
if (command == factoryCmd)
|
||||
{ Run->SetHistoName(newValue);}
|
||||
|
||||
if (command == fileCmd)
|
||||
{ Run->SetHistoType(newValue);}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
Reference in New Issue
Block a user