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