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