CMS 3D CMS Logo

List of all members | Public Member Functions
CMSEmStandardPhysicsLPM Class Reference

#include <CMSEmStandardPhysicsLPM.h>

Inheritance diagram for CMSEmStandardPhysicsLPM:

Public Member Functions

 CMSEmStandardPhysicsLPM (G4int ver, const edm::ParameterSet &p)
 
void ConstructParticle () override
 
void ConstructProcess () override
 
 ~CMSEmStandardPhysicsLPM () override
 

Detailed Description

Definition at line 17 of file CMSEmStandardPhysicsLPM.h.

Constructor & Destructor Documentation

◆ CMSEmStandardPhysicsLPM()

CMSEmStandardPhysicsLPM::CMSEmStandardPhysicsLPM ( G4int  ver,
const edm::ParameterSet p 
)

Definition at line 60 of file CMSEmStandardPhysicsLPM.cc.

References AlCaHLTBitMon_ParallelJobs::p.

61  : G4VPhysicsConstructor("CMSEmStandard_emm") {
62  SetVerboseLevel(ver);
63  G4EmParameters* param = G4EmParameters::Instance();
64  param->SetDefaults();
65  param->SetVerbose(ver);
66  param->SetApplyCuts(true);
67  param->SetStepFunction(0.8, 1 * CLHEP::mm);
68  param->SetMscRangeFactor(0.2);
69  param->SetMscStepLimitType(fMinimal);
70  SetPhysicsType(bElectromagnetic);
71  double tcut = p.getParameter<double>("G4TrackingCut") * CLHEP::MeV;
72  param->SetLowestElectronEnergy(tcut);
73  param->SetLowestMuHadEnergy(tcut);
74 }

◆ ~CMSEmStandardPhysicsLPM()

CMSEmStandardPhysicsLPM::~CMSEmStandardPhysicsLPM ( )
override

Definition at line 76 of file CMSEmStandardPhysicsLPM.cc.

76 {}

Member Function Documentation

◆ ConstructParticle()

void CMSEmStandardPhysicsLPM::ConstructParticle ( )
override

Definition at line 78 of file CMSEmStandardPhysicsLPM.cc.

78  {
79  // minimal set of particles for EM physics
80  G4EmBuilder::ConstructMinimalEmSet();
81 }

◆ ConstructProcess()

void CMSEmStandardPhysicsLPM::ConstructProcess ( )
override

Definition at line 83 of file CMSEmStandardPhysicsLPM.cc.

References g4SimHits_cfi::G4GammaGeneralProcess, HiggsValidation_cfi::particleName, EmParticleList::PartNames(), createTree::pp, contentValuesCheck::ss, TableParser::table, and HLT_2022v15_cff::verboseLevel.

