Import Geant4 10.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 14:11:04 +02:00
parent c9b32a6c0a
commit d4af681f38
4886 changed files with 420149 additions and 1023309 deletions
@@ -1,6 +1,6 @@
//$Id$
///\file "exoticphysics/.README"
///\file "exoticphysics/.README.txt"
///\brief Examples exoticphysics README page
/*! \page Examples_exoticphysics Category "exoticphysics"
@@ -1,6 +1,6 @@
//$Id: .README $
///\file "exoticphysics/channeling/.README"
///\file "exoticphysics/channeling/.README.txt"
///\brief Example channeling README page
/*! \page Examplechanneling Example channeling
@@ -14,6 +14,32 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
June 16, 2015 E. Bagli (channelingExample-V10-01-05)
- bug fix passing arguments
June 11, 2015 E. Bagli (channelingExample-V10-01-04)
- bug fix on analysis macro
June 11, 2015 E. Bagli (channelingExample-V10-01-03)
- further protection against zero division
June 3, 2015 E. Bagli (channelingExample-V10-01-02)
- prevent division by zero in ProcessChanneling and Wrappers classes
May 27, 2015 E. Bagli (channeling-Example-V10-01-01)
- added full integration of particle trajectory into the channeling process
- added beampipe and detector box to the detector construction
- modified the wrapper classes to correct bugs in energy loss calculation under channeling
- added to the wrapper class the InCrystal parameter in order to be completely transparent if the particle is outside a volume with a lattice
- added the InCrystal parameter to the user info to switch between single and multiple scattering
- single and multiple scattering are enabled/disabled if the volume has or not a lattice
- added data files for Si110 and Si111 planar nuclei density, planar electron density and planar electric field
- minor modification to XPhysicalLattice
- minor modification to the macro to analyze the output data
Mar 6, 2015 A. Dotti (channelingExample-V10-01-00)
- Initialization of GPS defaults moved to master
October 16, 2014 E. Bagli (channelingExample-V10-00-15)
- minor modification to condition for vr
- minor modification to computation of channeling outgoing angle
@@ -18,7 +18,7 @@ Double_t ComputeEfficiency(TH1D *h1,Double_t *fPar){
}
// Function for the computation of channeling efficiency at various incoming angle
Int_t AnalyseChannelingEfficiency(TTree *fTree = G4CH,Float_t fChannelingMinimum = 35., Float_t fChannelingMaximum = 70.){
Int_t AnalyseChannelingEfficiency(TTree *fTree,Float_t fChannelingMinimum = 35., Float_t fChannelingMaximum = 70.){
//**//Channeling Gaussian Fit Function
TF1 *vChanneling = new TF1("vChanneling","gaus",fChannelingMinimum,fChannelingMaximum);
vChanneling->SetParNames("Const","Mean","Sigma");
@@ -47,7 +47,6 @@ Int_t AnalyseChannelingEfficiency(TTree *fTree = G4CH,Float_t fChannelingMinimum
hChannelingEfficiency->SetFillStyle(0);
hChannelingEfficiency->SetMarkerStyle(20);
hChannelingEfficiency->Draw("PL");
c1->Update();
TGraph* gRoughExperimentalData = new TGraph(11);
gRoughExperimentalData->SetPoint( 0 , -10 , 20 );
@@ -61,7 +60,7 @@ Int_t AnalyseChannelingEfficiency(TTree *fTree = G4CH,Float_t fChannelingMinimum
gRoughExperimentalData->SetPoint( 8 , 6 , 66 );
gRoughExperimentalData->SetPoint( 9 , 8 , 52 );
gRoughExperimentalData->SetPoint( 10 , 10 , 37 );
gRoughExperimentalData->SetLineColor(4);
gRoughExperimentalData->SetLineStyle(3);
gRoughExperimentalData->SetFillStyle(0);
@@ -71,16 +70,13 @@ Int_t AnalyseChannelingEfficiency(TTree *fTree = G4CH,Float_t fChannelingMinimum
gRoughExperimentalData->SetTitle("Phys. Lett. B 680, 129");
gRoughExperimentalData->Draw("sameCP");
c1->Update();
TLegend *aLegend = new TLegend(0.30,0.15,0.55,0.3);
aLegend->AddEntry(hChannelingEfficiency);
aLegend->AddEntry(gRoughExperimentalData);
aLegend->SetFillStyle(0);
aLegend->SetLineColor(0);
aLegend->Draw();
c1->Update();
return 0;
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -59,9 +59,7 @@ private:
void ConstructSDandField();
private:
void ConstructWorld();
G4double fWorldSizeXY;
G4double fWorldSizeZ;
G4ThreeVector fWorldSize;
G4Box* fWorldSolid;
G4LogicalVolume* fWorldLogic;
G4VPhysicalVolume* fWorldPhysical;
@@ -70,14 +68,26 @@ private:
//** SSD **//
private:
void ConstructSiliconStripDetectors();
G4double fSSD0XtalDistance;
G4double fSSD1XtalDistance;
G4double fSSD2XtalDistance;
G4LogicalVolume* ConstructSiSD(G4int);
G4bool bSiSD;
G4ThreeVector fSSDSize;
G4Box* fSSDSolid;
G4LogicalVolume* fSSDLogic;
G4double fSSDXtalDistance[3];
G4LogicalVolume* fSSDLogic[3];
G4double fSSDBoxThickness;
G4ThreeVector fSSDBoxSize;
//** Beam pipe **//
void SetBeamPipeRadius(G4double aDouble) {fBeamPipeRadius = aDouble;};
G4double GetBeamPipeRadius() {return fBeamPipeRadius;};
void SetBeamPipeThickness(G4double aDouble) {fBeamPipeThickness = aDouble;};
G4double GetBeamPipeThickness() {return fBeamPipeThickness;};
private:
G4LogicalVolume* ConstructBeamPipe(G4double);
G4bool bBeamPipe;
G4double fBeamPipeRadius;
G4double fBeamPipeThickness;
//** Xtal **//
public:
void AddXtalTarget() {
@@ -71,6 +71,8 @@ public:
G4int GetNumberOfDechanneling();
void IncreaseNumberOfDechanneling();
G4int GetInTheCrystal() {return fInTheCrystal;};
void SetInTheCrystal(G4int aInt) {fInTheCrystal = aInt;};
private:
@@ -96,7 +98,7 @@ private:
//Last projection fof the particle momentum in the crystal reference system
G4int fNumberOfDechanneling;
G4int fInTheCrystal;
};
@@ -48,6 +48,13 @@ private:
G4String fFilePotentialName;
ExExChPhysicsListMessenger *fMessenger;
public:
G4double GetTransverseVariationMax() {return fTransverseVariationMax;};
void SetTransverseVariationMax(G4double aDouble) {fTransverseVariationMax = aDouble;};
G4double GetTimeStepMin() {return fTimeStepMin;};
void SetTimeStepMin(G4double aDouble) {fTimeStepMin = aDouble;};
public:
ExExChPhysicsList();
~ExExChPhysicsList();
@@ -63,6 +70,8 @@ public:
void SetFilePotentialName(const G4String&);
G4String GetFilePotentialName();
G4double fTimeStepMin;
G4double fTransverseVariationMax;
};
#endif
@@ -30,6 +30,8 @@
class ExExChPhysicsList;
class G4UIcmdWithAString;
class G4UIcmdWithABool;
class G4UIcmdWithADoubleAndUnit;
#include "G4UImessenger.hh"
#include "globals.hh"
@@ -47,6 +49,8 @@ class ExExChPhysicsListMessenger: public G4UImessenger
ExExChPhysicsList* fTarget;
G4UIcmdWithAString* fFilePotentialNameCmd;
G4UIcmdWithADoubleAndUnit* fTransverseVariationMaxCmd;
G4UIcmdWithADoubleAndUnit* fTimeStepMinCmd;
G4UIdirectory* fMyDirectory;
};
@@ -65,8 +65,6 @@ private:
G4double GetChannelingMeanFreePath(const G4Track&);
G4bool IsUnderCoherentEffect(const G4Track&);
public:
XVCrystalCharacteristic* GetPotential();
void SetPotential(XVCrystalCharacteristic*);
@@ -83,6 +81,17 @@ public:
XVCrystalCharacteristic* GetElectronDensity();
void SetElectronDensity(XVCrystalCharacteristic*);
G4double GetTransverseVariationMax(){
return fTransverseVariationMax;
};
void SetTransverseVariationMax(G4double aDouble){
fTransverseVariationMax = aDouble;
};
G4double GetTimeStepMin() {return fTimeStepMin;};
void SetTimeStepMin(G4double aDouble) {fTimeStepMin = aDouble;};
void ReadFromFileCharacteristics(G4bool);
void SetFileCharacteristicsName(const G4String& vFilename)
@@ -91,21 +100,15 @@ public:
private:
void UpdateParameters(const G4Track&);
void UpdatePosition(const G4Track&);
void UpdateMomentum(const G4Track&);
void UpdateDensity(const G4Track&);
G4bool UpdateInitialParameters(const G4Track&);
void ResetDensity(const G4Track&);
G4double ComputeCriticalEnergyBent(const G4Track&);
G4double ComputeCriticalEnergyMinimumBent(const G4Track&);
G4double ComputePotentialEnergyBent(const G4Track&);
G4ThreeVector ComputeTransverseEnergyBent(const G4Track&);
G4ThreeVector ComputeChannelingOutgoingMomentum(const G4Track&);
G4ThreeVector ComputeVolumeReflectionOutgoingMomentum(const G4Track&);
G4ThreeVector ComputePositionInTheCrystal(G4StepPoint*,const G4Track&);
G4double ComputeDistanceWhereParticleTangentToBentPlane(const G4Track&);
G4StepPoint* CheckStepPointLatticeForVolume(G4StepPoint*,const G4Track&);
G4StepPoint* CheckStepPointLatticeForPosition(G4StepPoint*,const G4Track&);
@@ -128,7 +131,6 @@ private:
G4bool HasLatticeOnBoundaryPre(const G4Track&);
G4bool HasLatticeOnBoundaryPost(const G4Track&);
G4bool ParticleIsTangentToBentPlane(const G4Track&);
G4bool ParticleIsNegative(const G4Track&);
G4bool ParticleIsNotOnBoundaryPre(const G4Track&);
G4bool ParticleIsNotOnBoundaryPost(const G4Track&);
@@ -138,7 +140,7 @@ private:
private:
//binding methods
XPhysicalLattice* GetXPhysicalLattice(const G4Track&);
XPhysicalLattice* GetXPL(const G4Track&);
G4VPhysicalVolume* GetVolume(const G4Track&);
ExExChParticleUserInfo* GetInfo(const G4Track&);
G4ParticleDefinition* GetParticleDefinition(const G4Track& aTrack);
@@ -160,6 +162,20 @@ private:
XVCrystalCharacteristic* fElectronDensity;
G4String fFileCharacteristicsName;
private:
G4bool UpdateIntegrationStep(const G4Track&,G4ThreeVector&);
G4double fTimeStep;
G4double fTimeStepMin;
G4double fTimeStepMax;
G4double fTimeStepTotal;
G4bool bHasToComputeTrajectory;
G4double bPointYPost;
G4double bPointYPre;
G4double fTransverseVariationMax;
G4double fIntegrationPeriod;
};
#endif
@@ -86,11 +86,12 @@ public:
public:
//set methods
void SetUnitCell(XUnitCell*);
G4ThreeVector ProjectMomentumVectorFromWorldToLattice(G4ThreeVector,
G4ThreeVector);
G4ThreeVector ProjectMomentumVectorFromLatticeToWorld(G4ThreeVector,
G4ThreeVector);
G4ThreeVector GetLatticeDirection(G4ThreeVector);
G4ThreeVector ProjectMomentumVectorFromWorldToLattice(G4ThreeVector&,
G4ThreeVector&);
G4ThreeVector ProjectMomentumVectorFromLatticeToWorld(G4ThreeVector&,
G4ThreeVector&);
G4ThreeVector GetLatticeDirection(G4ThreeVector&);
//retrieval methods
XUnitCell* GetXUnitCell();
@@ -100,7 +101,7 @@ public:
G4ThreeVector GetCurvatureRadius();
void SetCurvatureRadius(G4ThreeVector);
G4ThreeVector ComputeBendingAngle(G4ThreeVector);
G4ThreeVector ComputeBendingAngle(G4ThreeVector&);
G4bool IsBent();
@@ -31,6 +31,7 @@
#include "globals.hh"
#include "G4VContinuousDiscreteProcess.hh"
#include "ExExChParticleUserInfo.hh"
#include "G4ParticleChangeForNothing.hh"
class G4Material;
@@ -45,11 +46,13 @@ public:
XWrapperContinuousDiscreteProcess(const G4String& processName,
G4ProcessType);
G4int ItHasToWork(const G4Track&);
virtual ~XWrapperContinuousDiscreteProcess();
public:
void RegisterProcess(G4VContinuousDiscreteProcess*);
void RegisterProcess(G4VContinuousDiscreteProcess*,G4int);
void RegisterProcess(G4VContinuousDiscreteProcess*,G4int,G4int aBool = 0);
G4VContinuousDiscreteProcess* GetRegisteredProcess()
{return fRegisteredProcess;};
@@ -67,13 +70,14 @@ private:
const XWrapperContinuousDiscreteProcess& right);
//private data members
G4int bBothOrCrystalOrDetectorPhysics;
G4int bNucleiOrElectronFlag;
//Decide whether to use nuclei (+1) or electron (-1)
//or both (0) density to change parameters
G4VContinuousDiscreteProcess* fRegisteredProcess;
const G4Step theStepCopy;
G4ParticleChangeForNothing* fParticleChangeForNothing;
/////////////////////////////////////////////////////////
/////////////////// GEANT4 PROCESS METHODS //////////////
/////////////////////////////////////////////////////////
@@ -81,6 +85,10 @@ public:
// DO IT
virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step& );
virtual G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step& );
virtual G4VParticleChange* AtRestDoIt(const G4Track& aTrack,
const G4Step& aStep){
return fRegisteredProcess->AtRestDoIt(aTrack,aStep);
}
// GPIL
virtual G4double PostStepGetPhysicalInteractionLength (
@@ -93,6 +101,11 @@ public:
G4double,
G4double&,
G4GPILSelection*);
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track& aTrack,
G4ForceCondition* condition){
return fRegisteredProcess->AtRestGetPhysicalInteractionLength(aTrack,
condition);
};
// GENERAL
virtual void StartTracking(G4Track* aTrack);
@@ -31,6 +31,7 @@
#include "globals.hh"
#include "G4VDiscreteProcess.hh"
#include "ExExChParticleUserInfo.hh"
#include "G4ParticleChangeForNothing.hh"
class G4Material;
@@ -42,11 +43,13 @@ public:
"XWrapperDiscreteProcess" );
XWrapperDiscreteProcess(const G4String& , G4VDiscreteProcess*);
G4int ItHasToWork(const G4Track&);
virtual ~XWrapperDiscreteProcess();
public:
void RegisterProcess(G4VDiscreteProcess*);
void RegisterProcess(G4VDiscreteProcess*,G4int);
void RegisterProcess(G4VDiscreteProcess*,G4int,G4int aBool = 0);
G4double GetDensity(const G4Track&);
G4double GetDensityPreviousStep(const G4Track&);
@@ -62,8 +65,10 @@ private:
//private data members
///Decide whether to use nuclei (+1) or electron (-1) or both (0)
//density to change parameter
G4int bBothOrCrystalOrDetectorPhysics;
G4int bNucleiOrElectronFlag;
G4VDiscreteProcess* fRegisteredProcess;
G4ParticleChangeForNothing* fParticleChangeForNothing;
/////////////////////////////////////////////////////////
@@ -71,11 +76,21 @@ private:
/////////////////////////////////////////////////////////
public:
// DO IT
virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step& );
virtual G4VParticleChange* PostStepDoIt(const G4Track&,
const G4Step& );
virtual G4VParticleChange* AtRestDoIt(const G4Track& aTrack,
const G4Step& aStep){
return fRegisteredProcess->AtRestDoIt(aTrack,aStep);
}
// GPIL
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track&,
G4double, G4ForceCondition*);
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track& aTrack,
G4ForceCondition* condition){
return fRegisteredProcess->AtRestGetPhysicalInteractionLength(aTrack,
condition);
};
// GENERAL
void StartTracking(G4Track*);
@@ -84,12 +99,16 @@ public:
// PHYSICS TABLE
virtual void BuildPhysicsTable(const G4ParticleDefinition&);
virtual void PreparePhysicsTable(const G4ParticleDefinition&);
virtual G4bool StorePhysicsTable(const G4ParticleDefinition* , const G4String&, G4bool);
virtual G4bool RetrievePhysicsTable( const G4ParticleDefinition* ,const G4String&, G4bool);
virtual G4bool StorePhysicsTable(const G4ParticleDefinition*,
const G4String&, G4bool);
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition*,
const G4String&, G4bool);
protected:
// MFP
virtual G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition* );
virtual G4double GetMeanFreePath(const G4Track&,
G4double,
G4ForceCondition*);
public:
virtual void EndTracking() {fRegisteredProcess->EndTracking();};
@@ -33,6 +33,7 @@
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4SubtractionSolid.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4UniformMagField.hh"
@@ -75,6 +76,25 @@
ExExChDetectorConstruction::ExExChDetectorConstruction():
fWorldLogic(0),fXtalLogic(0){
//SiSD standard parameters
bSiSD = true;
fSSDSize = G4ThreeVector(3.8 * CLHEP::centimeter,
3.8 * CLHEP::centimeter,
640. * CLHEP::micrometer);
fSSDXtalDistance[0] = - (9998.) * CLHEP::millimeter;
fSSDXtalDistance[1] = - (320.) * CLHEP::millimeter;
fSSDXtalDistance[2] = + (10756.) * CLHEP::millimeter;
//SiSD Box standard parameters
fSSDBoxSize = G4ThreeVector(25. * CLHEP::centimeter,
25. * CLHEP::centimeter,
10. * CLHEP::centimeter);
fSSDBoxThickness = 4. * CLHEP::millimeter;
//Beampipe standard parameters
bBeamPipe = false;
fBeamPipeThickness = (0.3) * CLHEP::centimeter;
fBeamPipeRadius = (15.6) * CLHEP::centimeter;
bXtal = true;
fXtalAngle = G4ThreeVector(0.,0.,0.);
fXtalSize = G4ThreeVector(1. * CLHEP::millimeter,
@@ -114,15 +134,16 @@ void ExExChDetectorConstruction::DefineMaterials(){
G4VPhysicalVolume* ExExChDetectorConstruction::Construct(){
//** World **//
fWorldSizeXY = 20. * CLHEP::centimeter;
fWorldSizeZ = 2.2 * CLHEP::meter;
fWorldSize = G4ThreeVector(1. * CLHEP::meter,
1. * CLHEP::meter,
30. * CLHEP::meter);
fWorldMaterial = G4NistManager::
Instance()->FindOrBuildMaterial("G4_Galactic");
fWorldSolid = new G4Box("World",
fWorldSizeXY/2.,
fWorldSizeXY/2.,
fWorldSizeZ/2.);
fWorldSize.x()/2.,
fWorldSize.y()/2.,
fWorldSize.z()/2.);
fWorldLogic = new G4LogicalVolume(fWorldSolid,
fWorldMaterial,
@@ -136,55 +157,80 @@ G4VPhysicalVolume* ExExChDetectorConstruction::Construct(){
false,
0);
//** SSD **//
G4Material* Si = G4NistManager::Instance()->FindOrBuildMaterial("G4_Si");
fSSDSize = G4ThreeVector(1.92 * CLHEP::centimeter,
1.92 * CLHEP::centimeter,
0.06 * CLHEP::centimeter); //
fSSD0XtalDistance = - 1.0 * CLHEP::meter;
fSSD1XtalDistance = - 0.01 * CLHEP::meter;
fSSD2XtalDistance = + 1.0 * CLHEP::meter;
fSSDSolid = new G4Box("SiSD",
fSSDSize.x()/2.,
fSSDSize.y()/2.,
fSSDSize.z()/2.);
fSSDLogic = new G4LogicalVolume(fSSDSolid,Si,"SiSD");
new G4PVPlacement(0,
G4ThreeVector(0.,0.,fSSD0XtalDistance),
fSSDLogic,"SiSD",
fWorldLogic,
false,
0);
new G4PVPlacement(0,
G4ThreeVector(0.,0.,fSSD1XtalDistance),
fSSDLogic,
"SiSD",
fWorldLogic,
false,
1);
new G4PVPlacement(0,
G4ThreeVector(0.,0.,fSSD2XtalDistance),
fSSDLogic,
"SiSD",
fWorldLogic,
false,2
);
//** SiSD **//
if(bSiSD){
for(unsigned int i1=0;i1<3;i1++){
G4LogicalVolume* fSSDBoxLogic = ConstructSiSD(i1);
G4ThreeVector vBoxPosition =
G4ThreeVector(+fSSDBoxSize.x()/4.,
-fSSDBoxSize.y()/4.,
fSSDXtalDistance[i1]);
new G4PVPlacement(0,
vBoxPosition,
fSSDBoxLogic,"SiSD",
fWorldLogic,
false,
i1);
}
}
//** BeamPipe **//
if(bBeamPipe){
G4double fBeamPipeFromSiSDDistance = 20. * CLHEP::centimeter;
G4ThreeVector fBeamPipeA0Position =
G4ThreeVector(0.,
0.,
fSSDXtalDistance[0] + std::fabs(fSSDXtalDistance[1] -
fSSDXtalDistance[0])/2.);
G4double fBeamPipeA0Length =
std::fabs(fSSDXtalDistance[1] - fSSDXtalDistance[0]) -
2. * (fSSDSize.z()/2.) - 2. * fBeamPipeFromSiSDDistance;
G4LogicalVolume* fBeamPipeA0Logic =
ConstructBeamPipe(fBeamPipeA0Length);
new G4PVPlacement(0,
fBeamPipeA0Position,
fBeamPipeA0Logic,
"BeamPipeA0",
fWorldLogic,
false,
0);
G4ThreeVector fBeamPipeA1Position =
G4ThreeVector(0.,0.,+ std::fabs(fSSDXtalDistance[2]) /2.);
G4double fBeamPipeA1Length =
std::fabs(fSSDXtalDistance[2]) - 2. * (fSSDSize.z()/2.) -
2. * fBeamPipeFromSiSDDistance;
G4LogicalVolume* fBeamPipeA1Logic =
ConstructBeamPipe(fBeamPipeA1Length);
new G4PVPlacement(0,
fBeamPipeA1Position,
fBeamPipeA1Logic,
"BeamPipeA1",
fWorldLogic,
false,
1);
}
#ifndef G4MULTITHREADED
G4String SDname;
G4VSensitiveDetector* telescope =
new ExExChSensitiveDetector(SDname="/telescope");
G4SDManager::GetSDMpointer()->AddNewDetector(telescope);
fSSDLogic->SetSensitiveDetector(telescope);
for(unsigned int i1=0;i1<3;i1++){
fSSDLogic[i1]->SetSensitiveDetector(telescope);
}
#endif
if(bXtal) ConstructXtalTarget();
//** Crystal **//
if(bXtal){
ConstructXtalTarget();
}
return fWorldPhysical;
}
@@ -197,7 +243,9 @@ void ExExChDetectorConstruction::ConstructSDandField(){
G4VSensitiveDetector* telescope =
new ExExChSensitiveDetector(SDname="/telescope");
G4SDManager::GetSDMpointer()->AddNewDetector(telescope);
fSSDLogic->SetSensitiveDetector(telescope);
for(unsigned int i1=0;i1<3;i1++){
fSSDLogic[i1]->SetSensitiveDetector(telescope);
}
}
#else
void ExExChDetectorConstruction::ConstructSDandField(){
@@ -206,6 +254,292 @@ void ExExChDetectorConstruction::ConstructSDandField(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4LogicalVolume* ExExChDetectorConstruction::ConstructSiSD(G4int copyNo){
G4Material* Si = G4NistManager::Instance()->FindOrBuildMaterial("G4_Si");
G4Material* Al = G4NistManager::Instance()->FindOrBuildMaterial("G4_Al");
G4Material* Galactic =
G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic");
G4double fFoilThickness = 0.024 * CLHEP::millimeter;
//** SiSD Box **//
G4Box* fSSDBoxEnvelopeSolid =
new G4Box("SiSDBoxEnvelope",
fSSDBoxSize.x()/2.,
fSSDBoxSize.y()/2.,
fSSDBoxSize.z()/2. + fFoilThickness);
G4LogicalVolume* fSSDBoxEnvelopeLogic =
new G4LogicalVolume(fSSDBoxEnvelopeSolid,
Galactic,
"SiSDBoxEnvelope");
//** SiSD Active Area **//
G4Box* fSSDSolid = new G4Box("SiSD",
fSSDSize.x()/2.,
fSSDSize.y()/2.,
fSSDSize.z()/2.);
fSSDLogic[copyNo] = new G4LogicalVolume(fSSDSolid,Si,"SiSD");
//** SiSD Box **//
G4Box* fSSDBoxSolidA = new G4Box("SiSDBoxA",
fSSDBoxSize.x()/2.,
fSSDBoxSize.y()/2.,
fSSDBoxSize.z()/2.);
G4Box* fSSDBoxSolidB = new G4Box("SiSDBoxB",
fSSDBoxSize.x()/2. - fSSDBoxThickness/2.,
fSSDBoxSize.y()/2. - fSSDBoxThickness/2.,
fSSDBoxSize.z()/2. - fSSDBoxThickness/2.);
G4Box* fSSDBoxSolidC = new G4Box("SiSDBoxC",
fSSDSize.x()/2. + fSSDBoxThickness/2.,
fSSDSize.y()/2. + fSSDBoxThickness/2.,
fSSDBoxSize.z()/2.);
G4Box* fSSDBoxSolidD = new G4Box("SiSDBoxD",
fSSDSize.x()/2.,
fSSDSize.y()/2.,
fSSDBoxSize.z());
G4Box* fSSDBoxFoilSolid = new G4Box("SSDBoxFoil",
fSSDSize.x()/2.,
fSSDSize.y()/2.,
fFoilThickness);
G4SubtractionSolid* fSSDBoxSolid =
new G4SubtractionSolid("SiSDBox",
fSSDBoxSolidA,
fSSDBoxSolidB);
fSSDBoxSolid = new G4SubtractionSolid("SiSDBox",
fSSDBoxSolid,
fSSDBoxSolidC,
0,
G4ThreeVector(-fSSDBoxSize.x()/4.,
fSSDBoxSize.y()/4.,
0.));
G4SubtractionSolid* fSSDBoxInternalSolid =
new G4SubtractionSolid("SiSDBoxInternalSolid",
fSSDBoxSolidC,
fSSDBoxSolidD);
G4LogicalVolume* fSSDBoxLogic = new G4LogicalVolume(fSSDBoxSolid,
Al,
"SiSDBox");
G4LogicalVolume* fSSDBoxInternalLogic =
new G4LogicalVolume(fSSDBoxInternalSolid,
Al,
"SiSDBox");
G4LogicalVolume* fSSDBoxFoilLogic = new G4LogicalVolume(fSSDBoxFoilSolid,
Al,
"SiSDBoxFoil");
G4VisAttributes* fSSDBoxVisAttribute =
new G4VisAttributes(G4Colour(0.7,0.7,0.7));
fSSDBoxVisAttribute->SetForceSolid(true);
fSSDBoxLogic->SetVisAttributes(fSSDBoxVisAttribute);
fSSDBoxInternalLogic->SetVisAttributes(fSSDBoxVisAttribute);
G4VisAttributes* fSSDBoxFoilVisAttribute =
new G4VisAttributes(G4Colour(0.8,0.8,0.8));
fSSDBoxFoilVisAttribute->SetForceSolid(false);
fSSDBoxFoilLogic->SetVisAttributes(fSSDBoxFoilVisAttribute);
G4VisAttributes* fSiSDVisAttribute =
new G4VisAttributes(G4Colour(1.0,0.65,0.0));
fSiSDVisAttribute->SetForceSolid(true);
fSSDLogic[copyNo]->SetVisAttributes(fSiSDVisAttribute);
//** Add to Physical World **//
new G4PVPlacement(0,
G4ThreeVector(-fSSDBoxSize.x()/4.,fSSDBoxSize.y()/4.,0.),
fSSDLogic[copyNo],"SiSD",
fSSDBoxEnvelopeLogic,
false,
copyNo);
new G4PVPlacement(0,
G4ThreeVector(),
fSSDBoxLogic,"SiSDBox",
fSSDBoxEnvelopeLogic,
false,
copyNo);
new G4PVPlacement(0,
G4ThreeVector(-fSSDBoxSize.x()/4.,fSSDBoxSize.y()/4.,0.),
fSSDBoxInternalLogic,"SiSDBox",
fSSDBoxEnvelopeLogic,
false,
copyNo);
new G4PVPlacement(0,
G4ThreeVector(-fSSDBoxSize.x()/4.,
fSSDBoxSize.y()/4.,
(fSSDBoxSize.z()/2. - fFoilThickness/2.)),
fSSDBoxFoilLogic,"SiSDBoxFoil",
fSSDBoxEnvelopeLogic,
false,
copyNo);
new G4PVPlacement(0,
G4ThreeVector(-fSSDBoxSize.x()/4.,
fSSDBoxSize.y()/4.,
-(fSSDBoxSize.z()/2. - fFoilThickness/2.)),
fSSDBoxFoilLogic,"SiSDBoxFoil",
fSSDBoxEnvelopeLogic,
false,
G4int(copyNo*2+1));
return fSSDBoxEnvelopeLogic;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4LogicalVolume* ExExChDetectorConstruction::ConstructBeamPipe(G4double length){
G4Material* Galactic =
G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic");
G4Material* Mylar =
G4NistManager::Instance()->FindOrBuildMaterial("G4_MYLAR");
// Definition of vacuum
G4double z = 7.;
G4double a = 14.007*CLHEP::g/CLHEP::mole;
G4double density = CLHEP::universe_mean_density;
G4double pressure = 1.E-8 * 1.E-3 * CLHEP::bar;
G4double temperature = 300.*CLHEP::kelvin;
G4Material* Vacuum = new G4Material("Vacuum",
z,
a,
density,
kStateGas,
temperature,
pressure);
// Definition of stainless steel (not in NIST) for pipes
G4Element* elC = G4NistManager::Instance()->FindOrBuildElement("C");
G4Element* elSi = G4NistManager::Instance()->FindOrBuildElement("Si");
G4Element* elCr = G4NistManager::Instance()->FindOrBuildElement("Cr");
G4Element* elMn = G4NistManager::Instance()->FindOrBuildElement("Mn");
G4Element* elNi = G4NistManager::Instance()->FindOrBuildElement("Ni");
G4Element* elFe = G4NistManager::Instance()->FindOrBuildElement("Fe");
G4double density_SS = 8.06*CLHEP::g/CLHEP::cm3;
G4int ncomponents_SS =6;
G4double fractionmass;
G4Material* StainlessSteel =
new G4Material("StainlessSteel", density_SS, ncomponents_SS);
StainlessSteel->AddElement(elC, fractionmass=0.001);
StainlessSteel->AddElement(elSi, fractionmass=0.007);
StainlessSteel->AddElement(elCr, fractionmass=0.18);
StainlessSteel->AddElement(elMn, fractionmass=0.01);
StainlessSteel->AddElement(elFe, fractionmass=0.712);
StainlessSteel->AddElement(elNi, fractionmass=0.09);
// Visualization attributes
G4VisAttributes* fBeamPipeVisAttribute =
new G4VisAttributes(G4Colour(0.0,1.0,0.0));
fBeamPipeVisAttribute->SetForceSolid(true);
G4VisAttributes* fBeamPipeInsideVisAttribute =
new G4VisAttributes(G4Colour(0.0,0.0,1.0));
fBeamPipeInsideVisAttribute->SetForceSolid(false);
// Variables
G4double fMylarThickness = 10. * CLHEP::millimeter;
//** BeamPipe **//
G4Tubs* fBeamPipeEnvelopeSolid =
new G4Tubs("BeamPipeEnvelope",
0.,
fBeamPipeRadius + fBeamPipeThickness,
length * 0.5 + fMylarThickness * 0.5 * 4.,
0*CLHEP::deg,
360*CLHEP::deg);
G4LogicalVolume* fBeamPipeEnvelopeLogic =
new G4LogicalVolume(fBeamPipeEnvelopeSolid,
Galactic,
"BeamPipeEnvelope");
G4Tubs* fBeamPipeSolid = new G4Tubs("BeamPipe",
fBeamPipeRadius,
fBeamPipeRadius + fBeamPipeThickness,
length * 0.5,
0*CLHEP::deg,
360*CLHEP::deg);
G4LogicalVolume* fBeamPipeLogic = new G4LogicalVolume(fBeamPipeSolid,
StainlessSteel,
"BeamPipe");
fBeamPipeLogic->SetVisAttributes(fBeamPipeVisAttribute);
new G4PVPlacement(0,
G4ThreeVector(),
fBeamPipeLogic,
"BeamPipe",
fBeamPipeEnvelopeLogic,
false,
0);
G4Tubs* fBeamPipeInsideSolid = new G4Tubs("BeamPipeInside",
0.,
fBeamPipeRadius,
length * 0.5,
0*CLHEP::deg,
360*CLHEP::deg);
G4LogicalVolume* fBeamPipeInsideLogic =
new G4LogicalVolume(fBeamPipeInsideSolid,
Vacuum,
"BeamPipeInside");
fBeamPipeInsideLogic->SetVisAttributes(fBeamPipeInsideVisAttribute);
new G4PVPlacement(0,
G4ThreeVector(),
fBeamPipeInsideLogic,
"BeamPipeInside",
fBeamPipeEnvelopeLogic,
false,
0);
G4Tubs* fBeamPipeMylarSolid =
new G4Tubs("BeamPipeMylar",
0.,
fBeamPipeRadius + fBeamPipeThickness,
fMylarThickness * 0.5,
0*CLHEP::deg,
360*CLHEP::deg);
G4LogicalVolume* fBeamPipeMylarLogic =
new G4LogicalVolume(fBeamPipeMylarSolid,
Mylar,
"BeamPipeMylar");
fBeamPipeMylarLogic->SetVisAttributes(fBeamPipeInsideVisAttribute);
new G4PVPlacement(0,
G4ThreeVector(0.,
0.,
+(length + fMylarThickness * 2.) / 2.),
fBeamPipeMylarLogic,
"BeamPipeMylar",
fBeamPipeEnvelopeLogic,
false,
0);
new G4PVPlacement(0,
G4ThreeVector(0.,
0.,
-(length + fMylarThickness * 2.) / 2.),
fBeamPipeMylarLogic,
"BeamPipeMylar",
fBeamPipeEnvelopeLogic,
false,
1);
return fBeamPipeEnvelopeLogic;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExExChDetectorConstruction::ConstructXtalTarget(){
if(fXtalCurvatureRadius.x() != 0.){
double fXtalAngleOut =
@@ -103,11 +103,11 @@ void ExExChEventAction::EndOfEventAction(const G4Event* evt)
if(aHit->GetLayerID()==i2) {
SSDposition[i2] = aHit->GetWorldPos();
bTotalHits++;
}
}
}
}
if(bTotalHits > 2){
if(bTotalHits == 3){
double fAngXin = (SSDposition[1].x() - SSDposition[0].x());
fAngXin /= (SSDposition[1].z() - SSDposition[0].z());
double fAngYin = (SSDposition[1].y() - SSDposition[0].y());
@@ -37,11 +37,12 @@ ExExChParticleUserInfo::ExExChParticleUserInfo(){
fNumberOfDechanneling = 0;
fMomentumInChanneling = G4ThreeVector(0.,0.,0.);
fPositionInChanneling = G4ThreeVector(0.,0.,0.);
fMomentumInChanneling = G4ThreeVector(DBL_MAX,DBL_MAX,DBL_MAX);
fPositionInChanneling = G4ThreeVector(DBL_MAX,DBL_MAX,DBL_MAX);
fMomentumInChannelingInitial = G4ThreeVector(DBL_MAX,DBL_MAX,DBL_MAX);
fPositionInChannelingInitial = G4ThreeVector(DBL_MAX,DBL_MAX,DBL_MAX);
fInTheCrystal = false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#include "ExExChPhysListEmStandardSS.hh"
#include "G4SystemOfUnits.hh"
@@ -58,10 +57,13 @@
#include "G4eplusAnnihilation.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hBremsstrahlung.hh"
#include "G4hPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4IonParametrisedLossModel.hh"
@@ -90,47 +92,49 @@ ExExChPhysListEmStandardSS::~ExExChPhysListEmStandardSS()
void ExExChPhysListEmStandardSS::ConstructProcess()
{
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
// Add standard EM Processes
//
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
//G4cout << particleName << G4endl;
// Compton scattering
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel(),1);
G4VEmModel* theLowEPComptonModel = new G4LowEPComptonModel();
theLowEPComptonModel->SetHighEnergyLimit(20*MeV);
cs->AddEmModel(0, theLowEPComptonModel);
pmanager->AddDiscreteProcess(cs);
ph->RegisterProcess(cs, particle);
// Photoelectric
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
G4VEmModel* theLivermorePEModel =
new G4LivermorePhotoElectricModel();
theLivermorePEModel->SetHighEnergyLimit(10*GeV);
pe->SetEmModel(theLivermorePEModel,1);
pmanager->AddDiscreteProcess(pe);
ph->RegisterProcess(pe, particle);
// Gamma conversion
G4GammaConversion* gc = new G4GammaConversion();
G4VEmModel* thePenelopeGCModel =
new G4PenelopeGammaConversionModel();
thePenelopeGCModel->SetHighEnergyLimit(1*GeV);
gc->SetEmModel(thePenelopeGCModel,1);
pmanager->AddDiscreteProcess(gc);
ph->RegisterProcess(gc, particle);
// Rayleigh scattering
pmanager->AddDiscreteProcess(new G4RayleighScattering());
ph->RegisterProcess(new G4RayleighScattering(), particle);
} else if (particleName == "e-") {
//G4cout << particleName << G4endl;
// ionisation
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
eIoni->SetStepFunction(0.1, 100*um);
G4VEmModel* theIoniPenelope = new G4PenelopeIonisationModel();
theIoniPenelope->SetHighEnergyLimit(0.1*MeV);
eIoni->AddEmModel(0, theIoniPenelope, new G4UniversalFluctuation());
@@ -138,15 +142,15 @@ void ExExChPhysListEmStandardSS::ConstructProcess()
XWrapperContinuousDiscreteProcess *eIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
eIoni_wrapper->RegisterProcess(eIoni,-1);
pmanager->AddProcess(eIoni_wrapper,-1, 1, 1);
ph->RegisterProcess(eIoni_wrapper, particle);
// bremsstrahlung
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
XWrapperContinuousDiscreteProcess *eBrem_wrapper =
new XWrapperContinuousDiscreteProcess();
eBrem_wrapper->RegisterProcess(eBrem,-1);
pmanager->AddProcess(eBrem_wrapper,-1, 2, 2);
ph->RegisterProcess(eBrem_wrapper, particle);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
@@ -156,10 +160,19 @@ void ExExChPhysListEmStandardSS::ConstructProcess()
ecs->AddEmModel(0, ecsmodel);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper);
ecs_wrapper->RegisterProcess(ecs,1,1);
ph->RegisterProcess(ecs_wrapper, particle);
// multiple scattering
G4eMultipleScattering* ems = new G4eMultipleScattering();
XWrapperContinuousDiscreteProcess *ems_wrapper =
new XWrapperContinuousDiscreteProcess();
ems_wrapper->RegisterProcess(ems,0,2);
ph->RegisterProcess(ems_wrapper, particle);
} else if (particleName == "e+") {
//G4cout << particleName << G4endl;
// ionisation
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
@@ -170,21 +183,21 @@ void ExExChPhysListEmStandardSS::ConstructProcess()
XWrapperContinuousDiscreteProcess *eIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
eIoni_wrapper->RegisterProcess(eIoni,-1);
pmanager->AddProcess(eIoni_wrapper,-1, 1, 1);
ph->RegisterProcess(eIoni_wrapper, particle);
// bremsstrahlung
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
XWrapperContinuousDiscreteProcess *eBrem_wrapper =
new XWrapperContinuousDiscreteProcess();
eBrem_wrapper->RegisterProcess(eBrem,-1);
pmanager->AddProcess(eBrem_wrapper,-1, 2, 2);
ph->RegisterProcess(eBrem_wrapper, particle);
// annihilation at rest and in flight
G4eplusAnnihilation* eplusAnn = new G4eplusAnnihilation();
XWrapperDiscreteProcess *eplusAnn_wrapper =
new XWrapperDiscreteProcess();
eplusAnn_wrapper->RegisterProcess(eplusAnn,-1);
pmanager->AddProcess(eplusAnn_wrapper);
ph->RegisterProcess(eplusAnn_wrapper, particle);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
@@ -195,33 +208,41 @@ void ExExChPhysListEmStandardSS::ConstructProcess()
ecs->AddEmModel(0, ecsmodel);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper,1);
ecs_wrapper->RegisterProcess(ecs,1,1);
ph->RegisterProcess(ecs_wrapper, particle);
// multiple scattering
G4eMultipleScattering* ems = new G4eMultipleScattering();
XWrapperContinuousDiscreteProcess *ems_wrapper =
new XWrapperContinuousDiscreteProcess();
ems_wrapper->RegisterProcess(ems,0,2);
ph->RegisterProcess(ems_wrapper, particle);
} else if ((particleName == "mu+" ||
particleName == "mu-")) {
// ionisation
//G4cout << particleName << G4endl;
// ionisation
G4MuIonisation* muIoni = new G4MuIonisation();
muIoni->SetStepFunction(0.2, 50*um);
XWrapperContinuousDiscreteProcess *muIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
muIoni_wrapper->RegisterProcess(muIoni,-1);
pmanager->AddProcess(muIoni_wrapper,-1, 1, 1);
ph->RegisterProcess(muIoni_wrapper, particle);
// bremsstrahlung
G4MuBremsstrahlung* muBrem = new G4MuBremsstrahlung();
XWrapperContinuousDiscreteProcess *muBrem_wrapper =
new XWrapperContinuousDiscreteProcess();
muBrem_wrapper->RegisterProcess(muBrem,-1);
pmanager->AddProcess(muBrem_wrapper,-1, 2, 2);
ph->RegisterProcess(muBrem_wrapper, particle);
// pair production
G4MuPairProduction* muPair = new G4MuPairProduction();
XWrapperContinuousDiscreteProcess* muPair_wrapper =
new XWrapperContinuousDiscreteProcess();
muPair_wrapper->RegisterProcess(muPair,-1);
pmanager->AddProcess(muPair_wrapper,-1, 3, 3);
ph->RegisterProcess(muPair_wrapper, particle);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
@@ -231,62 +252,131 @@ void ExExChPhysListEmStandardSS::ConstructProcess()
ecs->AddEmModel(0, ecsmodel);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper);
ecs_wrapper->RegisterProcess(ecs,1,1);
ph->RegisterProcess(ecs_wrapper, particle);
// multiple scattering
XWrapperContinuousDiscreteProcess *mums_wrapper =
new XWrapperContinuousDiscreteProcess();
mums_wrapper->RegisterProcess(new G4MuMultipleScattering(),0,2);
ph->RegisterProcess(mums_wrapper, particle);
} else if ((particleName == "alpha" || particleName == "He3") ) {
//G4cout << particleName << G4endl;
// ionisation
G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetStepFunction(0.1, 10*um);
XWrapperContinuousDiscreteProcess *ionIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
ionIoni_wrapper->RegisterProcess(ionIoni,-1);
pmanager->AddProcess(ionIoni_wrapper,-1, 1, 1);
ph->RegisterProcess(ionIoni_wrapper, particle);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper);
ecs_wrapper->RegisterProcess(ecs,1,1);
ph->RegisterProcess(ecs_wrapper, particle);
// multiple scattering
XWrapperContinuousDiscreteProcess *hms_wrapper =
new XWrapperContinuousDiscreteProcess();
hms_wrapper->RegisterProcess(new G4hMultipleScattering(),0,2);
ph->RegisterProcess(hms_wrapper, particle);
} else if( particleName == "proton" ||
particleName == "pi-" ||
particleName == "pi+" ) {
//G4cout << particleName << G4endl;
// ionisation
G4hIonisation* hIoni = new G4hIonisation();
hIoni->SetStepFunction(0.1, 20*um);
XWrapperContinuousDiscreteProcess *hIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
hIoni_wrapper->RegisterProcess(hIoni,-1);
ph->RegisterProcess(hIoni_wrapper, particle);
// bremsstrahlung
G4hBremsstrahlung* hBrem = new G4hBremsstrahlung();
XWrapperContinuousDiscreteProcess *hBrem_wrapper =
new XWrapperContinuousDiscreteProcess();
hBrem_wrapper->RegisterProcess(hBrem,-1);
ph->RegisterProcess(hBrem_wrapper, particle);
// pair production
G4hPairProduction* hPair = new G4hPairProduction();
XWrapperContinuousDiscreteProcess* hPair_wrapper =
new XWrapperContinuousDiscreteProcess();
hPair_wrapper->RegisterProcess(hPair,-1);
ph->RegisterProcess(hPair_wrapper, particle);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,1,1);
ph->RegisterProcess(ecs_wrapper, particle);
// multiple scattering
XWrapperContinuousDiscreteProcess *hms_wrapper =
new XWrapperContinuousDiscreteProcess();
hms_wrapper->RegisterProcess(new G4hMultipleScattering(),0,2);
ph->RegisterProcess(hms_wrapper, particle);
} else if (particleName == "GenericIon" ) {
//G4cout << particleName << G4endl;
// ionisation
G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetStepFunction(0.1, 1*um);
XWrapperContinuousDiscreteProcess *ionIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
ionIoni_wrapper->RegisterProcess(ionIoni,-1);
pmanager->AddProcess(ionIoni_wrapper,-1, 1, 1);
ph->RegisterProcess(ionIoni_wrapper, particle);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper);
ecs_wrapper->RegisterProcess(ecs,1,1);
ph->RegisterProcess(ecs_wrapper, particle);
// multiple scattering
XWrapperContinuousDiscreteProcess *hms_wrapper =
new XWrapperContinuousDiscreteProcess();
hms_wrapper->RegisterProcess(new G4hMultipleScattering(),0,2);
ph->RegisterProcess(hms_wrapper, particle);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino") ) {
//all others charged particles except geantino
//G4cout << particleName << G4endl;
//all others charged particles except geantino
// ionisation
G4hIonisation* hIoni = new G4hIonisation();
XWrapperContinuousDiscreteProcess *hIoni_wrapper =
new XWrapperContinuousDiscreteProcess();
hIoni_wrapper->RegisterProcess(hIoni,-1);
pmanager->AddProcess(hIoni_wrapper,-1, 1, 1);
ph->RegisterProcess(hIoni_wrapper, particle);
// coulomb scattering
G4CoulombScattering* ecs = new G4CoulombScattering();
ecs->SetBuildTableFlag(false);
XWrapperDiscreteProcess *ecs_wrapper =
new XWrapperDiscreteProcess();
ecs_wrapper->RegisterProcess(ecs,0);
pmanager->AddDiscreteProcess(ecs_wrapper);
ecs_wrapper->RegisterProcess(ecs,1,1);
ph->RegisterProcess(ecs_wrapper, particle);
// multiple scattering
XWrapperContinuousDiscreteProcess *hms_wrapper =
new XWrapperContinuousDiscreteProcess();
hms_wrapper->RegisterProcess(new G4hMultipleScattering(),0,2);
ph->RegisterProcess(hms_wrapper, particle);
}
}
@@ -65,7 +65,8 @@
ExExChPhysicsList::ExExChPhysicsList(): G4VModularPhysicsList(){
fFilePotentialName = "";
fTimeStepMin = 2.E2 * CLHEP::angstrom;
fTransverseVariationMax = 2.E-2 * CLHEP::angstrom;
fParticleList = new G4DecayPhysics();
fDecayList = new G4RadioactiveDecayPhysics();
@@ -188,6 +189,8 @@ void ExExChPhysicsList::AddChanneling(){
channeling->SetNucleiDensity(vNucleiDensity);
channeling->SetElectronDensity(vElectronDensity);
channeling->SetTransverseVariationMax(fTransverseVariationMax);
channeling->SetTimeStepMin(fTimeStepMin);
if(fFilePotentialName != ""){
channeling->SetFileCharacteristicsName(fFilePotentialName);
}
@@ -29,6 +29,7 @@
#include "G4UIdirectory.hh"
#include "G4UIcmdWithABool.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4ios.hh"
ExExChPhysicsListMessenger::ExExChPhysicsListMessenger(
@@ -40,13 +41,29 @@ ExExChPhysicsListMessenger::ExExChPhysicsListMessenger(
fFilePotentialNameCmd->SetGuidance("Filename for input potential vector.");
fFilePotentialNameCmd->SetParameterName("potfilename",true);
fFilePotentialNameCmd->SetDefaultValue("");
}
fTransverseVariationMaxCmd =
new G4UIcmdWithADoubleAndUnit("/xtal/setTransVarMax",this);
fTransverseVariationMaxCmd->SetGuidance("Integration - transverse variation max");
fTransverseVariationMaxCmd->SetParameterName("trvarmax",true);
fTransverseVariationMaxCmd->SetDefaultValue(2.E-2);
fTransverseVariationMaxCmd->SetDefaultUnit("angstrom");
fTransverseVariationMaxCmd->SetRange("trvarmax>=0.0");
fTimeStepMinCmd =
new G4UIcmdWithADoubleAndUnit("/xtal/setTimeStepMin",this);
fTimeStepMinCmd->SetGuidance("Integration - time step min");
fTimeStepMinCmd->SetParameterName("timestmin",true);
fTimeStepMinCmd->SetDefaultValue(2.E0);
fTimeStepMinCmd->SetDefaultUnit("angstrom");
fTimeStepMinCmd->SetRange("timestmin>=0.0");}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ExExChPhysicsListMessenger::~ExExChPhysicsListMessenger(){
delete fFilePotentialNameCmd;
}
delete fTransverseVariationMaxCmd;
delete fTimeStepMinCmd;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -55,6 +72,12 @@ void ExExChPhysicsListMessenger::SetNewValue(G4UIcommand * command,
if( command==fFilePotentialNameCmd ){
fTarget->SetFilePotentialName(newValue);
}
if(command==fTransverseVariationMaxCmd ){
fTarget->SetTransverseVariationMax(fTransverseVariationMaxCmd->GetNewDoubleValue(newValue));
}
if(command==fTimeStepMinCmd ){
fTarget->SetTimeStepMin(fTimeStepMinCmd->GetNewDoubleValue(newValue));
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -65,7 +88,12 @@ G4String ExExChPhysicsListMessenger::GetCurrentValue(
if( command==fFilePotentialNameCmd ){
cv = fTarget->GetFilePotentialName();
}
if(command==fTransverseVariationMaxCmd ){
cv = fTransverseVariationMaxCmd->ConvertToString(fTarget->GetTransverseVariationMax());
}
if(command==fTimeStepMinCmd ){
cv = fTimeStepMinCmd->ConvertToString(fTarget->GetTimeStepMin());
}
return cv;
}
@@ -48,7 +48,7 @@ ExExChPrimaryGeneratorAction::ExExChPrimaryGeneratorAction()
fParticleGun->GetCurrentSource()->GetPosDist();
vPosDist->SetPosDisType("Beam");
vPosDist->SetPosDisShape("Circle");
vPosDist->SetCentreCoords(G4ThreeVector(0.,0.,-1.05 * CLHEP::meter));
vPosDist->SetCentreCoords(G4ThreeVector(0.,0.,(- 10.5) * CLHEP::meter));
vPosDist->SetBeamSigmaInR(0.0 * CLHEP::mm);
// Angular distribution
@@ -70,6 +70,12 @@ G4VDiscreteProcess(aName){
}
fFileCharacteristicsName = "";
fTimeStepMax = 0.;
fTimeStepMin = 2.E2 * CLHEP::angstrom;
fTransverseVariationMax = 2.E-2 * CLHEP::angstrom;
bPointYPre = -1.;
bPointYPost = -1.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -153,146 +159,170 @@ SetElectronDensity(XVCrystalCharacteristic* vElectronDensity){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool ExExChProcessChanneling::UpdateInitialParameters(const G4Track& aTrack){
if(GetInfo(aTrack)->GetPositionChanneled().x() == DBL_MAX){
// when the particle enters the crystal the position in the channel
//is randomly generated using a uniform distribution
G4double vXposition = G4UniformRand() *
GetXPL(aTrack)->ComputeInterplanarPeriod();
//vXposition = 1.0 * CLHEP::angstrom;
//initial position in the channel is stored
GetInfo(aTrack)->SetPositionChanneled(G4ThreeVector(vXposition,
0.,
0.));
GetInfo(aTrack)->SetPositionChanneledInitial(G4ThreeVector(vXposition,
0.,
0.));
}
if(GetInfo(aTrack)->GetMomentumChanneledInitial().x() == DBL_MAX){
// the first time it enter the crystal we take the momentum
// for the post step which is the only one in the crystal
G4ThreeVector vMomentum =
ComputeMomentum(aTrack,aTrack.GetStep()->GetPostStepPoint());
GetInfo(aTrack)->SetMomentumChanneled(vMomentum);
GetInfo(aTrack)->SetMomentumChanneledInitial(vMomentum);
return true;
}
return false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChProcessChanneling::UpdateParameters(const G4Track& aTrack){
if(fIntegratedDensity->HasBeenInitialized(GetXPhysicalLattice(aTrack))
if(fIntegratedDensity->HasBeenInitialized(GetXPL(aTrack))
== false){
ComputeCrystalCharacteristic(aTrack);
G4cout << "ChannelingProcess::UpdatePositionMomentumDensity::";
G4cout<<"fIntegratedDensity->Initialized" << G4endl;
}
UpdatePosition(aTrack);
UpdateMomentum(aTrack);
UpdateDensity(aTrack);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ExExChProcessChanneling::UpdatePosition(const G4Track& aTrack){
if(UpdateInitialParameters(aTrack) == false){
G4ThreeVector vMomentumNew =
ComputeMomentum(aTrack,
aTrack.GetStep()->GetPreStepPoint());
GetInfo(aTrack)->SetMomentumChanneled(vMomentumNew);
}
G4ThreeVector vPositionPost =
ComputePositionInTheCrystal(aTrack.GetStep()->GetPostStepPoint(),aTrack);
G4ThreeVector vPositionPre =
ComputePositionInTheCrystal(aTrack.GetStep()->GetPreStepPoint(),aTrack);
if(GetInfo(aTrack)->GetPositionChanneledInitial().x() == DBL_MAX ||
HasLatticeOnBoundaryPost(aTrack)){
// when the particle enters the crystal the position in the channel
//is randomly generated using a uniform distribution
G4double vXposition = G4UniformRand() *
GetXPhysicalLattice(aTrack)->ComputeInterplanarPeriod();
//initial position in the channel is stored
GetInfo(aTrack)->SetPositionChanneledInitial(G4ThreeVector(vXposition,
0.,
0.));
//initial position for the measurement of apparent centrifugal force
//is zero at crystal entrance
GetInfo(aTrack)->SetPositionChanneled(G4ThreeVector(0.,0.,0.));
bHasToComputeTrajectory = true;
if(vPositionPost.y() == bPointYPost &&
vPositionPre.y() == bPointYPre){
bHasToComputeTrajectory = false;
}
else{
G4double vPositionX = GetInfo(aTrack)->GetPositionChanneled().x();
//if the particle has been under channeling the position
//for the measurement of the apparent centrifugal force is reset
if(GetInfo(aTrack)->HasBeenUnderCoherentEffect() == 1){
GetInfo(aTrack)->SetPositionChanneled(G4ThreeVector(0.,0.,0.));
if(GetXPL(aTrack)->IsBent()){
bPointYPre = vPositionPre.y();
bPointYPost = vPositionPost.y();
}
else{
//if the particle has not been under channeling the distance
//between the new and the old point is computed for the evaluation
//of the centrifugal potential acting on the particle
vPositionX += (ComputePositionInTheCrystal(
aTrack.GetStep()->GetPostStepPoint(),
aTrack).x() - ComputePositionInTheCrystal(
aTrack.GetStep()->GetPreStepPoint(),
aTrack).x());
GetInfo(aTrack)->SetPositionChanneled(G4ThreeVector(vPositionX,
0.,
0.));
bPointYPre = vPositionPre.z();
bPointYPost = vPositionPost.z();
}
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector fMom = GetInfo(aTrack)->GetMomentumChanneled();
G4ThreeVector fPos = GetInfo(aTrack)->GetPositionChanneled();
G4ThreeVector fMomHalf = GetInfo(aTrack)->GetMomentumChanneled();
G4ThreeVector fPosHalf = GetInfo(aTrack)->GetPositionChanneled();
void ExExChProcessChanneling::UpdateMomentum(const G4Track& aTrack){
if(GetInfo(aTrack)->GetMomentumChanneledInitial().x() == DBL_MAX){
// the first time it enter the crystal we take the momentum
// for the post step which is the only one in the crystal
G4ThreeVector vMomentum =
ComputeMomentum(aTrack,aTrack.GetStep()->GetPostStepPoint());
GetInfo(aTrack)->SetMomentumChanneled(vMomentum);
GetInfo(aTrack)->SetMomentumChanneledInitial(
GetInfo(aTrack)->GetMomentumChanneled());
if(GetXPL(aTrack)->IsBent()){
fIntegrationPeriod = (vPositionPost.phi() - vPositionPre.phi())*
GetXPL(aTrack)->GetCurvatureRadius().x();
fIntegrationPeriod = vPositionPost.y() - vPositionPre.y();
}
else{
// we take the PREVIOUS step point to compare,
// otherwise the momentum is not computed correctly
G4ThreeVector vMomentum =
G4ThreeVector(GetInfo(aTrack)->GetMomentumChanneled().x(),
GetInfo(aTrack)->GetMomentumChanneled().y(),0.);
vMomentum+=ComputeMomentum(aTrack,aTrack.GetStep()->GetPreStepPoint());
GetInfo(aTrack)->SetMomentumChanneled(vMomentum);
fIntegrationPeriod = vPositionPost.z() - vPositionPre.z();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
fTimeStepTotal = 0.;
void ExExChProcessChanneling::UpdateDensity(const G4Track& aTrack){
if(GetInfo(aTrack)->HasBeenUnderCoherentEffect() == 1){
G4double vTransverseEnergy = ComputeTransverseEnergy(aTrack).x();
if(GetXPhysicalLattice(aTrack)->IsBent()){
if(GetInfo(aTrack)->HasBeenUnderCoherentEffect() == 1){
if(ParticleIsNegative(aTrack)){
vTransverseEnergy -=
ComputeCentrifugalEnergyMaximumVariation(aTrack).x();
}
else{
vTransverseEnergy +=
ComputeCentrifugalEnergyMaximumVariation(aTrack).x();
}
G4double vNucleiDensity=0.;
G4double vElectronDensity=0.;
if(fIntegrationPeriod>0. && bHasToComputeTrajectory==true){
G4double kBeta = 0.;
G4double kPos = 0.;
G4double kMom = 0.;
G4double kBR = 0.;
G4double Z = 0.;
do{
UpdateIntegrationStep(aTrack,fMom);
fPosHalf = fPos;
fMomHalf = fMom;
kBeta = aTrack.GetVelocity()/c_light;
if(fMom.z()!=0.){
kPos = fTimeStep / fMom.z();
}
}
G4double vCharge = GetParticleDefinition(aTrack)->GetPDGCharge();
G4double vNucleiDensity =
fIntegratedDensity->GetIntegratedDensityNuclei(vTransverseEnergy,
GetXPhysicalLattice(aTrack),
G4int(vCharge));
G4double vElectronDensity =
fIntegratedDensity->GetIntegratedDensityElectron(vTransverseEnergy,
GetXPhysicalLattice(aTrack),
G4int(vCharge));
G4double vLowerBoundNegative = 1.;
G4double vLowerBoundPositive = 0.01;
if(ParticleIsNegative(aTrack)){
if(vNucleiDensity < vLowerBoundNegative)
{vNucleiDensity = vLowerBoundNegative;}
if(vElectronDensity < vLowerBoundNegative)
{vElectronDensity = vLowerBoundNegative;}
}
else{
if(vNucleiDensity < vLowerBoundPositive)
{vNucleiDensity = vLowerBoundPositive;}
if(vElectronDensity < vLowerBoundPositive)
{vElectronDensity = vLowerBoundPositive;}
}
else{
kPos = fTimeStep / 1.E-20;
}
kMom = fTimeStep / kBeta;
kBR = fTimeStep * (fMom.z() * kBeta);;
Z = GetParticleDefinition(aTrack)->GetPDGCharge();
fPosHalf += (fMom * kPos * 0.5);
fMomHalf +=
(GetElectricField()->GetEC(fPos,GetXPL(aTrack))
* Z * kMom * 0.5);
if(GetXPL(aTrack)->IsBent()){
G4double temp =
fMomHalf.x() + kBR * 0.5 /
(GetXPL(aTrack)->GetCurvatureRadius()).x();
fMomHalf.setX(temp);
}
fPos += (fMomHalf * kPos);
fMom +=
(GetElectricField()->GetEC(fPosHalf,GetXPL(aTrack))
* Z * kMom );
if(GetXPL(aTrack)->IsBent()){
G4double temp =
fMom.x() + kBR /
(GetXPL(aTrack)->GetCurvatureRadius()).x();
fMom.setX(temp);
}
fTimeStepTotal += fTimeStep;
vNucleiDensity +=
(fTimeStep *
(GetNucleiDensity()->GetEC(fPos,GetXPL(aTrack)).x()
+GetNucleiDensity()->GetEC(fPos,GetXPL(aTrack)).x()
) * 0.5);
vElectronDensity +=
(fTimeStep * (
GetElectronDensity()->GetEC(fPos,GetXPL(aTrack)).x() +
GetElectronDensity()->GetEC(fPos,GetXPL(aTrack)).x()) * 0.5);
} while(fTimeStepTotal<fIntegrationPeriod);
vNucleiDensity /= fIntegrationPeriod;
vElectronDensity /= fIntegrationPeriod;
GetInfo(aTrack)->SetNucleiDensity(vNucleiDensity);
GetInfo(aTrack)->SetElectronDensity(vElectronDensity);
}
else{
ResetDensity(aTrack);
}
GetInfo(aTrack)->SetMomentumChanneled(fMom);
GetInfo(aTrack)->SetPositionChanneled(fPos);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -306,117 +336,6 @@ void ExExChProcessChanneling::ResetDensity(const G4Track& aTrack){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector ExExChProcessChanneling::
ComputeChannelingOutgoingMomentum(const G4Track& aTrack){
G4StepPoint* vStepPre = aTrack.GetStep()->GetPreStepPoint();
G4StepPoint* vStepPost = aTrack.GetStep()->GetPostStepPoint();
G4double vTotalEnergy = vStepPre->GetTotalEnergy();
G4double vTransverseEnergyX = std::fabs(ComputeTransverseEnergy(aTrack).x());
G4double vTransverseEnergyY = std::fabs(ComputeTransverseEnergy(aTrack).y());
double vPotentialEnergyX = 0.;
double vPotentialEnergyY = 0.;
bool bExit = false;
do{
G4double vXposition = G4UniformRand() *
GetXPhysicalLattice(aTrack)->ComputeInterplanarPeriod();
GetInfo(aTrack)->SetPositionChanneledInitial(G4ThreeVector(vXposition,
0.,
0.));
vPotentialEnergyX = ComputePotentialEnergy(aTrack).x();
vPotentialEnergyY = ComputePotentialEnergy(aTrack).y();
if(vPotentialEnergyX<=vTransverseEnergyX &&
vPotentialEnergyY<=vTransverseEnergyY){
bExit = true;
}
} while(bExit == false);
vTransverseEnergyX-=vPotentialEnergyX;
vTransverseEnergyY-=vPotentialEnergyY;
G4double vChAngleX = std::pow(+ 2. * std::fabs(vTransverseEnergyX)
/ vTotalEnergy , 0.5);
G4double vChAngleY = std::pow(+ 2. * std::fabs(vTransverseEnergyY)
/ vTotalEnergy , 0.5);
G4double vPhi = 2. * ( G4UniformRand() - 0.5) * vChAngleX;
G4double vTheta = 2. * ( G4UniformRand() - 0.5) * vChAngleY;
G4ThreeVector vNewMomentum =
G4ThreeVector(0.,0.,1.).rotate(G4ThreeVector(0,1,0),- vPhi)
.rotate(G4ThreeVector(1,0,0),- vTheta);
G4ThreeVector vPosition = ComputePositionInTheCrystal(vStepPost,aTrack);
return GetXPhysicalLattice(aTrack)->
ProjectMomentumVectorFromLatticeToWorld(vNewMomentum,vPosition);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector ExExChProcessChanneling::
ComputeVolumeReflectionOutgoingMomentum(const G4Track& aTrack){
G4StepPoint* vStep = aTrack.GetStep()->GetPostStepPoint();
G4double vVrAngle = 0.;
if(GetXPhysicalLattice(aTrack)->IsBent()) {
G4double vRadiusX = GetXPhysicalLattice(aTrack)->
GetCurvatureRadius().x();
G4double vTotalEnergy = vStep->GetTotalEnergy();
G4double vEnergyMax =
std::fabs(ComputeCriticalEnergyMaximum(aTrack)
- ComputeCriticalEnergyMinimum(aTrack));
G4double vEnergyRMS =
std::fabs(ComputeCentrifugalEnergyMaximumVariation(aTrack).x());
G4double vTransverseEnergy =
vEnergyMax + (G4UniformRand() * std::fabs(vEnergyRMS) );
vVrAngle = - std::fabs(vRadiusX)/vRadiusX *
std::pow(+ 2. * std::fabs(vTransverseEnergy) / vTotalEnergy , 0.5);
if(ParticleIsNegative(aTrack)){
vVrAngle *= 0.8; // = see PLB 681 (2009) 233
}
else{
vVrAngle *= 1.4;
}
G4ThreeVector vMomentumChanneled =
GetInfo(aTrack)->GetMomentumChanneled();
G4double vAngleRatio =
(vMomentumChanneled.x()/vTotalEnergy)/ComputeCriticalAngle(aTrack);
if(std::fabs(vAngleRatio)<1.5){
vVrAngle *= (-(std::fabs(vAngleRatio) - 1.5)/3.);
}
}
G4double vOmega = GetXPhysicalLattice(aTrack)->GetLatticeAngles().y();
G4double vPhi = vVrAngle * std::cos(vOmega);
G4double vTheta = vVrAngle * std::sin(vOmega);
G4ThreeVector vNewMomentum =
aTrack.GetMomentum().unit()
.rotate(G4ThreeVector(0.,1.,0.), - vPhi)
.rotate(G4ThreeVector(1.,0.,0.), -vTheta);
return vNewMomentum.unit();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector ExExChProcessChanneling::
ComputePositionInTheCrystal(G4StepPoint* vStep,const G4Track& aTrack){
@@ -431,7 +350,7 @@ ComputePositionInTheCrystal(G4StepPoint* vStep,const G4Track& aTrack){
theTouchable->GetHistory()->GetTopTransform().TransformPoint(vWorldPos);
if(GetXPhysicalLattice(aTrack)->IsBent() == false){
if(GetXPL(aTrack)->IsBent() == false){
G4Box* vXtalSolid =
(G4Box*) vStepVol->GetPhysicalVolume()
->GetLogicalVolume()->GetSolid();
@@ -450,29 +369,6 @@ ComputePositionInTheCrystal(G4StepPoint* vStep,const G4Track& aTrack){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double ExExChProcessChanneling::
ComputeDistanceWhereParticleTangentToBentPlane(const G4Track& aTrack){
G4ThreeVector vPositionPre =
ComputePositionInTheCrystal(aTrack.GetStep()->GetPreStepPoint(),aTrack);
G4ThreeVector vMomentumPre =
GetXPhysicalLattice(aTrack)->
ProjectMomentumVectorFromWorldToLattice(
aTrack.GetStep()->GetPreStepPoint()->GetMomentum(),
vPositionPre);
G4double vDeltaProportion = 1.;
if((vMomentumPre.x())!=0.){
vDeltaProportion = std::fabs(vMomentumPre.unit().x());
}
G4double vDeltaPosition = vDeltaProportion*
GetXPhysicalLattice(aTrack)->GetCurvatureRadius().x();
return std::abs(vDeltaPosition);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4StepPoint* ExExChProcessChanneling::
CheckStepPointLatticeForVolume(G4StepPoint* vStep, const G4Track& aTrack){
@@ -535,86 +431,59 @@ CheckStepPointLatticeForPosition(G4StepPoint* vStep, const G4Track& aTrack){
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool ExExChProcessChanneling::
IsUnderCoherentEffect(const G4Track& aTrack){
//----------------------------------------
// check if the particle momentum
// transverse to the (h,k,l) plane
// is small enough to permit channeling
//----------------------------------------
UpdateIntegrationStep(const G4Track& aTrack,G4ThreeVector& vMom){
UpdateParameters(aTrack);
G4double vEnergyMax = ComputeCriticalEnergyMaximum(aTrack);
G4double vTransverseEnergy = ComputeTransverseEnergy(aTrack).x();
if(GetXPhysicalLattice(aTrack)->IsBent() == false){
if(vTransverseEnergy <= vEnergyMax){
GetInfo(aTrack)->SetCoherentEffect(1);
// the particle is in channeling
return true;
}
}
else{
G4ThreeVector vPositionInTheCrystal =
GetInfo(aTrack)->GetPositionChanneled()
+ GetInfo(aTrack)->GetPositionChanneledInitial();
vTransverseEnergy += std::fabs(ComputeCentrifugalEnergy(aTrack,
vPositionInTheCrystal).x());
if(vTransverseEnergy <= vEnergyMax){
// the particle is in channeling
GetInfo(aTrack)->SetCoherentEffect(1);
return true;
if(vMom.x() != 0.0 || vMom.y() != 0.0){
double xy2 = vMom.x() * vMom.x() + vMom.y()*vMom.y();
if(xy2!=0.){
fTimeStep =
std::fabs(fTransverseVariationMax *
aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy() /
std::pow(xy2,0.5));
if(fTimeStep < fTimeStepMin) fTimeStep = fTimeStepMin;
else{
fTimeStepMax = std::sqrt( fTransverseVariationMax *
aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy() /
std::fabs(fElectricField->GetMaximum(GetXPL(aTrack))));
if(fTimeStep > fTimeStepMax) fTimeStep = fTimeStepMax;
}
}
else{
G4bool bNotBoundary = ParticleIsNotOnBoundary(aTrack);
G4bool bTangentToPlane = ParticleIsTangentToBentPlane(aTrack);
if(bTangentToPlane == true &&
bNotBoundary == true &&
GetInfo(aTrack)->HasBeenUnderCoherentEffect() != 2){
// the particle is in volume reflection
GetInfo(aTrack)->SetCoherentEffect(2);
return true;
}
}
fTimeStep = fTimeStepMin;
}
if(fTimeStep + fTimeStepTotal > fIntegrationPeriod){
fTimeStep = fIntegrationPeriod - fTimeStepTotal;
}
return true;
}
else{
fTimeStep = fTimeStepMin;
}
// the particle is not under coherent effect
GetInfo(aTrack)->SetCoherentEffect(0);
return false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double ExExChProcessChanneling::
GetChannelingMeanFreePath(const G4Track& aTrack){
//----------------------------------------
// return the channeling MFP
//----------------------------------------
G4double vMFPosc = ComputeOscillationPeriod(aTrack);
if(GetInfo(aTrack)->GetNucleiDensity() < 1.){
vMFPosc /= GetInfo(aTrack)->GetNucleiDensity();
G4double vMFP = 0.1 * ComputeOscillationPeriod(aTrack);
if(HasLatticeOnBoundaryPre(aTrack) == true){
vMFP = 0.001 * ComputeOscillationPeriod(aTrack);
}
G4double vMFP = vMFPosc * 2.;
if(GetXPhysicalLattice(aTrack)->IsBent()){
G4double vMFPVR =
ComputeDistanceWhereParticleTangentToBentPlane(aTrack);
if((std::fabs(vMFPVR) < vMFP) && (std::fabs(vMFPVR) > (0.5 * vMFPosc))){
vMFP = vMFPVR;
}
}
return vMFP;
}
@@ -634,9 +503,11 @@ GetMeanFreePath(const G4Track& aTrack,
*condition = Forced;
if(HasLattice(aTrack)){
GetInfo(aTrack)->SetInTheCrystal(true);
return GetChannelingMeanFreePath(aTrack);
}
else{
GetInfo(aTrack)->SetInTheCrystal(false);
return DBL_MAX;
}
}
@@ -661,51 +532,33 @@ PostStepDoIt(const G4Track& aTrack,
GetInfo(aTrack)->StoreDensityPreviousStep();
G4bool bIsUnderCoherentEffect = false;
if((HasLattice(aTrack) == true) &&
(ParticleIsNotOnBoundaryPost(aTrack) == true)){
bIsUnderCoherentEffect = IsUnderCoherentEffect(aTrack);
if(bIsUnderCoherentEffect){
if(GetInfo(aTrack)->HasBeenUnderCoherentEffect() == 1){
// if the particle is in channeling it gives the direction
// of the lattice to the particle momentum
G4ThreeVector vPosition =
ComputePositionInTheCrystal(
aTrack.GetStep()->GetPostStepPoint(),aTrack);
aParticleChange.ProposeMomentumDirection(
GetXPhysicalLattice(aTrack)->
GetLatticeDirection(vPosition).unit());
}
else if(GetInfo(aTrack)->HasBeenUnderCoherentEffect() == 2){
// if the particle is in VR it gives a kick
// to the opposite site of the bending to the particle
aParticleChange.ProposeMomentumDirection(
ComputeVolumeReflectionOutgoingMomentum(aTrack));
GetInfo(aTrack)->SetCoherentEffect(0);
ResetDensity(aTrack);
}
}
(HasLatticeOnBoundaryPost(aTrack) == false)){
UpdateParameters(aTrack);
G4ThreeVector vMomentum =
GetInfo(aTrack)->GetMomentumChanneled().unit();
G4ThreeVector vPosition;
vPosition =
ComputePositionInTheCrystal(aTrack.GetStep()->GetPostStepPoint(),
aTrack);
GetXPL(aTrack)->ProjectMomentumVectorFromLatticeToWorld(vMomentum,
vPosition);
aParticleChange.ProposeMomentumDirection(vMomentum.unit());
}
else{
// if the volume has no lattice it resets the density factors
ResetDensity(aTrack);
}
if( (bIsUnderCoherentEffect == false && (HasLattice(aTrack) == true) )
|| (HasLatticeOnBoundaryPre(aTrack) == true) ) {
// if has been under coherent effect but now it is not,
// the outgoing momentum is evaluated starting from the current position
if(GetInfo(aTrack)->HasBeenUnderCoherentEffect() == 1){
aParticleChange.ProposeMomentumDirection(
ComputeChannelingOutgoingMomentum(aTrack));
}
// If is not under coherent effect sets coherent effect to zero
// and resets the density factors after the outgoing angle
// has been evaluated
GetInfo(aTrack)->SetCoherentEffect(0);
ResetDensity(aTrack);
GetInfo(aTrack)->SetMomentumChanneled(G4ThreeVector(DBL_MAX,
DBL_MAX,
DBL_MAX));
GetInfo(aTrack)->SetPositionChanneled(G4ThreeVector(DBL_MAX,
DBL_MAX,
DBL_MAX));
}
return &aParticleChange;
@@ -724,10 +577,10 @@ ComputeTransverseEnergy(const G4Track& aTrack){
G4ThreeVector vTransverseEnergy = ComputePotentialEnergy(aTrack)
+ ComputeKineticEnergy(aTrack);
//while(!getchar());
return vTransverseEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector ExExChProcessChanneling::
ComputeKineticEnergy(const G4Track& aTrack){
//----------------------------------------
@@ -759,8 +612,8 @@ ComputePotentialEnergy(const G4Track& aTrack){
G4ThreeVector vPotentialEnergy =
fPotentialEnergy->GetEC(GetInfo(aTrack)->GetPositionChanneledInitial(),
GetXPhysicalLattice(aTrack));
fPotentialEnergy->GetEC(GetInfo(aTrack)->GetPositionChanneled(),
GetXPL(aTrack));
vPotentialEnergy *= GetParticleDefinition(aTrack)->GetPDGCharge();
@@ -781,11 +634,18 @@ ComputeCentrifugalEnergy(const G4Track& aTrack,G4ThreeVector vPosition){
G4double vPositionX = vPosition.x();
G4ThreeVector vEnergyVariation =
if(ParticleIsNegative(aTrack) && false){
vPositionX -=
GetXPL(aTrack)->ComputeInterplanarPeriod() * 0.5;
}
G4ThreeVector vEnergyVariation = G4ThreeVector();;
if(GetXPL(aTrack)->IsBent()){
vEnergyVariation =
G4ThreeVector(vTotalEnergy * vPositionX /
GetXPhysicalLattice(aTrack)->GetCurvatureRadius().x(),
GetXPL(aTrack)->GetCurvatureRadius().x(),
0.,
0.);
}
return vEnergyVariation;
}
@@ -801,11 +661,11 @@ ComputeMomentum(const G4Track& aTrack,G4StepPoint* vStep){
G4ThreeVector vPosition = ComputePositionInTheCrystal(vStep,aTrack);
G4ThreeVector vMomentum =
GetXPhysicalLattice(aTrack)->
ProjectMomentumVectorFromWorldToLattice(aTrack.GetMomentum(),
vPosition);
G4ThreeVector vMomentum = aTrack.GetMomentum();
GetXPL(aTrack)->
ProjectMomentumVectorFromWorldToLattice(vMomentum,vPosition);
return vMomentum;
}
@@ -821,11 +681,14 @@ ComputeCentrifugalEnergyMaximumVariation(const G4Track& aTrack){
G4double vTotalEnergy =
aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy();
G4ThreeVector vEnergyVariation = G4ThreeVector(vTotalEnergy *
GetXPhysicalLattice(aTrack)->ComputeInterplanarPeriod() /
GetXPhysicalLattice(aTrack)->GetCurvatureRadius().x(),
G4ThreeVector vEnergyVariation = G4ThreeVector();
if(GetXPL(aTrack)->IsBent()){
vEnergyVariation = G4ThreeVector(vTotalEnergy *
GetXPL(aTrack)->ComputeInterplanarPeriod() /
GetXPL(aTrack)->GetCurvatureRadius().x(),
0.,
0.);
}
return vEnergyVariation;
}
@@ -846,11 +709,11 @@ ComputeCriticalEnergyMaximum(const G4Track& aTrack){
if(ParticleIsNegative(aTrack)){
vCriticalEnergy =
- fPotentialEnergy->GetMinimum(GetXPhysicalLattice(aTrack));
- fPotentialEnergy->GetMinimum(GetXPL(aTrack));
}
else{
vCriticalEnergy =
+ fPotentialEnergy->GetMaximum(GetXPhysicalLattice(aTrack));
+ fPotentialEnergy->GetMaximum(GetXPL(aTrack));
}
vCriticalEnergy *= std::fabs(GetParticleDefinition(aTrack)->GetPDGCharge());
@@ -871,11 +734,11 @@ ComputeCriticalEnergyMinimum(const G4Track& aTrack){
if(ParticleIsNegative(aTrack)){
vCriticalEnergy =
- fPotentialEnergy->GetMaximum(GetXPhysicalLattice(aTrack));
- fPotentialEnergy->GetMaximum(GetXPL(aTrack));
}
else{
vCriticalEnergy =
+ fPotentialEnergy->GetMinimum(GetXPhysicalLattice(aTrack));
+ fPotentialEnergy->GetMinimum(GetXPL(aTrack));
}
vCriticalEnergy *= std::fabs(GetParticleDefinition(aTrack)->GetPDGCharge());
@@ -911,7 +774,7 @@ ComputeOscillationPeriod(const G4Track& aTrack){
//----------------------------------------
G4double vInterplanarPeriod =
GetXPhysicalLattice(aTrack)->ComputeInterplanarPeriod();
GetXPL(aTrack)->ComputeInterplanarPeriod();
G4double vOscillationPeriod =
CLHEP::pi * vInterplanarPeriod / ComputeCriticalAngle(aTrack);
return vOscillationPeriod;
@@ -928,8 +791,12 @@ ComputeCriticalRadius(const G4Track& aTrack){
G4double vTotalEnergy =
aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy();
G4double vCriticalRadius =
vTotalEnergy / fElectricField->GetMaximum(GetXPhysicalLattice(aTrack));
G4double vCriticalRadius = 1.E-20;
if(fElectricField->GetMaximum(GetXPL(aTrack)) != 0.){
vCriticalRadius = vTotalEnergy
/ fElectricField->GetMaximum(GetXPL(aTrack));
}
return vCriticalRadius;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -942,11 +809,11 @@ ComputePotentialWellCentre(const G4Track& aTrack){
//----------------------------------------
G4double vInterplanarPeriodHalf =
0.5 * GetXPhysicalLattice(aTrack)->ComputeInterplanarPeriod();
0.5 * GetXPL(aTrack)->ComputeInterplanarPeriod();
G4double vCentreX = vInterplanarPeriodHalf;
if(GetXPhysicalLattice(aTrack)->IsBent()){
if(GetXPL(aTrack)->IsBent()){
G4double vTotalEnergy =
aTrack.GetStep()->GetPreStepPoint()->GetTotalEnergy();
@@ -956,7 +823,7 @@ ComputePotentialWellCentre(const G4Track& aTrack){
vCentreX *= (1. - 0.5 * vTotalEnergy /
vPotentialWellDepth /
GetXPhysicalLattice(aTrack)->GetCurvatureRadius().x() *
GetXPL(aTrack)->GetCurvatureRadius().x() *
vInterplanarPeriodHalf );
}
@@ -986,7 +853,7 @@ BuildPhysicsTable(const G4ParticleDefinition&){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XPhysicalLattice* ExExChProcessChanneling::
GetXPhysicalLattice(const G4Track& aTrack){
GetXPL(const G4Track& aTrack){
if(fLatticeManager->HasLattice(
aTrack.GetStep()->GetPostStepPoint()->GetPhysicalVolume())){
return fLatticeManager->GetXPhysicalLattice(aTrack.GetStep()
@@ -1035,7 +902,7 @@ G4bool ExExChProcessChanneling::
HasLatticeOnBoundaryPre(const G4Track& aTrack){
if(fLatticeManager->HasLattice(aTrack.GetStep()->GetPreStepPoint()->
GetPhysicalVolume()) &&
aTrack.GetStep()->GetPostStepPoint()->GetStepStatus() == fGeomBoundary) {
aTrack.GetStep()->GetPreStepPoint()->GetStepStatus() == fGeomBoundary) {
return true;
}
else{
@@ -1049,7 +916,7 @@ G4bool ExExChProcessChanneling::
HasLatticeOnBoundaryPost(const G4Track& aTrack){
if(fLatticeManager->HasLattice(aTrack.GetStep()->
GetPostStepPoint()->GetPhysicalVolume()) &&
aTrack.GetStep()->GetPreStepPoint()->GetStepStatus() == fGeomBoundary) {
aTrack.GetStep()->GetPostStepPoint()->GetStepStatus() == fGeomBoundary) {
return true;
}
else{
@@ -1070,36 +937,6 @@ G4bool ExExChProcessChanneling::ParticleIsNegative(const G4Track& aTrack){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool ExExChProcessChanneling::
ParticleIsTangentToBentPlane(const G4Track& aTrack){
G4ThreeVector vPositionPre =
ComputePositionInTheCrystal(aTrack.GetStep()->GetPreStepPoint(),aTrack);
G4ThreeVector vMomentumPre =
GetXPhysicalLattice(aTrack)->
ProjectMomentumVectorFromWorldToLattice(aTrack.GetStep()->
GetPreStepPoint()->GetMomentum(),vPositionPre);
G4ThreeVector vPositionPost =
ComputePositionInTheCrystal(aTrack.GetStep()->
GetPostStepPoint(),aTrack);
G4ThreeVector vMomentumPost = GetXPhysicalLattice(aTrack)->
ProjectMomentumVectorFromWorldToLattice(aTrack.GetStep()->
GetPostStepPoint()->GetMomentum(),vPositionPost);
if(vMomentumPost.x()<0. &&
vMomentumPre.x()>0. &&
GetXPhysicalLattice(aTrack)->GetCurvatureRadius().x() < 0.){
return true;
}
if(vMomentumPost.x()>0. &&
vMomentumPre.x()<0. &&
GetXPhysicalLattice(aTrack)->GetCurvatureRadius().x() > 0.){
return true;
}
return false;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool ExExChProcessChanneling::
@@ -1155,22 +992,39 @@ GetParticleDefinition(const G4Track& aTrack){
void ExExChProcessChanneling::
ComputeCrystalCharacteristic(const G4Track& aTrack){
fIntegratedDensity->SetXPhysicalLattice(GetXPhysicalLattice(aTrack));
fIntegratedDensity->SetXPhysicalLattice(GetXPL(aTrack));
fIntegratedDensity->InitializeTables();
if(fFileCharacteristicsName != ""){
G4String filename;
fPotentialEnergy->ReadFromECHARM(filename =
fFileCharacteristicsName + "_pot.txt");
//fElectricField->ReadFromECHARM("efx.txt");
fElectricField->InitializePhysicalLattice(GetXPhysicalLattice(aTrack));
fElectronDensity->InitializePhysicalLattice(GetXPL(aTrack));
fNucleiDensity->InitializePhysicalLattice(GetXPL(aTrack));
fPotentialEnergy->InitializePhysicalLattice(GetXPL(aTrack));
fElectricField->InitializePhysicalLattice(GetXPL(aTrack));
filename = fFileCharacteristicsName + "_pot.txt";
G4cout << filename << G4endl;
fPotentialEnergy->ReadFromECHARM(filename,CLHEP::eV);
fPotentialEnergy->PrintOnFile("temppot.dat",GetXPL(aTrack));
filename = fFileCharacteristicsName + "_efx.txt";
G4cout << filename << G4endl;
fElectricField->ReadFromECHARM(filename,CLHEP::eV/CLHEP::m);
fElectricField->PrintOnFile("tempefx.dat",GetXPL(aTrack));
filename = fFileCharacteristicsName + "_atd.txt";
G4cout << filename << G4endl;
fNucleiDensity->ReadFromECHARM(filename);
filename = fFileCharacteristicsName + "_eld.txt";
G4cout << filename << G4endl;
fElectronDensity->ReadFromECHARM(filename);
fIntegratedDensity->ReadFromFiles(fFileCharacteristicsName);
}
else{
fPotentialEnergy->InitializePhysicalLattice(
GetXPhysicalLattice(aTrack));
fElectricField->InitializePhysicalLattice(GetXPhysicalLattice(aTrack));
GetXPL(aTrack));
fElectricField->InitializePhysicalLattice(GetXPL(aTrack));
}
}
@@ -32,14 +32,41 @@
#include "ExExChEventAction.hh"
#include "ExExChRunAction.hh"
#include "G4GeneralParticleSource.hh"
#include "G4ParticleTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExExChUserActionInitialization::ExExChUserActionInitialization() {
//AND->3June2014, temporary to take into account new GPS
//Create an instance of GPS in master so shared resources and messenger
//exist in master.
//GPS is special: it is thread-private,
//but underlying parameters and objects governing
//the distributions are shared among threads.
//We need to be sure that the defaults are set only once by master
masterGPS = new G4GeneralParticleSource();
//AND<-3June2014
masterGPS->SetParticleDefinition(G4ParticleTable::
GetParticleTable()->FindParticle("proton"));
// Position distribution
G4SPSPosDistribution *vPosDist =
masterGPS->GetCurrentSource()->GetPosDist();
vPosDist->SetPosDisType("Beam");
vPosDist->SetPosDisShape("Circle");
vPosDist->SetCentreCoords(G4ThreeVector(0.,0.,-1.05 * CLHEP::meter));
vPosDist->SetBeamSigmaInR(0.0 * CLHEP::mm);
// Angular distribution
G4SPSAngDistribution *vAngDist =
masterGPS->GetCurrentSource()->GetAngDist();
vAngDist->DefineAngRefAxes("angref1",G4ThreeVector(1.,0.,0));
vAngDist->DefineAngRefAxes("angref2",G4ThreeVector(0.,-1.,0));
vAngDist->SetAngDistType("beam2d");
vAngDist->SetBeamSigmaInAngX(13.36E-6 * CLHEP::rad);
vAngDist->SetBeamSigmaInAngY(11.25E-6 * CLHEP::rad);
// Energy distribution
G4SPSEneDistribution *vEneDist =
masterGPS->GetCurrentSource()->GetEneDist();
vEneDist->SetEnergyDisType("Mono");
vEneDist->SetMonoEnergy(400. * CLHEP::GeV);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -295,8 +295,8 @@ G4double XPhysicalLattice::GetThermalVibrationAmplitude(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector XPhysicalLattice::
ProjectMomentumVectorFromWorldToLattice(G4ThreeVector vMomentum,
G4ThreeVector vPosition){
ProjectMomentumVectorFromWorldToLattice(G4ThreeVector& vMomentum,
G4ThreeVector& vPosition){
vMomentum.rotate(G4ThreeVector(1.,0.,0.),fOmega)
.rotate(G4ThreeVector(0.,1.,0.), fTheta)
.rotate(G4ThreeVector(0.,0.,1.), fPhi);
@@ -313,8 +313,8 @@ ProjectMomentumVectorFromWorldToLattice(G4ThreeVector vMomentum,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector XPhysicalLattice::
ProjectMomentumVectorFromLatticeToWorld(G4ThreeVector vMomentum,
G4ThreeVector vPosition){
ProjectMomentumVectorFromLatticeToWorld(G4ThreeVector& vMomentum,
G4ThreeVector& vPosition){
vMomentum.rotate(G4ThreeVector(0.,0.,1.), -fPhi)
.rotate(G4ThreeVector(0.,1.,0.), -fTheta)
.rotate(G4ThreeVector(1.,0.,0.), fOmega);
@@ -330,8 +330,9 @@ ProjectMomentumVectorFromLatticeToWorld(G4ThreeVector vMomentum,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector XPhysicalLattice::GetLatticeDirection(G4ThreeVector vPosition){
return ProjectMomentumVectorFromLatticeToWorld(G4ThreeVector(0.,0.,1.),
G4ThreeVector XPhysicalLattice::GetLatticeDirection(G4ThreeVector& vPosition){
G4ThreeVector dir = G4ThreeVector(0.,0.,1.);
return ProjectMomentumVectorFromLatticeToWorld(dir,
vPosition);
}
@@ -372,7 +373,7 @@ G4bool XPhysicalLattice::IsBent(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ThreeVector XPhysicalLattice::ComputeBendingAngle(G4ThreeVector vPosition){
G4ThreeVector XPhysicalLattice::ComputeBendingAngle(G4ThreeVector& vPosition){
G4double vAngleX = 0.;
G4double vAngleY = 0.;
@@ -76,15 +76,15 @@ ComputeEC(G4ThreeVector vPositionVector,
G4ThreeVector XVCrystalPlanarAnalytical::
ComputeECFromVector(G4ThreeVector vPosition){
G4double vInterplanarPeriod = fPhysicalLattice->ComputeInterplanarPeriod();
if((vPosition.x() >= 0.) &&
(vPosition.x() < vInterplanarPeriod)){
return G4ThreeVector(fVectorEC->Value(vPosition.x()),0.,0.);
}
else{
G4double vPositionX = vPosition.x() -
std::fmod(vPosition.x(),vInterplanarPeriod) * vInterplanarPeriod;
return G4ThreeVector(fVectorEC->Value(vPositionX),0.,0.);
}
G4double vX = vPosition.x();
if (vX < 0.0) {
vX += ((int( - vX / vInterplanarPeriod) + 1.0 )
* vInterplanarPeriod);
}
else if( vX > vInterplanarPeriod ){
vX -= ( int( vX / vInterplanarPeriod) * vInterplanarPeriod );
}
return G4ThreeVector(fVectorEC->Value(vX),0.,0.);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -209,7 +209,7 @@ void XVCrystalPlanarAnalytical::ReadFromFile(const G4String& filename,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XVCrystalPlanarAnalytical::ReadFromECHARM(const G4String& filename,
G4double){
G4double vConversion){
std::ifstream vFileIn;
vFileIn.open(filename);
@@ -222,7 +222,6 @@ void XVCrystalPlanarAnalytical::ReadFromECHARM(const G4String& filename,
xmax *= CLHEP::meter;
fMaximum = -DBL_MAX;
fMinimum = +DBL_MAX;
std::cout << imax << " " << xmax << std::endl;
fVectorEC = new G4PhysicsLinearVector(0,xmax,imax);
@@ -230,12 +229,16 @@ void XVCrystalPlanarAnalytical::ReadFromECHARM(const G4String& filename,
double vTempX;
vFileIn >> vTempX;
vTempX *= CLHEP::eV;
vTempX *= vConversion;
if(vTempX > fMaximum) {fMaximum = vTempX;}
if(vTempX < fMinimum) {fMinimum = vTempX;}
fVectorEC->PutValue(i,vTempX);
}
G4cout << "XVCrystalPlanarAnalytical::ReadFromECHARM() - " <<
vConversion << " " << imax << " " << xmax << " " <<
fMinimum << " " << fMaximum << G4endl;
vFileIn.close();
}
@@ -37,6 +37,7 @@
#include "G4GeometryTolerance.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleChangeForNothing.hh"
XWrapperContinuousDiscreteProcess::
@@ -46,6 +47,8 @@ XWrapperContinuousDiscreteProcess(const G4String& aName)
G4cout << GetProcessName() << " is created "<< G4endl;
}
bNucleiOrElectronFlag = +0;
bBothOrCrystalOrDetectorPhysics = +0;
fParticleChangeForNothing = new G4ParticleChangeForNothing();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -58,7 +61,14 @@ XWrapperContinuousDiscreteProcess(const G4String& aName,
if (verboseLevel>1) {
G4cout << GetProcessName() << " is created "<< G4endl;
}
theProcessType = fRegisteredProcess->GetProcessType();
theProcessSubType = fRegisteredProcess->GetProcessSubType();
enableAtRestDoIt = fRegisteredProcess->isAtRestDoItIsEnabled();
enableAlongStepDoIt = fRegisteredProcess->isAlongStepDoItIsEnabled();
enablePostStepDoIt = fRegisteredProcess->isPostStepDoItIsEnabled();
bNucleiOrElectronFlag = +0;
bBothOrCrystalOrDetectorPhysics = +0;
fParticleChangeForNothing = new G4ParticleChangeForNothing();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -70,7 +80,10 @@ XWrapperContinuousDiscreteProcess(const G4String& aName,
if (verboseLevel>1) {
G4cout << GetProcessName() << " is created "<< G4endl;
}
theProcessType = aProcessType;
bNucleiOrElectronFlag = +0;
bBothOrCrystalOrDetectorPhysics = +0;
fParticleChangeForNothing = new G4ParticleChangeForNothing();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -92,15 +105,27 @@ G4VContinuousDiscreteProcess(right){
void XWrapperContinuousDiscreteProcess::
RegisterProcess(G4VContinuousDiscreteProcess* toRegister){
fRegisteredProcess = toRegister;
theProcessType = fRegisteredProcess->GetProcessType();
theProcessSubType = fRegisteredProcess->GetProcessSubType();
enableAtRestDoIt = fRegisteredProcess->isAtRestDoItIsEnabled();
enableAlongStepDoIt = fRegisteredProcess->isAlongStepDoItIsEnabled();
enablePostStepDoIt = fRegisteredProcess->isPostStepDoItIsEnabled();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XWrapperContinuousDiscreteProcess::
RegisterProcess(G4VContinuousDiscreteProcess* toRegister,
G4int flag){
G4int flag,
G4int region){
fRegisteredProcess = toRegister;
theProcessType = fRegisteredProcess->GetProcessType();
theProcessSubType = fRegisteredProcess->GetProcessSubType();
enableAtRestDoIt = fRegisteredProcess->isAtRestDoItIsEnabled();
enableAlongStepDoIt = fRegisteredProcess->isAlongStepDoItIsEnabled();
enablePostStepDoIt = fRegisteredProcess->isPostStepDoItIsEnabled();
bNucleiOrElectronFlag = flag;
bBothOrCrystalOrDetectorPhysics = region;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -117,31 +142,54 @@ G4int XWrapperContinuousDiscreteProcess::GetNucleiOrElectronFlag(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XWrapperContinuousDiscreteProcess::GetDensity(const G4Track& aTrack){
//Retrieve nuclei and electron density
//from ExExChParticleUserInfo object
G4int XWrapperContinuousDiscreteProcess::ItHasToWork(const G4Track& aTrack){
ExExChParticleUserInfo* chanInfo =
(ExExChParticleUserInfo*) aTrack.GetUserInformation();
G4double vDensity = 1.;
(ExExChParticleUserInfo*) aTrack.GetUserInformation();
if(chanInfo){
if(bNucleiOrElectronFlag == +1){
vDensity = chanInfo->GetNucleiDensity();
if((chanInfo->GetInTheCrystal() == true) &&
(bBothOrCrystalOrDetectorPhysics == 1 ||
bBothOrCrystalOrDetectorPhysics == 0)){
return 1;
}
else if(bNucleiOrElectronFlag == -1){
vDensity = chanInfo->GetElectronDensity();
}
else{
vDensity = (chanInfo->GetNucleiDensity()
+ chanInfo->GetElectronDensity())/2.;
if((chanInfo->GetInTheCrystal() == false) &&
(bBothOrCrystalOrDetectorPhysics == 2 ||
bBothOrCrystalOrDetectorPhysics == 0)){
return 2;
}
}
else {
G4cout << G4endl << "XWrapperContinuousDiscreteProcess::";
G4cout << G4endl << "XWrapperDiscreteProcess::";
G4cout << "ERROR - no ExExChParticleUserInfo object Detected";
G4cout << G4endl;
}
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XWrapperContinuousDiscreteProcess::GetDensity(const G4Track& aTrack){
//Retrieve nuclei and electron density
//from ExExChParticleUserInfo object
G4double vDensity = 1.;
if(ItHasToWork(aTrack) == 1){
ExExChParticleUserInfo* chanInfo =
(ExExChParticleUserInfo*) aTrack.GetUserInformation();
if(chanInfo){
if(bNucleiOrElectronFlag == +1){
vDensity = chanInfo->GetNucleiDensity();
}
else if(bNucleiOrElectronFlag == -1){
vDensity = chanInfo->GetElectronDensity();
}
else{
vDensity = (chanInfo->GetNucleiDensity()
+ chanInfo->GetElectronDensity())/2.;
}
}
}
return vDensity;
}
@@ -152,12 +200,13 @@ G4double XWrapperContinuousDiscreteProcess::
GetDensityPreviousStep(const G4Track& aTrack){
//Retrieve nuclei and electron density
//from ExExChParticleUserInfo object
ExExChParticleUserInfo* chanInfo =
(ExExChParticleUserInfo*) aTrack.GetUserInformation();
G4double vDensityPreviousStep = 1.;
if(chanInfo){
if(ItHasToWork(aTrack) == 1){
ExExChParticleUserInfo* chanInfo =
(ExExChParticleUserInfo*) aTrack.GetUserInformation();
if(bNucleiOrElectronFlag == +1){
vDensityPreviousStep = chanInfo->GetNucleiDensityPreviousStep();
}
@@ -166,15 +215,10 @@ GetDensityPreviousStep(const G4Track& aTrack){
}
else{
vDensityPreviousStep =
(chanInfo->GetNucleiDensityPreviousStep()
+ chanInfo->GetElectronDensityPreviousStep())/2.;
(chanInfo->GetNucleiDensityPreviousStep()
+ chanInfo->GetElectronDensityPreviousStep())/2.;
}
}
else {
G4cout << G4endl << "XWrapperContinuousDiscreteProcess::";
G4cout << "ERROR - no ExExChParticleUserInfo";
G4cout << "object Detected" << G4endl;
}
return vDensityPreviousStep;
}
@@ -207,9 +251,14 @@ void XWrapperContinuousDiscreteProcess::StartTracking(G4Track* aTrack){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XWrapperContinuousDiscreteProcess::
GetMeanFreePath(const G4Track&,
G4double, //previousStepSize,
G4ForceCondition*){
GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition){
if(ItHasToWork(aTrack) == 2){
return fRegisteredProcess->PostStepGetPhysicalInteractionLength(aTrack,
previousStepSize,
condition);
}
return DBL_MAX;
}
@@ -220,33 +269,50 @@ PostStepGetPhysicalInteractionLength (const G4Track &aTrack,
G4double previousStepSize,
G4ForceCondition *condition){
G4double vDensity = GetDensity(aTrack);
G4double vDensityPreviousStep = GetDensityPreviousStep(aTrack);
if ( (previousStepSize < 0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
// beginning of tracking (or just after DoIt of this process)
ResetNumberOfInteractionLengthLeft();
} else if ( previousStepSize > 0.0) {
// subtract NumberOfInteractionLengthLeft
SubtractNumberOfInteractionLengthLeft(previousStepSize
* vDensityPreviousStep);
} else {
// zero step DO NOTHING
}
G4double regIntLength =
if(ItHasToWork(aTrack) == 1){
G4double vDensity = GetDensity(aTrack);
G4double vDensityPreviousStep = GetDensityPreviousStep(aTrack);
if ( (previousStepSize < 0.0) ||
(theNumberOfInteractionLengthLeft<=0.0)) {
// beginning of tracking (or just after DoIt of this process)
ResetNumberOfInteractionLengthLeft();
} else if ( previousStepSize > 0.0) {
// subtract NumberOfInteractionLengthLeft
SubtractNumberOfInteractionLengthLeft(previousStepSize
* vDensityPreviousStep);
} else {
// zero step DO NOTHING
}
G4double regIntLength =
fRegisteredProcess->PostStepGetPhysicalInteractionLength(aTrack,
previousStepSize * vDensityPreviousStep,
condition);
G4double regIntNumber =
previousStepSize * vDensityPreviousStep,
condition);
G4double regIntNumber =
fRegisteredProcess->GetNumberOfInteractionLengthLeft();
currentInteractionLength = regIntLength / regIntNumber;
theNumberOfInteractionLengthLeft = regIntNumber;
currentInteractionLength = theNumberOfInteractionLengthLeft
if(regIntNumber!=0){
currentInteractionLength = regIntLength / regIntNumber;
}
else{
return DBL_MAX;
}
theNumberOfInteractionLengthLeft = regIntNumber;
currentInteractionLength = theNumberOfInteractionLengthLeft
* currentInteractionLength;
currentInteractionLength /= vDensity;
return currentInteractionLength;
if ( vDensity == 0. ) return DBL_MAX;
currentInteractionLength /= vDensity;
return currentInteractionLength;
}
else if(ItHasToWork(aTrack) == 2){
return fRegisteredProcess->PostStepGetPhysicalInteractionLength(aTrack,
previousStepSize,
condition);
}
else{
return DBL_MAX;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -257,13 +323,26 @@ AlongStepGetPhysicalInteractionLength (const G4Track& aTrack,
G4double currentMinimumStep,
G4double& currentSafety,
G4GPILSelection* selection){
G4double vDensityPreviousStep = GetDensityPreviousStep(aTrack);
return fRegisteredProcess->AlongStepGetPhysicalInteractionLength(aTrack,
previousStepSize * vDensityPreviousStep,
currentMinimumStep,
currentSafety,
selection);
if(ItHasToWork(aTrack) == 1){
G4double vDensityPreviousStep = GetDensityPreviousStep(aTrack);
return fRegisteredProcess->AlongStepGetPhysicalInteractionLength(aTrack,
previousStepSize * vDensityPreviousStep,
currentMinimumStep,
currentSafety,
selection);
}
else if(ItHasToWork(aTrack) == 2){
return fRegisteredProcess->AlongStepGetPhysicalInteractionLength(aTrack,
previousStepSize,
currentMinimumStep,
currentSafety,
selection);
}
else{
return DBL_MAX;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -271,11 +350,20 @@ AlongStepGetPhysicalInteractionLength (const G4Track& aTrack,
G4VParticleChange* XWrapperContinuousDiscreteProcess::
PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep ){
G4double vDensity = GetDensity(aTrack);
G4double vStepLengthSaved = aStep.GetStepLength();
const_cast<G4Step&>(aStep).SetStepLength(aStep.GetStepLength() * vDensity);
pParticleChange = fRegisteredProcess->PostStepDoIt(aTrack, aStep);
const_cast<G4Step&>(aStep).SetStepLength(vStepLengthSaved);
if(ItHasToWork(aTrack) == 1){
G4double vDensity = GetDensity(aTrack);
G4double vStepLengthSaved = aStep.GetStepLength();
const_cast<G4Step&>(aStep).SetStepLength(
aStep.GetStepLength() * vDensity);
pParticleChange = fRegisteredProcess->PostStepDoIt(aTrack, aStep);
const_cast<G4Step&>(aStep).SetStepLength(vStepLengthSaved);
return pParticleChange;
}
else if(ItHasToWork(aTrack) == 2){
return fRegisteredProcess->PostStepDoIt(aTrack, aStep);
}
pParticleChange = fParticleChangeForNothing;
return pParticleChange;
}
@@ -284,11 +372,20 @@ PostStepDoIt(const G4Track& aTrack,
G4VParticleChange* XWrapperContinuousDiscreteProcess::
AlongStepDoIt(const G4Track& aTrack,
const G4Step& aStep ){
G4double vDensity = GetDensity(aTrack);
G4double vStepLengthSaved = aStep.GetStepLength();
const_cast<G4Step&>(aStep).SetStepLength(aStep.GetStepLength() * vDensity);
pParticleChange = fRegisteredProcess->AlongStepDoIt(aTrack, aStep);
const_cast<G4Step&>(aStep).SetStepLength(vStepLengthSaved);
if(ItHasToWork(aTrack) == 1){
G4double vDensity = GetDensity(aTrack);
G4double vStepLengthSaved = aStep.GetStepLength();
const_cast<G4Step&>(aStep).SetStepLength(
aStep.GetStepLength() * vDensity);
pParticleChange = fRegisteredProcess->AlongStepDoIt(aTrack, aStep);
const_cast<G4Step&>(aStep).SetStepLength(vStepLengthSaved);
return pParticleChange;
}
else if(ItHasToWork(aTrack) == 2){
return fRegisteredProcess->AlongStepDoIt(aTrack, aStep);
}
pParticleChange = fParticleChangeForNothing;
return pParticleChange;
}
@@ -37,7 +37,7 @@
#include "G4GeometryTolerance.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleChangeForNothing.hh"
XWrapperDiscreteProcess::XWrapperDiscreteProcess(const G4String& aName)
:G4VDiscreteProcess(aName){
@@ -45,6 +45,8 @@ XWrapperDiscreteProcess::XWrapperDiscreteProcess(const G4String& aName)
G4cout << GetProcessName() << " is created "<< G4endl;
}
bNucleiOrElectronFlag = +0;
bBothOrCrystalOrDetectorPhysics = +0;
fParticleChangeForNothing = new G4ParticleChangeForNothing();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -54,6 +56,14 @@ XWrapperDiscreteProcess(const G4String&,
G4VDiscreteProcess* toRegister)
:G4VDiscreteProcess("XWrapperDiscreteProcess"){
fRegisteredProcess = toRegister;
theProcessType = fRegisteredProcess->GetProcessType();
theProcessSubType = fRegisteredProcess->GetProcessSubType();
enableAtRestDoIt = fRegisteredProcess->isAtRestDoItIsEnabled();
enableAlongStepDoIt = fRegisteredProcess->isAlongStepDoItIsEnabled();
enablePostStepDoIt = fRegisteredProcess->isPostStepDoItIsEnabled();
bNucleiOrElectronFlag = +0;
bBothOrCrystalOrDetectorPhysics = +0;
fParticleChangeForNothing = new G4ParticleChangeForNothing();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -74,14 +84,26 @@ G4VDiscreteProcess(right){
void XWrapperDiscreteProcess::RegisterProcess(G4VDiscreteProcess* toRegister){
fRegisteredProcess = toRegister;
theProcessType = fRegisteredProcess->GetProcessType();
theProcessSubType = fRegisteredProcess->GetProcessSubType();
enableAtRestDoIt = fRegisteredProcess->isAtRestDoItIsEnabled();
enableAlongStepDoIt = fRegisteredProcess->isAlongStepDoItIsEnabled();
enablePostStepDoIt = fRegisteredProcess->isPostStepDoItIsEnabled();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XWrapperDiscreteProcess::RegisterProcess(G4VDiscreteProcess* toRegister,
G4int flag){
G4int flag,
G4int region){
fRegisteredProcess = toRegister;
bNucleiOrElectronFlag = flag;
bBothOrCrystalOrDetectorPhysics = region;
theProcessType = fRegisteredProcess->GetProcessType();
theProcessSubType = fRegisteredProcess->GetProcessSubType();
enableAtRestDoIt = fRegisteredProcess->isAtRestDoItIsEnabled();
enableAlongStepDoIt = fRegisteredProcess->isAlongStepDoItIsEnabled();
enablePostStepDoIt = fRegisteredProcess->isPostStepDoItIsEnabled();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -98,24 +120,20 @@ G4int XWrapperDiscreteProcess::GetNucleiOrElectronFlag(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XWrapperDiscreteProcess::GetDensity(const G4Track& aTrack){
//Retrieve nuclei and electron density
//from ExExChParticleUserInfo object
G4int XWrapperDiscreteProcess::ItHasToWork(const G4Track& aTrack){
ExExChParticleUserInfo* chanInfo =
(ExExChParticleUserInfo*) aTrack.GetUserInformation();
G4double vDensity = 1.;
(ExExChParticleUserInfo*) aTrack.GetUserInformation();
if(chanInfo){
if(bNucleiOrElectronFlag == +1){
vDensity = chanInfo->GetNucleiDensity();
if((chanInfo->GetInTheCrystal() == true) &&
(bBothOrCrystalOrDetectorPhysics == 1 ||
bBothOrCrystalOrDetectorPhysics == 0)){
return 1;
}
else if(bNucleiOrElectronFlag == -1){
vDensity = chanInfo->GetElectronDensity();
}
else{
vDensity = (chanInfo->GetNucleiDensity()
+ chanInfo->GetElectronDensity())/2.;
if((chanInfo->GetInTheCrystal() == false) &&
(bBothOrCrystalOrDetectorPhysics == 2 ||
bBothOrCrystalOrDetectorPhysics == 0)){
return 2;
}
}
else {
@@ -124,6 +142,33 @@ G4double XWrapperDiscreteProcess::GetDensity(const G4Track& aTrack){
G4cout << G4endl;
}
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double XWrapperDiscreteProcess::GetDensity(const G4Track& aTrack){
//Retrieve nuclei and electron density
//from ExExChParticleUserInfo object
G4double vDensity = 1.;
if(ItHasToWork(aTrack)){
ExExChParticleUserInfo* chanInfo =
(ExExChParticleUserInfo*) aTrack.GetUserInformation();
if(chanInfo){
if(bNucleiOrElectronFlag == +1){
vDensity = chanInfo->GetNucleiDensity();
}
else if(bNucleiOrElectronFlag == -1){
vDensity = chanInfo->GetElectronDensity();
}
else{
vDensity = (chanInfo->GetNucleiDensity()
+ chanInfo->GetElectronDensity())/2.;
}
}
}
return vDensity;
}
@@ -133,12 +178,13 @@ G4double XWrapperDiscreteProcess::
GetDensityPreviousStep(const G4Track& aTrack){
//Retrieve nuclei and electron density
//from ExExChParticleUserInfo object
ExExChParticleUserInfo* chanInfo =
(ExExChParticleUserInfo*) aTrack.GetUserInformation();
G4double vDensityPreviousStep = 1.;
if(chanInfo){
if(ItHasToWork(aTrack)){
ExExChParticleUserInfo* chanInfo =
(ExExChParticleUserInfo*) aTrack.GetUserInformation();
if(bNucleiOrElectronFlag == +1){
vDensityPreviousStep = chanInfo->GetNucleiDensityPreviousStep();
}
@@ -147,15 +193,10 @@ GetDensityPreviousStep(const G4Track& aTrack){
}
else{
vDensityPreviousStep =
(chanInfo->GetNucleiDensityPreviousStep()
+ chanInfo->GetElectronDensityPreviousStep())/2.;
(chanInfo->GetNucleiDensityPreviousStep()
+ chanInfo->GetElectronDensityPreviousStep())/2.;
}
}
else {
G4cout << G4endl << "XWrapperDiscreteProcess::";
G4cout << "ERROR - no ExExChParticleUserInfo object Detected";
G4cout << G4endl;
}
return vDensityPreviousStep;
}
@@ -199,41 +240,64 @@ G4double XWrapperDiscreteProcess::
PostStepGetPhysicalInteractionLength (const G4Track &aTrack,
G4double previousStepSize,
G4ForceCondition *condition){
G4double vDensity = GetDensity(aTrack);
G4double vDensityPreviousStep = GetDensityPreviousStep(aTrack);
if ( (previousStepSize < 0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
// beginning of tracking (or just after DoIt of this process)
ResetNumberOfInteractionLengthLeft();
} else if ( previousStepSize > 0.0) {
// subtract NumberOfInteractionLengthLeft
SubtractNumberOfInteractionLengthLeft(previousStepSize
* vDensityPreviousStep);
} else {
// zero step DO NOTHING
}
G4double regIntLength =
if(ItHasToWork(aTrack) == 1){
G4double vDensity = GetDensity(aTrack);
G4double vDensityPreviousStep = GetDensityPreviousStep(aTrack);
if ( (previousStepSize < 0.0) ||
(theNumberOfInteractionLengthLeft<=0.0)) {
// beginning of tracking (or just after DoIt of this process)
ResetNumberOfInteractionLengthLeft();
} else if ( previousStepSize > 0.0) {
// subtract NumberOfInteractionLengthLeft
SubtractNumberOfInteractionLengthLeft(previousStepSize
* vDensityPreviousStep);
} else {
// zero step DO NOTHING
}
G4double regIntLength =
fRegisteredProcess->PostStepGetPhysicalInteractionLength(aTrack,
previousStepSize * vDensityPreviousStep,
condition);
G4double regIntNumber =
previousStepSize * vDensityPreviousStep,
condition);
G4double regIntNumber =
fRegisteredProcess->GetNumberOfInteractionLengthLeft();
currentInteractionLength = regIntLength / regIntNumber;
theNumberOfInteractionLengthLeft = regIntNumber;
currentInteractionLength =
if(regIntNumber!=0){
currentInteractionLength = regIntLength / regIntNumber;
}
else{
return DBL_MAX;
}
theNumberOfInteractionLengthLeft = regIntNumber;
currentInteractionLength =
theNumberOfInteractionLengthLeft * currentInteractionLength;
currentInteractionLength /= vDensity;
return currentInteractionLength;
if ( vDensity == 0. ) return DBL_MAX;
currentInteractionLength /= vDensity;
return currentInteractionLength;
}
else if(ItHasToWork(aTrack) == 2){
return fRegisteredProcess->PostStepGetPhysicalInteractionLength(aTrack,
previousStepSize,
condition);
}
else{
return DBL_MAX;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VParticleChange* XWrapperDiscreteProcess::PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep ){
return fRegisteredProcess->PostStepDoIt(aTrack, aStep);
if(ItHasToWork(aTrack) == 1){
return fRegisteredProcess->PostStepDoIt(aTrack, aStep);
}
else if(ItHasToWork(aTrack) == 2){
return fRegisteredProcess->PostStepDoIt(aTrack, aStep);
}
pParticleChange = fParticleChangeForNothing;
return pParticleChange;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1,6 +1,6 @@
//$Id$
///\file "exoticphysics/monopole/.README"
///\file "exoticphysics/monopole/.README.txt"
///\brief Example monopole README page
/*! \page Examplemonopole Example monopole
@@ -1,4 +1,4 @@
$Id: History 84606 2014-10-17 07:50:04Z gcosmo $
$Id: History 92500 2015-09-02 07:26:32Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,11 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
01 September 15: I. Hrivnacova (monopole-V10-01-00)
- Removed EventAction and EventActionMessenger classes, now obsolete, and
replaced /testex/event/printModulo commands in macros with
/run/printProgress
16 October 14: I. Hrivnacova (monopole-V10-00-00)
- Fixed coding guidelines (long lines) in G4MonopoleTransportation.cc
@@ -1,66 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file exoticphysics/monopole/include/EventAction.hh
/// \brief Definition of the EventAction class
//
// $Id: EventAction.hh 68036 2013-03-13 14:13:45Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef EventAction_h
#define EventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class EventActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class EventAction : public G4UserEventAction
{
public:
EventAction();
~EventAction();
virtual void BeginOfEventAction(const G4Event*);
virtual void EndOfEventAction(const G4Event*);
inline void SetPrintModulo(G4int val) { fPrintModulo = val; };
private:
G4int fPrintModulo;
EventActionMessenger* fEventMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,64 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file exoticphysics/monopole/include/EventActionMessenger.hh
/// \brief Definition of the EventActionMessenger class
//
// $Id: EventActionMessenger.hh 68036 2013-03-13 14:13:45Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef EventActionMessenger_h
#define EventActionMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class EventAction;
class G4UIdirectory;
class G4UIcmdWithAnInteger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class EventActionMessenger: public G4UImessenger
{
public:
EventActionMessenger(EventAction*);
~EventActionMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
private:
EventAction* fEventAction;
G4UIdirectory* fEventDir;
G4UIcmdWithAnInteger* fPrintCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -26,7 +26,7 @@
/// \file exoticphysics/monopole/monopole.cc
/// \brief Main program of the exoticphysics/monopole example
//
// $Id: monopole.cc 66817 2013-01-12 16:16:08Z gcosmo $
// $Id: monopole.cc 92500 2015-09-02 07:26:32Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -43,7 +43,6 @@
#include "PrimaryGeneratorAction.hh"
#include "RunAction.hh"
#include "EventAction.hh"
#include "TrackingAction.hh"
#include "SteppingAction.hh"
@@ -103,7 +102,6 @@ int main(int argc,char** argv) {
RunAction* run;
runManager->SetUserAction(run = new RunAction(det, kin));
runManager->SetUserAction(new EventAction);
runManager->SetUserAction(new TrackingAction(run));
runManager->SetUserAction(new SteppingAction(run));
@@ -137,4 +135,4 @@ int main(int argc,char** argv) {
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
/particle/process/dump
#
#/process/eLoss/verbose 1
/testex/event/printModulo 10
/run/printProgress 10
#
/gun/particle monopole
/gun/energy 100 GeV
@@ -4,7 +4,7 @@
############################################
*************************************************************
Geant4MT version Name: geant4-09-06-ref-02 (18-January-2013)
Geant4 version Name: geant4-10-02-ref-00 (4-December-2015)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
@@ -19,16 +19,19 @@ G4PhysListFactory::GetReferencePhysList <FTFP_BERT> EMoption= 0
/monopole/setup
Monopole is created: m(GeV)= 100 Qel= 0 Qmag= 68.518
/control/execute /ec/build/release/09-06-refmt-01_branch/examples/extended/exoticphysics/monopole/monopole.in
/control/execute /mnt/build/jenkins/workspace/g4-slc6/COMPILER/gcc49/LABEL/slc6/THREAD/Seq/release/RelWithDebInfo/UseGranularCLHEP/10-02-ref-00_branch/10-02-ref-00_branch/examples/extended/exoticphysics/monopole/monopole.in
/control/verbose 1
/run/verbose 0
/testex/run/verbose 1
/tracking/verbose 0
/testex/det/setMat G4_Si
/testex/det/setSizeX 10 cm
/run/geometryModified
/testex/det/setSizeYZ 20 cm
/run/geometryModified
/testex/det/setStepSize 0.2 mm
/testex/run/binSize 0.2 mm
/process/em/verbose 1
/run/initialize
---------------------------------------------------------
@@ -36,26 +39,47 @@ Monopole is created: m(GeV)= 100 Qel= 0 Qmag= 68.518
---------------------------------------------------------
### Adding tracking cuts for neutron TimeCut(ns)= 10000 KinEnergyCut(MeV)= 0
/process/eLoss/verbose 1
/testex/event/printModulo 10
/process/em/verbose 1
/particle/select monopole
/particle/process/dump
G4ProcessManager: particle[monopole]
[0]=== process[MonopoleTransportation :Transportation] Active
Ordering:: AtRest AlongStep PostStep
GetPIL/ DoIt GetPIL/ DoIt GetPIL/ DoIt
Ordering::
index -1: -1: 1: 0: 2: 0:
parameter -1: -1: 1: 1: 1: 1:
[1]=== process[mplIoni :Electromagnetic] Active
Ordering:: AtRest AlongStep PostStep
GetPIL/ DoIt GetPIL/ DoIt GetPIL/ DoIt
Ordering::
index -1: -1: 0: 1: 1: 1:
parameter -1: -1: 2: 2: 2: 2:
[2]=== process[StepLimiter :General] Active
Ordering:: AtRest AlongStep PostStep
GetPIL/ DoIt GetPIL/ DoIt GetPIL/ DoIt
Ordering::
index -1: -1: -1: -1: 0: 2:
parameter -1: -1: -1: -1: 1000: 1000:
/run/printProgress 10
/gun/particle monopole
/gun/energy 100 GeV
/run/beamOn 100
### Monopole ionisation model with d-electron production, Gmag= 68.518
phot: for gamma SubType= 12
phot: for gamma SubType= 12 BuildTable= 0
LambdaPrime table from 200 keV to 10 TeV in 54 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
PhotoElectric : Emin= 0 eV Emax= 10 TeV AngularGenSauterGavrila FluoActive
compt: for gamma SubType= 13
Lambda table from 100 eV to 1 MeV in 28 bins, spline: 1
compt: for gamma SubType= 13 BuildTable= 1
Lambda table from 100 eV to 1 MeV, 7 bins per decade, spline: 1
LambdaPrime table from 1 MeV to 10 TeV in 49 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
Klein-Nishina : Emin= 0 eV Emax= 10 TeV
conv: for gamma SubType= 14
Lambda table from 1.022 MeV to 10 TeV in 49 bins, spline: 1
conv: for gamma SubType= 14 BuildTable= 1
Lambda table from 1.022 MeV to 10 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
BetheHeitler : Emin= 0 eV Emax= 80 GeV
BetheHeitlerLPM : Emin= 80 GeV Emax= 10 TeV
@@ -63,26 +87,26 @@ conv: for gamma SubType= 14
msc: for e- SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
MollerBhabha : Emin= 0 eV Emax= 10 TeV
eBrem: for e- SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
LPM flag: 1 for E > 1 GeV
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
LPM flag: 1 for E > 1 GeV, HighEnergyThreshold(GeV)= 10000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV DipBustGen
eBremLPM : Emin= 1 GeV Emax= 10 TeV DipBustGen
CoulombScat: for e- SubType= 1
Lambda table from 100 MeV to 10 TeV in 35 bins, spline: 1
CoulombScat: for e-, integral: 1 SubType= 1 BuildTable= 1
Lambda table from 100 MeV to 10 TeV, 7 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 10 TeV
@@ -90,42 +114,42 @@ CoulombScat: for e- SubType= 1
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
MollerBhabha : Emin= 0 eV Emax= 10 TeV
eBrem: for e+ SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
LPM flag: 1 for E > 1 GeV
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
LPM flag: 1 for E > 1 GeV, HighEnergyThreshold(GeV)= 10000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV DipBustGen
eBremLPM : Emin= 1 GeV Emax= 10 TeV DipBustGen
annihil: for e+ SubType= 5
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplus2gg : Emin= 0 eV Emax= 10 TeV
CoulombScat: for e+ SubType= 1
Lambda table from 100 MeV to 10 TeV in 35 bins, spline: 1
CoulombScat: for e+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from 100 MeV to 10 TeV, 7 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 10 TeV
msc: for proton SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for proton SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 2 MeV
@@ -133,24 +157,31 @@ hIoni: for proton SubType= 2
hBrems: for proton SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for proton, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of anti_proton
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for GenericIon SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV
UrbanMsc : Emin= 0 eV Emax= 10 TeV
ionIoni: for GenericIon SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.02
Stopping Power data for 17 ion/material pairs
===== EM models for the G4Region DefaultRegionForTheWorld ======
@@ -160,24 +191,24 @@ ionIoni: for GenericIon SubType= 2
msc: for alpha SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
UrbanMsc : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
ionIoni: for alpha SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 7.9452 MeV
BetheBloch : Emin= 7.9452 MeV Emax= 10 TeV
msc: for anti_proton SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for anti_proton SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 2 MeV
@@ -185,24 +216,31 @@ hIoni: for anti_proton SubType= 2
hBrems: for anti_proton SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for anti_proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for anti_proton, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 10 TeV, 7 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for kaon+ SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for kaon+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 1.05231 MeV
@@ -210,24 +248,31 @@ hIoni: for kaon+ SubType= 2
hBrems: for kaon+ SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for kaon+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for kaon+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 10 TeV, 7 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for kaon- SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for kaon- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 1.05231 MeV
@@ -235,12 +280,585 @@ hIoni: for kaon- SubType= 2
hBrems: for kaon- SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for kaon- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for kaon-, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of kaon+
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for mu+ SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
muIoni: for mu+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 200 keV
BetheBloch : Emin= 200 keV Emax= 1 GeV
MuBetheBloch : Emin= 1 GeV Emax= 10 TeV
muBrems: for mu+ SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 10 TeV
muPairProd: for mu+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for mu+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 10 TeV, 7 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for mu- SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
muIoni: for mu- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 200 keV
BetheBloch : Emin= 200 keV Emax= 1 GeV
MuBetheBloch : Emin= 1 GeV Emax= 10 TeV
muBrems: for mu- SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 10 TeV
muPairProd: for mu- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for mu-, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of mu+
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for pi+ SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for pi+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 297.505 keV
BetheBloch : Emin= 297.505 keV Emax= 10 TeV
hBrems: for pi+ SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for pi+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for pi+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 10 TeV, 7 bins per decade, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for pi- SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 0, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for pi- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 297.505 keV
BetheBloch : Emin= 297.505 keV Emax= 10 TeV
hBrems: for pi- SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for pi- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV, 7 bins per decade, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of pi+
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
====================================================================
HADRONIC PROCESSES SUMMARY (verbose level 1)
---------------------------------------------------
Hadronic Processes for neutron
Process: hadElastic
Model: hElasticCHIPS: 0 eV ---> 100 TeV
Cr_sctns: G4NeutronElasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: neutronInelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: G4NeutronInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: nCapture
Model: nRadCapture: 0 eV ---> 100 TeV
Cr_sctns: G4NeutronCaptureXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaCaptureXS: 0 eV ---> 100 TeV
Process: nKiller
---------------------------------------------------
Hadronic Processes for GenericIon
Process: ionInelastic
Model: Binary Light Ion Cascade: 0 eV /n ---> 4 GeV/n
Model: FTFP: 2 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for He3
Process: He3Inelastic
Model: Binary Light Ion Cascade: 0 eV /n ---> 4 GeV/n
Model: FTFP: 2 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for alpha
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: alphaInelastic
Model: Binary Light Ion Cascade: 0 eV /n ---> 4 GeV/n
Model: FTFP: 2 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for anti_He3
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: anti_He3Inelastic
Model: FTFP: 0 eV /n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for anti_alpha
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: anti_alphaInelastic
Model: FTFP: 0 eV /n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for anti_deuteron
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: anti_deuteronInelastic
Model: FTFP: 0 eV /n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for anti_neutron
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: anti_neutronInelastic
Model: FTFP: 0 eV ---> 100 TeV
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for anti_proton
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
Model: AntiAElastic: 100 MeV ---> 100 TeV
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: anti_protonInelastic
Model: FTFP: 0 eV ---> 100 TeV
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for anti_triton
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: anti_tritonInelastic
Model: FTFP: 0 eV /n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for deuteron
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: dInelastic
Model: Binary Light Ion Cascade: 0 eV /n ---> 4 GeV/n
Model: FTFP: 2 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for e+
Process: positronNuclear
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for e-
Process: electronNuclear
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for gamma
Process: photonNuclear
Model: BertiniCascade: 0 eV ---> 3.5 GeV
Model: TheoFSGenerator: 3 GeV ---> 100 TeV
Cr_sctns: PhotoNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for kaon+
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: kaon+Inelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: Glauber-Gribov: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for kaon-
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: kaon-Inelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: Glauber-Gribov: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hBertiniCaptureAtRest
---------------------------------------------------
Hadronic Processes for lambda
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: lambdaInelastic
Model: BertiniCascade: 0 eV ---> 6 GeV
Model: FTFP: 2 GeV ---> 100 TeV
Cr_sctns: ChipsHyperonInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for mu+
Process: muonNuclear
Model: G4MuonVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: KokoulinMuonNuclearXS: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for mu-
Process: muonNuclear
Model: G4MuonVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: KokoulinMuonNuclearXS: 0 eV ---> 100 TeV
Process: muMinusCaptureAtRest
---------------------------------------------------
Hadronic Processes for pi+
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 1.0001 GeV
Model: hElasticGlauber: 1 GeV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: pi+Inelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: G4CrossSectionPairGG: 0 eV ---> 100 TeV
G4CrossSectionPairGG: G4PiNuclearCrossSection cross sections
below 91 GeV, Glauber-Gribov above
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for pi-
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 1.0001 GeV
Model: hElasticGlauber: 1 GeV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: pi-Inelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: G4CrossSectionPairGG: 0 eV ---> 100 TeV
G4CrossSectionPairGG: G4PiNuclearCrossSection cross sections
below 91 GeV, Glauber-Gribov above
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hBertiniCaptureAtRest
---------------------------------------------------
Hadronic Processes for proton
Process: hadElastic
Model: hElasticCHIPS: 0 eV ---> 100 TeV
Cr_sctns: ChipsProtonElasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: protonInelastic
Model: FTFP: 4 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 5 GeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for triton
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: tInelastic
Model: Binary Light Ion Cascade: 0 eV /n ---> 4 GeV/n
Model: FTFP: 2 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
================================================================
### Run 0 starts.
### Run 0 start.
### Histo::Save: Opended file <monopole.root> for 5 histograms
--> Event 0 starts.
--> Event 10 starts.
--> Event 20 starts.
--> Event 30 starts.
--> Event 40 starts.
--> Event 50 starts.
--> Event 60 starts.
--> Event 70 starts.
--> Event 80 starts.
--> Event 90 starts.
The run consists of 100 monopole of 100 GeV through 10 cm of G4_Si (density: 2.33 g/cm3 )
projected Range= 7.7461 cm rms= 101.2 um
### Stopping Powers
E(MeV)= 0.001 dedxp= 24.465 dedxmp= 1.2659
E(MeV)= 0.0012589 dedxp= 27.276 dedxmp= 1.4204
E(MeV)= 0.0015849 dedxp= 30.767 dedxmp= 1.5937
E(MeV)= 0.0019953 dedxp= 34.558 dedxmp= 1.7881
E(MeV)= 0.0025119 dedxp= 38.769 dedxmp= 2.0063
E(MeV)= 0.0031623 dedxp= 43.491 dedxmp= 2.2511
E(MeV)= 0.0039811 dedxp= 48.814 dedxmp= 2.5258
E(MeV)= 0.0050119 dedxp= 54.773 dedxmp= 2.834
E(MeV)= 0.0063096 dedxp= 61.455 dedxmp= 3.1798
E(MeV)= 0.0079433 dedxp= 68.933 dedxmp= 3.5678
E(MeV)= 0.01 dedxp= 77.356 dedxmp= 4.0031
E(MeV)= 0.012589 dedxp= 85.192 dedxmp= 4.4916
E(MeV)= 0.015849 dedxp= 93.469 dedxmp= 5.0397
E(MeV)= 0.019953 dedxp= 101.92 dedxmp= 5.6546
E(MeV)= 0.025119 dedxp= 110.26 dedxmp= 6.3445
E(MeV)= 0.031623 dedxp= 117.88 dedxmp= 7.1187
E(MeV)= 0.039811 dedxp= 123.92 dedxmp= 7.9873
E(MeV)= 0.050119 dedxp= 127.47 dedxmp= 8.9619
E(MeV)= 0.063096 dedxp= 127.65 dedxmp= 10.055
E(MeV)= 0.079433 dedxp= 124.16 dedxmp= 11.282
E(MeV)= 0.1 dedxp= 117.53 dedxmp= 12.659
E(MeV)= 0.12589 dedxp= 108.93 dedxmp= 14.204
E(MeV)= 0.15849 dedxp= 99.664 dedxmp= 15.937
E(MeV)= 0.19953 dedxp= 90.588 dedxmp= 17.881
E(MeV)= 0.25119 dedxp= 82.081 dedxmp= 20.063
E(MeV)= 0.31623 dedxp= 74.169 dedxmp= 22.511
E(MeV)= 0.39811 dedxp= 66.763 dedxmp= 25.258
E(MeV)= 0.50119 dedxp= 59.742 dedxmp= 28.34
E(MeV)= 0.63096 dedxp= 53.434 dedxmp= 31.798
E(MeV)= 0.79433 dedxp= 47.062 dedxmp= 35.678
E(MeV)= 1 dedxp= 40.845 dedxmp= 40.031
E(MeV)= 1.2589 dedxp= 35.325 dedxmp= 44.916
E(MeV)= 1.5849 dedxp= 30.422 dedxmp= 50.396
E(MeV)= 1.9953 dedxp= 26.068 dedxmp= 56.545
E(MeV)= 2.5119 dedxp= 22.267 dedxmp= 63.444
E(MeV)= 3.1623 dedxp= 18.934 dedxmp= 71.185
E(MeV)= 3.9811 dedxp= 16.043 dedxmp= 79.871
E(MeV)= 5.0119 dedxp= 13.589 dedxmp= 89.528
E(MeV)= 6.3096 dedxp= 11.42 dedxmp= 91.388
E(MeV)= 7.9433 dedxp= 9.608 dedxmp= 94.03
E(MeV)= 10 dedxp= 8.0524 dedxmp= 97.584
E(MeV)= 12.589 dedxp= 6.6936 dedxmp= 102.2
E(MeV)= 15.849 dedxp= 5.5755 dedxmp= 108.06
E(MeV)= 19.953 dedxp= 4.6616 dedxmp= 115.36
E(MeV)= 25.119 dedxp= 3.9107 dedxmp= 124.33
E(MeV)= 31.623 dedxp= 3.2703 dedxmp= 135.25
E(MeV)= 39.811 dedxp= 2.7356 dedxmp= 148.41
E(MeV)= 50.119 dedxp= 2.2882 dedxmp= 164.17
E(MeV)= 63.096 dedxp= 1.9184 dedxmp= 182.94
E(MeV)= 79.433 dedxp= 1.6121 dedxmp= 205.18
E(MeV)= 100 dedxp= 1.3599 dedxmp= 231.43
E(MeV)= 125.89 dedxp= 1.153 dedxmp= 262.3
E(MeV)= 158.49 dedxp= 0.98406 dedxmp= 298.49
E(MeV)= 199.53 dedxp= 0.84666 dedxmp= 340.8
E(MeV)= 251.19 dedxp= 0.73555 dedxmp= 390.13
E(MeV)= 316.23 dedxp= 0.64633 dedxmp= 447.53
E(MeV)= 398.11 dedxp= 0.57535 dedxmp= 514.18
E(MeV)= 501.19 dedxp= 0.51956 dedxmp= 591.42
E(MeV)= 630.96 dedxp= 0.47644 dedxmp= 631.06
E(MeV)= 794.33 dedxp= 0.44387 dedxmp= 669.72
E(MeV)= 1000 dedxp= 0.42068 dedxmp= 708.41
E(MeV)= 1258.9 dedxp= 0.40476 dedxmp= 747.13
E(MeV)= 1584.9 dedxp= 0.39477 dedxmp= 785.89
E(MeV)= 1995.3 dedxp= 0.38966 dedxmp= 824.71
E(MeV)= 2511.9 dedxp= 0.3885 dedxmp= 863.59
E(MeV)= 3162.3 dedxp= 0.39046 dedxmp= 902.56
E(MeV)= 3981.1 dedxp= 0.39483 dedxmp= 941.63
E(MeV)= 5011.9 dedxp= 0.40101 dedxmp= 980.83
E(MeV)= 6309.6 dedxp= 0.4085 dedxmp= 1020.2
E(MeV)= 7943.3 dedxp= 0.41692 dedxmp= 1059.7
E(MeV)= 10000 dedxp= 0.42591 dedxmp= 1099.5
E(MeV)= 12589 dedxp= 0.43526 dedxmp= 1139.6
E(MeV)= 15849 dedxp= 0.44479 dedxmp= 1180
E(MeV)= 19953 dedxp= 0.45437 dedxmp= 1220.8
E(MeV)= 25119 dedxp= 0.46392 dedxmp= 1262.1
E(MeV)= 31623 dedxp= 0.4734 dedxmp= 1303.9
E(MeV)= 39811 dedxp= 0.48279 dedxmp= 1346.2
E(MeV)= 50119 dedxp= 0.49208 dedxmp= 1389
E(MeV)= 63096 dedxp= 0.5013 dedxmp= 1432.3
E(MeV)= 79433 dedxp= 0.51047 dedxmp= 1475.7
E(MeV)= 1e+05 dedxp= 0.51964 dedxmp= 1521.9
E(MeV)= 1.2589e+05 dedxp= 0.5289 dedxmp= 1569.5
E(MeV)= 1.5849e+05 dedxp= 0.53834 dedxmp= 1616.1
E(MeV)= 1.9953e+05 dedxp= 0.54808 dedxmp= 1661.5
E(MeV)= 2.5119e+05 dedxp= 0.55828 dedxmp= 1705.5
E(MeV)= 3.1623e+05 dedxp= 0.56916 dedxmp= 1747.9
E(MeV)= 3.9811e+05 dedxp= 0.58097 dedxmp= 1788.3
E(MeV)= 5.0119e+05 dedxp= 0.59408 dedxmp= 1826.5
E(MeV)= 6.3096e+05 dedxp= 0.60891 dedxmp= 1862.4
E(MeV)= 7.9433e+05 dedxp= 0.62602 dedxmp= 1895.6
E(MeV)= 1e+06 dedxp= 0.64612 dedxmp= 1926.2
E(MeV)= 1.2589e+06 dedxp= 0.6701 dedxmp= 1954
E(MeV)= 1.5849e+06 dedxp= 0.6991 dedxmp= 1979
E(MeV)= 1.9953e+06 dedxp= 0.73447 dedxmp= 2001.2
E(MeV)= 2.5119e+06 dedxp= 0.77187 dedxmp= 2020.8
E(MeV)= 3.1623e+06 dedxp= 0.82036 dedxmp= 2037.7
E(MeV)= 3.9811e+06 dedxp= 0.88274 dedxmp= 2052.3
E(MeV)= 5.0119e+06 dedxp= 0.96259 dedxmp= 2064.6
E(MeV)= 6.3096e+06 dedxp= 1.0645 dedxmp= 2074.8
E(MeV)= 7.9433e+06 dedxp= 1.1943 dedxmp= 2083.1
### End of stopping power table
Range table for G4_Si
--------- Ranlux engine status ---------
Initial seed = 9876
float_seed_table[] = 0.0993674 0.917071 0.513817 0.697908 0.189047 0.940547 0.882616 0.441314 0.77574 0.816998 0.200629 0.940735 0.779485 0.702042 0.476098 0.0277817 0.589708 0.0454592 0.079353 0.783744 0.687957 0.706206 0.876165 0.829392
i_lag = 23, j_lag = 9
carry = 0, count24 = 13
luxury = 3 nskip = 199
----------------------------------------
@@ -1,76 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file exoticphysics/monopole/src/EventAction.cc
/// \brief Implementation of the EventAction class
//
// $Id: EventAction.cc 68036 2013-03-13 14:13:45Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "EventAction.hh"
#include "EventActionMessenger.hh"
#include "G4Event.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventAction::EventAction()
: G4UserEventAction(),
fPrintModulo(10000),
fEventMessenger(0)
{
fEventMessenger = new EventActionMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventAction::~EventAction()
{
delete fEventMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void EventAction::BeginOfEventAction(const G4Event* evt)
{
G4int evtNb = evt->GetEventID();
//printing survey
if (evtNb % fPrintModulo == 0) {
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void EventAction::EndOfEventAction(const G4Event*)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,74 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file exoticphysics/monopole/src/EventActionMessenger.cc
/// \brief Implementation of the EventActionMessenger class
//
// $Id: EventActionMessenger.cc 68036 2013-03-13 14:13:45Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "EventActionMessenger.hh"
#include "EventAction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAnInteger.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventActionMessenger::EventActionMessenger(EventAction* evAct)
: G4UImessenger(),
fEventAction(evAct),
fEventDir(0),
fPrintCmd(0)
{
fEventDir = new G4UIdirectory("/testex/event/");
fEventDir->SetGuidance("event control");
fPrintCmd = new G4UIcmdWithAnInteger("/testex/event/printModulo",this);
fPrintCmd->SetGuidance("Print events modulo n");
fPrintCmd->SetParameterName("EventNb",false);
fPrintCmd->SetRange("EventNb>0");
fPrintCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventActionMessenger::~EventActionMessenger()
{
delete fPrintCmd;
delete fEventDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void EventActionMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
{
if(command == fPrintCmd)
{fEventAction->SetPrintModulo(fPrintCmd->GetNewIntValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,6 +1,6 @@
//$Id: .README 76246 2013-11-08 11:17:29Z gcosmo $
//$Id: .README.txt 94710 2015-12-03 16:15:05Z gunter $
///\file "exoticphysics/phonon/.README"
///\file "exoticphysics/phonon/.README.txt"
///\brief Example phonon README page
/*! \page Examplephonon Example phonon
+12 -1
View File
@@ -1,4 +1,4 @@
$Id: History 84271 2014-10-13 07:12:23Z gcosmo $
$Id: History 92176 2015-08-20 13:07:22Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,17 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
19 August 2015: M. Kelsey (phononExample-V10-01-01)
- XAluminumElectrodeHit.hh: Make simple container with public data members
- XAluminumElectrodeSensitivity: Improve MT robustness, make HC local, make
file streams shared-static, with protective mutexes.
NOTE: MT output from clang, icc is different from gcc. Change below means
test jobs still failing on those compilers.
13 August 2015: G. Folger (phononExample-V10-01-00)
- Update caustic.out-MT to file created on slc6, gcc49, MT
12 October 2014: M. Kelsey (phononExample-V10-00-03)
- caustic.out-MT-*, timing.out-MT-*: Remove platform-specific reference files.
- caustic.out-MT, timing.out-MT: Add new references for MT jobs; output is
@@ -1,4 +1,6 @@
-0.99087,2.90339,-12.7
-0.830314,-6.05251,-12.7
-8.31785,-11.1924,12.7
-6.63941,-16.9549,-12.7
3.35453,4.76497,12.7
16.7678,-8.41667,12.7
-6.45515,-21.9922,-12.7
-6.13518,-28.1214,-12.7
@@ -26,9 +26,10 @@
/// \file exoticphysics/phonon/include/XAluminumElectrodeHit.hh
/// \brief Definition of the XAluminumElectrodeHit class
//
// $Id: XAluminumElectrodeHit.hh 84197 2014-10-10 14:33:03Z gcosmo $
// $Id: XAluminumElectrodeHit.hh 92176 2015-08-20 13:07:22Z gcosmo $
//
// 20141008 Allocators must be thread-local, and must be pointers
// 20150818 Make hit a simple container, with public data members
#ifndef XAluminumElectrodeHit_h
#define XAluminumElectrodeHit_h 1
@@ -41,39 +42,27 @@
class G4AttDef;
class G4AttValue;
class XAluminumElectrodeHit : public G4VHit
{
public:
class XAluminumElectrodeHit : public G4VHit {
public: // Treat hit as simple container class
G4double fTime;
G4double fEdep;
G4ThreeVector fLocalPos;
G4ThreeVector fWorldPos;
XAluminumElectrodeHit();
virtual ~XAluminumElectrodeHit();
XAluminumElectrodeHit(const XAluminumElectrodeHit &right);
const XAluminumElectrodeHit& operator=(const XAluminumElectrodeHit &right);
int operator==(const XAluminumElectrodeHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
virtual void Draw();
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual std::vector<G4AttValue>* CreateAttValues() const;
virtual void Print();
private:
G4double fTime;
G4double fEdep;
G4ThreeVector fLocalPos;
G4ThreeVector fWorldPos;
public:
inline void SetTime(G4double t) { fTime = t; }
inline G4double GetTime() const { return fTime; }
inline void SetEDep(G4double e) { fEdep = e; }
inline G4double GetEDep() const { return fEdep; }
inline void SetLocalPos(G4ThreeVector xyz) { fLocalPos = xyz; }
inline G4ThreeVector GetLocalPos() const { return fLocalPos; }
inline void SetWorldPos(G4ThreeVector xyz) { fWorldPos = xyz; }
inline G4ThreeVector GetWorldPos() const { return fWorldPos; }
public:
XAluminumElectrodeHit();
virtual ~XAluminumElectrodeHit();
XAluminumElectrodeHit(const XAluminumElectrodeHit &right);
const XAluminumElectrodeHit& operator=(const XAluminumElectrodeHit &right);
int operator==(const XAluminumElectrodeHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
virtual void Draw();
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual std::vector<G4AttValue>* CreateAttValues() const;
virtual void Print();
};
typedef G4THitsCollection<XAluminumElectrodeHit> XAluminumElectrodeHitsCollection;
@@ -26,48 +26,44 @@
/// \file exoticphysics/phonon/include/XAluminumElectrodeSensitivity.hh
/// \brief Definition of the XAluminumElectrodeSensitivity class
//
// $Id: XAluminumElectrodeSensitivity.hh 76246 2013-11-08 11:17:29Z gcosmo $
// $Id: XAluminumElectrodeSensitivity.hh 92176 2015-08-20 13:07:22Z gcosmo $
//
// 20150818 Improve MT compatibility; hits collection should not be static
#ifndef XAluminumElectrodeSensitivity_h
#define XAluminumElectrodeSensitivity_h 1
#include "G4VSensitiveDetector.hh"
#include "XAluminumElectrodeHit.hh"
#include <iostream>
#include <fstream>
#include <iosfwd>
class G4Step;
class G4HCofThisEvent;
class G4TouchableHistory;
using namespace std;
class XAluminumElectrodeSensitivity : public G4VSensitiveDetector
{
public:
XAluminumElectrodeSensitivity(G4String);
virtual ~XAluminumElectrodeSensitivity();
virtual void Initialize(G4HCofThisEvent*);
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
virtual void EndOfEvent(G4HCofThisEvent*);
class XAluminumElectrodeSensitivity : public G4VSensitiveDetector {
public:
XAluminumElectrodeSensitivity(const G4String&);
virtual ~XAluminumElectrodeSensitivity();
virtual void Initialize(G4HCofThisEvent*);
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
virtual void EndOfEvent(G4HCofThisEvent*);
XAluminumElectrodeHitsCollection* GetHitsCollection();
static XAluminumElectrodeHitsCollection* fHitsCollection;
private:
//XAluminumElectrodeHitsCollection * hitsCollection;
ofstream fWriter; //writing hit posn to file. Temporary fix.
ofstream fWriter2; //writing timing information to file. Temporary fix.
protected:
void WriteHitInfo(const XAluminumElectrodeHit* aHit);
G4int fHCID;
private:
XAluminumElectrodeHitsCollection* fHitsCollection;
static std::fstream* fWriter; // For hit position output (temporary)
static std::fstream* fWriter2; // For hit timing/energy (temporary)
G4int fHCID; // Index of collection in event
};
#endif
@@ -0,0 +1,61 @@
############################################
!!! WARNING - FPE detection is activated !!!
############################################
*************************************************************
Geant4 version Name: geant4-10-02-ref-00 (4-December-2015)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
OpenGLImmediateXm (OGLIXm, OGLIQt_FALLBACK)
OpenGLStoredXm (OGLSXm, OGLSQt_FALLBACK)
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK, OGLIXm_FALLBACK)
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
RayTracerX (RayTracerX)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByCharge
drawByParticleID
drawByOriginVolume
drawByAttribute
Registered filter factories:
chargeFilter
particleFilter
originVolumeFilter
attributeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
Available colours:
black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow
Graphics systems deleted.
Visualization Manager deleting...
@@ -26,78 +26,90 @@
/// \file exoticphysics/phonon/src/XAluminumElectrodeSensitivity.cc
/// \brief Implementation of the XAluminumElectrodeSensitivity class
//
// $Id: XAluminumElectrodeSensitivity.cc 76246 2013-11-08 11:17:29Z gcosmo $
// $Id: XAluminumElectrodeSensitivity.cc 92176 2015-08-20 13:07:22Z gcosmo $
//
#include "XAluminumElectrodeSensitivity.hh"
#include "XAluminumElectrodeHit.hh"
#include "G4AutoLock.hh"
#include "G4HCofThisEvent.hh"
#include "G4Navigator.hh"
#include "G4SDManager.hh"
#include "G4Step.hh"
#include "G4SystemOfUnits.hh"
#include "G4Threading.hh"
#include "G4TouchableHistory.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4SDManager.hh"
#include "G4Navigator.hh"
#include "G4SystemOfUnits.hh"
#include "G4ios.hh"
#include <fstream>
std::fstream* XAluminumElectrodeSensitivity::fWriter = 0;
std::fstream* XAluminumElectrodeSensitivity::fWriter2 = 0;
using namespace std;
G4Mutex theMutex = G4MUTEX_INITIALIZER; // Just need one
XAluminumElectrodeHitsCollection*
XAluminumElectrodeSensitivity::fHitsCollection = NULL;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XAluminumElectrodeSensitivity::XAluminumElectrodeSensitivity(G4String name)
:G4VSensitiveDetector(name)
{
G4String HCname;
collectionName.insert(HCname="XAluminumElectrodeHit");
XAluminumElectrodeSensitivity::
XAluminumElectrodeSensitivity(const G4String& name)
: G4VSensitiveDetector(name) {
collectionName.insert("XAluminumElectrodeHit");
fHCID = -1;
fWriter.open("caustic.ssv", fstream::out | fstream::ate);
fWriter2.open("timing.ssv", fstream::out | fstream::ate);
if(!fWriter.is_open()){
G4cout<<"\nXAluminumElectrodeSensitivity::Constructor:";
G4cout<<"\n\tFailed to open caustic.ssv for appending data.";
G4cout<<"\n\tCreating caustic.ssv" << G4endl;
fWriter.open("caustic.ssv");
G4AutoLock lockIt(&theMutex); // Only one thread opens files!
fWriter = new std::fstream("caustic.ssv",std::fstream::out|std::fstream::ate);
if (!fWriter->is_open()) {
G4cerr << "XAluminumElectrodeSensitivity::Constructor:"
<< "\n\tFailed to open caustic.ssv for appending data."
<< "\n\tCreating caustic.ssv" << G4endl;
fWriter->open("caustic.ssv");
}
if(!fWriter2.is_open()){
G4cout<<"\nXAluminumElectrodeSensitivity::Constructor: ";
G4cout<<"\n\tFailed to open timing.ssv for appending data.";
G4cout<<"\n\tCreating timing.ssv." << G4endl;
fWriter2.open("timing.ssv");
fWriter2 = new std::fstream("timing.ssv",std::fstream::out|std::fstream::ate);
if (!fWriter2->is_open()) {
G4cerr << "XAluminumElectrodeSensitivity::Constructor: "
<< "\n\tFailed to open timing.ssv for appending data."
<< "\n\tCreating timing.ssv." << G4endl;
fWriter2->open("timing.ssv");
}
if(!(fWriter.is_open() && fWriter2.is_open())){
G4cout<<"\nXAluminumElectrodeSensitivity::Constructor: "
<<"\nERROR: COULD NOT CREATE OUTPUT FILES FOR WRITING" << G4endl;
if (!(fWriter->is_open() && fWriter2->is_open())) {
G4cerr << "XAluminumElectrodeSensitivity::Constructor: "
<< "\nERROR: COULD NOT CREATE OUTPUT FILES FOR WRITING" << G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XAluminumElectrodeSensitivity::~XAluminumElectrodeSensitivity(){
fWriter.close();
fWriter2.close();
XAluminumElectrodeSensitivity::~XAluminumElectrodeSensitivity() {
G4AutoLock lockIt(&theMutex); // Only one thread deletes!
if (fWriter) {
fWriter->close();
delete fWriter; fWriter = 0;
}
if (fWriter2) {
fWriter2->close();
delete fWriter2; fWriter2 = 0;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
XAluminumElectrodeHitsCollection*
XAluminumElectrodeSensitivity::GetHitsCollection(){
XAluminumElectrodeSensitivity::GetHitsCollection() {
return fHitsCollection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XAluminumElectrodeSensitivity::Initialize(G4HCofThisEvent*HCE)
void XAluminumElectrodeSensitivity::Initialize(G4HCofThisEvent* HCE)
{
fHitsCollection = new XAluminumElectrodeHitsCollection
(SensitiveDetectorName,collectionName[0]);
if(fHCID<0)
fHitsCollection =
new XAluminumElectrodeHitsCollection(SensitiveDetectorName,
collectionName[0]);
if (fHCID<0)
{ fHCID = G4SDManager::GetSDMpointer()->GetCollectionID(fHitsCollection); }
HCE->AddHitsCollection(fHCID,fHitsCollection);
}
@@ -120,25 +132,38 @@ G4bool XAluminumElectrodeSensitivity::ProcessHits(G4Step* aStep,
= theTouchable->GetHistory()->GetTopTransform().TransformPoint(fWorldPos);
XAluminumElectrodeHit* aHit = new XAluminumElectrodeHit();
aHit->SetTime(postStepPoint->GetGlobalTime());
aHit->SetEDep(edp);
aHit->SetWorldPos(fWorldPos);
aHit->SetLocalPos(fLocalPos);
aHit->fTime = postStepPoint->GetGlobalTime();
aHit->fEdep = edp;
aHit->fWorldPos = fWorldPos;
aHit->fLocalPos = fLocalPos;
fHitsCollection->insert(aHit);
fWriter<<"\n"<<fWorldPos.getX()/mm
<<","<<fWorldPos.getY()/mm
<<","<<fWorldPos.getZ()/mm;
fWriter2<<"\n"<<postStepPoint->GetGlobalTime()/ns<<" "
<<aHit->GetEDep()/eV;
return true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XAluminumElectrodeSensitivity::EndOfEvent(G4HCofThisEvent* /*HCE*/)
{;}
void XAluminumElectrodeSensitivity::EndOfEvent(G4HCofThisEvent* /*HCE*/) {
if (!fHitsCollection || fHitsCollection->GetSize()==0) return;
for (size_t i=0; i<fHitsCollection->GetSize(); i++) {
WriteHitInfo(dynamic_cast<XAluminumElectrodeHit*>(fHitsCollection->GetHit(i)));
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void XAluminumElectrodeSensitivity::
WriteHitInfo(const XAluminumElectrodeHit* aHit) {
if (!aHit) return;
G4AutoLock lockIt(&theMutex); // Only one event can write at a time
*fWriter << "\n" << aHit->fWorldPos.getX()/mm
<< "," << aHit->fWorldPos.getY()/mm
<< "," << aHit->fWorldPos.getZ()/mm;
*fWriter2 << "\n" << aHit->fTime/ns << " " << aHit->fEdep/eV;
}
@@ -1,6 +1,6 @@
//$Id$
///\file "exoticphysics/ucn/.README"
///\file "exoticphysics/ucn/.README.txt"
///\brief Example ucn README page
/*! \page Exampleucn Example ucn
@@ -64,7 +64,6 @@ This example exhibits the functionality of UCN physics
Through ExUCNExtraPhysics the following processes are instantiated:
- G4StepLimiter
- G4UserSpecialCuts
- G4Decay (G4NeutronBetaDecayChannel)
and in ConstructUCN()
- G4UCNLoss
@@ -5,6 +5,7 @@
#/control/verbose 2
#/event/verbose 1
#/tracking/verbose 1
#/ucnboundary/verbose 1
#
/run/beamOn 1
#
File diff suppressed because it is too large Load Diff
@@ -15,6 +15,18 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
June 26, 2015 P. Gumplinger (ExUCN-V10-01-03)
- add NumberOfVariables in G4RepleteEofM constructor
June 10, 2015 P. Gumplinger (ExUCN-V10-01-02)
- remove AddBetaDecay method
April 30, 2015 P. Gumplinger (ExUCN-V10-01-01)
- use the correct way to access G4Transportation::EnableUseMagneticMoment()
January 23, 2015 I. Hrivnacova (ExUCN-V10-01-00)
- fixed files description for Doxygen
September 16, 2014 I. Hrivnacova (ExUCN-V10-00-04)
- improved formatting in .README
@@ -59,7 +59,6 @@ This example exhibits the functionality of UCN physics
G4StepLimiter
G4UserSpecialCuts
G4Decay (G4NeutronBetaDecayChannel)
and in ConstructUCN()
@@ -25,7 +25,7 @@
//
// $Id: ExUCNExtraPhysics.hh 68021 2013-03-13 13:36:07Z gcosmo $
//
/// \file exoticphysic/ucn/include/ExUCNExtraPhysics.hh
/// \file exoticphysics/ucn/include/ExUCNExtraPhysics.hh
/// \brief Definition of the ExUCNExtraPhysics class
//
@@ -51,6 +51,5 @@ private:
void ConstructUCN();
void AddBetaDecay();
};
#endif
@@ -215,14 +215,15 @@ void ExUCNDetectorConstruction::ConstructSDandField()
fField = new G4UniformGravityField();
G4RepleteEofM* equation = new G4RepleteEofM(fField);
// G4RepleteEofM* equation = new G4RepleteEofM(fField,12);
// G4EqGravityField* equation = new G4EqGravityField(fField);
G4FieldManager* fieldManager
= G4TransportationManager::GetTransportationManager()->GetFieldManager();
fieldManager->SetDetectorField(fField);
// G4MagIntegratorStepper* stepper = new G4ClassicalRK4(equation,12);
G4MagIntegratorStepper* stepper = new G4ClassicalRK4(equation,8);
// G4MagIntegratorStepper* stepper = new G4ClassicalRK4(equation,12);
G4double minStep = 0.01*mm;
@@ -33,7 +33,6 @@
#include "G4ProcessManager.hh"
#include "G4Transportation.hh"
#include "G4PhysicsListHelper.hh"
#include "G4Decay.hh"
#include "G4DecayTable.hh"
@@ -85,53 +84,10 @@ void ExUCNExtraPhysics::ConstructProcess()
pmanager->AddDiscreteProcess(new G4UserSpecialCuts());
}
AddBetaDecay();
ConstructUCN();
// G4Transportation* transportation = NULL;
// G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
// transportation = (G4Transportation*) ph->GetTransportation();
// G4Transportation::EnableUseMagneticMoment();
// if (transportation) transportation->EnableUseMagneticMoment();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExUCNExtraPhysics::AddBetaDecay()
{
aParticleIterator->reset();
while ((*aParticleIterator)()) {
G4ParticleDefinition* particle = aParticleIterator->value();
G4String particleName = particle->GetParticleName();
if ( particleName == "neutron" ) {
particle->SetPDGLifeTime(886.7*second);
particle->SetPDGStable(false);
G4DecayTable * table = new G4DecayTable();
G4VDecayChannel* mode =
new G4NeutronBetaDecayChannel("neutron",1.00);
table->Insert(mode);
particle->SetDecayTable(table);
G4ProcessManager* pmanager = particle->GetProcessManager();
if (!pmanager) {
std::ostringstream o;
o << "Particle " << particleName << "without a Process Manager";
G4Exception("ExUCNExtraPhysics::ConstructProcess()","",
FatalException,o.str().c_str());
}
G4Decay* theDecayProcess = new G4Decay();
pmanager->AddProcess(theDecayProcess);
pmanager->SetProcessOrdering(theDecayProcess,idxPostStep);
pmanager->SetProcessOrdering(theDecayProcess,idxAtRest);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file field/field01/src/ExUCNRunAction.cc
/// \file exoticphysics/ucn/src/ExUCNRunAction.cc
/// \brief Implementation of the ExUCNRunAction class
//
//