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 "G4ProcessManager.hh" 52 #include "G4TransportationWithMsc.hh" 54 #include "G4RegionStore.hh" 55 #include "G4Region.hh" 56 #include "G4GammaGeneralProcess.hh" 58 #include "G4SystemOfUnits.hh" 61 : G4VPhysicsConstructor(
"CMSEmStandard_emn") {
64 G4EmParameters* param = G4EmParameters::Instance();
66 param->SetVerbose(ver);
67 param->SetApplyCuts(
true);
68 param->SetMinEnergy(100 * CLHEP::eV);
69 param->SetNumberOfBinsPerDecade(20);
70 param->SetStepFunction(0.8, 1 * CLHEP::mm);
71 param->SetMscRangeFactor(0.2);
72 param->SetMscStepLimitType(fMinimal);
74 param->SetUseMottCorrection(
true);
75 SetPhysicsType(bElectromagnetic);
79 fLambdaLimit =
p.getParameter<
double>(
"G4MscLambdaLimit") * CLHEP::mm;
82 if (msc ==
"UseSafetyPlus") {
85 if (msc ==
"Minimal") {
88 double tcut =
p.getParameter<
double>(
"G4TrackingCut") * CLHEP::MeV;
89 param->SetLowestElectronEnergy(tcut);
90 param->SetLowestMuHadEnergy(tcut);
95 G4EmBuilder::ConstructMinimalEmSet();
100 edm::LogVerbatim(
"PhysicsList") <<
"### " << GetPhysicsName() <<
" Construct Processes";
106 G4EmBuilder::PrepareEMPhysics();
108 G4PhysicsListHelper*
ph = G4PhysicsListHelper::GetPhysicsListHelper();
111 G4hMultipleScattering* hmsc =
new G4hMultipleScattering(
"ionmsc");
112 G4NuclearStopping* pnuc(
nullptr);
115 G4double highEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit();
116 const G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"HcalRegion",
false);
117 const G4Region* bRegion = G4RegionStore::GetInstance()->GetRegion(
"HGCalRegion",
false);
120 G4ParticleDefinition* particle = G4Gamma::Gamma();
123 G4PhotoElectricEffect* pe =
new G4PhotoElectricEffect();
124 G4VEmModel* theLivermorePEModel =
new G4LivermorePhotoElectricModel();
125 pe->SetEmModel(theLivermorePEModel);
128 G4ComptonScattering*
cs =
new G4ComptonScattering;
129 cs->SetEmModel(
new G4KleinNishinaModel());
132 G4GammaConversion* gc =
new G4GammaConversion();
133 G4VEmModel*
conv =
new G4BetheHeitler5DModel();
134 gc->SetEmModel(
conv);
136 if (G4EmParameters::Instance()->GeneralProcessActive()) {
138 sp->AddEmProcess(pe);
139 sp->AddEmProcess(
cs);
140 sp->AddEmProcess(gc);
141 sp->AddEmProcess(
new G4RayleighScattering());
142 G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
143 ph->RegisterProcess(sp, particle);
145 ph->RegisterProcess(pe, particle);
146 ph->RegisterProcess(
cs, particle);
147 ph->RegisterProcess(gc, particle);
148 ph->RegisterProcess(
new G4RayleighScattering(), particle);
155 G4UrbanMscModel* msc1 =
new G4UrbanMscModel();
156 G4WentzelVIModel* msc2 =
new G4WentzelVIModel();
157 msc1->SetHighEnergyLimit(highEnergyLimit);
158 msc2->SetLowEnergyLimit(highEnergyLimit);
161 G4UrbanMscModel* msc4 =
nullptr;
162 if (
nullptr != aRegion) {
163 msc4 =
new G4UrbanMscModel();
164 msc4->SetHighEnergyLimit(highEnergyLimit);
170 msc4->SetLocked(
true);
174 G4GoudsmitSaundersonMscModel* msc3 =
nullptr;
175 if (
nullptr != bRegion) {
176 msc3 =
new G4GoudsmitSaundersonMscModel();
177 msc3->SetHighEnergyLimit(highEnergyLimit);
178 msc3->SetRangeFactor(0.08);
180 msc3->SetStepLimitType(fUseSafetyPlus);
181 msc3->SetLocked(
true);
184 G4TransportationWithMscType transportationWithMsc = G4EmParameters::Instance()->TransportationWithMsc();
185 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
186 G4ProcessManager* procManager = particle->GetProcessManager();
188 G4VProcess* removed = procManager->RemoveProcess(0);
189 if (removed->GetProcessName() !=
"Transportation") {
190 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
193 "replaced process is not G4Transportation!");
195 G4TransportationWithMsc* transportWithMsc =
197 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
198 transportWithMsc->SetMultipleSteps(
true);
200 transportWithMsc->AddMscModel(msc1);
201 transportWithMsc->AddMscModel(msc2);
202 if (msc4 !=
nullptr) {
203 transportWithMsc->AddMscModel(msc4, -1, aRegion);
205 if (msc3 !=
nullptr) {
206 transportWithMsc->AddMscModel(msc3, -1, bRegion);
208 procManager->AddProcess(transportWithMsc, -1, 0, 0);
211 G4eMultipleScattering* msc =
new G4eMultipleScattering;
212 msc->SetEmModel(msc1);
213 msc->SetEmModel(msc2);
214 if (msc4 !=
nullptr) {
215 msc->AddEmModel(-1, msc4, aRegion);
217 if (msc3 !=
nullptr) {
218 msc->AddEmModel(-1, msc3, bRegion);
220 ph->RegisterProcess(msc, particle);
224 G4eCoulombScatteringModel* ssm =
new G4eCoulombScatteringModel();
225 G4CoulombScattering*
ss =
new G4CoulombScattering();
227 ss->SetMinKinEnergy(highEnergyLimit);
228 ssm->SetLowEnergyLimit(highEnergyLimit);
229 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
232 G4eIonisation* eioni =
new G4eIonisation();
235 G4eBremsstrahlung* brem =
new G4eBremsstrahlung();
236 G4SeltzerBergerModel* br1 =
new G4SeltzerBergerModel();
237 G4eBremsstrahlungRelModel* br2 =
new G4eBremsstrahlungRelModel();
238 br1->SetAngularDistribution(
new G4Generator2BS());
239 br2->SetAngularDistribution(
new G4Generator2BS());
240 brem->SetEmModel(br1);
241 brem->SetEmModel(br2);
242 br1->SetHighEnergyLimit(CLHEP::GeV);
244 G4ePairProduction* ee =
new G4ePairProduction();
247 ph->RegisterProcess(eioni, particle);
248 ph->RegisterProcess(brem, particle);
249 ph->RegisterProcess(ee, particle);
250 ph->RegisterProcess(
ss, particle);
253 particle = G4Positron::Positron();
256 msc1 =
new G4UrbanMscModel();
257 msc2 =
new G4WentzelVIModel();
258 msc1->SetHighEnergyLimit(highEnergyLimit);
259 msc2->SetLowEnergyLimit(highEnergyLimit);
262 if (
nullptr != aRegion) {
263 msc4 =
new G4UrbanMscModel();
264 msc4->SetHighEnergyLimit(highEnergyLimit);
270 msc4->SetLocked(
true);
274 if (
nullptr != bRegion) {
275 msc3 =
new G4GoudsmitSaundersonMscModel();
276 msc3->SetHighEnergyLimit(highEnergyLimit);
277 msc3->SetRangeFactor(0.08);
279 msc3->SetStepLimitType(fUseSafetyPlus);
280 msc3->SetLocked(
true);
283 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
284 G4ProcessManager* procManager = particle->GetProcessManager();
286 G4VProcess* removed = procManager->RemoveProcess(0);
287 if (removed->GetProcessName() !=
"Transportation") {
288 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
291 "replaced process is not G4Transportation!");
293 G4TransportationWithMsc* transportWithMsc =
295 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
296 transportWithMsc->SetMultipleSteps(
true);
298 transportWithMsc->AddMscModel(msc1);
299 transportWithMsc->AddMscModel(msc2);
300 if (msc4 !=
nullptr) {
301 transportWithMsc->AddMscModel(msc4, -1, aRegion);
303 if (msc3 !=
nullptr) {
304 transportWithMsc->AddMscModel(msc3, -1, bRegion);
306 procManager->AddProcess(transportWithMsc, -1, 0, 0);
309 G4eMultipleScattering* msc =
new G4eMultipleScattering;
310 msc->SetEmModel(msc1);
311 msc->SetEmModel(msc2);
312 if (msc4 !=
nullptr) {
313 msc->AddEmModel(-1, msc4, aRegion);
315 if (msc3 !=
nullptr) {
316 msc->AddEmModel(-1, msc3, bRegion);
318 ph->RegisterProcess(msc, particle);
322 ssm =
new G4eCoulombScatteringModel();
323 ss =
new G4CoulombScattering();
325 ss->SetMinKinEnergy(highEnergyLimit);
326 ssm->SetLowEnergyLimit(highEnergyLimit);
327 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
330 eioni =
new G4eIonisation();
333 brem =
new G4eBremsstrahlung();
334 br1 =
new G4SeltzerBergerModel();
335 br2 =
new G4eBremsstrahlungRelModel();
336 br1->SetAngularDistribution(
new G4Generator2BS());
337 br2->SetAngularDistribution(
new G4Generator2BS());
338 brem->SetEmModel(br1);
339 brem->SetEmModel(br2);
340 br1->SetHighEnergyLimit(CLHEP::GeV);
343 ph->RegisterProcess(eioni, particle);
344 ph->RegisterProcess(brem, particle);
345 ph->RegisterProcess(ee, particle);
346 ph->RegisterProcess(
new G4eplusAnnihilation(), particle);
347 ph->RegisterProcess(
ss, particle);
350 particle = G4GenericIon::GenericIon();
351 G4ionIonisation* ionIoni =
new G4ionIonisation();
352 ph->RegisterProcess(hmsc, particle);
353 ph->RegisterProcess(ionIoni, particle);
356 G4EmBuilder::ConstructCharged(hmsc, pnuc);
Log< level::Info, true > LogVerbatim
void ConstructProcess() override
CMSEmStandardPhysicsXS(G4int ver, const edm::ParameterSet &p)
void ConstructParticle() override
G4MscStepLimitType fStepLimitType