Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file medical/electronScattering2/src/ElectronBenchmarkDetector.cc
|
||||
/// \brief Implementation of the ElectronBenchmarkDetector class
|
||||
//
|
||||
|
||||
#include "ElectronBenchmarkDetector.hh"
|
||||
|
||||
@@ -48,17 +51,18 @@
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4PSCellFlux.hh"
|
||||
#include "G4PSPopulation.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
ElectronBenchmarkDetector::ElectronBenchmarkDetector()
|
||||
:fLogWorld(NULL),
|
||||
worldVisAtt(0),
|
||||
windowVisAtt(0),
|
||||
primFoilVisAtt(0),
|
||||
monVisAtt(0),
|
||||
bagVisAtt(0),
|
||||
heliumVisAtt(0),
|
||||
ringVisAtt(0),
|
||||
scorerVisAtt(0)
|
||||
fWorldVisAtt(0),
|
||||
fWindowVisAtt(0),
|
||||
fPrimFoilVisAtt(0),
|
||||
fMonVisAtt(0),
|
||||
fBagVisAtt(0),
|
||||
fHeliumVisAtt(0),
|
||||
fRingVisAtt(0),
|
||||
fScorerVisAtt(0)
|
||||
{
|
||||
// Exit Window
|
||||
fPosWindow0 = 0.000000*cm;
|
||||
@@ -99,14 +103,14 @@ ElectronBenchmarkDetector::~ElectronBenchmarkDetector()
|
||||
{
|
||||
delete fMessenger;
|
||||
|
||||
delete worldVisAtt;
|
||||
delete windowVisAtt;
|
||||
delete primFoilVisAtt;
|
||||
delete monVisAtt;
|
||||
delete bagVisAtt;
|
||||
delete heliumVisAtt;
|
||||
delete ringVisAtt;
|
||||
delete scorerVisAtt;
|
||||
delete fWorldVisAtt;
|
||||
delete fWindowVisAtt;
|
||||
delete fPrimFoilVisAtt;
|
||||
delete fMonVisAtt;
|
||||
delete fBagVisAtt;
|
||||
delete fHeliumVisAtt;
|
||||
delete fRingVisAtt;
|
||||
delete fScorerVisAtt;
|
||||
}
|
||||
|
||||
|
||||
@@ -204,8 +208,8 @@ G4VPhysicalVolume* ElectronBenchmarkDetector::CreateWorld(){
|
||||
G4VSolid* worldSolid = new G4Tubs("WorldSolid", 0.*cm, radWorld, halfLengthWorld, 0.*deg, 360.*deg);
|
||||
G4LogicalVolume* worldLog = new G4LogicalVolume(worldSolid, G4Material::GetMaterial("G4_AIR"), "WorldLog");
|
||||
|
||||
worldVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
worldLog->SetVisAttributes(worldVisAtt);
|
||||
fWorldVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
worldLog->SetVisAttributes(fWorldVisAtt);
|
||||
|
||||
G4VPhysicalVolume* worldPhys =
|
||||
new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), worldLog,"World", 0, false, 0);
|
||||
@@ -220,8 +224,8 @@ void ElectronBenchmarkDetector::CreateExitWindow(G4LogicalVolume* worldLog){
|
||||
G4VSolid* windowSolid = new G4Tubs("windowSolid", 0.*cm, fRadOverall, halfThicknessWindow, 0.*deg, 360.*deg);
|
||||
G4LogicalVolume* windowLog = new G4LogicalVolume(windowSolid, G4Material::GetMaterial("TiAlloy"), "windowLog");
|
||||
|
||||
windowVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
windowLog->SetVisAttributes(windowVisAtt);
|
||||
fWindowVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
windowLog->SetVisAttributes(fWindowVisAtt);
|
||||
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0., halfThicknessWindow - halfLengthWorld),
|
||||
@@ -239,8 +243,8 @@ void ElectronBenchmarkDetector::CreatePrimaryFoil(G4LogicalVolume* worldLog){
|
||||
0.*cm, fRadOverall, fHalfThicknessPrimFoil, 0.*deg, 360.*deg);
|
||||
G4LogicalVolume* primFoilLog = new G4LogicalVolume(primFoilSolid, fMaterialPrimFoil, "PrimFoilLog");
|
||||
|
||||
primFoilVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
primFoilLog->SetVisAttributes(primFoilVisAtt);
|
||||
fPrimFoilVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
primFoilLog->SetVisAttributes(fPrimFoilVisAtt);
|
||||
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0.,fPosPrimFoil + fHalfThicknessPrimFoil - halfLengthWorld),
|
||||
@@ -254,8 +258,8 @@ void ElectronBenchmarkDetector::CreateMonitor(G4LogicalVolume* worldLog){
|
||||
G4VSolid* monSolid = new G4Tubs("monSolid", 0.*cm, fRadOverall, halfThicknessMon, 0.*deg, 360.*deg);
|
||||
G4LogicalVolume* monLog = new G4LogicalVolume(monSolid, G4Material::GetMaterial("G4_MYLAR"), "monLog");
|
||||
|
||||
monVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
monLog->SetVisAttributes(monVisAtt);
|
||||
fMonVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
monLog->SetVisAttributes(fMonVisAtt);
|
||||
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0., fPosMon0 + halfThicknessMon - halfLengthWorld),
|
||||
@@ -270,8 +274,8 @@ void ElectronBenchmarkDetector::CreateHeliumBag(G4LogicalVolume* worldLog){
|
||||
G4VSolid* bagSolid = new G4Tubs("bagSolid", 0.*cm, fRadOverall, halfThicknessBag, 0.*deg, 360.*deg);
|
||||
G4LogicalVolume* bagLog = new G4LogicalVolume(bagSolid, G4Material::GetMaterial("G4_MYLAR"), "bagLog");
|
||||
|
||||
bagVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
bagLog->SetVisAttributes(bagVisAtt);
|
||||
fBagVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
bagLog->SetVisAttributes(fBagVisAtt);
|
||||
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0., fPosBag0 + halfThicknessBag - halfLengthWorld),
|
||||
@@ -282,8 +286,8 @@ void ElectronBenchmarkDetector::CreateHeliumBag(G4LogicalVolume* worldLog){
|
||||
G4VSolid* heliumSolid = new G4Tubs("heliumSolid", 0.*cm, fRadOverall, halfThicknessHelium, 0.*deg, 360.*deg);
|
||||
G4LogicalVolume* heliumLog = new G4LogicalVolume(heliumSolid, G4Material::GetMaterial("G4_He"), "heliumLog");
|
||||
|
||||
heliumVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
heliumLog->SetVisAttributes(heliumVisAtt);
|
||||
fHeliumVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
heliumLog->SetVisAttributes(fHeliumVisAtt);
|
||||
|
||||
new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),heliumLog,"Helium",bagLog,false,0);
|
||||
|
||||
@@ -293,9 +297,9 @@ void ElectronBenchmarkDetector::CreateHeliumBag(G4LogicalVolume* worldLog){
|
||||
G4LogicalVolume* ring0Log = new G4LogicalVolume(ringSolid, G4Material::GetMaterial("G4_Al"), "ring0Log");
|
||||
G4LogicalVolume* ring1Log = new G4LogicalVolume(ringSolid, G4Material::GetMaterial("G4_Al"), "ring1Log");
|
||||
|
||||
ringVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
ring0Log->SetVisAttributes(ringVisAtt);
|
||||
ring1Log->SetVisAttributes(ringVisAtt);
|
||||
fRingVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
ring0Log->SetVisAttributes(fRingVisAtt);
|
||||
ring1Log->SetVisAttributes(fRingVisAtt);
|
||||
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0., -halfThicknessHelium + halfThicknessRing),
|
||||
@@ -314,8 +318,8 @@ void ElectronBenchmarkDetector::CreateScorer(G4LogicalVolume* worldLog){
|
||||
G4VSolid* scorerSolid = new G4Tubs("scorerSolid", 0.*cm, fRadOverall, halfThicknessScorer, 0.*deg, 360.*deg);
|
||||
G4LogicalVolume* scorerLog = new G4LogicalVolume(scorerSolid, G4Material::GetMaterial("G4_AIR"), "scorerLog");
|
||||
|
||||
scorerVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
scorerLog->SetVisAttributes(scorerVisAtt);
|
||||
fScorerVisAtt = new G4VisAttributes(G4Colour(0.5,1.0,0.5));
|
||||
scorerLog->SetVisAttributes(fScorerVisAtt);
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(0.,0., halfLengthWorld - halfThicknessScorer),
|
||||
scorerLog,"Scorer",worldLog,false,0);
|
||||
|
||||
+22
-19
@@ -23,6 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file medical/electronScattering2/src/ElectronBenchmarkDetectorMessenger.cc
|
||||
/// \brief Implementation of the ElectronBenchmarkDetectorMessenger class
|
||||
//
|
||||
|
||||
#include "ElectronBenchmarkDetectorMessenger.hh"
|
||||
#include "ElectronBenchmarkDetector.hh"
|
||||
@@ -36,38 +39,38 @@
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
ElectronBenchmarkDetectorMessenger::ElectronBenchmarkDetectorMessenger(ElectronBenchmarkDetector* det)
|
||||
:detector(det)
|
||||
:fDetector(det)
|
||||
{
|
||||
listDir = new G4UIdirectory("/primFoil/");
|
||||
listDir->SetGuidance("Primary foil commands");
|
||||
fListDir = new G4UIdirectory("/primFoil/");
|
||||
fListDir->SetGuidance("Primary foil commands");
|
||||
|
||||
// Foil Material
|
||||
primFoilMatCmd = new G4UIcmdWithAString("/primFoil/material",this);
|
||||
primFoilMatCmd->SetGuidance("Material of primary foil");
|
||||
primFoilMatCmd->SetParameterName("primFoilMat",false);
|
||||
primFoilMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fPrimFoilMatCmd = new G4UIcmdWithAString("/primFoil/material",this);
|
||||
fPrimFoilMatCmd->SetGuidance("Material of primary foil");
|
||||
fPrimFoilMatCmd->SetParameterName("primFoilMat",false);
|
||||
fPrimFoilMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
// Foil Thickness
|
||||
primFoilThickCmd = new G4UIcmdWithADoubleAndUnit("/primFoil/thickness",this);
|
||||
primFoilThickCmd->SetGuidance("Thickness of primary foil");
|
||||
primFoilThickCmd->SetParameterName("thickness",false);
|
||||
primFoilThickCmd->SetDefaultUnit("cm");
|
||||
primFoilThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fPrimFoilThickCmd = new G4UIcmdWithADoubleAndUnit("/primFoil/thickness",this);
|
||||
fPrimFoilThickCmd->SetGuidance("Thickness of primary foil");
|
||||
fPrimFoilThickCmd->SetParameterName("thickness",false);
|
||||
fPrimFoilThickCmd->SetDefaultUnit("cm");
|
||||
fPrimFoilThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
}
|
||||
|
||||
ElectronBenchmarkDetectorMessenger::~ElectronBenchmarkDetectorMessenger()
|
||||
{
|
||||
delete listDir;
|
||||
delete primFoilMatCmd;
|
||||
delete primFoilThickCmd;
|
||||
delete fListDir;
|
||||
delete fPrimFoilMatCmd;
|
||||
delete fPrimFoilThickCmd;
|
||||
}
|
||||
|
||||
void ElectronBenchmarkDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if ( command == primFoilMatCmd ){
|
||||
detector->SetPrimFoilMaterial(newValue);
|
||||
} else if ( command == primFoilThickCmd ){
|
||||
detector->SetPrimFoilThickness(primFoilThickCmd->GetNewDoubleValue(newValue));
|
||||
if ( command == fPrimFoilMatCmd ){
|
||||
fDetector->SetPrimFoilMaterial(newValue);
|
||||
} else if ( command == fPrimFoilThickCmd ){
|
||||
fDetector->SetPrimFoilThickness(fPrimFoilThickCmd->GetNewDoubleValue(newValue));
|
||||
} else {
|
||||
G4cerr << "***** Command is not found !!! " << newValue << G4endl;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file medical/electronScattering2/src/ElectronEventAction.cc
|
||||
/// \brief Implementation of the ElectronEventAction class
|
||||
//
|
||||
|
||||
#include "ElectronEventAction.hh"
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file medical/electronScattering2/src/ElectronPrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the ElectronPrimaryGeneratorAction class
|
||||
//
|
||||
|
||||
#include "ElectronPrimaryGeneratorAction.hh"
|
||||
#include "G4Event.hh"
|
||||
@@ -30,15 +33,15 @@
|
||||
|
||||
ElectronPrimaryGeneratorAction::ElectronPrimaryGeneratorAction()
|
||||
{
|
||||
particleGun = new G4GeneralParticleSource();
|
||||
fParticleGun = new G4GeneralParticleSource();
|
||||
}
|
||||
|
||||
ElectronPrimaryGeneratorAction::~ElectronPrimaryGeneratorAction()
|
||||
{
|
||||
delete particleGun;
|
||||
delete fParticleGun;
|
||||
}
|
||||
|
||||
void ElectronPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
@@ -23,11 +23,15 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file medical/electronScattering2/src/ElectronRun.cc
|
||||
/// \brief Implementation of the ElectronRun class
|
||||
//
|
||||
|
||||
#include "ElectronRun.hh"
|
||||
#include "G4MultiFunctionalDetector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include <assert.h>
|
||||
|
||||
ElectronRun::ElectronRun(const G4String& detectorName)
|
||||
@@ -176,13 +180,18 @@ void ElectronRun::Print(const std::vector<G4String>& title,
|
||||
|
||||
std::vector<G4double>::const_iterator energyBinIter = iter->second.begin();
|
||||
|
||||
// The built-in scorers do not automatically account for the area of the cylinder replica rings.
|
||||
// We must account for this now by multiplying our result by the ratio of the area of the full cylinder end
|
||||
// over the area of the actual scoring ring.
|
||||
// In this ratio, PI divides out, as does the width of the scoring rings.
|
||||
// Left with just the number of rings squared divided by the ring index plus 1 squared minus ring index squared.
|
||||
G4int ringNum = iter->first;
|
||||
G4double area = (ringNum+1)*(ringNum+1) - ringNum*ringNum;
|
||||
G4double areaCorrection = 233.*233. / ( (ringNum+1)*(ringNum+1) - ringNum*ringNum );
|
||||
G4int counter = 0;
|
||||
|
||||
while (energyBinIter != iter->second.end()) {
|
||||
G4double value = *energyBinIter;
|
||||
if (counter < 2) value = value/area;
|
||||
if (counter < 2) value = value*areaCorrection;
|
||||
G4cout << std::setw(10)<<std::setprecision(5)<< value*mm*mm<<" ";
|
||||
outFile << value*mm*mm;
|
||||
if (counter < 3) outFile <<",";
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file medical/electronScattering2/src/ElectronRunAction.cc
|
||||
/// \brief Implementation of the ElectronRunAction class
|
||||
//
|
||||
|
||||
#include "ElectronRunAction.hh"
|
||||
#include "ElectronRun.hh"
|
||||
@@ -30,7 +33,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
ElectronRunAction::ElectronRunAction(G4String &outputFile) {
|
||||
outputFileSpec = outputFile;
|
||||
fOutputFileSpec = outputFile;
|
||||
}
|
||||
|
||||
ElectronRunAction::~ElectronRunAction() {}
|
||||
@@ -49,5 +52,5 @@ void ElectronRunAction::EndOfRunAction(const G4Run* aRun)
|
||||
const ElectronRun* theRun = dynamic_cast<const ElectronRun*>(aRun);
|
||||
assert (0 != theRun);
|
||||
|
||||
theRun->DumpData(outputFileSpec);
|
||||
theRun->DumpData(fOutputFileSpec);
|
||||
}
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysListEmStandard.cc,v 1.24 2009-11-15 22:10:03 maire Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file medical/electronScattering2/src/PhysListEmStandard.cc
|
||||
/// \brief Implementation of the PhysListEmStandard class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -66,6 +68,8 @@
|
||||
#include "G4LossTableManager.hh"
|
||||
#include "G4UAtomicDeexcitation.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEmStandard::PhysListEmStandard(const G4String& name)
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysListEmStandardGS.cc,v 1.1 2011-01-05 18:48:54 vnivanch Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file medical/electronScattering2/src/PhysListEmStandardGS.cc
|
||||
/// \brief Implementation of the PhysListEmStandardGS class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysListEmStandardSS.cc,v 1.1 2011-01-05 18:48:54 vnivanch Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file medical/electronScattering2/src/PhysListEmStandardSS.cc
|
||||
/// \brief Implementation of the PhysListEmStandardSS class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -52,6 +54,8 @@
|
||||
#include "G4ionIonisation.hh"
|
||||
#include "G4EmProcessOptions.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysListEmStandardSS::PhysListEmStandardSS(const G4String& name)
|
||||
@@ -83,34 +87,36 @@ void PhysListEmStandardSS::ConstructProcess()
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
//electron
|
||||
pmanager->AddDiscreteProcess(new G4CoulombScattering);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 2, 2);
|
||||
pmanager->AddDiscreteProcess(new G4CoulombScattering);
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
//positron
|
||||
pmanager->AddDiscreteProcess(new G4CoulombScattering);
|
||||
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);
|
||||
|
||||
} else if (particleName == "mu+" ||
|
||||
particleName == "mu-" ) {
|
||||
//muon
|
||||
pmanager->AddDiscreteProcess(new G4CoulombScattering);
|
||||
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);
|
||||
|
||||
} else if (particleName == "alpha" || particleName == "He3") {
|
||||
pmanager->AddDiscreteProcess(new G4CoulombScattering);
|
||||
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
|
||||
G4CoulombScattering* cs = new G4CoulombScattering();
|
||||
cs->SetBuildTableFlag(false);
|
||||
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
|
||||
} else if (particleName == "GenericIon" ) {
|
||||
G4CoulombScattering* cs = new G4CoulombScattering();
|
||||
cs->SetBuildTableFlag(false);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
|
||||
pmanager->AddDiscreteProcess(cs);
|
||||
|
||||
} else if ((!particle->IsShortLived()) &&
|
||||
(particle->GetPDGCharge() != 0.0) &&
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysListEmStandardWVI.cc,v 1.1 2011-01-05 18:48:54 vnivanch Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file medical/electronScattering2/src/PhysListEmStandardWVI.cc
|
||||
/// \brief Implementation of the PhysListEmStandardWVI class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -93,7 +95,7 @@ void PhysListEmStandardWVI::ConstructProcess()
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
//electron
|
||||
G4eMultipleScattering* msc = new G4eMultipleScattering();
|
||||
G4MuMultipleScattering* msc = new G4MuMultipleScattering();
|
||||
msc->AddEmModel(0, new G4WentzelVIModel());
|
||||
pmanager->AddProcess(msc, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
|
||||
@@ -102,7 +104,7 @@ void PhysListEmStandardWVI::ConstructProcess()
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
//positron
|
||||
G4eMultipleScattering* msc = new G4eMultipleScattering();
|
||||
G4MuMultipleScattering* msc = new G4MuMultipleScattering();
|
||||
msc->AddEmModel(0, new G4WentzelVIModel());
|
||||
pmanager->AddProcess(msc, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2, 2);
|
||||
@@ -126,32 +128,26 @@ void PhysListEmStandardWVI::ConstructProcess()
|
||||
particleName == "pi+" ) {
|
||||
//proton
|
||||
G4hMultipleScattering* msc = new G4hMultipleScattering();
|
||||
msc->AddEmModel(0, new G4WentzelVIModel());
|
||||
pmanager->AddProcess(msc, -1, 1, 1);
|
||||
pmanager->AddProcess(msc, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3);
|
||||
pmanager->AddProcess(new G4hPairProduction, -1, 4, 4);
|
||||
pmanager->AddProcess(new G4CoulombScattering, -1,-1, 5);
|
||||
|
||||
} else if( particleName == "alpha" ||
|
||||
particleName == "He3" ) {
|
||||
//alpha
|
||||
G4hMultipleScattering* msc = new G4hMultipleScattering();
|
||||
msc->AddEmModel(0, new G4WentzelVIModel());
|
||||
pmanager->AddProcess(msc, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4CoulombScattering, -1,-1, 3);
|
||||
pmanager->AddProcess(new G4NuclearStopping, -1, 3,-1);
|
||||
|
||||
} else if( particleName == "GenericIon" ) {
|
||||
//Ions
|
||||
G4hMultipleScattering* msc = new G4hMultipleScattering();
|
||||
msc->AddEmModel(0, new G4WentzelVIModel());
|
||||
pmanager->AddProcess(msc, -1, 1, 1);
|
||||
G4ionIonisation* ionIoni = new G4ionIonisation();
|
||||
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
|
||||
pmanager->AddProcess(ionIoni, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4CoulombScattering, -1,-1, 3);
|
||||
pmanager->AddProcess(new G4NuclearStopping, -1, 3,-1);
|
||||
|
||||
} else if ((!particle->IsShortLived()) &&
|
||||
@@ -159,10 +155,8 @@ void PhysListEmStandardWVI::ConstructProcess()
|
||||
(particle->GetParticleName() != "chargedgeantino")) {
|
||||
//all others charged particles except geantino
|
||||
G4hMultipleScattering* msc = new G4hMultipleScattering();
|
||||
msc->AddEmModel(0, new G4WentzelVIModel());
|
||||
pmanager->AddProcess(msc, -1, 1, 1);
|
||||
pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
|
||||
pmanager->AddProcess(new G4CoulombScattering, -1,-1, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysicsList.cc,v 1.2 2011-01-05 18:48:54 vnivanch Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file medical/electronScattering2/src/PhysicsList.cc
|
||||
/// \brief Implementation of the PhysicsList class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -69,20 +71,22 @@
|
||||
#include "G4BaryonConstructor.hh"
|
||||
#include "G4IonConstructor.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsList::PhysicsList() : G4VModularPhysicsList()
|
||||
{
|
||||
pMessenger = new PhysicsListMessenger(this);
|
||||
fMessenger = new PhysicsListMessenger(this);
|
||||
|
||||
// EM physics
|
||||
emName = G4String("local");
|
||||
emPhysicsList = new PhysListEmStandard(emName);
|
||||
fEmName = G4String("local");
|
||||
fEmPhysicsList = new PhysListEmStandard(fEmName);
|
||||
|
||||
defaultCutValue = 1.*mm;
|
||||
cutForGamma = defaultCutValue;
|
||||
cutForElectron = defaultCutValue;
|
||||
cutForPositron = defaultCutValue;
|
||||
fCutForGamma = defaultCutValue;
|
||||
fCutForElectron = defaultCutValue;
|
||||
fCutForPositron = defaultCutValue;
|
||||
|
||||
SetVerboseLevel(1);
|
||||
}
|
||||
@@ -91,8 +95,8 @@ PhysicsList::PhysicsList() : G4VModularPhysicsList()
|
||||
|
||||
PhysicsList::~PhysicsList()
|
||||
{
|
||||
delete emPhysicsList;
|
||||
delete pMessenger;
|
||||
delete fEmPhysicsList;
|
||||
delete fMessenger;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -138,7 +142,7 @@ void PhysicsList::ConstructParticle()
|
||||
void PhysicsList::ConstructProcess()
|
||||
{
|
||||
AddTransportation();
|
||||
emPhysicsList->ConstructProcess();
|
||||
fEmPhysicsList->ConstructProcess();
|
||||
AddDecay();
|
||||
AddStepMax();
|
||||
}
|
||||
@@ -199,55 +203,55 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
|
||||
}
|
||||
|
||||
if (name == emName) return;
|
||||
if (name == fEmName) return;
|
||||
|
||||
if (name == "local") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new PhysListEmStandard(name);
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new PhysListEmStandard(name);
|
||||
|
||||
} else if (name == "emstandard_opt0") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics();
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics();
|
||||
|
||||
} else if (name == "emstandard_opt1") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics_option1();
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option1();
|
||||
|
||||
} else if (name == "emstandard_opt2") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics_option2();
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option2();
|
||||
|
||||
} else if (name == "emstandard_opt3") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics_option3();
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option3();
|
||||
|
||||
} else if (name == "standardSS") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new PhysListEmStandardSS(name);
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new PhysListEmStandardSS(name);
|
||||
|
||||
} else if (name == "standardGS") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new PhysListEmStandardGS(name);
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new PhysListEmStandardGS(name);
|
||||
|
||||
} else if (name == "standardWVI") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new PhysListEmStandardWVI(name);
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new PhysListEmStandardWVI(name);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -270,9 +274,9 @@ void PhysicsList::SetCuts()
|
||||
|
||||
// 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+");
|
||||
SetCutValue(fCutForGamma, "gamma");
|
||||
SetCutValue(fCutForElectron, "e-");
|
||||
SetCutValue(fCutForPositron, "e+");
|
||||
|
||||
if (verboseLevel>0) DumpCutValuesTable();
|
||||
}
|
||||
@@ -281,24 +285,24 @@ void PhysicsList::SetCuts()
|
||||
|
||||
void PhysicsList::SetCutForGamma(G4double cut)
|
||||
{
|
||||
cutForGamma = cut;
|
||||
SetParticleCuts(cutForGamma, G4Gamma::Gamma());
|
||||
fCutForGamma = cut;
|
||||
SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForElectron(G4double cut)
|
||||
{
|
||||
cutForElectron = cut;
|
||||
SetParticleCuts(cutForElectron, G4Electron::Electron());
|
||||
fCutForElectron = cut;
|
||||
SetParticleCuts(fCutForElectron, G4Electron::Electron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForPositron(G4double cut)
|
||||
{
|
||||
cutForPositron = cut;
|
||||
SetParticleCuts(cutForPositron, G4Positron::Positron());
|
||||
fCutForPositron = cut;
|
||||
SetParticleCuts(fCutForPositron, G4Positron::Positron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysicsListMessenger.cc,v 1.3 2011-01-05 18:48:54 vnivanch Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file medical/electronScattering2/src/PhysicsListMessenger.cc
|
||||
/// \brief Implementation of the PhysicsListMessenger class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -39,79 +41,79 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
|
||||
:pPhysicsList(pPhys)
|
||||
:fPhysicsList(pPhys)
|
||||
{
|
||||
physDir = new G4UIdirectory("/testem/phys/");
|
||||
physDir->SetGuidance("physics list commands");
|
||||
fPhysDir = new G4UIdirectory("/testem/phys/");
|
||||
fPhysDir->SetGuidance("physics list commands");
|
||||
|
||||
pListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this);
|
||||
pListCmd->SetGuidance("Add modula physics list.");
|
||||
pListCmd->SetParameterName("PList",false);
|
||||
pListCmd->AvailableForStates(G4State_PreInit);
|
||||
fPListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this);
|
||||
fPListCmd->SetGuidance("Add modula physics list.");
|
||||
fPListCmd->SetParameterName("PList",false);
|
||||
fPListCmd->AvailableForStates(G4State_PreInit);
|
||||
|
||||
gammaCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setGCut",this);
|
||||
gammaCutCmd->SetGuidance("Set gamma cut.");
|
||||
gammaCutCmd->SetParameterName("Gcut",false);
|
||||
gammaCutCmd->SetUnitCategory("Length");
|
||||
gammaCutCmd->SetRange("Gcut>0.0");
|
||||
gammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fGammaCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setGCut",this);
|
||||
fGammaCutCmd->SetGuidance("Set gamma cut.");
|
||||
fGammaCutCmd->SetParameterName("Gcut",false);
|
||||
fGammaCutCmd->SetUnitCategory("Length");
|
||||
fGammaCutCmd->SetRange("Gcut>0.0");
|
||||
fGammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
electCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setECut",this);
|
||||
electCutCmd->SetGuidance("Set electron cut.");
|
||||
electCutCmd->SetParameterName("Ecut",false);
|
||||
electCutCmd->SetUnitCategory("Length");
|
||||
electCutCmd->SetRange("Ecut>0.0");
|
||||
electCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fElectCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setECut",this);
|
||||
fElectCutCmd->SetGuidance("Set electron cut.");
|
||||
fElectCutCmd->SetParameterName("Ecut",false);
|
||||
fElectCutCmd->SetUnitCategory("Length");
|
||||
fElectCutCmd->SetRange("Ecut>0.0");
|
||||
fElectCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
protoCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setPCut",this);
|
||||
protoCutCmd->SetGuidance("Set positron cut.");
|
||||
protoCutCmd->SetParameterName("Pcut",false);
|
||||
protoCutCmd->SetUnitCategory("Length");
|
||||
protoCutCmd->SetRange("Pcut>0.0");
|
||||
protoCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fProtoCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setPCut",this);
|
||||
fProtoCutCmd->SetGuidance("Set positron cut.");
|
||||
fProtoCutCmd->SetParameterName("Pcut",false);
|
||||
fProtoCutCmd->SetUnitCategory("Length");
|
||||
fProtoCutCmd->SetRange("Pcut>0.0");
|
||||
fProtoCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
allCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setCut",this);
|
||||
allCutCmd->SetGuidance("Set cut for all.");
|
||||
allCutCmd->SetParameterName("cut",false);
|
||||
allCutCmd->SetUnitCategory("Length");
|
||||
allCutCmd->SetRange("cut>0.0");
|
||||
allCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fAllCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setCut",this);
|
||||
fAllCutCmd->SetGuidance("Set cut for all.");
|
||||
fAllCutCmd->SetParameterName("cut",false);
|
||||
fAllCutCmd->SetUnitCategory("Length");
|
||||
fAllCutCmd->SetRange("cut>0.0");
|
||||
fAllCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsListMessenger::~PhysicsListMessenger()
|
||||
{
|
||||
delete pListCmd;
|
||||
delete gammaCutCmd;
|
||||
delete electCutCmd;
|
||||
delete protoCutCmd;
|
||||
delete allCutCmd;
|
||||
delete physDir;
|
||||
delete fPListCmd;
|
||||
delete fGammaCutCmd;
|
||||
delete fElectCutCmd;
|
||||
delete fProtoCutCmd;
|
||||
delete fAllCutCmd;
|
||||
delete fPhysDir;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsListMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
if( command == pListCmd )
|
||||
{ pPhysicsList->AddPhysicsList(newValue);}
|
||||
if( command == fPListCmd )
|
||||
{ fPhysicsList->AddPhysicsList(newValue);}
|
||||
|
||||
if( command == gammaCutCmd )
|
||||
{ pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));}
|
||||
if( command == fGammaCutCmd )
|
||||
{ fPhysicsList->SetCutForGamma(fGammaCutCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == electCutCmd )
|
||||
{ pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));}
|
||||
if( command == fElectCutCmd )
|
||||
{ fPhysicsList->SetCutForElectron(fElectCutCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == protoCutCmd )
|
||||
{ pPhysicsList->SetCutForPositron(protoCutCmd->GetNewDoubleValue(newValue));}
|
||||
if( command == fProtoCutCmd )
|
||||
{ fPhysicsList->SetCutForPositron(fProtoCutCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == allCutCmd )
|
||||
if( command == fAllCutCmd )
|
||||
{
|
||||
G4double cut = allCutCmd->GetNewDoubleValue(newValue);
|
||||
pPhysicsList->SetCutForGamma(cut);
|
||||
pPhysicsList->SetCutForElectron(cut);
|
||||
pPhysicsList->SetCutForPositron(cut);
|
||||
G4double cut = fAllCutCmd->GetNewDoubleValue(newValue);
|
||||
fPhysicsList->SetCutForGamma(cut);
|
||||
fPhysicsList->SetCutForElectron(cut);
|
||||
fPhysicsList->SetCutForPositron(cut);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: StepMax.cc,v 1.1 2011-01-05 18:48:54 vnivanch Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file medical/electronScattering2/src/StepMax.cc
|
||||
/// \brief Implementation of the StepMax class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -35,14 +37,14 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
StepMax::StepMax(const G4String& processName)
|
||||
: G4VDiscreteProcess(processName),MaxChargedStep(DBL_MAX)
|
||||
: G4VDiscreteProcess(processName),fMaxChargedStep(DBL_MAX)
|
||||
{
|
||||
pMess = new StepMaxMessenger(this);
|
||||
fMess = new StepMaxMessenger(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
StepMax::~StepMax() { delete pMess; }
|
||||
StepMax::~StepMax() { delete fMess; }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -53,7 +55,7 @@ G4bool StepMax::IsApplicable(const G4ParticleDefinition& particle)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void StepMax::SetMaxStep(G4double step) {MaxChargedStep = step;}
|
||||
void StepMax::SetMaxStep(G4double step) {fMaxChargedStep = step;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -66,7 +68,7 @@ G4double StepMax::PostStepGetPhysicalInteractionLength(const G4Track&,
|
||||
|
||||
G4double ProposedStep = DBL_MAX;
|
||||
|
||||
if(MaxChargedStep > 0.) ProposedStep = MaxChargedStep;
|
||||
if(fMaxChargedStep > 0.) ProposedStep = fMaxChargedStep;
|
||||
|
||||
return ProposedStep;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: StepMaxMessenger.cc,v 1.1 2011-01-05 18:48:54 vnivanch Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file medical/electronScattering2/src/StepMaxMessenger.cc
|
||||
/// \brief Implementation of the StepMaxMessenger class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -37,28 +39,28 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
StepMaxMessenger::StepMaxMessenger(StepMax* stepM)
|
||||
:pStepMax(stepM)
|
||||
:fStepMax(stepM)
|
||||
{
|
||||
StepMaxCmd = new G4UIcmdWithADoubleAndUnit("/testem/stepMax",this);
|
||||
StepMaxCmd->SetGuidance("Set max allowed step length");
|
||||
StepMaxCmd->SetParameterName("mxStep",false);
|
||||
StepMaxCmd->SetRange("mxStep>0.");
|
||||
StepMaxCmd->SetUnitCategory("Length");
|
||||
fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/testem/stepMax",this);
|
||||
fStepMaxCmd->SetGuidance("Set max allowed step length");
|
||||
fStepMaxCmd->SetParameterName("mxStep",false);
|
||||
fStepMaxCmd->SetRange("mxStep>0.");
|
||||
fStepMaxCmd->SetUnitCategory("Length");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
StepMaxMessenger::~StepMaxMessenger()
|
||||
{
|
||||
delete StepMaxCmd;
|
||||
delete fStepMaxCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void StepMaxMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
if (command == StepMaxCmd)
|
||||
{ pStepMax->SetMaxStep(StepMaxCmd->GetNewDoubleValue(newValue));}
|
||||
if (command == fStepMaxCmd)
|
||||
{ fStepMax->SetMaxStep(fStepMaxCmd->GetNewDoubleValue(newValue));}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user