Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
GarfieldPhysicsList Class Reference

#include <GarfieldPhysicsList.hh>

+ Inheritance diagram for GarfieldPhysicsList:

Public Member Functions

 GarfieldPhysicsList ()
 
virtual ~GarfieldPhysicsList ()
 
virtual void SetCuts ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 

Protected Member Functions

void AddParameterisation ()
 

Detailed Description

Definition at line 39 of file GarfieldPhysicsList.hh.

Constructor & Destructor Documentation

◆ GarfieldPhysicsList()

GarfieldPhysicsList::GarfieldPhysicsList ( )

Definition at line 49 of file GarfieldPhysicsList.cc.

49 :
50 G4VModularPhysicsList() {
51 G4int verb = 0;
52 SetVerboseLevel(verb);
53 defaultCutValue = 1 * CLHEP::mm;
54 QGSP_BERT_HP *physicsList = new QGSP_BERT_HP;
55 for (G4int i = 0;; ++i) {
56 G4VPhysicsConstructor* elem =
57 const_cast<G4VPhysicsConstructor*>(physicsList->GetPhysics(i));
58 if (elem == NULL)
59 break;
60 G4cout << "RegisterPhysics: " << elem->GetPhysicsName() << G4endl;
61 RegisterPhysics(elem);
62 }
63
64}

◆ ~GarfieldPhysicsList()

GarfieldPhysicsList::~GarfieldPhysicsList ( )
virtual

Definition at line 68 of file GarfieldPhysicsList.cc.

68 {
69
70}

Member Function Documentation

◆ AddParameterisation()

void GarfieldPhysicsList::AddParameterisation ( )
protected

Definition at line 72 of file GarfieldPhysicsList.cc.

