CMS 3D CMS Logo

CMSEmStandardPhysicsEMZ.cc
Go to the documentation of this file.
3 
4 #include "G4SystemOfUnits.hh"
5 #include "G4ParticleDefinition.hh"
6 #include "G4LossTableManager.hh"
7 #include "G4EmParameters.hh"
8 #include "G4EmBuilder.hh"
9 
10 #include "G4ComptonScattering.hh"
11 #include "G4GammaConversion.hh"
12 #include "G4PhotoElectricEffect.hh"
13 #include "G4RayleighScattering.hh"
14 #include "G4PEEffectFluoModel.hh"
15 #include "G4KleinNishinaModel.hh"
16 #include "G4LowEPComptonModel.hh"
17 #include "G4BetheHeitler5DModel.hh"
18 #include "G4LivermorePhotoElectricModel.hh"
19 
20 #include "G4eMultipleScattering.hh"
21 #include "G4hMultipleScattering.hh"
22 #include "G4MscStepLimitType.hh"
23 #include "G4UrbanMscModel.hh"
24 #include "G4GoudsmitSaundersonMscModel.hh"
25 #include "G4DummyModel.hh"
26 #include "G4WentzelVIModel.hh"
27 #include "G4CoulombScattering.hh"
28 #include "G4eCoulombScatteringModel.hh"
29 
30 #include "G4eIonisation.hh"
31 #include "G4eBremsstrahlung.hh"
32 #include "G4Generator2BS.hh"
33 #include "G4SeltzerBergerModel.hh"
34 #include "G4ePairProduction.hh"
35 #include "G4UniversalFluctuation.hh"
36 
37 #include "G4eplusAnnihilation.hh"
38 
39 #include "G4hIonisation.hh"
40 #include "G4ionIonisation.hh"
41 
42 #include "G4Gamma.hh"
43 #include "G4Electron.hh"
44 #include "G4Positron.hh"
45 #include "G4GenericIon.hh"
46 
47 #include "G4IonParametrisedLossModel.hh"
48 #include "G4NuclearStopping.hh"
49 #include "G4ePairProduction.hh"
50 #include "G4LivermoreIonisationModel.hh"
51 #include "G4PenelopeIonisationModel.hh"
52 
53 #include "G4PhysicsListHelper.hh"
54 #include "G4BuilderType.hh"
55 #include "G4GammaGeneralProcess.hh"
56 
57 #include "G4RegionStore.hh"
58 #include "G4Region.hh"
59 #include "G4GammaGeneralProcess.hh"
60 
61 #include "G4SystemOfUnits.hh"
62 
64  : G4VPhysicsConstructor("CMSEmStandard_emz") {
65  SetVerboseLevel(ver);
66  G4EmParameters* param = G4EmParameters::Instance();
67  param->SetDefaults();
68  param->SetVerbose(ver);
69  param->SetMinEnergy(100 * CLHEP::eV);
70  param->SetLowestElectronEnergy(100 * CLHEP::eV);
71  param->SetNumberOfBinsPerDecade(20);
72  param->ActivateAngularGeneratorForIonisation(true);
73  param->SetStepFunction(0.2, 10 * CLHEP::um);
74  param->SetStepFunctionMuHad(0.1, 50 * CLHEP::um);
75  param->SetStepFunctionLightIons(0.1, 20 * CLHEP::um);
76  param->SetStepFunctionIons(0.1, 1 * CLHEP::um);
77  param->SetUseMottCorrection(true); // use Mott-correction for e-/e+ msc gs
78  param->SetMscStepLimitType(fUseSafetyPlus); // for e-/e+ msc gs
79  param->SetMscSkin(3); // error-free stepping for e-/e+ msc gs
80  param->SetMscRangeFactor(0.08); // error-free stepping for e-/e+ msc gs
81  param->SetMuHadLateralDisplacement(true);
82  param->SetFluo(true);
83  param->SetUseICRU90Data(true);
84  param->SetMaxNIELEnergy(1 * CLHEP::MeV);
85  double tcut = p.getParameter<double>("G4TrackingCut") * CLHEP::MeV;
86  param->SetLowestElectronEnergy(tcut);
87  param->SetLowestMuHadEnergy(tcut);
88  SetPhysicsType(bElectromagnetic);
89 }
90 
92 
94  // minimal set of particles for EM physics
95  G4EmBuilder::ConstructMinimalEmSet();
96 }
97 
99  if (verboseLevel > 0) {
100  edm::LogVerbatim("PhysicsList") << "### " << GetPhysicsName() << " Construct Processes";
101  }
102 
103  // This EM builder takes default models of Geant4 10 EMV.
104  // Multiple scattering by Urban for all particles
105  // except e+e- below 100 MeV for which the Urban model is used
106  G4EmBuilder::PrepareEMPhysics();
107 
108  G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
109 
110  // processes used by several particles
111  G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
112  G4double nielEnergyLimit = G4EmParameters::Instance()->MaxNIELEnergy();
113  G4NuclearStopping* pnuc = nullptr;
114  if (nielEnergyLimit > 0.0) {
115  pnuc = new G4NuclearStopping();
116  pnuc->SetMaxKinEnergy(nielEnergyLimit);
117  }
118 
119  // high energy limit for e+- scattering models
120  G4double highEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit();
121 
122  // Add gamma EM Processes
123  G4ParticleDefinition* particle = G4Gamma::Gamma();
124 
125  // Photoelectric
126  G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
127  G4VEmModel* theLivermorePEModel = new G4LivermorePhotoElectricModel();
128  pe->SetEmModel(theLivermorePEModel);
129 
130  // Compton scattering
131  G4ComptonScattering* cs = new G4ComptonScattering;
132  cs->SetEmModel(new G4KleinNishinaModel());
133  G4VEmModel* theLowEPComptonModel = new G4LowEPComptonModel();
134  theLowEPComptonModel->SetHighEnergyLimit(20 * CLHEP::MeV);
135  cs->AddEmModel(0, theLowEPComptonModel);
136 
137  // Gamma conversion
138  G4GammaConversion* gc = new G4GammaConversion();
139  G4VEmModel* conv = new G4BetheHeitler5DModel();
140  gc->SetEmModel(conv);
141 
142  if (G4EmParameters::Instance()->GeneralProcessActive()) {
144  sp->AddEmProcess(pe);
145  sp->AddEmProcess(cs);
146  sp->AddEmProcess(gc);
147  sp->AddEmProcess(new G4RayleighScattering());
148  G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
149  ph->RegisterProcess(sp, particle);
150  } else {
151  ph->RegisterProcess(pe, particle);
152  ph->RegisterProcess(cs, particle);
153  ph->RegisterProcess(gc, particle);
154  ph->RegisterProcess(new G4RayleighScattering(), particle);
155  }
156 
157  // e-
158  particle = G4Electron::Electron();
159 
160  // multiple scattering
161  G4eMultipleScattering* msc = new G4eMultipleScattering();
162  // e-/e+ msc gs with Mott-correction
163  // (Mott-correction is set through G4EmParameters)
164  G4GoudsmitSaundersonMscModel* msc1 = new G4GoudsmitSaundersonMscModel();
165  G4WentzelVIModel* msc2 = new G4WentzelVIModel();
166  msc1->SetHighEnergyLimit(highEnergyLimit);
167  msc2->SetLowEnergyLimit(highEnergyLimit);
168  msc->SetEmModel(msc1);
169  msc->SetEmModel(msc2);
170 
171  G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
172  G4CoulombScattering* ss = new G4CoulombScattering();
173  ss->SetEmModel(ssm);
174  ss->SetMinKinEnergy(highEnergyLimit);
175  ssm->SetLowEnergyLimit(highEnergyLimit);
176  ssm->SetActivationLowEnergyLimit(highEnergyLimit);
177 
178  // single scattering
179  ssm = new G4eCoulombScatteringModel();
180  ss = new G4CoulombScattering();
181  ss->SetEmModel(ssm);
182  ss->SetMinKinEnergy(highEnergyLimit);
183  ssm->SetLowEnergyLimit(highEnergyLimit);
184  ssm->SetActivationLowEnergyLimit(highEnergyLimit);
185 
186  // ionisation
187  G4eIonisation* eioni = new G4eIonisation();
188  G4VEmModel* theIoniLiv = new G4LivermoreIonisationModel();
189  theIoniLiv->SetHighEnergyLimit(0.1 * CLHEP::MeV);
190  eioni->AddEmModel(0, theIoniLiv, new G4UniversalFluctuation());
191 
192  // bremsstrahlung
193  G4eBremsstrahlung* brem = new G4eBremsstrahlung();
194  G4SeltzerBergerModel* br1 = new G4SeltzerBergerModel();
195  G4eBremsstrahlungRelModel* br2 = new G4eBremsstrahlungRelModel();
196  br1->SetAngularDistribution(new G4Generator2BS());
197  br2->SetAngularDistribution(new G4Generator2BS());
198  brem->SetEmModel(br1);
199  brem->SetEmModel(br2);
200  br1->SetHighEnergyLimit(CLHEP::GeV);
201 
202  G4ePairProduction* ee = new G4ePairProduction();
203 
204  // register processes
205  ph->RegisterProcess(msc, particle);
206  ph->RegisterProcess(eioni, particle);
207  ph->RegisterProcess(brem, particle);
208  ph->RegisterProcess(ee, particle);
209  ph->RegisterProcess(ss, particle);
210 
211  // e+
212  particle = G4Positron::Positron();
213 
214  // multiple scattering
215  msc = new G4eMultipleScattering();
216  // e-/e+ msc gs with Mott-correction
217  // (Mott-correction is set through G4EmParameters)
218  msc1 = new G4GoudsmitSaundersonMscModel();
219  msc2 = new G4WentzelVIModel();
220  msc1->SetHighEnergyLimit(highEnergyLimit);
221  msc2->SetLowEnergyLimit(highEnergyLimit);
222  msc->SetEmModel(msc1);
223  msc->SetEmModel(msc2);
224 
225  // single scattering
226  ssm = new G4eCoulombScatteringModel();
227  ss = new G4CoulombScattering();
228  ss->SetEmModel(ssm);
229  ss->SetMinKinEnergy(highEnergyLimit);
230  ssm->SetLowEnergyLimit(highEnergyLimit);
231  ssm->SetActivationLowEnergyLimit(highEnergyLimit);
232 
233  // ionisation
234  eioni = new G4eIonisation();
235  /*
236  G4VEmModel* pen = new G4PenelopeIonisationModel();
237  pen->SetHighEnergyLimit(0.1*CLHEP::MeV);
238  eioni->AddEmModel(0, pen, new G4UniversalFluctuation());
239  */
240  // bremsstrahlung
241  brem = new G4eBremsstrahlung();
242  br1 = new G4SeltzerBergerModel();
243  br2 = new G4eBremsstrahlungRelModel();
244  br1->SetAngularDistribution(new G4Generator2BS());
245  br2->SetAngularDistribution(new G4Generator2BS());
246  brem->SetEmModel(br1);
247  brem->SetEmModel(br2);
248  br1->SetHighEnergyLimit(CLHEP::GeV);
249 
250  // register processes
251  ph->RegisterProcess(msc, particle);
252  ph->RegisterProcess(eioni, particle);
253  ph->RegisterProcess(brem, particle);
254  ph->RegisterProcess(ee, particle);
255  ph->RegisterProcess(new G4eplusAnnihilation(), particle);
256  ph->RegisterProcess(ss, particle);
257 
258  // generic ion
259  particle = G4GenericIon::GenericIon();
260  G4ionIonisation* ionIoni = new G4ionIonisation();
261  ionIoni->SetEmModel(new G4IonParametrisedLossModel());
262  ph->RegisterProcess(hmsc, particle);
263  ph->RegisterProcess(ionIoni, particle);
264  if (nullptr != pnuc)
265  ph->RegisterProcess(pnuc, particle);
266 
267  // muons, hadrons, ions
268  G4EmBuilder::ConstructCharged(hmsc, pnuc);
269 }
Log< level::Info, true > LogVerbatim
CMSEmStandardPhysicsEMZ(G4int ver, const edm::ParameterSet &p)
EPOS::IO_EPOS conv