CMS 3D CMS Logo

CMSEmStandardPhysicsLPM.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 "G4RegionStore.hh"
76 #include "G4Region.hh"
77 
78 #include "G4SystemOfUnits.hh"
79 
80 CMSEmStandardPhysicsLPM::CMSEmStandardPhysicsLPM(G4int ver) : G4VPhysicsConstructor("CMSEmStandard_emm"), verbose(ver) {
81  G4EmParameters* param = G4EmParameters::Instance();
82  param->SetDefaults();
83  param->SetVerbose(verbose);
84  param->SetApplyCuts(true);
85  param->SetStepFunction(0.8, 1 * CLHEP::mm);
86  param->SetMscRangeFactor(0.2);
87  param->SetMscStepLimitType(fMinimal);
88  SetPhysicsType(bElectromagnetic);
89 }
90 
92 
94  // gamma
95  G4Gamma::Gamma();
96 
97  // leptons
99  G4Positron::Positron();
100  G4MuonPlus::MuonPlus();
101  G4MuonMinus::MuonMinus();
102  G4TauMinus::TauMinusDefinition();
103  G4TauPlus::TauPlusDefinition();
104 
105  // mesons
106  G4PionPlus::PionPlusDefinition();
107  G4PionMinus::PionMinusDefinition();
108  G4KaonPlus::KaonPlusDefinition();
109  G4KaonMinus::KaonMinusDefinition();
110  G4DMesonMinus::DMesonMinusDefinition();
111  G4DMesonPlus::DMesonPlusDefinition();
112  G4BMesonMinus::BMesonMinusDefinition();
113  G4BMesonPlus::BMesonPlusDefinition();
114 
115  // barions
116  G4Proton::Proton();
117  G4AntiProton::AntiProton();
118  G4SigmaMinus::SigmaMinusDefinition();
119  G4AntiSigmaMinus::AntiSigmaMinusDefinition();
120  G4SigmaPlus::SigmaPlusDefinition();
121  G4AntiSigmaPlus::AntiSigmaPlusDefinition();
122  G4XiMinus::XiMinusDefinition();
123  G4AntiXiMinus::AntiXiMinusDefinition();
124  G4OmegaMinus::OmegaMinusDefinition();
125  G4AntiOmegaMinus::AntiOmegaMinusDefinition();
126  G4LambdacPlus::LambdacPlusDefinition();
127  G4AntiLambdacPlus::AntiLambdacPlusDefinition();
128  G4XicPlus::XicPlusDefinition();
129  G4AntiXicPlus::AntiXicPlusDefinition();
130 
131  // ions
132  G4Deuteron::Deuteron();
133  G4Triton::Triton();
134  G4He3::He3();
135  G4Alpha::Alpha();
136  G4GenericIon::GenericIonDefinition();
137 }
138 
140  if (verbose > 1) {
141  edm::LogVerbatim("PhysicsList") << "### " << GetPhysicsName() << " Construct Processes";
142  }
143 
144  // This EM builder takes default models of Geant4 10 EMV.
145  // Multiple scattering by Urban for all particles
146  // except e+e- below 100 MeV for which the Urban model is used
147 
148  G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
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* pmsc = nullptr;
165  G4hMultipleScattering* hmsc = nullptr;
166 
167  // muon and hadron single scattering
168  G4CoulombScattering* muss = nullptr;
169  G4CoulombScattering* piss = nullptr;
170  G4CoulombScattering* kss = nullptr;
171 
172  // high energy limit for e+- scattering models and bremsstrahlung
173  G4double highEnergyLimit = 100 * MeV;
174 
175  G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion("HcalRegion", false);
176  G4Region* bRegion = G4RegionStore::GetInstance()->GetRegion("HGCalRegion", false);
177  if (verbose > 1) {
178  edm::LogVerbatim("PhysicsList") << "CMSEmStandardPhysicsLPM: HcalRegion " << aRegion << "; HGCalRegion " << bRegion;
179  }
180  G4ParticleTable* table = G4ParticleTable::GetParticleTable();
181  EmParticleList emList;
182  for (const auto& particleName : emList.PartNames()) {
183  G4ParticleDefinition* particle = table->FindParticle(particleName);
184 
185  if (particleName == "gamma") {
186  ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
187  ph->RegisterProcess(new G4ComptonScattering(), particle);
188  ph->RegisterProcess(new G4GammaConversion(), particle);
189 
190  } else if (particleName == "e-") {
191  G4eIonisation* eioni = new G4eIonisation();
192 
193  G4eMultipleScattering* msc = new G4eMultipleScattering;
194  G4UrbanMscModel* msc1 = new G4UrbanMscModel();
195  G4WentzelVIModel* msc2 = new G4WentzelVIModel();
196  G4UrbanMscModel* msc3 = new G4UrbanMscModel();
197  msc1->SetHighEnergyLimit(highEnergyLimit);
198  msc2->SetLowEnergyLimit(highEnergyLimit);
199  msc3->SetHighEnergyLimit(highEnergyLimit);
200  msc3->SetLocked(true);
201  msc->SetEmModel(msc1);
202  msc->SetEmModel(msc2);
203  if (aRegion) {
204  msc->AddEmModel(-1, msc3, aRegion);
205  }
206  if (bRegion) {
207  msc->AddEmModel(-1, msc3, bRegion);
208  }
209 
210  G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
211  G4CoulombScattering* ss = new G4CoulombScattering();
212  ss->SetEmModel(ssm);
213  ss->SetMinKinEnergy(highEnergyLimit);
214  ssm->SetLowEnergyLimit(highEnergyLimit);
215  ssm->SetActivationLowEnergyLimit(highEnergyLimit);
216 
217  ph->RegisterProcess(msc, particle);
218  ph->RegisterProcess(eioni, particle);
219  ph->RegisterProcess(new G4eBremsstrahlung(), particle);
220  ph->RegisterProcess(ss, particle);
221 
222  } else if (particleName == "e+") {
223  G4eIonisation* eioni = new G4eIonisation();
224 
225  G4eMultipleScattering* msc = new G4eMultipleScattering;
226  G4UrbanMscModel* msc1 = new G4UrbanMscModel();
227  G4WentzelVIModel* msc2 = new G4WentzelVIModel();
228  G4UrbanMscModel* msc3 = new G4UrbanMscModel();
229  msc1->SetHighEnergyLimit(highEnergyLimit);
230  msc2->SetLowEnergyLimit(highEnergyLimit);
231  msc3->SetHighEnergyLimit(highEnergyLimit);
232  msc3->SetLocked(true);
233  msc->SetEmModel(msc1);
234  msc->SetEmModel(msc2);
235  if (aRegion) {
236  msc->AddEmModel(-1, msc3, aRegion);
237  }
238  if (bRegion) {
239  msc->AddEmModel(-1, msc3, bRegion);
240  }
241 
242  G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
243  G4CoulombScattering* ss = new G4CoulombScattering();
244  ss->SetEmModel(ssm);
245  ss->SetMinKinEnergy(highEnergyLimit);
246  ssm->SetLowEnergyLimit(highEnergyLimit);
247  ssm->SetActivationLowEnergyLimit(highEnergyLimit);
248 
249  ph->RegisterProcess(msc, particle);
250  ph->RegisterProcess(eioni, particle);
251  ph->RegisterProcess(new G4eBremsstrahlung(), particle);
252  ph->RegisterProcess(new G4eplusAnnihilation(), particle);
253  ph->RegisterProcess(ss, particle);
254 
255  } else if (particleName == "mu+" || particleName == "mu-") {
256  if (nullptr == mub) {
257  mub = new G4MuBremsstrahlung();
258  mup = new G4MuPairProduction();
259  mumsc = new G4MuMultipleScattering();
260  mumsc->SetEmModel(new G4WentzelVIModel());
261  muss = new G4CoulombScattering();
262  }
263  ph->RegisterProcess(mumsc, particle);
264  ph->RegisterProcess(new G4MuIonisation(), particle);
265  ph->RegisterProcess(mub, particle);
266  ph->RegisterProcess(mup, particle);
267  ph->RegisterProcess(muss, particle);
268 
269  } else if (particleName == "alpha" || particleName == "He3") {
270  ph->RegisterProcess(new G4hMultipleScattering(), particle);
271  ph->RegisterProcess(new G4ionIonisation(), particle);
272 
273  } else if (particleName == "GenericIon") {
274  if (nullptr == hmsc) {
275  hmsc = new G4hMultipleScattering("ionmsc");
276  }
277  ph->RegisterProcess(hmsc, particle);
278  ph->RegisterProcess(new G4ionIonisation(), particle);
279 
280  } else if (particleName == "pi+" || particleName == "pi-") {
281  if (nullptr == pib) {
282  pib = new G4hBremsstrahlung();
283  pip = new G4hPairProduction();
284  pimsc = new G4hMultipleScattering();
285  pimsc->SetEmModel(new G4WentzelVIModel());
286  piss = new G4CoulombScattering();
287  }
288  ph->RegisterProcess(pimsc, particle);
289  ph->RegisterProcess(new G4hIonisation(), particle);
290  ph->RegisterProcess(pib, particle);
291  ph->RegisterProcess(pip, particle);
292  ph->RegisterProcess(piss, particle);
293 
294  } else if (particleName == "kaon+" || particleName == "kaon-") {
295  if (nullptr == kb) {
296  kb = new G4hBremsstrahlung();
297  kp = new G4hPairProduction();
298  kmsc = new G4hMultipleScattering();
299  kmsc->SetEmModel(new G4WentzelVIModel());
300  kss = new G4CoulombScattering();
301  }
302  ph->RegisterProcess(kmsc, particle);
303  ph->RegisterProcess(new G4hIonisation(), particle);
304  ph->RegisterProcess(kb, particle);
305  ph->RegisterProcess(kp, particle);
306  ph->RegisterProcess(kss, particle);
307 
308  } else if (particleName == "proton" || particleName == "anti_proton") {
309  if (nullptr == pb) {
310  pb = new G4hBremsstrahlung();
311  pp = new G4hPairProduction();
312  }
313  pmsc = new G4hMultipleScattering();
314  pmsc->SetEmModel(new G4WentzelVIModel());
315 
316  ph->RegisterProcess(pmsc, particle);
317  ph->RegisterProcess(new G4hIonisation(), particle);
318  ph->RegisterProcess(pb, particle);
319  ph->RegisterProcess(pp, particle);
320  ph->RegisterProcess(new G4CoulombScattering(), particle);
321 
322  } else if (particle->GetPDGCharge() != 0.0) {
323  if (nullptr == hmsc) {
324  hmsc = new G4hMultipleScattering("ionmsc");
325  }
326  ph->RegisterProcess(hmsc, particle);
327  ph->RegisterProcess(new G4hIonisation(), particle);
328  }
329  }
330  edm::LogVerbatim("PhysicsList") << "CMSEmStandardPhysicsLPM: EM physics is instantiated";
331 }
EmParticleList.h
VtxSmearedParameters_cfi.Alpha
Alpha
Definition: VtxSmearedParameters_cfi.py:115
CMSEmStandardPhysicsLPM::verbose
G4int verbose
Definition: CMSEmStandardPhysicsLPM.h:17
MessageLogger.h
MeV
const double MeV
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
HiggsValidation_cfi.particleName
particleName
Definition: HiggsValidation_cfi.py:7
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
CMSEmStandardPhysicsLPM::~CMSEmStandardPhysicsLPM
~CMSEmStandardPhysicsLPM() override
Definition: CMSEmStandardPhysicsLPM.cc:91
CMSEmStandardPhysicsLPM::ConstructParticle
void ConstructParticle() override
Definition: CMSEmStandardPhysicsLPM.cc:93
edm::LogVerbatim
Definition: MessageLogger.h:297
CMSEmStandardPhysicsLPM::CMSEmStandardPhysicsLPM
CMSEmStandardPhysicsLPM(G4int ver)
Definition: CMSEmStandardPhysicsLPM.cc:80
nanoDQM_cff.Electron
Electron
Definition: nanoDQM_cff.py:62
EmParticleList
Definition: EmParticleList.h:10
CMSEmStandardPhysicsLPM::ConstructProcess
void ConstructProcess() override
Definition: CMSEmStandardPhysicsLPM.cc:139
EmParticleList::PartNames
const std::vector< G4String > & PartNames() const
Definition: EmParticleList.cc:52
CMSEmStandardPhysicsLPM.h
createTree.pp
pp
Definition: createTree.py:17
TableParser.table
table
Definition: TableParser.py:111
kp
int kp
Definition: CascadeWrapper.h:13