72 {
73
75
76 std::string ionizationModel = garfieldPhysics->GetIonizationModel();
77
78 G4FastSimulationManagerProcess* fastSimProcess_garfield =
79 new G4FastSimulationManagerProcess("G4FSMP_garfield");
80
81 theParticleIterator->reset();
82 while ((*theParticleIterator)()) {
83
84 G4ParticleDefinition* particle = theParticleIterator->value();
85 G4ProcessManager* pmanager = particle->GetProcessManager();
86 G4EmConfigurator* config =
87 G4LossTableManager::Instance()->EmConfigurator();
88 G4LossTableManager::Instance()->SetVerbose(1);
89
90 if (garfieldPhysics->FindParticleName(particle->GetParticleName(),
91 "garfield")) {
92 pmanager->AddDiscreteProcess(fastSimProcess_garfield);
93 }
94
95 if (garfieldPhysics->FindParticleName(particle->GetParticleName(),
96 "geant4")) {
97 double minEnergy_MeV = garfieldPhysics->GetMinEnergyMeVParticle(
98 particle->GetParticleName(), "geant4");
99 double maxEnergy_MeV = garfieldPhysics->GetMaxEnergyMeVParticle(
100 particle->GetParticleName(), "geant4");
101 if (ionizationModel == "PAI") {
102
103 G4PAIModel* pai = new G4PAIModel(particle, "G4PAIModel");
104 if (particle->GetParticleName() == "e-"
105 || particle->GetParticleName() == "e+") {
106
107 config->SetExtraEmModel(particle->GetParticleName(),
108 "eIoni", pai, "RegionGarfield", minEnergy_MeV * MeV,
109 maxEnergy_MeV * MeV, pai);
110
111 } else if (particle->GetParticleName() == "mu-"
112 || particle->GetParticleName() == "mu+") {
113
114 config->SetExtraEmModel(particle->GetParticleName(),
115 "muIoni", pai, "RegionGarfield", minEnergy_MeV * MeV,
116 maxEnergy_MeV * MeV, pai);
117
118 } else if (particle->GetParticleName() == "proton"
119 || particle->GetParticleName() == "pi+"
120 || particle->GetParticleName() == "pi-") {
121
122 config->SetExtraEmModel(particle->GetParticleName(),
123 "hIoni", pai, "RegionGarfield", minEnergy_MeV * MeV,
124 maxEnergy_MeV * MeV, pai);
125
126 } else if (particle->GetParticleName() == "alpha"
127 || particle->GetParticleName() == "He3"
128 || particle->GetParticleName() == "GenericIon") {
129
130 config->SetExtraEmModel(particle->GetParticleName(),
131 "ionIoni", pai, "RegionGarfield", minEnergy_MeV * MeV,
132 maxEnergy_MeV * MeV, pai);
133
134 }
135
136 } else if (ionizationModel == "PAIPhot") {
137
138 G4PAIPhotModel* paiPhot = new G4PAIPhotModel(particle,
139 "G4PAIModel");
140 if (particle->GetParticleName() == "e-"
141 || particle->GetParticleName() == "e+") {
142
143 config->SetExtraEmModel(particle->GetParticleName(),
144 "eIoni", paiPhot, "RegionGarfield", minEnergy_MeV * MeV,
145 maxEnergy_MeV * MeV, paiPhot);
146
147 } else if (particle->GetParticleName() == "mu-"
148 || particle->GetParticleName() == "mu+") {
149
150 config->SetExtraEmModel(particle->GetParticleName(),
151 "muIoni", paiPhot, "RegionGarfield", minEnergy_MeV * MeV,
152 maxEnergy_MeV * MeV, paiPhot);
153
154 } else if (particle->GetParticleName() == "proton"
155 || particle->GetParticleName() == "pi+"
156 || particle->GetParticleName() == "pi-") {
157
158 config->SetExtraEmModel(particle->GetParticleName(),
159 "hIoni", paiPhot, "RegionGarfield", minEnergy_MeV * MeV,
160 maxEnergy_MeV * MeV, paiPhot);
161
162 } else if (particle->GetParticleName() == "alpha"
163 || particle->GetParticleName() == "He3"
164 || particle->GetParticleName() == "GenericIon") {
165
166 config->SetExtraEmModel(particle->GetParticleName(),
167 "ionIoni", paiPhot, "RegionGarfield", minEnergy_MeV * MeV,
168 maxEnergy_MeV * MeV, paiPhot);
169
170 }
171 }
172 }
173 }
174}
double GetMaxEnergyMeVParticle(std::string name, std::string program="garfield")
static GarfieldPhysics * GetInstance()
double GetMinEnergyMeVParticle(std::string name, std::string program="garfield")
std::string GetIonizationModel()
bool FindParticleName(const std::string name, std::string program="garfield")

Referenced by ConstructProcess().

◆ ConstructParticle()

void GarfieldPhysicsList::ConstructParticle ( )
virtual

Definition at line 196 of file GarfieldPhysicsList.cc.

196 {
197 G4VModularPhysicsList::ConstructParticle();
198}

◆ ConstructProcess()

void GarfieldPhysicsList::ConstructProcess ( )
virtual

Definition at line 200 of file GarfieldPhysicsList.cc.

200 {
201 G4VModularPhysicsList::ConstructProcess();
203}

◆ SetCuts()

void GarfieldPhysicsList::SetCuts ( )
virtual

Definition at line 177 of file GarfieldPhysicsList.cc.

177 {
178 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100. * eV,
179 100. * TeV);
180
181 SetCutsWithDefault();
182
183 G4Region *region = G4RegionStore::GetInstance()->GetRegion(
184 "RegionGarfield");
185 G4ProductionCuts * cuts = new G4ProductionCuts();
186 cuts->SetProductionCut(1 * um, G4ProductionCuts::GetIndex("gamma"));
187 cuts->SetProductionCut(1 * um, G4ProductionCuts::GetIndex("e-"));
188 cuts->SetProductionCut(1 * um, G4ProductionCuts::GetIndex("e+"));
189 if (region) {
190 region->SetProductionCuts(cuts);
191 }
192
193 DumpCutValuesTable();
194}

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