CMS 3D CMS Logo

CMSEmStandardPhysics.cc
Go to the documentation of this file.
3 
5 
6 #include "G4EmParameters.hh"
7 #include "G4ParticleTable.hh"
8 
9 #include "G4ParticleDefinition.hh"
10 #include "G4LossTableManager.hh"
11 
12 #include "G4ComptonScattering.hh"
13 #include "G4GammaConversion.hh"
14 #include "G4PhotoElectricEffect.hh"
15 
16 #include "G4hMultipleScattering.hh"
17 #include "G4eMultipleScattering.hh"
18 #include "G4MuMultipleScattering.hh"
19 #include "G4CoulombScattering.hh"
20 #include "G4eCoulombScatteringModel.hh"
21 #include "G4WentzelVIModel.hh"
22 #include "G4UrbanMscModel.hh"
23 
24 #include "G4eIonisation.hh"
25 #include "G4eBremsstrahlung.hh"
26 #include "G4eplusAnnihilation.hh"
27 #include "G4UAtomicDeexcitation.hh"
28 
29 #include "G4MuIonisation.hh"
30 #include "G4MuBremsstrahlung.hh"
31 #include "G4MuPairProduction.hh"
32 
33 #include "G4hIonisation.hh"
34 #include "G4ionIonisation.hh"
35 #include "G4hBremsstrahlung.hh"
36 #include "G4hPairProduction.hh"
37 
38 #include "G4Gamma.hh"
39 #include "G4Electron.hh"
40 #include "G4Positron.hh"
41 #include "G4MuonPlus.hh"
42 #include "G4MuonMinus.hh"
43 #include "G4TauMinus.hh"
44 #include "G4TauPlus.hh"
45 #include "G4PionPlus.hh"
46 #include "G4PionMinus.hh"
47 #include "G4KaonPlus.hh"
48 #include "G4KaonMinus.hh"
49 #include "G4BMesonMinus.hh"
50 #include "G4BMesonPlus.hh"
51 #include "G4DMesonMinus.hh"
52 #include "G4DMesonPlus.hh"
53 #include "G4Proton.hh"
54 #include "G4AntiProton.hh"
55 #include "G4SigmaMinus.hh"
56 #include "G4AntiSigmaMinus.hh"
57 #include "G4SigmaPlus.hh"
58 #include "G4AntiSigmaPlus.hh"
59 #include "G4XiMinus.hh"
60 #include "G4AntiXiMinus.hh"
61 #include "G4OmegaMinus.hh"
62 #include "G4AntiOmegaMinus.hh"
63 #include "G4LambdacPlus.hh"
64 #include "G4AntiLambdacPlus.hh"
65 #include "G4XicPlus.hh"
66 #include "G4AntiXicPlus.hh"
67 #include "G4Deuteron.hh"
68 #include "G4Triton.hh"
69 #include "G4He3.hh"
70 #include "G4Alpha.hh"
71 #include "G4GenericIon.hh"
72 
73 #include "G4PhysicsListHelper.hh"
74 #include "G4BuilderType.hh"
75 #include "G4GammaGeneralProcess.hh"
76 
77 #include "G4SystemOfUnits.hh"
78 
79 CMSEmStandardPhysics::CMSEmStandardPhysics(G4int ver) : G4VPhysicsConstructor("CMSEmStandard_eml"), verbose(ver) {
80  G4EmParameters* param = G4EmParameters::Instance();
81  param->SetDefaults();
82  param->SetVerbose(verbose);
83  param->SetApplyCuts(true);
84  param->SetStepFunction(0.8, 1 * CLHEP::mm);
85  param->SetMscRangeFactor(0.2);
86  param->SetMscStepLimitType(fMinimal);
87  SetPhysicsType(bElectromagnetic);
88 }
89 
91 
93  // gamma
94  G4Gamma::Gamma();
95 
96  // leptons
98  G4Positron::Positron();
99  G4MuonPlus::MuonPlus();
100  G4MuonMinus::MuonMinus();
101  G4TauMinus::TauMinusDefinition();
102  G4TauPlus::TauPlusDefinition();
103 
104  // mesons
105  G4PionPlus::PionPlusDefinition();
106  G4PionMinus::PionMinusDefinition();
107  G4KaonPlus::KaonPlusDefinition();
108  G4KaonMinus::KaonMinusDefinition();
109  G4DMesonMinus::DMesonMinusDefinition();
110  G4DMesonPlus::DMesonPlusDefinition();
111  G4BMesonMinus::BMesonMinusDefinition();
112  G4BMesonPlus::BMesonPlusDefinition();
113 
114  // barions
115  G4Proton::Proton();
116  G4AntiProton::AntiProton();
117  G4SigmaMinus::SigmaMinusDefinition();
118  G4AntiSigmaMinus::AntiSigmaMinusDefinition();
119  G4SigmaPlus::SigmaPlusDefinition();
120  G4AntiSigmaPlus::AntiSigmaPlusDefinition();
121  G4XiMinus::XiMinusDefinition();
122  G4AntiXiMinus::AntiXiMinusDefinition();
123  G4OmegaMinus::OmegaMinusDefinition();
124  G4AntiOmegaMinus::AntiOmegaMinusDefinition();
125  G4LambdacPlus::LambdacPlusDefinition();
126  G4AntiLambdacPlus::AntiLambdacPlusDefinition();
127  G4XicPlus::XicPlusDefinition();
128  G4AntiXicPlus::AntiXicPlusDefinition();
129 
130  // ions
131  G4Deuteron::Deuteron();
132  G4Triton::Triton();
133  G4He3::He3();
134  G4Alpha::Alpha();
135  G4GenericIon::GenericIonDefinition();
136 }
137 
139  if (verbose > 0) {
140  edm::LogVerbatim("PhysicsList") << "### " << GetPhysicsName() << " Construct Processes ";
141  }
142 
143  // This EM builder takes default models of Geant4 10 EMV.
144  // Multiple scattering by Urban for all particles
145  // except e+e- below 100 MeV for which the Urban93 model is used
146 
147  G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
148  G4LossTableManager* man = G4LossTableManager::Instance();
149 
150  // muon & hadron bremsstrahlung and pair production
151  G4MuBremsstrahlung* mub = nullptr;
152  G4MuPairProduction* mup = nullptr;
153  G4hBremsstrahlung* pib = nullptr;
154  G4hPairProduction* pip = nullptr;
155  G4hBremsstrahlung* kb = nullptr;
156  G4hPairProduction* kp = nullptr;
157  G4hBremsstrahlung* pb = nullptr;
158  G4hPairProduction* pp = nullptr;
159 
160  // muon & hadron multiple scattering
161  G4MuMultipleScattering* mumsc = nullptr;
162  G4hMultipleScattering* pimsc = nullptr;
163  G4hMultipleScattering* kmsc = nullptr;
164  G4hMultipleScattering* hmsc = nullptr;
165 
166  // muon and hadron single scattering
167  G4CoulombScattering* muss = nullptr;
168  G4CoulombScattering* piss = nullptr;
169  G4CoulombScattering* kss = nullptr;
170 
171  // high energy limit for e+- scattering models and bremsstrahlung
172  G4double highEnergyLimit = 100 * MeV;
173 
174  G4ParticleTable* table = G4ParticleTable::GetParticleTable();
175  EmParticleList emList;
176  for (const auto& particleName : emList.PartNames()) {
177  G4ParticleDefinition* particle = table->FindParticle(particleName);
178 
179  if (particleName == "gamma") {
180  G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
181 
182  if (G4EmParameters::Instance()->GeneralProcessActive()) {
183  G4GammaGeneralProcess* sp = new G4GammaGeneralProcess();
184  sp->AddEmProcess(pee);
185  sp->AddEmProcess(new G4ComptonScattering());
186  sp->AddEmProcess(new G4GammaConversion());
187  man->SetGammaGeneralProcess(sp);
188  ph->RegisterProcess(sp, particle);
189  } else {
190  ph->RegisterProcess(pee, particle);
191  ph->RegisterProcess(new G4ComptonScattering(), particle);
192  ph->RegisterProcess(new G4GammaConversion(), particle);
193  }
194 
195  } else if (particleName == "e-") {
196  G4eIonisation* eioni = new G4eIonisation();
197 
198  G4eMultipleScattering* msc = new G4eMultipleScattering;
199  G4UrbanMscModel* msc1 = new G4UrbanMscModel();
200  G4WentzelVIModel* msc2 = new G4WentzelVIModel();
201  msc1->SetHighEnergyLimit(highEnergyLimit);
202  msc2->SetLowEnergyLimit(highEnergyLimit);
203  msc->SetEmModel(msc1);
204  msc->SetEmModel(msc2);
205 
206  G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
207  G4CoulombScattering* ss = new G4CoulombScattering();
208  ss->SetEmModel(ssm);
209  ss->SetMinKinEnergy(highEnergyLimit);
210  ssm->SetLowEnergyLimit(highEnergyLimit);
211  ssm->SetActivationLowEnergyLimit(highEnergyLimit);
212 
213  ph->RegisterProcess(msc, particle);
214  ph->RegisterProcess(eioni, particle);
215  ph->RegisterProcess(new G4eBremsstrahlung(), particle);
216  ph->RegisterProcess(ss, particle);
217 
218  } else if (particleName == "e+") {
219  G4eIonisation* eioni = new G4eIonisation();
220 
221  G4eMultipleScattering* msc = new G4eMultipleScattering;
222  G4UrbanMscModel* msc1 = new G4UrbanMscModel();
223  G4WentzelVIModel* msc2 = new G4WentzelVIModel();
224  msc1->SetHighEnergyLimit(highEnergyLimit);
225  msc2->SetLowEnergyLimit(highEnergyLimit);
226  msc->SetEmModel(msc1);
227  msc->SetEmModel(msc2);
228 
229  G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
230  G4CoulombScattering* ss = new G4CoulombScattering();
231  ss->SetEmModel(ssm);
232  ss->SetMinKinEnergy(highEnergyLimit);
233  ssm->SetLowEnergyLimit(highEnergyLimit);
234  ssm->SetActivationLowEnergyLimit(highEnergyLimit);
235 
236  ph->RegisterProcess(msc, particle);
237  ph->RegisterProcess(eioni, particle);
238  ph->RegisterProcess(new G4eBremsstrahlung(), particle);
239  ph->RegisterProcess(new G4eplusAnnihilation(), particle);
240  ph->RegisterProcess(ss, particle);
241 
242  } else if (particleName == "mu+" || particleName == "mu-") {
243  if (nullptr == mub) {
244  mub = new G4MuBremsstrahlung();
245  mup = new G4MuPairProduction();
246  mumsc = new G4MuMultipleScattering();
247  mumsc->SetEmModel(new G4WentzelVIModel());
248  muss = new G4CoulombScattering();
249  }
250  ph->RegisterProcess(mumsc, particle);
251  ph->RegisterProcess(new G4MuIonisation(), particle);
252  ph->RegisterProcess(mub, particle);
253  ph->RegisterProcess(mup, particle);
254  ph->RegisterProcess(muss, particle);
255 
256  } else if (particleName == "alpha" || particleName == "He3") {
257  ph->RegisterProcess(new G4hMultipleScattering(), particle);
258  ph->RegisterProcess(new G4ionIonisation(), particle);
259 
260  } else if (particleName == "GenericIon") {
261  if (nullptr == hmsc) {
262  hmsc = new G4hMultipleScattering("ionmsc");
263  }
264  ph->RegisterProcess(hmsc, particle);
265  ph->RegisterProcess(new G4ionIonisation(), particle);
266 
267  } else if (particleName == "pi+" || particleName == "pi-") {
268  if (nullptr == pib) {
269  pib = new G4hBremsstrahlung();
270  pip = new G4hPairProduction();
271  pimsc = new G4hMultipleScattering();
272  pimsc->SetEmModel(new G4WentzelVIModel());
273  piss = new G4CoulombScattering();
274  }
275  ph->RegisterProcess(pimsc, particle);
276  ph->RegisterProcess(new G4hIonisation(), particle);
277  ph->RegisterProcess(pib, particle);
278  ph->RegisterProcess(pip, particle);
279  ph->RegisterProcess(piss, particle);
280 
281  } else if (particleName == "kaon+" || particleName == "kaon-") {
282  if (nullptr == kb) {
283  kb = new G4hBremsstrahlung();
284  kp = new G4hPairProduction();
285  kmsc = new G4hMultipleScattering();
286  kmsc->SetEmModel(new G4WentzelVIModel());
287  kss = new G4CoulombScattering();
288  }
289  ph->RegisterProcess(kmsc, particle);
290  ph->RegisterProcess(new G4hIonisation(), particle);
291  ph->RegisterProcess(kb, particle);
292  ph->RegisterProcess(kp, particle);
293  ph->RegisterProcess(kss, particle);
294 
295  } else if (particleName == "proton" || particleName == "anti_proton") {
296  if (nullptr == pb) {
297  pb = new G4hBremsstrahlung();
298  pp = new G4hPairProduction();
299  }
300  G4hMultipleScattering* pmsc = new G4hMultipleScattering();
301  pmsc->SetEmModel(new G4WentzelVIModel());
302  G4CoulombScattering* pss = new G4CoulombScattering();
303 
304  ph->RegisterProcess(pmsc, particle);
305  ph->RegisterProcess(new G4hIonisation(), particle);
306  ph->RegisterProcess(pb, particle);
307  ph->RegisterProcess(pp, particle);
308  ph->RegisterProcess(pss, particle);
309 
310  } else if (particle->GetPDGCharge() != 0.0) {
311  if (nullptr == hmsc) {
312  hmsc = new G4hMultipleScattering("ionmsc");
313  }
314  ph->RegisterProcess(hmsc, particle);
315  ph->RegisterProcess(new G4hIonisation(), particle);
316  }
317  }
318 }
EmParticleList.h
VtxSmearedParameters_cfi.Alpha
Alpha
Definition: VtxSmearedParameters_cfi.py:115
MessageLogger.h
pss
std::pair< ALIstring, ALIstring > pss
Definition: Fit.h:25
CMSEmStandardPhysics::ConstructParticle
void ConstructParticle() override
Definition: CMSEmStandardPhysics.cc:92
MeV
const double MeV
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
CMSEmStandardPhysics::~CMSEmStandardPhysics
~CMSEmStandardPhysics() override
Definition: CMSEmStandardPhysics.cc:90
CMSEmStandardPhysics.h
HiggsValidation_cfi.particleName
particleName
Definition: HiggsValidation_cfi.py:7
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
nanoDQM_cff.Electron
Electron
Definition: nanoDQM_cff.py:62
EmParticleList
Definition: EmParticleList.h:10
CMSEmStandardPhysics::CMSEmStandardPhysics
CMSEmStandardPhysics(G4int ver)
Definition: CMSEmStandardPhysics.cc:79
CMSEmStandardPhysics::verbose
G4int verbose
Definition: CMSEmStandardPhysics.h:16
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
CMSEmStandardPhysics::ConstructProcess
void ConstructProcess() override
Definition: CMSEmStandardPhysics.cc:138
EmParticleList::PartNames
const std::vector< G4String > & PartNames() const
Definition: EmParticleList.cc:52
createTree.pp
pp
Definition: createTree.py:17
TableParser.table
table
Definition: TableParser.py:111
kp
int kp
Definition: CascadeWrapper.h:13