165{
166 theParticleIterator->reset();
167 while( (*theParticleIterator)() ){
168 G4ParticleDefinition* particle = theParticleIterator->value();
169 G4ProcessManager* pmanager = particle->GetProcessManager();
170 G4String particleName = particle->GetParticleName();
171
172 if (particleName == "gamma") {
173
174 pmanager->AddDiscreteProcess(new G4GammaConversion());
175 pmanager->AddDiscreteProcess(new G4ComptonScattering());
176 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
177
178 } else if (particleName == "e-") {
179
180 G4VProcess* theeminusMultipleScattering = new G4MultipleScattering();
181 G4VProcess* theeminusIonisation = new G4eIonisation();
182 G4VProcess* theeminusBremsstrahlung = new G4eBremsstrahlung();
183
184
185 pmanager->AddProcess(theeminusMultipleScattering);
186 pmanager->AddProcess(theeminusIonisation);
187 pmanager->AddProcess(theeminusBremsstrahlung);
188
189
190 pmanager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
191 pmanager->SetProcessOrdering(theeminusIonisation, idxAlongStep,2);
192
193
194 pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
195 pmanager->SetProcessOrdering(theeminusIonisation, idxPostStep,2);
196 pmanager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep,3);
197
198 } else if (particleName == "e+") {
199
200 G4VProcess* theeplusMultipleScattering = new G4MultipleScattering();
201 G4VProcess* theeplusIonisation = new G4eIonisation();
202 G4VProcess* theeplusBremsstrahlung = new G4eBremsstrahlung();
203 G4VProcess* theeplusAnnihilation = new G4eplusAnnihilation();
204
205
206 pmanager->AddProcess(theeplusMultipleScattering);
207 pmanager->AddProcess(theeplusIonisation);
208 pmanager->AddProcess(theeplusBremsstrahlung);
209 pmanager->AddProcess(theeplusAnnihilation);
210
211
212 pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
213
214
215 pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
216 pmanager->SetProcessOrdering(theeplusIonisation, idxAlongStep,2);
217
218
219 pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
220 pmanager->SetProcessOrdering(theeplusIonisation, idxPostStep,2);
221 pmanager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep,3);
222 pmanager->SetProcessOrdering(theeplusAnnihilation, idxPostStep,4);
223
224 } else if( particleName == "mu+" ||
225 particleName == "mu-" ) {
226
227 G4VProcess* aMultipleScattering = new G4MultipleScattering();
228 G4VProcess* aBremsstrahlung = new G4MuBremsstrahlung();
229 G4VProcess* aPairProduction = new G4MuPairProduction();
230 G4VProcess* anIonisation = new G4MuIonisation();
231
232
233 pmanager->AddProcess(anIonisation);
234 pmanager->AddProcess(aMultipleScattering);
235 pmanager->AddProcess(aBremsstrahlung);
236 pmanager->AddProcess(aPairProduction);
237
238
239 pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
240 pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
241
242
243 pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
244 pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);
245 pmanager->SetProcessOrdering(aBremsstrahlung, idxPostStep,3);
246 pmanager->SetProcessOrdering(aPairProduction, idxPostStep,4);
247
248 } else if ((!particle->IsShortLived()) &&
249 (particle->GetPDGCharge() != 0.0) &&
250 (particle->GetParticleName() != "chargedgeantino")) {
251
252 G4VProcess* aMultipleScattering = new G4MultipleScattering();
253 G4VProcess* anIonisation = new G4hIonisation();
254
255
256
257
258 pmanager->AddProcess(anIonisation);
259 pmanager->AddProcess(aMultipleScattering);
260
261
262
263
264 pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
265 pmanager->SetProcessOrdering(anIonisation, idxAlongStep,2);
266
267
268
269 pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
270 pmanager->SetProcessOrdering(anIonisation, idxPostStep,2);
271
272 }
273 }
274}