156 theParticleIterator->reset();
157 while ( ( *theParticleIterator )() )
159 G4ParticleDefinition* particle = theParticleIterator->value();
160 G4ProcessManager* pmanager = particle->GetProcessManager();
161 G4String particleName = particle->GetParticleName();
163 if ( particleName ==
"gamma" )
166 pmanager->AddDiscreteProcess(
new G4GammaConversion() );
167 pmanager->AddDiscreteProcess(
new G4ComptonScattering() );
168 pmanager->AddDiscreteProcess(
new G4PhotoElectricEffect() );
170 else if ( particleName ==
"e-" )
173 G4VProcess* theeminusMultipleScattering =
new G4MultipleScattering();
174 G4VProcess* theeminusIonisation =
new G4eIonisation();
175 G4VProcess* theeminusBremsstrahlung =
new G4eBremsstrahlung();
178 pmanager->AddProcess( theeminusMultipleScattering );
179 pmanager->AddProcess( theeminusIonisation );
180 pmanager->AddProcess( theeminusBremsstrahlung );
183 pmanager->SetProcessOrdering( theeminusMultipleScattering, idxAlongStep, 1 );
184 pmanager->SetProcessOrdering( theeminusIonisation, idxAlongStep, 2 );
187 pmanager->SetProcessOrdering( theeminusMultipleScattering, idxPostStep, 1 );
188 pmanager->SetProcessOrdering( theeminusIonisation, idxPostStep, 2 );
189 pmanager->SetProcessOrdering( theeminusBremsstrahlung, idxPostStep, 3 );
191 else if ( particleName ==
"e+" )
194 G4VProcess* theeplusMultipleScattering =
new G4MultipleScattering();
195 G4VProcess* theeplusIonisation =
new G4eIonisation();
196 G4VProcess* theeplusBremsstrahlung =
new G4eBremsstrahlung();
197 G4VProcess* theeplusAnnihilation =
new G4eplusAnnihilation();
200 pmanager->AddProcess( theeplusMultipleScattering );
201 pmanager->AddProcess( theeplusIonisation );
202 pmanager->AddProcess( theeplusBremsstrahlung );
203 pmanager->AddProcess( theeplusAnnihilation );
206 pmanager->SetProcessOrderingToFirst( theeplusAnnihilation, idxAtRest );
209 pmanager->SetProcessOrdering( theeplusMultipleScattering, idxAlongStep, 1 );
210 pmanager->SetProcessOrdering( theeplusIonisation, idxAlongStep, 2 );
213 pmanager->SetProcessOrdering( theeplusMultipleScattering, idxPostStep, 1 );
214 pmanager->SetProcessOrdering( theeplusIonisation, idxPostStep, 2 );
215 pmanager->SetProcessOrdering( theeplusBremsstrahlung, idxPostStep, 3 );
216 pmanager->SetProcessOrdering( theeplusAnnihilation, idxPostStep, 4 );
218 else if ( particleName ==
"mu+" || particleName ==
"mu-" )
221 G4VProcess* aMultipleScattering =
new G4MultipleScattering();
222 G4VProcess* aBremsstrahlung =
new G4MuBremsstrahlung();
223 G4VProcess* aPairProduction =
new G4MuPairProduction();
224 G4VProcess* anIonisation =
new G4MuIonisation();
227 pmanager->AddProcess( anIonisation );
228 pmanager->AddProcess( aMultipleScattering );
229 pmanager->AddProcess( aBremsstrahlung );
230 pmanager->AddProcess( aPairProduction );
233 pmanager->SetProcessOrdering( aMultipleScattering, idxAlongStep, 1 );
234 pmanager->SetProcessOrdering( anIonisation, idxAlongStep, 2 );
237 pmanager->SetProcessOrdering( aMultipleScattering, idxPostStep, 1 );
238 pmanager->SetProcessOrdering( anIonisation, idxPostStep, 2 );
239 pmanager->SetProcessOrdering( aBremsstrahlung, idxPostStep, 3 );
240 pmanager->SetProcessOrdering( aPairProduction, idxPostStep, 4 );
242 else if ( ( !particle->IsShortLived() ) && ( particle->GetPDGCharge() != 0.0 ) &&
243 ( particle->GetParticleName() !=
"chargedgeantino" ) )
246 G4VProcess* aMultipleScattering =
new G4MultipleScattering();
247 G4VProcess* anIonisation =
new G4hIonisation();
252 pmanager->AddProcess( anIonisation );
253 pmanager->AddProcess( aMultipleScattering );
258 pmanager->SetProcessOrdering( aMultipleScattering, idxAlongStep, 1 );
259 pmanager->SetProcessOrdering( anIonisation, idxAlongStep, 2 );
263 pmanager->SetProcessOrdering( aMultipleScattering, idxPostStep, 1 );
264 pmanager->SetProcessOrdering( anIonisation, idxPostStep, 2 );