163 theParticleIterator->reset();
164 while( (*theParticleIterator)() ){
165 G4ParticleDefinition* particle = theParticleIterator->value();
166 G4ProcessManager* pmanager = particle->GetProcessManager();
167 G4String particleName = particle->GetParticleName();
169 if (particleName ==
"gamma") {
171 pmanager->AddDiscreteProcess(
new G4GammaConversion());
172 pmanager->AddDiscreteProcess(
new G4ComptonScattering());
173 pmanager->AddDiscreteProcess(
new G4PhotoElectricEffect());
175 }
else if (particleName ==
"e-") {
177 G4VProcess* theeminusMultipleScattering =
new G4MultipleScattering();
178 G4VProcess* theeminusIonisation =
new G4eIonisation();
179 G4VProcess* theeminusBremsstrahlung =
new G4eBremsstrahlung();
182 pmanager->AddProcess(theeminusMultipleScattering);
183 pmanager->AddProcess(theeminusIonisation);
184 pmanager->AddProcess(theeminusBremsstrahlung);
187 pmanager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
188 pmanager->SetProcessOrdering(theeminusIonisation, idxAlongStep,2);
191 pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
192 pmanager->SetProcessOrdering(theeminusIonisation, idxPostStep,2);
193 pmanager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep,3);
195 }
else if (particleName ==
"e+") {
197 G4VProcess* theeplusMultipleScattering =
new G4MultipleScattering();
198 G4VProcess* theeplusIonisation =
new G4eIonisation();
199 G4VProcess* theeplusBremsstrahlung =
new G4eBremsstrahlung();
200 G4VProcess* theeplusAnnihilation =
new G4eplusAnnihilation();
203 pmanager->AddProcess(theeplusMultipleScattering);
204 pmanager->AddProcess(theeplusIonisation);
205 pmanager->AddProcess(theeplusBremsstrahlung);
206 pmanager->AddProcess(theeplusAnnihilation);
209 pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
212 pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
213 pmanager->SetProcessOrdering(theeplusIonisation, idxAlongStep,2);
216 pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
217 pmanager->SetProcessOrdering(theeplusIonisation, idxPostStep,2);
218 pmanager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep,3);
219 pmanager->SetProcessOrdering(theeplusAnnihilation, idxPostStep,4);
221 }
else if( particleName ==
"mu+" ||
222 particleName ==
"mu-" ) {
224 G4VProcess* aMultipleScattering =
new G4MultipleScattering();
225 G4VProcess* aBremsstrahlung =
new G4MuBremsstrahlung();
226 G4VProcess* aPairProduction =
new G4MuPairProduction();
227 G4VProcess* anIonisation =
new G4MuIonisation();
230 pmanager->AddProcess(anIonisation);
231 pmanager->AddProcess(aMultipleScattering);
232 pmanager->AddProcess(aBremsstrahlung);
233 pmanager->AddProcess(aPairProduction);
236 pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
237 pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
240 pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
241 pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);
242 pmanager->SetProcessOrdering(aBremsstrahlung, idxPostStep,3);
243 pmanager->SetProcessOrdering(aPairProduction, idxPostStep,4);
245 }
else if ((!particle->IsShortLived()) &&
246 (particle->GetPDGCharge() != 0.0) &&
247 (particle->GetParticleName() !=
"chargedgeantino")) {
249 G4VProcess* aMultipleScattering =
new G4MultipleScattering();
250 G4VProcess* anIonisation =
new G4hIonisation();
253 pmanager->AddProcess(anIonisation);
254 pmanager->AddProcess(aMultipleScattering);
257 pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
258 pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
261 pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
262 pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);