83  {
84  if (verboseLevel > 1) {
85  edm::LogVerbatim("PhysicsList") << "### " << GetPhysicsName() << " Construct Processes";
86  }
87 
88  // This EM builder takes default models of Geant4 10 EMV.
89  // Multiple scattering by Urban for all particles
90  // except e+e- below 100 MeV for which the Urban model is used
91 
92  G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
93  G4LossTableManager* man = G4LossTableManager::Instance();
94 
95  // muon & hadron bremsstrahlung and pair production
96  G4MuBremsstrahlung* mub = nullptr;
97  G4MuPairProduction* mup = nullptr;
98  G4hBremsstrahlung* pib = nullptr;
99  G4hPairProduction* pip = nullptr;
100  G4hBremsstrahlung* kb = nullptr;
101  G4hPairProduction* kp = nullptr;
102  G4hBremsstrahlung* pb = nullptr;
103  G4hPairProduction* pp = nullptr;
104 
105  // muon & hadron multiple scattering
106  G4MuMultipleScattering* mumsc = nullptr;
107  G4hMultipleScattering* pimsc = nullptr;
108  G4hMultipleScattering* kmsc = nullptr;
109  G4hMultipleScattering* pmsc = nullptr;
110  G4hMultipleScattering* hmsc = nullptr;
111 
112  // muon and hadron single scattering
113  G4CoulombScattering* muss = nullptr;
114  G4CoulombScattering* piss = nullptr;
115  G4CoulombScattering* kss = nullptr;
116 
117  // high energy limit for e+- scattering models and bremsstrahlung
118  G4double highEnergyLimit = 100 * MeV;
119 
120  G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion("HcalRegion", false);
121  G4Region* bRegion = G4RegionStore::GetInstance()->GetRegion("HGCalRegion", false);
122  if (verboseLevel > 1) {
123  edm::LogVerbatim("PhysicsList") << "CMSEmStandardPhysicsLPM: HcalRegion " << aRegion << "; HGCalRegion " << bRegion;
124  }
125  G4ParticleTable* table = G4ParticleTable::GetParticleTable();
126  EmParticleList emList;
127  for (const auto& particleName : emList.PartNames()) {
128  G4ParticleDefinition* particle = table->FindParticle(particleName);
129 
130  if (particleName == "gamma") {
131  G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
132 
133  if (G4EmParameters::Instance()->GeneralProcessActive()) {
135  sp->AddEmProcess(pee);
136  sp->AddEmProcess(new G4ComptonScattering());
137  sp->AddEmProcess(new G4GammaConversion());
138  man->SetGammaGeneralProcess(sp);
139  ph->RegisterProcess(sp, particle);
140 
141  } else {
142  ph->RegisterProcess(pee, particle);
143  ph->RegisterProcess(new G4ComptonScattering(), particle);
144  ph->RegisterProcess(new G4GammaConversion(), particle);
145  }
146 
147  } else if (particleName == "e-") {
148  G4eIonisation* eioni = new G4eIonisation();
149 
150  G4eMultipleScattering* msc = new G4eMultipleScattering;
151  G4UrbanMscModel* msc1 = new G4UrbanMscModel();
152  G4WentzelVIModel* msc2 = new G4WentzelVIModel();
153  msc1->SetHighEnergyLimit(highEnergyLimit);
154  msc2->SetLowEnergyLimit(highEnergyLimit);
155  msc->SetEmModel(msc1);
156  msc->SetEmModel(msc2);
157 
158  // e-/e+ msc for HCAL and HGCAL using the Urban model
159  if (nullptr != aRegion || nullptr != bRegion) {
160  G4UrbanMscModel* msc3 = new G4UrbanMscModel();
161  msc3->SetHighEnergyLimit(highEnergyLimit);
162  msc3->SetLocked(true);
163 
164  if (nullptr != aRegion) {
165  msc->AddEmModel(-1, msc3, aRegion);
166  }
167  if (nullptr != bRegion) {
168  msc->AddEmModel(-1, msc3, bRegion);
169  }
170  }
171 
172  G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
173  G4CoulombScattering* ss = new G4CoulombScattering();
174  ss->SetEmModel(ssm);
175  ss->SetMinKinEnergy(highEnergyLimit);
176  ssm->SetLowEnergyLimit(highEnergyLimit);
177  ssm->SetActivationLowEnergyLimit(highEnergyLimit);
178 
179  ph->RegisterProcess(msc, particle);
180  ph->RegisterProcess(eioni, particle);
181  ph->RegisterProcess(new G4eBremsstrahlung(), particle);
182  ph->RegisterProcess(ss, particle);
183 
184  } else if (particleName == "e+") {
185  G4eIonisation* eioni = new G4eIonisation();
186 
187  G4eMultipleScattering* msc = new G4eMultipleScattering;
188  G4UrbanMscModel* msc1 = new G4UrbanMscModel();
189  G4WentzelVIModel* msc2 = new G4WentzelVIModel();
190  msc1->SetHighEnergyLimit(highEnergyLimit);
191  msc2->SetLowEnergyLimit(highEnergyLimit);
192  msc->SetEmModel(msc1);
193  msc->SetEmModel(msc2);
194 
195  // e-/e+ msc for HCAL and HGCAL using the Urban model
196  if (nullptr != aRegion || nullptr != bRegion) {
197  G4UrbanMscModel* msc3 = new G4UrbanMscModel();
198  msc3->SetHighEnergyLimit(highEnergyLimit);
199  msc3->SetLocked(true);
200 
201  if (nullptr != aRegion) {
202  msc->AddEmModel(-1, msc3, aRegion);
203  }
204  if (nullptr != bRegion) {
205  msc->AddEmModel(-1, msc3, bRegion);
206  }
207  }
208 
209  G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
210  G4CoulombScattering* ss = new G4CoulombScattering();
211  ss->SetEmModel(ssm);
212  ss->SetMinKinEnergy(highEnergyLimit);
213  ssm->SetLowEnergyLimit(highEnergyLimit);
214  ssm->SetActivationLowEnergyLimit(highEnergyLimit);
215 
216  ph->RegisterProcess(msc, particle);
217  ph->RegisterProcess(eioni, particle);
218  ph->RegisterProcess(new G4eBremsstrahlung(), particle);
219  ph->RegisterProcess(new G4eplusAnnihilation(), particle);
220  ph->RegisterProcess(ss, particle);
221 
222  } else if (particleName == "mu+" || particleName == "mu-") {
223  if (nullptr == mub) {
224  mub = new G4MuBremsstrahlung();
225  mup = new G4MuPairProduction();
226  mumsc = new G4MuMultipleScattering();
227  mumsc->SetEmModel(new G4WentzelVIModel());
228  muss = new G4CoulombScattering();
229  }
230  ph->RegisterProcess(mumsc, particle);
231  ph->RegisterProcess(new G4MuIonisation(), particle);
232  ph->RegisterProcess(mub, particle);
233  ph->RegisterProcess(mup, particle);
234  ph->RegisterProcess(muss, particle);
235 
236  } else if (particleName == "alpha" || particleName == "He3") {
237  ph->RegisterProcess(new G4hMultipleScattering(), particle);
238  ph->RegisterProcess(new G4ionIonisation(), particle);
239 
240  } else if (particleName == "GenericIon") {
241  if (nullptr == hmsc) {
242  hmsc = new G4hMultipleScattering("ionmsc");
243  }
244  ph->RegisterProcess(hmsc, particle);
245  ph->RegisterProcess(new G4ionIonisation(), particle);
246 
247  } else if (particleName == "pi+" || particleName == "pi-") {
248  if (nullptr == pib) {
249  pib = new G4hBremsstrahlung();
250  pip = new G4hPairProduction();
251  pimsc = new G4hMultipleScattering();
252  pimsc->SetEmModel(new G4WentzelVIModel());
253  piss = new G4CoulombScattering();
254  }
255  ph->RegisterProcess(pimsc, particle);
256  ph->RegisterProcess(new G4hIonisation(), particle);
257  ph->RegisterProcess(pib, particle);
258  ph->RegisterProcess(pip, particle);
259  ph->RegisterProcess(piss, particle);
260 
261  } else if (particleName == "kaon+" || particleName == "kaon-") {
262  if (nullptr == kb) {
263  kb = new G4hBremsstrahlung();
264  kp = new G4hPairProduction();
265  kmsc = new G4hMultipleScattering();
266  kmsc->SetEmModel(new G4WentzelVIModel());
267  kss = new G4CoulombScattering();
268  }
269  ph->RegisterProcess(kmsc, particle);
270  ph->RegisterProcess(new G4hIonisation(), particle);
271  ph->RegisterProcess(kb, particle);
272  ph->RegisterProcess(kp, particle);
273  ph->RegisterProcess(kss, particle);
274 
275  } else if (particleName == "proton" || particleName == "anti_proton") {
276  if (nullptr == pb) {
277  pb = new G4hBremsstrahlung();
278  pp = new G4hPairProduction();
279  }
280  pmsc = new G4hMultipleScattering();
281  pmsc->SetEmModel(new G4WentzelVIModel());
282 
283  ph->RegisterProcess(pmsc, particle);
284  ph->RegisterProcess(new G4hIonisation(), particle);
285  ph->RegisterProcess(pb, particle);
286  ph->RegisterProcess(pp, particle);
287  ph->RegisterProcess(new G4CoulombScattering(), particle);
288 
289  } else if (particle->GetPDGCharge() != 0.0) {
290  if (nullptr == hmsc) {
291  hmsc = new G4hMultipleScattering("ionmsc");
292  }
293  ph->RegisterProcess(hmsc, particle);
294  ph->RegisterProcess(new G4hIonisation(), particle);
295  }
296  }
297  edm::LogVerbatim("PhysicsList") << "CMSEmStandardPhysicsLPM: EM physics is instantiated";
298 }
Log< level::Info, true > LogVerbatim
const std::vector< G4String > & PartNames() const