CMS 3D CMS Logo

CMSEmStandardPhysics95.cc
Go to the documentation of this file.
3 #include "G4EmParameters.hh"
4 #include "G4ParticleTable.hh"
5 
6 #include "G4ParticleDefinition.hh"
7 #include "G4ProcessManager.hh"
8 #include "G4LossTableManager.hh"
9 #include "G4RegionStore.hh"
10 
11 #include "G4ComptonScattering.hh"
12 #include "G4GammaConversion.hh"
13 #include "G4GammaConversion.hh"
14 #include "G4PairProductionRelModel.hh"
15 #include "G4PhotoElectricEffect.hh"
16 
17 #include "G4hMultipleScattering.hh"
18 #include "G4eMultipleScattering.hh"
19 #include "G4MscStepLimitType.hh"
20 
21 #include "G4eIonisation.hh"
22 #include "G4eBremsstrahlung.hh"
23 #include "G4eplusAnnihilation.hh"
24 
25 #include "G4MuMultipleScattering.hh"
26 #include "G4MuIonisation.hh"
27 #include "G4MuBremsstrahlung.hh"
28 #include "G4MuPairProduction.hh"
29 
30 #include "G4hIonisation.hh"
31 #include "G4ionIonisation.hh"
32 #include "G4hBremsstrahlung.hh"
33 #include "G4hPairProduction.hh"
34 
35 #include "G4Gamma.hh"
36 #include "G4Electron.hh"
37 #include "G4Positron.hh"
38 #include "G4MuonPlus.hh"
39 #include "G4MuonMinus.hh"
40 #include "G4TauMinus.hh"
41 #include "G4TauPlus.hh"
42 #include "G4PionPlus.hh"
43 #include "G4PionMinus.hh"
44 #include "G4KaonPlus.hh"
45 #include "G4KaonMinus.hh"
46 #include "G4BMesonMinus.hh"
47 #include "G4BMesonPlus.hh"
48 #include "G4DMesonMinus.hh"
49 #include "G4DMesonPlus.hh"
50 #include "G4Proton.hh"
51 #include "G4AntiProton.hh"
52 #include "G4SigmaMinus.hh"
53 #include "G4AntiSigmaMinus.hh"
54 #include "G4SigmaPlus.hh"
55 #include "G4AntiSigmaPlus.hh"
56 #include "G4XiMinus.hh"
57 #include "G4AntiXiMinus.hh"
58 #include "G4OmegaMinus.hh"
59 #include "G4AntiOmegaMinus.hh"
60 #include "G4LambdacPlus.hh"
61 #include "G4AntiLambdacPlus.hh"
62 #include "G4XicPlus.hh"
63 #include "G4AntiXicPlus.hh"
64 #include "G4Deuteron.hh"
65 #include "G4Triton.hh"
66 #include "G4He3.hh"
67 #include "G4Alpha.hh"
68 #include "G4GenericIon.hh"
69 #include "G4BuilderType.hh"
70 
71 #include "G4SystemOfUnits.hh"
72 
74  const std::string& reg):
75  G4VPhysicsConstructor(name), verbose(ver), region(reg) {
76  G4EmParameters* param = G4EmParameters::Instance();
77  param->SetDefaults();
78  param->SetVerbose(verbose);
79  param->SetApplyCuts(true);
80  param->SetMscRangeFactor(0.2);
81  param->SetMscStepLimitType(fMinimal);
82  SetPhysicsType(bElectromagnetic);
83 }
84 
86 
88  // gamma
90 
91  // leptons
93  G4Positron::Positron();
94  G4MuonPlus::MuonPlus();
95  G4MuonMinus::MuonMinus();
96  G4TauMinus::TauMinusDefinition();
97  G4TauPlus::TauPlusDefinition();
98 
99  // mesons
100  G4PionPlus::PionPlusDefinition();
101  G4PionMinus::PionMinusDefinition();
102  G4KaonPlus::KaonPlusDefinition();
103  G4KaonMinus::KaonMinusDefinition();
104  G4DMesonMinus::DMesonMinusDefinition();
105  G4DMesonPlus::DMesonPlusDefinition();
106  G4BMesonMinus::BMesonMinusDefinition();
107  G4BMesonPlus::BMesonPlusDefinition();
108 
109  // barions
110  G4Proton::Proton();
111  G4AntiProton::AntiProton();
112  G4SigmaMinus::SigmaMinusDefinition();
113  G4AntiSigmaMinus::AntiSigmaMinusDefinition();
114  G4SigmaPlus::SigmaPlusDefinition();
115  G4AntiSigmaPlus::AntiSigmaPlusDefinition();
116  G4XiMinus::XiMinusDefinition();
117  G4AntiXiMinus::AntiXiMinusDefinition();
118  G4OmegaMinus::OmegaMinusDefinition();
119  G4AntiOmegaMinus::AntiOmegaMinusDefinition();
120  G4LambdacPlus::LambdacPlusDefinition();
121  G4AntiLambdacPlus::AntiLambdacPlusDefinition();
122  G4XicPlus::XicPlusDefinition();
123  G4AntiXicPlus::AntiXicPlusDefinition();
124 
125  // ions
126  G4Deuteron::Deuteron();
127  G4Triton::Triton();
128  G4He3::He3();
129  G4Alpha::Alpha();
130  G4GenericIon::GenericIonDefinition();
131 }
132 
134 {
135  // This EM builder takes default models of Geant4 10 EMV.
136  // Multiple scattering by Urban for all particles
137 
138  G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
139 
140  G4MuBremsstrahlung* mub = nullptr;
141  G4MuPairProduction* mup = nullptr;
142  G4hBremsstrahlung* pib = nullptr;
143  G4hPairProduction* pip = nullptr;
144  G4hBremsstrahlung* kb = nullptr;
145  G4hPairProduction* kp = nullptr;
146  G4hBremsstrahlung* pb = nullptr;
147  G4hPairProduction* pp = nullptr;
148 
149  G4hMultipleScattering* hmsc = nullptr;
150 
151  // Add standard EM Processes
152  G4ParticleTable* table = G4ParticleTable::GetParticleTable();
153  EmParticleList emList;
154  for(const auto& particleName : emList.PartNames()) {
155  G4ParticleDefinition* particle = table->FindParticle(particleName);
156  if(verbose > 1)
157  G4cout << "### " << GetPhysicsName() << " instantiates for "
158  << particleName << G4endl;
159 
160  if (particleName == "gamma") {
161 
162  ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
163  ph->RegisterProcess(new G4ComptonScattering(), particle);
164  ph->RegisterProcess(new G4GammaConversion(), particle);
165 
166  } else if (particleName == "e-") {
167 
168  G4eIonisation* eioni = new G4eIonisation();
169  eioni->SetStepFunction(0.8, 1.0*mm);
170  G4eMultipleScattering* msc = new G4eMultipleScattering();
171  msc->SetStepLimitType(fMinimal);
172 
173  G4eBremsstrahlung* ebrem = new G4eBremsstrahlung();
174 
175  ph->RegisterProcess(msc, particle);
176  ph->RegisterProcess(eioni, particle);
177  ph->RegisterProcess(ebrem, particle);
178 
179  } else if (particleName == "e+") {
180 
181  G4eIonisation* eioni = new G4eIonisation();
182  eioni->SetStepFunction(0.8, 1.0*mm);
183  G4eMultipleScattering* msc = new G4eMultipleScattering();
184  msc->SetStepLimitType(fMinimal);
185 
186  G4eBremsstrahlung* ebrem = new G4eBremsstrahlung();
187 
188  ph->RegisterProcess(msc, particle);
189  ph->RegisterProcess(eioni, particle);
190  ph->RegisterProcess(ebrem, particle);
191  ph->RegisterProcess(new G4eplusAnnihilation(), particle);
192 
193  } else if (particleName == "mu+" ||
194  particleName == "mu-" ) {
195 
196  if(nullptr == mub) {
197  mub = new G4MuBremsstrahlung();
198  mup = new G4MuPairProduction();
199  }
200  G4MuMultipleScattering* msc = new G4MuMultipleScattering();
201  ph->RegisterProcess(msc, particle);
202  ph->RegisterProcess(new G4MuIonisation(), particle);
203  ph->RegisterProcess(mub, particle);
204  ph->RegisterProcess(mup, particle);
205 
206  } else if (particleName == "alpha" ||
207  particleName == "He3" ) {
208 
209  ph->RegisterProcess(new G4hMultipleScattering(), particle);
210  ph->RegisterProcess(new G4ionIonisation(), particle);
211 
212  } else if (particleName == "GenericIon") {
213 
214  if(nullptr == hmsc) {
215  hmsc = new G4hMultipleScattering("ionmsc");
216  }
217  ph->RegisterProcess(hmsc, particle);
218  ph->RegisterProcess(new G4ionIonisation(), particle);
219 
220  } else if (particleName == "pi+" ||
221  particleName == "pi-" ) {
222 
223  if(nullptr == pib) {
224  pib = new G4hBremsstrahlung();
225  pip = new G4hPairProduction();
226  }
227  ph->RegisterProcess(new G4hMultipleScattering(), particle);
228  ph->RegisterProcess(new G4hIonisation(), particle);
229  ph->RegisterProcess(pib, particle);
230  ph->RegisterProcess(pip, particle);
231 
232  } else if (particleName == "kaon+" ||
233  particleName == "kaon-" ) {
234 
235  if(nullptr == kb) {
236  kb = new G4hBremsstrahlung();
237  kp = new G4hPairProduction();
238  }
239  ph->RegisterProcess(new G4hMultipleScattering(), particle);
240  ph->RegisterProcess(new G4hIonisation(), particle);
241  ph->RegisterProcess(kb, particle);
242  ph->RegisterProcess(kp, particle);
243 
244  } else if (particleName == "proton" ||
245  particleName == "anti_proton") {
246 
247  if(nullptr == pb) {
248  pb = new G4hBremsstrahlung();
249  pp = new G4hPairProduction();
250  }
251  ph->RegisterProcess(new G4hMultipleScattering(), particle);
252  ph->RegisterProcess(new G4hIonisation(), particle);
253  ph->RegisterProcess(pb, particle);
254  ph->RegisterProcess(pp, particle);
255 
256  } else if (particleName == "B+" ||
257  particleName == "B-" ||
258  particleName == "D+" ||
259  particleName == "D-" ||
260  particleName == "Ds+" ||
261  particleName == "Ds-" ||
262  particleName == "anti_He3" ||
263  particleName == "anti_alpha" ||
264  particleName == "anti_deuteron" ||
265  particleName == "anti_lambda_c+" ||
266  particleName == "anti_omega-" ||
267  particleName == "anti_sigma_c+" ||
268  particleName == "anti_sigma_c++" ||
269  particleName == "anti_sigma+" ||
270  particleName == "anti_sigma-" ||
271  particleName == "anti_triton" ||
272  particleName == "anti_xi_c+" ||
273  particleName == "anti_xi-" ||
274  particleName == "deuteron" ||
275  particleName == "lambda_c+" ||
276  particleName == "omega-" ||
277  particleName == "sigma_c+" ||
278  particleName == "sigma_c++" ||
279  particleName == "sigma+" ||
280  particleName == "sigma-" ||
281  particleName == "tau+" ||
282  particleName == "tau-" ||
283  particleName == "triton" ||
284  particleName == "xi_c+" ||
285  particleName == "xi-" ) {
286 
287  if(nullptr == hmsc) {
288  hmsc = new G4hMultipleScattering("ionmsc");
289  }
290  ph->RegisterProcess(hmsc, particle);
291  ph->RegisterProcess(new G4hIonisation(), particle);
292  }
293  }
294 }
const std::vector< G4String > & PartNames() const
CMSEmStandardPhysics95(const G4String &name, G4int ver, const std::string &reg)
int kp
susybsm::MuonSegmentCollection msc
Definition: classes.h:32
dbl * Gamma
Definition: mlp_gen.cc:38