Public Member Functions | Private Attributes | List of all members
EDepSim::PhysicsList Class Reference

#include <EDepSimPhysicsList.hh>

Inheritance diagram for EDepSim::PhysicsList:

Public Member Functions

 PhysicsList (G4String physName)
 
virtual ~PhysicsList ()
 
void SetPhysicsListName (G4String pName)
 
virtual void SetCuts ()
 Used by GEANT4 to set the cuts defined below. More...
 
void SetCutForGamma (G4double)
 Set the range cut for photons. More...
 
void SetCutForElectron (G4double)
 Set the range cut for electrons. More...
 
void SetCutForPositron (G4double)
 Set the range cut for positrons. More...
 
void SetIonizationModel (bool)
 

Private Attributes

G4double fCutForGamma
 The gamma-ray range cut. More...
 
G4double fCutForElectron
 The electron range cut. More...
 
G4double fCutForPositron
 The positron range cut. More...
 
EDepSim::ExtraPhysicsfExtra
 The extra physics list. More...
 
EDepSim::PhysicsListMessengerfMessenger
 The messenger to control this class. More...
 

Detailed Description

Definition at line 16 of file EDepSimPhysicsList.hh.

Constructor & Destructor Documentation

EDepSim::PhysicsList::PhysicsList ( G4String  physName)
explicit

Construct the physics list. If physName is a valid list, then it will be used. Otherwise, the physics list will be read first from the macro file, and then from the PHYSLIST environment variable. If all of thoses methods fail, then a G4 provided default will be used.

Definition at line 28 of file EDepSimPhysicsList.cc.

29  : G4VModularPhysicsList() {
30  G4LossTableManager::Instance();
31  defaultCutValue = 1.*mm;
32  fCutForGamma = defaultCutValue;
33  fCutForElectron = defaultCutValue;
34  fCutForPositron = defaultCutValue;
35 
37 
38  SetVerboseLevel(1);
39 
40  G4PhysListFactory factory;
41  G4VModularPhysicsList* phys = NULL;
42 
43  // Check to see if the physics list has been over ridden from the
44  // environment variable PHYSLIST
45  char* list = getenv("PHYSLIST");
46  if (list) {
47  phys = factory.ReferencePhysList();
48  }
49 
50  // Check if a list name was provided on the command line. It usually is
51  // not provided.
52  if (!phys && physName.size() > 1
53  && factory.IsReferencePhysList(physName)) {
54  EDepSimLog("Set the default physics list");
55  phys =factory.GetReferencePhysList(physName);
56  }
57 
58  // Use the default physics list.
59  if (!phys) {
60  phys =factory.GetReferencePhysList("QGSP_BERT");
61  }
62 
63  if (!phys) {
64  EDepSimThrow("No physics list was created.");
65  }
66 
67  // Transfer the physics list from the factory to this one.
68  for (G4int i = 0; ; ++i) {
69  G4VPhysicsConstructor* elem =
70  const_cast<G4VPhysicsConstructor*> (phys->GetPhysics(i));
71  if (elem == NULL) break;
72  G4cout << "RegisterPhysics: " << elem->GetPhysicsName() << G4endl;
73  RegisterPhysics(elem);
74  }
75 
76  // Add our specific lists.
78  RegisterPhysics(fExtra);
79  RegisterPhysics(new G4OpticalPhysics());
80 
81 }
#define EDepSimLog(outStream)
Definition: EDepSimLog.hh:717
EDepSim::PhysicsListMessenger * fMessenger
The messenger to control this class.
#define EDepSimThrow(message)
Print an error message, and then throw an exception.
std::string getenv(std::string const &name)
Definition: getenv.cc:15
G4double fCutForPositron
The positron range cut.
EDepSim::ExtraPhysics * fExtra
The extra physics list.
G4double fCutForGamma
The gamma-ray range cut.
static constexpr double mm
Definition: Units.h:65
G4double fCutForElectron
The electron range cut.
EDepSim::PhysicsList::~PhysicsList ( )
virtual

Definition at line 83 of file EDepSimPhysicsList.cc.

83  {
84  delete fMessenger;
85 }
EDepSim::PhysicsListMessenger * fMessenger
The messenger to control this class.

Member Function Documentation

void EDepSim::PhysicsList::SetCutForElectron ( G4double  cut)

Set the range cut for electrons.

Definition at line 108 of file EDepSimPhysicsList.cc.

108  {
109  fCutForElectron = cut;
110  SetParticleCuts(fCutForElectron, G4Electron::Electron());
111 }
G4double fCutForElectron
The electron range cut.
void EDepSim::PhysicsList::SetCutForGamma ( G4double  cut)

Set the range cut for photons.

Definition at line 103 of file EDepSimPhysicsList.cc.

103  {
104  fCutForGamma = cut;
105  SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
106 }
G4double fCutForGamma
The gamma-ray range cut.
void EDepSim::PhysicsList::SetCutForPositron ( G4double  cut)

Set the range cut for positrons.

Definition at line 113 of file EDepSimPhysicsList.cc.

113  {
114  fCutForPositron = cut;
115  SetParticleCuts(fCutForPositron, G4Positron::Positron());
116 }
G4double fCutForPositron
The positron range cut.
void EDepSim::PhysicsList::SetCuts ( )
virtual

Used by GEANT4 to set the cuts defined below.

Definition at line 87 of file EDepSimPhysicsList.cc.

87  {
88  if (verboseLevel >0) {
89  G4cout << "EDepSim::PhysicsList::SetCuts:";
90  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length")
91  << G4endl;
92  }
93 
94  // set cut values for gamma at first and for e- second and next for e+,
95  // because some processes for e+/e- need cut values for gamma
96  SetCutValue(fCutForGamma, "gamma");
97  SetCutValue(fCutForElectron, "e-");
98  SetCutValue(fCutForPositron, "e+");
99 
100  if (verboseLevel>0) DumpCutValuesTable();
101 }
G4double fCutForPositron
The positron range cut.
G4double fCutForGamma
The gamma-ray range cut.
G4double fCutForElectron
The electron range cut.
void EDepSim::PhysicsList::SetIonizationModel ( bool  b)

Set the recombination fraction for liquid argon (negative for using nest).

Definition at line 118 of file EDepSimPhysicsList.cc.

118  {
120 }
EDepSim::ExtraPhysics * fExtra
The extra physics list.
static bool * b
Definition: config.cpp:1043
void EDepSim::PhysicsList::SetPhysicsListName ( G4String  pName)

Set the physics list name to be used (this is used by the physics list messenger.

Member Data Documentation

G4double EDepSim::PhysicsList::fCutForElectron
private

The electron range cut.

Definition at line 53 of file EDepSimPhysicsList.hh.

G4double EDepSim::PhysicsList::fCutForGamma
private

The gamma-ray range cut.

Definition at line 50 of file EDepSimPhysicsList.hh.

G4double EDepSim::PhysicsList::fCutForPositron
private

The positron range cut.

Definition at line 56 of file EDepSimPhysicsList.hh.

EDepSim::ExtraPhysics* EDepSim::PhysicsList::fExtra
private

The extra physics list.

Definition at line 59 of file EDepSimPhysicsList.hh.

EDepSim::PhysicsListMessenger* EDepSim::PhysicsList::fMessenger
private

The messenger to control this class.

Definition at line 62 of file EDepSimPhysicsList.hh.


The documentation for this class was generated from the following files: