test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CMSEmStandardPhysicsLPM.cc
Go to the documentation of this file.
3 
4 #include "G4ParticleDefinition.hh"
5 #include "G4ProcessManager.hh"
6 #include "G4LossTableManager.hh"
7 #include "G4EmProcessOptions.hh"
8 #include "G4RegionStore.hh"
9 
10 #include "G4ComptonScattering.hh"
11 #include "G4GammaConversion.hh"
12 #include "G4PhotoElectricEffect.hh"
13 #include "G4PairProductionRelModel.hh"
14 
15 #include "G4hMultipleScattering.hh"
16 #include "G4eMultipleScattering.hh"
17 #include "G4MuMultipleScattering.hh"
18 #include "G4MscStepLimitType.hh"
19 #include "G4WentzelVIModel.hh"
20 #include "G4CoulombScattering.hh"
21 
22 #include "G4eIonisation.hh"
23 #include "G4eBremsstrahlung.hh"
24 #include "G4eplusAnnihilation.hh"
25 
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 
70 #include "G4SystemOfUnits.hh"
71 
73  G4VPhysicsConstructor(name), verbose(ver) {
74  G4LossTableManager::Instance();
75 }
76 
78 
80  // gamma
82 
83  // leptons
85  G4Positron::Positron();
86  G4MuonPlus::MuonPlus();
87  G4MuonMinus::MuonMinus();
88  G4TauMinus::TauMinusDefinition();
89  G4TauPlus::TauPlusDefinition();
90 
91  // mesons
92  G4PionPlus::PionPlusDefinition();
93  G4PionMinus::PionMinusDefinition();
94  G4KaonPlus::KaonPlusDefinition();
95  G4KaonMinus::KaonMinusDefinition();
96  G4DMesonMinus::DMesonMinusDefinition();
97  G4DMesonPlus::DMesonPlusDefinition();
98  G4BMesonMinus::BMesonMinusDefinition();
99  G4BMesonPlus::BMesonPlusDefinition();
100 
101  // barions
102  G4Proton::Proton();
103  G4AntiProton::AntiProton();
104  G4SigmaMinus::SigmaMinusDefinition();
105  G4AntiSigmaMinus::AntiSigmaMinusDefinition();
106  G4SigmaPlus::SigmaPlusDefinition();
107  G4AntiSigmaPlus::AntiSigmaPlusDefinition();
108  G4XiMinus::XiMinusDefinition();
109  G4AntiXiMinus::AntiXiMinusDefinition();
110  G4OmegaMinus::OmegaMinusDefinition();
111  G4AntiOmegaMinus::AntiOmegaMinusDefinition();
112  G4LambdacPlus::LambdacPlusDefinition();
113  G4AntiLambdacPlus::AntiLambdacPlusDefinition();
114  G4XicPlus::XicPlusDefinition();
115  G4AntiXicPlus::AntiXicPlusDefinition();
116 
117  // ions
118  G4Deuteron::Deuteron();
119  G4Triton::Triton();
120  G4He3::He3();
121  G4Alpha::Alpha();
122  G4GenericIon::GenericIonDefinition();
123 }
124 
126 {
127  // Add standard EM Processes
128  // muon & hadron bremsstrahlung and pair production
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;
137 
138  G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
139 
140  // This EM builder takes default models of Geant4 10 EMV.
141  // Multiple scattering by Urban for all particles
142  // except e+e- for which the Urban93 model is used
143  // and WentzelVI+SingleScattering for muons
144 
145  aParticleIterator->reset();
146  while( (*aParticleIterator)() ){
147  G4ParticleDefinition* particle = aParticleIterator->value();
148  G4ProcessManager* pmanager = particle->GetProcessManager();
149  G4String particleName = particle->GetParticleName();
150  if(verbose > 1)
151  G4cout << "### " << GetPhysicsName() << " instantiates for "
152  << particleName << " at " << particle << G4endl;
153 
154  if (particleName == "gamma") {
155 
156  pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
157  pmanager->AddDiscreteProcess(new G4ComptonScattering);
158  pmanager->AddDiscreteProcess(new G4GammaConversion());
159 
160  } else if (particleName == "e-") {
161 
162  G4eIonisation* eioni = new G4eIonisation();
163  eioni->SetStepFunction(0.8, 1.0*mm);
164  G4eMultipleScattering* msc = new G4eMultipleScattering;
165  msc->SetStepLimitType(fMinimal);
166  msc->AddEmModel(0,new UrbanMscModel93());
167 
168  G4eBremsstrahlung* ebrem = new G4eBremsstrahlung();
169 
170  pmanager->AddProcess(msc, -1, 1, 1);
171  pmanager->AddProcess(eioni, -1, 2, 2);
172  pmanager->AddProcess(ebrem, -1,-3, 3);
173 
174  } else if (particleName == "e+") {
175 
176  G4eIonisation* eioni = new G4eIonisation();
177  eioni->SetStepFunction(0.8, 1.0*mm);
178  G4eMultipleScattering* msc = new G4eMultipleScattering;
179  msc->SetStepLimitType(fMinimal);
180  msc->AddEmModel(0,new UrbanMscModel93());
181 
182  G4eBremsstrahlung* ebrem = new G4eBremsstrahlung();
183 
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);
188 
189  } else if (particleName == "mu+" ||
190  particleName == "mu-" ) {
191 
192  if(nullptr == mub) {
193  mub = new G4MuBremsstrahlung();
194  mup = new G4MuPairProduction();
195  }
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);
203 
204  } else if (particleName == "alpha" ||
205  particleName == "He3" ||
206  particleName == "GenericIon") {
207 
208  pmanager->AddProcess(hmsc, -1, 1, 1);
209  pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
210 
211  } else if (particleName == "pi+" ||
212  particleName == "pi-" ) {
213 
214  if(nullptr == pib) {
215  pib = new G4hBremsstrahlung();
216  pip = new G4hPairProduction();
217  }
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);
222 
223  } else if (particleName == "kaon+" ||
224  particleName == "kaon-" ) {
225 
226  if(nullptr == kb) {
227  kb = new G4hBremsstrahlung();
228  kp = new G4hPairProduction();
229  }
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);
234 
235  } else if (particleName == "proton" ||
236  particleName == "anti_proton" ) {
237 
238  if(nullptr == pb) {
239  pb = new G4hBremsstrahlung();
240  pp = new G4hPairProduction();
241  }
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);
246 
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-" ) {
273 
274  pmanager->AddProcess(hmsc, -1, 1, 1);
275  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
276  }
277  }
278 
279  // Setup options
280  //
281  G4EmProcessOptions opt;
282  opt.SetVerbose(verbose);
283  // muon scattering
284  opt.SetPolarAngleLimit(CLHEP::pi);
285  // ApplyCuts
286  //
287  opt.SetApplyCuts(true);
288 }
tuple pp
Definition: createTree.py:15
int kp
susybsm::MuonSegmentCollection msc
Definition: classes.h:32
CMSEmStandardPhysicsLPM(const G4String &name, G4int ver)
const Double_t pi
dbl * Gamma
Definition: mlp_gen.cc:38