129 G4MuBremsstrahlung* mub =
nullptr;
130 G4MuPairProduction* mup =
nullptr;
131 G4hBremsstrahlung* pib =
nullptr;
132 G4hPairProduction* pip =
nullptr;
133 G4hBremsstrahlung* kb =
nullptr;
134 G4hPairProduction*
kp =
nullptr;
135 G4hBremsstrahlung* pb =
nullptr;
136 G4hPairProduction*
pp =
nullptr;
138 G4hMultipleScattering* hmsc =
new G4hMultipleScattering(
"ionmsc");
145 aParticleIterator->reset();
146 while( (*aParticleIterator)() ){
147 G4ParticleDefinition* particle = aParticleIterator->value();
148 G4ProcessManager* pmanager = particle->GetProcessManager();
149 G4String particleName = particle->GetParticleName();
151 G4cout <<
"### " << GetPhysicsName() <<
" instantiates for "
152 << particleName <<
" at " << particle << G4endl;
154 if (particleName ==
"gamma") {
156 pmanager->AddDiscreteProcess(
new G4PhotoElectricEffect);
157 pmanager->AddDiscreteProcess(
new G4ComptonScattering);
158 pmanager->AddDiscreteProcess(
new G4GammaConversion());
160 }
else if (particleName ==
"e-") {
162 G4eIonisation* eioni =
new G4eIonisation();
163 eioni->SetStepFunction(0.8, 1.0*mm);
164 G4eMultipleScattering*
msc =
new G4eMultipleScattering;
165 msc->SetStepLimitType(fMinimal);
168 G4eBremsstrahlung* ebrem =
new G4eBremsstrahlung();
170 pmanager->AddProcess(msc, -1, 1, 1);
171 pmanager->AddProcess(eioni, -1, 2, 2);
172 pmanager->AddProcess(ebrem, -1,-3, 3);
174 }
else if (particleName ==
"e+") {
176 G4eIonisation* eioni =
new G4eIonisation();
177 eioni->SetStepFunction(0.8, 1.0*mm);
178 G4eMultipleScattering* msc =
new G4eMultipleScattering;
179 msc->SetStepLimitType(fMinimal);
182 G4eBremsstrahlung* ebrem =
new G4eBremsstrahlung();
184 pmanager->AddProcess(msc, -1, 1, 1);
185 pmanager->AddProcess(eioni, -1, 2, 2);
186 pmanager->AddProcess(ebrem, -1,-3, 3);
187 pmanager->AddProcess(
new G4eplusAnnihilation, 0,-1, 4);
189 }
else if (particleName ==
"mu+" ||
190 particleName ==
"mu-" ) {
193 mub =
new G4MuBremsstrahlung();
194 mup =
new G4MuPairProduction();
196 G4MuMultipleScattering* mumsc =
new G4MuMultipleScattering();
197 mumsc->AddEmModel(0,
new G4WentzelVIModel());
198 pmanager->AddProcess(mumsc, -1, 1, 1);
199 pmanager->AddProcess(
new G4MuIonisation, -1, 2, 2);
200 pmanager->AddProcess(mub, -1,-3, 3);
201 pmanager->AddProcess(mup, -1,-4, 4);
202 pmanager->AddProcess(
new G4CoulombScattering, -1,-4, 5);
204 }
else if (particleName ==
"alpha" ||
205 particleName ==
"He3" ||
206 particleName ==
"GenericIon") {
208 pmanager->AddProcess(hmsc, -1, 1, 1);
209 pmanager->AddProcess(
new G4ionIonisation, -1, 2, 2);
211 }
else if (particleName ==
"pi+" ||
212 particleName ==
"pi-" ) {
215 pib =
new G4hBremsstrahlung();
216 pip =
new G4hPairProduction();
218 pmanager->AddProcess(
new G4hMultipleScattering, -1, 1, 1);
219 pmanager->AddProcess(
new G4hIonisation, -1, 2, 2);
220 pmanager->AddProcess(pib, -1,-3, 3);
221 pmanager->AddProcess(pip, -1,-4, 4);
223 }
else if (particleName ==
"kaon+" ||
224 particleName ==
"kaon-" ) {
227 kb =
new G4hBremsstrahlung();
228 kp =
new G4hPairProduction();
230 pmanager->AddProcess(
new G4hMultipleScattering, -1, 1, 1);
231 pmanager->AddProcess(
new G4hIonisation, -1, 2, 2);
232 pmanager->AddProcess(kb, -1,-3, 3);
233 pmanager->AddProcess(kp, -1,-4, 4);
235 }
else if (particleName ==
"proton" ||
236 particleName ==
"anti_proton" ) {
239 pb =
new G4hBremsstrahlung();
240 pp =
new G4hPairProduction();
242 pmanager->AddProcess(
new G4hMultipleScattering, -1, 1, 1);
243 pmanager->AddProcess(
new G4hIonisation, -1, 2, 2);
244 pmanager->AddProcess(pb, -1,-3, 3);
245 pmanager->AddProcess(pp, -1,-4, 4);
247 }
else if (particleName ==
"B+" ||
248 particleName ==
"B-" ||
249 particleName ==
"D+" ||
250 particleName ==
"D-" ||
251 particleName ==
"Ds+" ||
252 particleName ==
"Ds-" ||
253 particleName ==
"anti_lambda_c+" ||
254 particleName ==
"anti_omega-" ||
255 particleName ==
"anti_sigma_c+" ||
256 particleName ==
"anti_sigma_c++" ||
257 particleName ==
"anti_sigma+" ||
258 particleName ==
"anti_sigma-" ||
259 particleName ==
"anti_xi_c+" ||
260 particleName ==
"anti_xi-" ||
261 particleName ==
"deuteron" ||
262 particleName ==
"lambda_c+" ||
263 particleName ==
"omega-" ||
264 particleName ==
"sigma_c+" ||
265 particleName ==
"sigma_c++" ||
266 particleName ==
"sigma+" ||
267 particleName ==
"sigma-" ||
268 particleName ==
"tau+" ||
269 particleName ==
"tau-" ||
270 particleName ==
"triton" ||
271 particleName ==
"xi_c+" ||
272 particleName ==
"xi-" ) {
274 pmanager->AddProcess(hmsc, -1, 1, 1);
275 pmanager->AddProcess(
new G4hIonisation, -1, 2, 2);
281 G4EmProcessOptions opt;
287 opt.SetApplyCuts(
true);