153 theParticleIterator->reset();
154 while ( ( *theParticleIterator )() )
156 G4ParticleDefinition* particle = theParticleIterator->value();
157 G4ProcessManager* pmanager = particle->GetProcessManager();
158 G4String particleName = particle->GetParticleName();
160 if ( particleName ==
"gamma" )
163 pmanager->AddDiscreteProcess(
new G4GammaConversion() );
164 pmanager->AddDiscreteProcess(
new G4ComptonScattering() );
165 pmanager->AddDiscreteProcess(
new G4PhotoElectricEffect() );
167 else if ( particleName ==
"e-" )
170 G4VProcess* theeminusMultipleScattering =
new G4MultipleScattering();
171 G4VProcess* theeminusIonisation =
new G4eIonisation();
172 G4VProcess* theeminusBremsstrahlung =
new G4eBremsstrahlung();
175 pmanager->AddProcess( theeminusMultipleScattering );
176 pmanager->AddProcess( theeminusIonisation );
177 pmanager->AddProcess( theeminusBremsstrahlung );
180 pmanager->SetProcessOrdering( theeminusMultipleScattering, idxAlongStep, 1 );
181 pmanager->SetProcessOrdering( theeminusIonisation, idxAlongStep, 2 );
184 pmanager->SetProcessOrdering( theeminusMultipleScattering, idxPostStep, 1 );
185 pmanager->SetProcessOrdering( theeminusIonisation, idxPostStep, 2 );
186 pmanager->SetProcessOrdering( theeminusBremsstrahlung, idxPostStep, 3 );
188 else if ( particleName ==
"e+" )
191 G4VProcess* theeplusMultipleScattering =
new G4MultipleScattering();
192 G4VProcess* theeplusIonisation =
new G4eIonisation();
193 G4VProcess* theeplusBremsstrahlung =
new G4eBremsstrahlung();
194 G4VProcess* theeplusAnnihilation =
new G4eplusAnnihilation();
197 pmanager->AddProcess( theeplusMultipleScattering );
198 pmanager->AddProcess( theeplusIonisation );
199 pmanager->AddProcess( theeplusBremsstrahlung );
200 pmanager->AddProcess( theeplusAnnihilation );
203 pmanager->SetProcessOrderingToFirst( theeplusAnnihilation, idxAtRest );
206 pmanager->SetProcessOrdering( theeplusMultipleScattering, idxAlongStep, 1 );
207 pmanager->SetProcessOrdering( theeplusIonisation, idxAlongStep, 2 );
210 pmanager->SetProcessOrdering( theeplusMultipleScattering, idxPostStep, 1 );
211 pmanager->SetProcessOrdering( theeplusIonisation, idxPostStep, 2 );
212 pmanager->SetProcessOrdering( theeplusBremsstrahlung, idxPostStep, 3 );
213 pmanager->SetProcessOrdering( theeplusAnnihilation, idxPostStep, 4 );
215 else if ( particleName ==
"mu+" || particleName ==
"mu-" )
218 G4VProcess* aMultipleScattering =
new G4MultipleScattering();
219 G4VProcess* aBremsstrahlung =
new G4MuBremsstrahlung();
220 G4VProcess* aPairProduction =
new G4MuPairProduction();
221 G4VProcess* anIonisation =
new G4MuIonisation();
224 pmanager->AddProcess( anIonisation );
225 pmanager->AddProcess( aMultipleScattering );
226 pmanager->AddProcess( aBremsstrahlung );
227 pmanager->AddProcess( aPairProduction );
230 pmanager->SetProcessOrdering( aMultipleScattering, idxAlongStep, 1 );
231 pmanager->SetProcessOrdering( anIonisation, idxAlongStep, 2 );
234 pmanager->SetProcessOrdering( aMultipleScattering, idxPostStep, 1 );
235 pmanager->SetProcessOrdering( anIonisation, idxPostStep, 2 );
236 pmanager->SetProcessOrdering( aBremsstrahlung, idxPostStep, 3 );
237 pmanager->SetProcessOrdering( aPairProduction, idxPostStep, 4 );
239 else if ( ( !particle->IsShortLived() ) && ( particle->GetPDGCharge() != 0.0 ) &&
240 ( particle->GetParticleName() !=
"chargedgeantino" ) )
243 G4VProcess* aMultipleScattering =
new G4MultipleScattering();
244 G4VProcess* anIonisation =
new G4hIonisation();
247 pmanager->AddProcess( anIonisation );
248 pmanager->AddProcess( aMultipleScattering );
251 pmanager->SetProcessOrdering( aMultipleScattering, idxAlongStep, 1 );
252 pmanager->SetProcessOrdering( anIonisation, idxAlongStep, 2 );
255 pmanager->SetProcessOrdering( aMultipleScattering, idxPostStep, 1 );
256 pmanager->SetProcessOrdering( anIonisation, idxPostStep, 2 );