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