166 theParticleIterator->reset();
167 while( (*theParticleIterator)() ){
168 G4ParticleDefinition* particle = theParticleIterator->value();
169 G4ProcessManager* pmanager = particle->GetProcessManager();
170 G4String particleName = particle->GetParticleName();
172 if (particleName ==
"gamma") {
174 pmanager->AddDiscreteProcess(
new G4GammaConversion());
175 pmanager->AddDiscreteProcess(
new G4ComptonScattering());
176 pmanager->AddDiscreteProcess(
new G4PhotoElectricEffect());
178 }
else if (particleName ==
"e-") {
180 G4VProcess* theeminusMultipleScattering =
new G4MultipleScattering();
181 G4VProcess* theeminusIonisation =
new G4eIonisation();
182 G4VProcess* theeminusBremsstrahlung =
new G4eBremsstrahlung();
185 pmanager->AddProcess(theeminusMultipleScattering);
186 pmanager->AddProcess(theeminusIonisation);
187 pmanager->AddProcess(theeminusBremsstrahlung);
190 pmanager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
191 pmanager->SetProcessOrdering(theeminusIonisation, idxAlongStep,2);
194 pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
195 pmanager->SetProcessOrdering(theeminusIonisation, idxPostStep,2);
196 pmanager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep,3);
198 }
else if (particleName ==
"e+") {
200 G4VProcess* theeplusMultipleScattering =
new G4MultipleScattering();
201 G4VProcess* theeplusIonisation =
new G4eIonisation();
202 G4VProcess* theeplusBremsstrahlung =
new G4eBremsstrahlung();
203 G4VProcess* theeplusAnnihilation =
new G4eplusAnnihilation();
206 pmanager->AddProcess(theeplusMultipleScattering);
207 pmanager->AddProcess(theeplusIonisation);
208 pmanager->AddProcess(theeplusBremsstrahlung);
209 pmanager->AddProcess(theeplusAnnihilation);
212 pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
215 pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
216 pmanager->SetProcessOrdering(theeplusIonisation, idxAlongStep,2);
219 pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
220 pmanager->SetProcessOrdering(theeplusIonisation, idxPostStep,2);
221 pmanager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep,3);
222 pmanager->SetProcessOrdering(theeplusAnnihilation, idxPostStep,4);
224 }
else if( particleName ==
"mu+" ||
225 particleName ==
"mu-" ) {
227 G4VProcess* aMultipleScattering =
new G4MultipleScattering();
228 G4VProcess* aBremsstrahlung =
new G4MuBremsstrahlung();
229 G4VProcess* aPairProduction =
new G4MuPairProduction();
230 G4VProcess* anIonisation =
new G4MuIonisation();
233 pmanager->AddProcess(anIonisation);
234 pmanager->AddProcess(aMultipleScattering);
235 pmanager->AddProcess(aBremsstrahlung);
236 pmanager->AddProcess(aPairProduction);
239 pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
240 pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
243 pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
244 pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);
245 pmanager->SetProcessOrdering(aBremsstrahlung, idxPostStep,3);
246 pmanager->SetProcessOrdering(aPairProduction, idxPostStep,4);
248 }
else if ((!particle->IsShortLived()) &&
249 (particle->GetPDGCharge() != 0.0) &&
250 (particle->GetParticleName() !=
"chargedgeantino")) {
252 G4VProcess* aMultipleScattering =
new G4MultipleScattering();
253 G4VProcess* anIonisation =
new G4hIonisation();
258 pmanager->AddProcess(anIonisation);
259 pmanager->AddProcess(aMultipleScattering);
264 pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
265 pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
269 pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
270 pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);