4 #include "G4SystemOfUnits.hh" 5 #include "G4ParticleDefinition.hh" 6 #include "G4LossTableManager.hh" 7 #include "G4EmParameters.hh" 8 #include "G4EmBuilder.hh" 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" 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" 30 #include "G4eIonisation.hh" 31 #include "G4eBremsstrahlung.hh" 32 #include "G4Generator2BS.hh" 33 #include "G4SeltzerBergerModel.hh" 34 #include "G4ePairProduction.hh" 35 #include "G4UniversalFluctuation.hh" 37 #include "G4eplusAnnihilation.hh" 39 #include "G4hIonisation.hh" 40 #include "G4ionIonisation.hh" 43 #include "G4Electron.hh" 44 #include "G4Positron.hh" 45 #include "G4GenericIon.hh" 47 #include "G4PhysicsListHelper.hh" 48 #include "G4BuilderType.hh" 49 #include "G4GammaGeneralProcess.hh" 51 #include "G4Version.hh" 52 #if G4VERSION_NUMBER >= 1110 53 #include "G4ProcessManager.hh" 54 #include "G4TransportationWithMsc.hh" 57 #include "G4RegionStore.hh" 58 #include "G4Region.hh" 59 #include "G4GammaGeneralProcess.hh" 61 #include "G4SystemOfUnits.hh" 64 : G4VPhysicsConstructor(
"CMSEmStandard_emn") {
67 G4EmParameters* param = G4EmParameters::Instance();
69 param->SetVerbose(ver);
70 param->SetApplyCuts(
true);
71 param->SetMinEnergy(100 * CLHEP::eV);
72 param->SetNumberOfBinsPerDecade(20);
73 param->SetStepFunction(0.8, 1 * CLHEP::mm);
74 param->SetMscRangeFactor(0.2);
75 param->SetMscStepLimitType(fMinimal);
77 param->SetUseMottCorrection(
true);
78 SetPhysicsType(bElectromagnetic);
82 fLambdaLimit =
p.getParameter<
double>(
"G4MscLambdaLimit") * CLHEP::mm;
85 if (msc ==
"UseSafetyPlus") {
88 if (msc ==
"Minimal") {
91 double tcut =
p.getParameter<
double>(
"G4TrackingCut") * CLHEP::MeV;
92 param->SetLowestElectronEnergy(tcut);
93 param->SetLowestMuHadEnergy(tcut);
98 G4EmBuilder::ConstructMinimalEmSet();
103 edm::LogVerbatim(
"PhysicsList") <<
"### " << GetPhysicsName() <<
" Construct Processes";
109 G4EmBuilder::PrepareEMPhysics();
111 G4PhysicsListHelper*
ph = G4PhysicsListHelper::GetPhysicsListHelper();
114 G4hMultipleScattering* hmsc =
new G4hMultipleScattering(
"ionmsc");
115 G4NuclearStopping* pnuc(
nullptr);
118 G4double highEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit();
119 const G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"HcalRegion",
false);
120 const G4Region* bRegion = G4RegionStore::GetInstance()->GetRegion(
"HGCalRegion",
false);
123 G4ParticleDefinition* particle = G4Gamma::Gamma();
126 G4PhotoElectricEffect* pe =
new G4PhotoElectricEffect();
127 G4VEmModel* theLivermorePEModel =
new G4LivermorePhotoElectricModel();
128 pe->SetEmModel(theLivermorePEModel);
131 G4ComptonScattering*
cs =
new G4ComptonScattering;
132 cs->SetEmModel(
new G4KleinNishinaModel());
135 G4GammaConversion* gc =
new G4GammaConversion();
136 G4VEmModel*
conv =
new G4BetheHeitler5DModel();
137 gc->SetEmModel(
conv);
139 if (G4EmParameters::Instance()->GeneralProcessActive()) {
141 sp->AddEmProcess(pe);
142 sp->AddEmProcess(
cs);
143 sp->AddEmProcess(gc);
144 sp->AddEmProcess(
new G4RayleighScattering());
145 G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
146 ph->RegisterProcess(sp, particle);
148 ph->RegisterProcess(pe, particle);
149 ph->RegisterProcess(
cs, particle);
150 ph->RegisterProcess(gc, particle);
151 ph->RegisterProcess(
new G4RayleighScattering(), particle);
158 G4UrbanMscModel* msc1 =
new G4UrbanMscModel();
159 G4WentzelVIModel* msc2 =
new G4WentzelVIModel();
160 msc1->SetHighEnergyLimit(highEnergyLimit);
161 msc2->SetLowEnergyLimit(highEnergyLimit);
164 G4UrbanMscModel* msc4 =
nullptr;
165 if (
nullptr != aRegion) {
166 msc4 =
new G4UrbanMscModel();
167 msc4->SetHighEnergyLimit(highEnergyLimit);
173 msc4->SetLocked(
true);
177 G4GoudsmitSaundersonMscModel* msc3 =
nullptr;
178 if (
nullptr != bRegion) {
179 msc3 =
new G4GoudsmitSaundersonMscModel();
180 msc3->SetHighEnergyLimit(highEnergyLimit);
181 msc3->SetRangeFactor(0.08);
183 msc3->SetStepLimitType(fUseSafetyPlus);
184 msc3->SetLocked(
true);
187 #if G4VERSION_NUMBER >= 1110 188 G4TransportationWithMscType transportationWithMsc = G4EmParameters::Instance()->TransportationWithMsc();
189 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
190 G4ProcessManager* procManager = particle->GetProcessManager();
192 G4VProcess* removed = procManager->RemoveProcess(0);
193 if (removed->GetProcessName() !=
"Transportation") {
194 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
197 "replaced process is not G4Transportation!");
199 G4TransportationWithMsc* transportWithMsc =
201 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
202 transportWithMsc->SetMultipleSteps(
true);
204 transportWithMsc->AddMscModel(msc1);
205 transportWithMsc->AddMscModel(msc2);
206 if (msc4 !=
nullptr) {
207 transportWithMsc->AddMscModel(msc4, -1, aRegion);
209 if (msc3 !=
nullptr) {
210 transportWithMsc->AddMscModel(msc3, -1, bRegion);
212 procManager->AddProcess(transportWithMsc, -1, 0, 0);
217 G4eMultipleScattering* msc =
new G4eMultipleScattering;
218 msc->SetEmModel(msc1);
219 msc->SetEmModel(msc2);
220 if (msc4 !=
nullptr) {
221 msc->AddEmModel(-1, msc4, aRegion);
223 if (msc3 !=
nullptr) {
224 msc->AddEmModel(-1, msc3, bRegion);
226 ph->RegisterProcess(msc, particle);
230 G4eCoulombScatteringModel* ssm =
new G4eCoulombScatteringModel();
231 G4CoulombScattering*
ss =
new G4CoulombScattering();
233 ss->SetMinKinEnergy(highEnergyLimit);
234 ssm->SetLowEnergyLimit(highEnergyLimit);
235 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
238 G4eIonisation* eioni =
new G4eIonisation();
241 G4eBremsstrahlung* brem =
new G4eBremsstrahlung();
242 G4SeltzerBergerModel* br1 =
new G4SeltzerBergerModel();
243 G4eBremsstrahlungRelModel* 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);
250 G4ePairProduction* ee =
new G4ePairProduction();
253 ph->RegisterProcess(eioni, particle);
254 ph->RegisterProcess(brem, particle);
255 ph->RegisterProcess(ee, particle);
256 ph->RegisterProcess(
ss, particle);
259 particle = G4Positron::Positron();
262 msc1 =
new G4UrbanMscModel();
263 msc2 =
new G4WentzelVIModel();
264 msc1->SetHighEnergyLimit(highEnergyLimit);
265 msc2->SetLowEnergyLimit(highEnergyLimit);
268 if (
nullptr != aRegion) {
269 msc4 =
new G4UrbanMscModel();
270 msc4->SetHighEnergyLimit(highEnergyLimit);
276 msc4->SetLocked(
true);
280 if (
nullptr != bRegion) {
281 msc3 =
new G4GoudsmitSaundersonMscModel();
282 msc3->SetHighEnergyLimit(highEnergyLimit);
283 msc3->SetRangeFactor(0.08);
285 msc3->SetStepLimitType(fUseSafetyPlus);
286 msc3->SetLocked(
true);
289 #if G4VERSION_NUMBER >= 1110 290 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
291 G4ProcessManager* procManager = particle->GetProcessManager();
293 G4VProcess* removed = procManager->RemoveProcess(0);
294 if (removed->GetProcessName() !=
"Transportation") {
295 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
298 "replaced process is not G4Transportation!");
300 G4TransportationWithMsc* transportWithMsc =
302 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
303 transportWithMsc->SetMultipleSteps(
true);
305 transportWithMsc->AddMscModel(msc1);
306 transportWithMsc->AddMscModel(msc2);
307 if (msc4 !=
nullptr) {
308 transportWithMsc->AddMscModel(msc4, -1, aRegion);
310 if (msc3 !=
nullptr) {
311 transportWithMsc->AddMscModel(msc3, -1, bRegion);
313 procManager->AddProcess(transportWithMsc, -1, 0, 0);
318 G4eMultipleScattering* msc =
new G4eMultipleScattering;
319 msc->SetEmModel(msc1);
320 msc->SetEmModel(msc2);
321 if (msc4 !=
nullptr) {
322 msc->AddEmModel(-1, msc4, aRegion);
324 if (msc3 !=
nullptr) {
325 msc->AddEmModel(-1, msc3, bRegion);
327 ph->RegisterProcess(msc, particle);
331 ssm =
new G4eCoulombScatteringModel();
332 ss =
new G4CoulombScattering();
334 ss->SetMinKinEnergy(highEnergyLimit);
335 ssm->SetLowEnergyLimit(highEnergyLimit);
336 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
339 eioni =
new G4eIonisation();
342 brem =
new G4eBremsstrahlung();
343 br1 =
new G4SeltzerBergerModel();
344 br2 =
new G4eBremsstrahlungRelModel();
345 br1->SetAngularDistribution(
new G4Generator2BS());
346 br2->SetAngularDistribution(
new G4Generator2BS());
347 brem->SetEmModel(br1);
348 brem->SetEmModel(br2);
349 br1->SetHighEnergyLimit(CLHEP::GeV);
352 ph->RegisterProcess(eioni, particle);
353 ph->RegisterProcess(brem, particle);
354 ph->RegisterProcess(ee, particle);
355 ph->RegisterProcess(
new G4eplusAnnihilation(), particle);
356 ph->RegisterProcess(
ss, particle);
359 particle = G4GenericIon::GenericIon();
360 G4ionIonisation* ionIoni =
new G4ionIonisation();
361 ph->RegisterProcess(hmsc, particle);
362 ph->RegisterProcess(ionIoni, particle);
365 G4EmBuilder::ConstructCharged(hmsc, pnuc);
Log< level::Info, true > LogVerbatim
void ConstructProcess() override
CMSEmStandardPhysicsXS(G4int ver, const edm::ParameterSet &p)
void ConstructParticle() override
G4MscStepLimitType fStepLimitType