121 theParticleIterator->reset();
122 while( (*theParticleIterator)() ){
123 G4ParticleDefinition* particle = theParticleIterator->value();
124 G4ProcessManager* pmanager = particle->GetProcessManager();
125 G4String particleName = particle->GetParticleName();
127 G4cout <<
"### " << GetPhysicsName() <<
" instantiates for "
128 << particleName << G4endl;
130 if (particleName ==
"gamma") {
132 pmanager->AddDiscreteProcess(
new G4PhotoElectricEffect);
133 pmanager->AddDiscreteProcess(
new G4ComptonScattering);
134 pmanager->AddDiscreteProcess(
new G4GammaConversion);
136 }
else if (particleName ==
"e-") {
138 G4eIonisation* eioni =
new G4eIonisation();
139 eioni->SetStepFunction(0.8, 1.0*mm);
140 G4eMultipleScattering* msc =
new G4eMultipleScattering;
141 msc->SetStepLimitType(fMinimal);
142 G4eBremsstrahlung* brem =
new G4eBremsstrahlung();
143 G4VEmModel* lpm =
new G4eBremsstrahlungRelModel();
144 lpm->SetLowEnergyLimit(GeV);
145 lpm->SetHighEnergyLimit(100.*TeV);
146 brem->AddEmModel(0,lpm);
147 pmanager->AddProcess(msc, -1, 1, 1);
148 pmanager->AddProcess(eioni, -1, 2, 2);
149 pmanager->AddProcess(brem, -1,-3, 3);
151 }
else if (particleName ==
"e+") {
153 G4eIonisation* eioni =
new G4eIonisation();
154 eioni->SetStepFunction(0.8, 1.0*mm);
155 G4eMultipleScattering* msc =
new G4eMultipleScattering;
156 msc->SetStepLimitType(fMinimal);
157 G4eBremsstrahlung* brem =
new G4eBremsstrahlung();
158 G4VEmModel* lpm =
new G4eBremsstrahlungRelModel();
159 lpm->SetLowEnergyLimit(GeV);
160 lpm->SetHighEnergyLimit(100.*TeV);
161 brem->AddEmModel(0,lpm);
162 pmanager->AddProcess(msc, -1, 1, 1);
163 pmanager->AddProcess(eioni, -1, 2, 2);
164 pmanager->AddProcess(brem, -1,-3, 3);
165 pmanager->AddProcess(
new G4eplusAnnihilation, 0,-1, 4);
167 }
else if (particleName ==
"mu+" ||
168 particleName ==
"mu-" ) {
170 pmanager->AddProcess(
new G4hMultipleScattering, -1, 1, 1);
171 pmanager->AddProcess(
new G4MuIonisation, -1, 2, 2);
172 pmanager->AddProcess(
new G4MuBremsstrahlung, -1,-3, 3);
173 pmanager->AddProcess(
new G4MuPairProduction, -1,-4, 4);
175 }
else if (particleName ==
"alpha" ||
176 particleName ==
"He3" ||
177 particleName ==
"GenericIon") {
179 pmanager->AddProcess(
new G4hMultipleScattering, -1, 1, 1);
180 pmanager->AddProcess(
new G4ionIonisation, -1, 2, 2);
182 }
else if (particleName ==
"B+" ||
183 particleName ==
"B-" ||
184 particleName ==
"D+" ||
185 particleName ==
"D-" ||
186 particleName ==
"Ds+" ||
187 particleName ==
"Ds-" ||
188 particleName ==
"anti_lambda_c+" ||
189 particleName ==
"anti_omega-" ||
190 particleName ==
"anti_proton" ||
191 particleName ==
"anti_sigma_c+" ||
192 particleName ==
"anti_sigma_c++" ||
193 particleName ==
"anti_sigma+" ||
194 particleName ==
"anti_sigma-" ||
195 particleName ==
"anti_xi_c+" ||
196 particleName ==
"anti_xi-" ||
197 particleName ==
"deuteron" ||
198 particleName ==
"kaon+" ||
199 particleName ==
"kaon-" ||
200 particleName ==
"lambda_c+" ||
201 particleName ==
"omega-" ||
202 particleName ==
"pi+" ||
203 particleName ==
"pi-" ||
204 particleName ==
"proton" ||
205 particleName ==
"sigma_c+" ||
206 particleName ==
"sigma_c++" ||
207 particleName ==
"sigma+" ||
208 particleName ==
"sigma-" ||
209 particleName ==
"tau+" ||
210 particleName ==
"tau-" ||
211 particleName ==
"triton" ||
212 particleName ==
"xi_c+" ||
213 particleName ==
"xi-" ) {
215 pmanager->AddProcess(
new G4hMultipleScattering, -1, 1, 1);
216 pmanager->AddProcess(
new G4hIonisation, -1, 2, 2);
218 if (particleName ==
"pi+" ||
219 particleName ==
"kaon+" ||
220 particleName ==
"kaon-" ||
221 particleName ==
"proton" ||
222 particleName ==
"pi-" ) {
223 pmanager->AddProcess(
new G4hBremsstrahlung(), -1,-3, 3);
224 pmanager->AddProcess(
new G4hPairProduction(), -1,-4, 4);
232 G4EmProcessOptions opt;
234 opt.SetApplyCuts(
true);
235 opt.SetLPMFlag(
false);
239 opt.SetMinEnergy(100.*eV);
240 opt.SetMaxEnergy(10.*TeV);
241 opt.SetDEDXBinning(77);
242 opt.SetLambdaBinning(77);