CMS 3D CMS Logo

CMSEmStandardPhysics95.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 "G4ProcessManager.hh"
11 #include "G4LossTableManager.hh"
12 #include "G4RegionStore.hh"
13 
14 #include "G4ComptonScattering.hh"
15 #include "G4GammaConversion.hh"
16 #include "G4GammaConversion.hh"
17 #include "G4PairProductionRelModel.hh"
18 #include "G4PhotoElectricEffect.hh"
19 
20 #include "G4hMultipleScattering.hh"
21 #include "G4eMultipleScattering.hh"
22 #include "G4MscStepLimitType.hh"
23 
24 #include "G4eIonisation.hh"
25 #include "G4eBremsstrahlung.hh"
26 #include "G4eplusAnnihilation.hh"
27 
28 #include "G4MuMultipleScattering.hh"
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 #include "G4BuilderType.hh"
73 
74 #include "G4SystemOfUnits.hh"
75 
76 CMSEmStandardPhysics95::CMSEmStandardPhysics95(const G4String& name, G4int ver, const std::string& reg)
77  : G4VPhysicsConstructor(name), verbose(ver), region(reg) {
78  G4EmParameters* param = G4EmParameters::Instance();
79  param->SetDefaults();
80  param->SetVerbose(verbose);
81  param->SetApplyCuts(true);
82  param->SetStepFunction(0.8, 1 * CLHEP::mm);
83  param->SetMscRangeFactor(0.2);
84  param->SetMscStepLimitType(fMinimal);
85  SetPhysicsType(bElectromagnetic);
86 }
87 
89 
91  // gamma
92  G4Gamma::Gamma();
93 
94  // leptons
96  G4Positron::Positron();
97  G4MuonPlus::MuonPlus();
98  G4MuonMinus::MuonMinus();
99  G4TauMinus::TauMinusDefinition();
100  G4TauPlus::TauPlusDefinition();
101 
102  // mesons
103  G4PionPlus::PionPlusDefinition();
104  G4PionMinus::PionMinusDefinition();
105  G4KaonPlus::KaonPlusDefinition();
106  G4KaonMinus::KaonMinusDefinition();
107  G4DMesonMinus::DMesonMinusDefinition();
108  G4DMesonPlus::DMesonPlusDefinition();
109  G4BMesonMinus::BMesonMinusDefinition();
110  G4BMesonPlus::BMesonPlusDefinition();
111 
112  // barions
113  G4Proton::Proton();
114  G4AntiProton::AntiProton();
115  G4SigmaMinus::SigmaMinusDefinition();
116  G4AntiSigmaMinus::AntiSigmaMinusDefinition();
117  G4SigmaPlus::SigmaPlusDefinition();
118  G4AntiSigmaPlus::AntiSigmaPlusDefinition();
119  G4XiMinus::XiMinusDefinition();
120  G4AntiXiMinus::AntiXiMinusDefinition();
121  G4OmegaMinus::OmegaMinusDefinition();
122  G4AntiOmegaMinus::AntiOmegaMinusDefinition();
123  G4LambdacPlus::LambdacPlusDefinition();
124  G4AntiLambdacPlus::AntiLambdacPlusDefinition();
125  G4XicPlus::XicPlusDefinition();
126  G4AntiXicPlus::AntiXicPlusDefinition();
127 
128  // ions
129  G4Deuteron::Deuteron();
130  G4Triton::Triton();
131  G4He3::He3();
132  G4Alpha::Alpha();
133  G4GenericIon::GenericIonDefinition();
134 }
135 
137  // This EM builder takes default models of Geant4 EMV.
138  // Multiple scattering by Urban for all particles
139 
140  G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
141 
142  // muon & hadron bremsstrahlung and pair production
143  G4MuBremsstrahlung* mub = nullptr;
144  G4MuPairProduction* mup = nullptr;
145  G4hBremsstrahlung* pib = nullptr;
146  G4hPairProduction* pip = nullptr;
147  G4hBremsstrahlung* kb = nullptr;
148  G4hPairProduction* kp = nullptr;
149  G4hBremsstrahlung* pb = nullptr;
150  G4hPairProduction* pp = nullptr;
151 
152  // muon & hadron multiple scattering
153  G4MuMultipleScattering* mumsc = nullptr;
154  G4hMultipleScattering* pimsc = nullptr;
155  G4hMultipleScattering* kmsc = nullptr;
156  G4hMultipleScattering* pmsc = nullptr;
157  G4hMultipleScattering* hmsc = nullptr;
158 
159  // Add standard EM Processes
160  G4ParticleTable* table = G4ParticleTable::GetParticleTable();
161  EmParticleList emList;
162  for (const auto& particleName : emList.PartNames()) {
163  G4ParticleDefinition* particle = table->FindParticle(particleName);
164  if (verbose > 1)
165  edm::LogVerbatim("PhysicsList") << "### " << GetPhysicsName() << " instantiates for " << particleName;
166 
167  if (particleName == "gamma") {
168  ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
169  ph->RegisterProcess(new G4ComptonScattering(), particle);
170  ph->RegisterProcess(new G4GammaConversion(), particle);
171 
172  } else if (particleName == "e-") {
173  G4eIonisation* eioni = new G4eIonisation();
174  G4eMultipleScattering* msc = new G4eMultipleScattering();
175  G4eBremsstrahlung* ebrem = new G4eBremsstrahlung();
176 
177  ph->RegisterProcess(msc, particle);
178  ph->RegisterProcess(eioni, particle);
179  ph->RegisterProcess(ebrem, particle);
180 
181  } else if (particleName == "e+") {
182  G4eIonisation* eioni = new G4eIonisation();
183  G4eMultipleScattering* msc = new G4eMultipleScattering();
184  G4eBremsstrahlung* ebrem = new G4eBremsstrahlung();
185 
186  ph->RegisterProcess(msc, particle);
187  ph->RegisterProcess(eioni, particle);
188  ph->RegisterProcess(ebrem, particle);
189  ph->RegisterProcess(new G4eplusAnnihilation(), particle);
190 
191  } else if (particleName == "mu+" || particleName == "mu-") {
192  if (nullptr == mub) {
193  mub = new G4MuBremsstrahlung();
194  mup = new G4MuPairProduction();
195  mumsc = new G4MuMultipleScattering();
196  }
197  ph->RegisterProcess(mumsc, particle);
198  ph->RegisterProcess(new G4MuIonisation(), particle);
199  ph->RegisterProcess(mub, particle);
200  ph->RegisterProcess(mup, particle);
201 
202  } else if (particleName == "alpha" || particleName == "He3") {
203  ph->RegisterProcess(new G4hMultipleScattering(), particle);
204  ph->RegisterProcess(new G4ionIonisation(), particle);
205 
206  } else if (particleName == "GenericIon") {
207  if (nullptr == hmsc) {
208  hmsc = new G4hMultipleScattering("ionmsc");
209  }
210  ph->RegisterProcess(hmsc, particle);
211  ph->RegisterProcess(new G4ionIonisation(), particle);
212 
213  } else if (particleName == "pi+" || particleName == "pi-") {
214  if (nullptr == pib) {
215  pib = new G4hBremsstrahlung();
216  pip = new G4hPairProduction();
217  pimsc = new G4hMultipleScattering();
218  }
219  ph->RegisterProcess(pimsc, particle);
220  ph->RegisterProcess(new G4hIonisation(), particle);
221  ph->RegisterProcess(pib, particle);
222  ph->RegisterProcess(pip, particle);
223 
224  } else if (particleName == "kaon+" || particleName == "kaon-") {
225  if (nullptr == kb) {
226  kb = new G4hBremsstrahlung();
227  kp = new G4hPairProduction();
228  kmsc = new G4hMultipleScattering();
229  }
230  ph->RegisterProcess(kmsc, particle);
231  ph->RegisterProcess(new G4hIonisation(), particle);
232  ph->RegisterProcess(kb, particle);
233  ph->RegisterProcess(kp, particle);
234 
235  } else if (particleName == "proton" || particleName == "anti_proton") {
236  if (nullptr == pb) {
237  pb = new G4hBremsstrahlung();
238  pp = new G4hPairProduction();
239  }
240  pmsc = new G4hMultipleScattering();
241  ph->RegisterProcess(pmsc, particle);
242  ph->RegisterProcess(new G4hIonisation(), particle);
243  ph->RegisterProcess(pb, particle);
244  ph->RegisterProcess(pp, particle);
245 
246  } else if (particle->GetPDGCharge() != 0.0) {
247  if (nullptr == hmsc) {
248  hmsc = new G4hMultipleScattering("ionmsc");
249  }
250  ph->RegisterProcess(hmsc, particle);
251  ph->RegisterProcess(new G4hIonisation(), particle);
252  }
253  }
254 }
EmParticleList.h
VtxSmearedParameters_cfi.Alpha
Alpha
Definition: VtxSmearedParameters_cfi.py:115
MessageLogger.h
CMSEmStandardPhysics95.h
CMSEmStandardPhysics95::~CMSEmStandardPhysics95
~CMSEmStandardPhysics95() override
Definition: CMSEmStandardPhysics95.cc:88
HiggsValidation_cfi.particleName
particleName
Definition: HiggsValidation_cfi.py:7
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CMSEmStandardPhysics95::ConstructProcess
void ConstructProcess() override
Definition: CMSEmStandardPhysics95.cc:136
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88338
CMSEmStandardPhysics95::ConstructParticle
void ConstructParticle() override
Definition: CMSEmStandardPhysics95.cc:90
nanoDQM_cff.Electron
Electron
Definition: nanoDQM_cff.py:62
EmParticleList
Definition: EmParticleList.h:10
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EmParticleList::PartNames
const std::vector< G4String > & PartNames() const
Definition: EmParticleList.cc:52
createTree.pp
pp
Definition: createTree.py:17
CMSEmStandardPhysics95::CMSEmStandardPhysics95
CMSEmStandardPhysics95(const G4String &name, G4int ver, const std::string &reg)
Definition: CMSEmStandardPhysics95.cc:76
TableParser.table
table
Definition: TableParser.py:111
kp
int kp
Definition: CascadeWrapper.h:13
CMSEmStandardPhysics95::verbose
G4int verbose
Definition: CMSEmStandardPhysics95.h:17