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") {
66 G4EmParameters* param = G4EmParameters::Instance();
68 param->SetVerbose(ver);
69 param->SetApplyCuts(
true);
70 param->SetMinEnergy(100 * CLHEP::eV);
71 param->SetNumberOfBinsPerDecade(20);
72 param->SetStepFunction(0.8, 1 * CLHEP::mm);
73 param->SetMscRangeFactor(0.2);
74 param->SetMscStepLimitType(fMinimal);
76 param->SetUseMottCorrection(
true);
77 SetPhysicsType(bElectromagnetic);
81 fLambdaLimit =
p.getParameter<
double>(
"G4MscLambdaLimit") * CLHEP::mm;
84 if (msc ==
"UseSafetyPlus") {
87 if (msc ==
"Minimal") {
90 double tcut =
p.getParameter<
double>(
"G4TrackingCut") * CLHEP::MeV;
91 param->SetLowestElectronEnergy(tcut);
92 param->SetLowestMuHadEnergy(tcut);
99 G4EmBuilder::ConstructMinimalEmSet();
104 edm::LogVerbatim(
"PhysicsList") <<
"### " << GetPhysicsName() <<
" Construct Processes";
110 G4EmBuilder::PrepareEMPhysics();
112 G4PhysicsListHelper*
ph = G4PhysicsListHelper::GetPhysicsListHelper();
115 G4hMultipleScattering* hmsc =
new G4hMultipleScattering(
"ionmsc");
116 G4NuclearStopping* pnuc(
nullptr);
119 G4double highEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit();
120 const G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"HcalRegion",
false);
121 const G4Region* bRegion = G4RegionStore::GetInstance()->GetRegion(
"HGCalRegion",
false);
124 G4ParticleDefinition* particle = G4Gamma::Gamma();
127 G4PhotoElectricEffect* pe =
new G4PhotoElectricEffect();
128 G4VEmModel* theLivermorePEModel =
new G4LivermorePhotoElectricModel();
129 pe->SetEmModel(theLivermorePEModel);
132 G4ComptonScattering*
cs =
new G4ComptonScattering;
133 cs->SetEmModel(
new G4KleinNishinaModel());
136 G4GammaConversion* gc =
new G4GammaConversion();
137 G4VEmModel*
conv =
new G4BetheHeitler5DModel();
138 gc->SetEmModel(
conv);
140 if (G4EmParameters::Instance()->GeneralProcessActive()) {
142 sp->AddEmProcess(pe);
143 sp->AddEmProcess(
cs);
144 sp->AddEmProcess(gc);
145 sp->AddEmProcess(
new G4RayleighScattering());
146 G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
147 ph->RegisterProcess(sp, particle);
149 ph->RegisterProcess(pe, particle);
150 ph->RegisterProcess(
cs, particle);
151 ph->RegisterProcess(gc, particle);
152 ph->RegisterProcess(
new G4RayleighScattering(), particle);
159 G4UrbanMscModel* msc1 =
new G4UrbanMscModel();
160 G4WentzelVIModel* msc2 =
new G4WentzelVIModel();
161 msc1->SetHighEnergyLimit(highEnergyLimit);
162 msc2->SetLowEnergyLimit(highEnergyLimit);
165 G4UrbanMscModel* msc4 =
nullptr;
166 if (
nullptr != aRegion) {
167 msc4 =
new G4UrbanMscModel();
168 msc4->SetHighEnergyLimit(highEnergyLimit);
174 msc4->SetLocked(
true);
178 G4GoudsmitSaundersonMscModel* msc3 =
nullptr;
179 if (
nullptr != bRegion) {
180 msc3 =
new G4GoudsmitSaundersonMscModel();
181 msc3->SetHighEnergyLimit(highEnergyLimit);
182 msc3->SetRangeFactor(0.08);
184 msc3->SetStepLimitType(fUseSafetyPlus);
185 msc3->SetLocked(
true);
188 #if G4VERSION_NUMBER >= 1110 189 G4TransportationWithMscType transportationWithMsc = G4EmParameters::Instance()->TransportationWithMsc();
190 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
191 G4ProcessManager* procManager = particle->GetProcessManager();
193 G4VProcess* removed = procManager->RemoveProcess(0);
194 if (removed->GetProcessName() !=
"Transportation") {
195 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
198 "replaced process is not G4Transportation!");
200 G4TransportationWithMsc* transportWithMsc =
202 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
203 transportWithMsc->SetMultipleSteps(
true);
205 transportWithMsc->AddMscModel(msc1);
206 transportWithMsc->AddMscModel(msc2);
207 if (msc4 !=
nullptr) {
208 transportWithMsc->AddMscModel(msc4, -1, aRegion);
210 if (msc3 !=
nullptr) {
211 transportWithMsc->AddMscModel(msc3, -1, bRegion);
213 procManager->AddProcess(transportWithMsc, -1, 0, 0);
218 G4eMultipleScattering* msc =
new G4eMultipleScattering;
219 msc->SetEmModel(msc1);
220 msc->SetEmModel(msc2);
221 if (msc4 !=
nullptr) {
222 msc->AddEmModel(-1, msc4, aRegion);
224 if (msc3 !=
nullptr) {
225 msc->AddEmModel(-1, msc3, bRegion);
227 ph->RegisterProcess(msc, particle);
231 G4eCoulombScatteringModel* ssm =
new G4eCoulombScatteringModel();
232 G4CoulombScattering*
ss =
new G4CoulombScattering();
234 ss->SetMinKinEnergy(highEnergyLimit);
235 ssm->SetLowEnergyLimit(highEnergyLimit);
236 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
239 G4eIonisation* eioni =
new G4eIonisation();
242 G4eBremsstrahlung* brem =
new G4eBremsstrahlung();
243 G4SeltzerBergerModel* br1 =
new G4SeltzerBergerModel();
244 G4eBremsstrahlungRelModel* br2 =
new G4eBremsstrahlungRelModel();
245 br1->SetAngularDistribution(
new G4Generator2BS());
246 br2->SetAngularDistribution(
new G4Generator2BS());
247 brem->SetEmModel(br1);
248 brem->SetEmModel(br2);
249 br1->SetHighEnergyLimit(CLHEP::GeV);
251 G4ePairProduction* ee =
new G4ePairProduction();
254 ph->RegisterProcess(eioni, particle);
255 ph->RegisterProcess(brem, particle);
256 ph->RegisterProcess(ee, particle);
257 ph->RegisterProcess(
ss, particle);
260 particle = G4Positron::Positron();
263 msc1 =
new G4UrbanMscModel();
264 msc2 =
new G4WentzelVIModel();
265 msc1->SetHighEnergyLimit(highEnergyLimit);
266 msc2->SetLowEnergyLimit(highEnergyLimit);
269 if (
nullptr != aRegion) {
270 msc4 =
new G4UrbanMscModel();
271 msc4->SetHighEnergyLimit(highEnergyLimit);
277 msc4->SetLocked(
true);
281 if (
nullptr != bRegion) {
282 msc3 =
new G4GoudsmitSaundersonMscModel();
283 msc3->SetHighEnergyLimit(highEnergyLimit);
284 msc3->SetRangeFactor(0.08);
286 msc3->SetStepLimitType(fUseSafetyPlus);
287 msc3->SetLocked(
true);
290 #if G4VERSION_NUMBER >= 1110 291 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
292 G4ProcessManager* procManager = particle->GetProcessManager();
294 G4VProcess* removed = procManager->RemoveProcess(0);
295 if (removed->GetProcessName() !=
"Transportation") {
296 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
299 "replaced process is not G4Transportation!");
301 G4TransportationWithMsc* transportWithMsc =
303 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
304 transportWithMsc->SetMultipleSteps(
true);
306 transportWithMsc->AddMscModel(msc1);
307 transportWithMsc->AddMscModel(msc2);
308 if (msc4 !=
nullptr) {
309 transportWithMsc->AddMscModel(msc4, -1, aRegion);
311 if (msc3 !=
nullptr) {
312 transportWithMsc->AddMscModel(msc3, -1, bRegion);
314 procManager->AddProcess(transportWithMsc, -1, 0, 0);
319 G4eMultipleScattering* msc =
new G4eMultipleScattering;
320 msc->SetEmModel(msc1);
321 msc->SetEmModel(msc2);
322 if (msc4 !=
nullptr) {
323 msc->AddEmModel(-1, msc4, aRegion);
325 if (msc3 !=
nullptr) {
326 msc->AddEmModel(-1, msc3, bRegion);
328 ph->RegisterProcess(msc, particle);
332 ssm =
new G4eCoulombScatteringModel();
333 ss =
new G4CoulombScattering();
335 ss->SetMinKinEnergy(highEnergyLimit);
336 ssm->SetLowEnergyLimit(highEnergyLimit);
337 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
340 eioni =
new G4eIonisation();
343 brem =
new G4eBremsstrahlung();
344 br1 =
new G4SeltzerBergerModel();
345 br2 =
new G4eBremsstrahlungRelModel();
346 br1->SetAngularDistribution(
new G4Generator2BS());
347 br2->SetAngularDistribution(
new G4Generator2BS());
348 brem->SetEmModel(br1);
349 brem->SetEmModel(br2);
350 br1->SetHighEnergyLimit(CLHEP::GeV);
353 ph->RegisterProcess(eioni, particle);
354 ph->RegisterProcess(brem, particle);
355 ph->RegisterProcess(ee, particle);
356 ph->RegisterProcess(
new G4eplusAnnihilation(), particle);
357 ph->RegisterProcess(
ss, particle);
360 particle = G4GenericIon::GenericIon();
361 G4ionIonisation* ionIoni =
new G4ionIonisation();
362 ph->RegisterProcess(hmsc, particle);
363 ph->RegisterProcess(ionIoni, particle);
366 G4EmBuilder::ConstructCharged(hmsc, pnuc);
Log< level::Info, true > LogVerbatim
void ConstructProcess() override
~CMSEmStandardPhysicsXS() override
CMSEmStandardPhysicsXS(G4int ver, const edm::ParameterSet &p)
void ConstructParticle() override
G4MscStepLimitType fStepLimitType