5 #include <CLHEP/Units/SystemOfUnits.h> 6 #include "G4ParticleDefinition.hh" 7 #include "G4LossTableManager.hh" 8 #include "G4EmParameters.hh" 9 #include "G4EmBuilder.hh" 11 #include "G4ComptonScattering.hh" 12 #include "G4GammaConversion.hh" 13 #include "G4PhotoElectricEffect.hh" 15 #include "G4MscStepLimitType.hh" 17 #include "G4eMultipleScattering.hh" 18 #include "G4hMultipleScattering.hh" 19 #include "G4eCoulombScatteringModel.hh" 20 #include "G4CoulombScattering.hh" 21 #include "G4WentzelVIModel.hh" 22 #include "G4UrbanMscModel.hh" 23 #include "G4GoudsmitSaundersonMscModel.hh" 25 #include "G4eIonisation.hh" 26 #include "G4eBremsstrahlung.hh" 27 #include "G4eplusAnnihilation.hh" 29 #include "G4hIonisation.hh" 30 #include "G4ionIonisation.hh" 32 #include "G4ParticleTable.hh" 34 #include "G4Electron.hh" 35 #include "G4Positron.hh" 36 #include "G4GenericIon.hh" 38 #include "G4PhysicsListHelper.hh" 39 #include "G4BuilderType.hh" 40 #include "G4GammaGeneralProcess.hh" 42 #include "G4ProcessManager.hh" 43 #include "G4TransportationWithMsc.hh" 45 #include "G4RegionStore.hh" 46 #include "G4Region.hh" 49 : G4VPhysicsConstructor(
"CMSEmStandard_emn") {
52 G4EmParameters* param = G4EmParameters::Instance();
54 param->SetVerbose(ver);
55 param->SetApplyCuts(
true);
56 param->SetStepFunction(0.8, 1 * CLHEP::mm);
57 param->SetMscRangeFactor(0.2);
58 param->SetMscStepLimitType(fMinimal);
59 param->SetFluo(
false);
60 param->SetUseMottCorrection(
true);
61 SetPhysicsType(bElectromagnetic);
65 fLambdaLimit =
p.getParameter<
double>(
"G4MscLambdaLimit") * CLHEP::mm;
68 if (msc ==
"UseSafetyPlus") {
71 if (msc ==
"Minimal") {
74 double tcut =
p.getParameter<
double>(
"G4TrackingCut") * CLHEP::MeV;
75 param->SetLowestElectronEnergy(tcut);
76 param->SetLowestMuHadEnergy(tcut);
91 G4EmBuilder::ConstructMinimalEmSet();
96 edm::LogVerbatim(
"PhysicsList") <<
"### " << GetPhysicsName() <<
" Construct Processes";
102 G4EmBuilder::PrepareEMPhysics();
104 G4PhysicsListHelper*
ph = G4PhysicsListHelper::GetPhysicsListHelper();
107 G4hMultipleScattering* hmsc =
new G4hMultipleScattering(
"ionmsc");
108 G4NuclearStopping* pnuc(
nullptr);
111 auto param = G4EmParameters::Instance();
112 G4double highEnergyLimit = param->MscEnergyLimit();
114 const G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"HcalRegion",
false);
115 const G4Region* bRegion = G4RegionStore::GetInstance()->GetRegion(
"HGCalRegion",
false);
118 G4ParticleDefinition* particle = G4Gamma::Gamma();
120 G4PhotoElectricEffect* pee =
new G4PhotoElectricEffect();
122 if (param->GeneralProcessActive()) {
124 sp->AddEmProcess(pee);
125 sp->AddEmProcess(
new G4ComptonScattering());
126 sp->AddEmProcess(
new G4GammaConversion());
127 G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
128 ph->RegisterProcess(sp, particle);
131 ph->RegisterProcess(pee, particle);
132 ph->RegisterProcess(
new G4ComptonScattering(), particle);
133 ph->RegisterProcess(
new G4GammaConversion(), particle);
140 G4UrbanMscModel* msc1 =
new G4UrbanMscModel();
141 G4WentzelVIModel* msc2 =
new G4WentzelVIModel();
142 msc1->SetHighEnergyLimit(highEnergyLimit);
143 msc2->SetLowEnergyLimit(highEnergyLimit);
146 G4UrbanMscModel* msc4 =
nullptr;
147 if (
nullptr != aRegion) {
148 msc4 =
new G4UrbanMscModel();
149 msc4->SetHighEnergyLimit(highEnergyLimit);
155 msc4->SetLocked(
true);
159 G4GoudsmitSaundersonMscModel* msc3 =
nullptr;
160 if (
nullptr != bRegion) {
161 msc3 =
new G4GoudsmitSaundersonMscModel();
162 msc3->SetHighEnergyLimit(highEnergyLimit);
163 msc3->SetRangeFactor(0.08);
165 msc3->SetStepLimitType(fUseSafetyPlus);
166 msc3->SetLocked(
true);
169 G4TransportationWithMscType transportationWithMsc = G4EmParameters::Instance()->TransportationWithMsc();
170 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
171 G4ProcessManager* procManager = particle->GetProcessManager();
173 G4VProcess* removed = procManager->RemoveProcess(0);
174 if (removed->GetProcessName() !=
"Transportation") {
175 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
178 "replaced process is not G4Transportation!");
180 G4TransportationWithMsc* transportWithMsc =
182 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
183 transportWithMsc->SetMultipleSteps(
true);
185 transportWithMsc->AddMscModel(msc1);
186 transportWithMsc->AddMscModel(msc2);
187 if (msc4 !=
nullptr) {
188 transportWithMsc->AddMscModel(msc4, -1, aRegion);
190 if (msc3 !=
nullptr) {
191 transportWithMsc->AddMscModel(msc3, -1, bRegion);
193 procManager->AddProcess(transportWithMsc, -1, 0, 0);
196 G4eMultipleScattering* msc =
new G4eMultipleScattering;
197 msc->SetEmModel(msc1);
198 msc->SetEmModel(msc2);
199 if (msc4 !=
nullptr) {
200 msc->AddEmModel(-1, msc4, aRegion);
202 if (msc3 !=
nullptr) {
203 msc->AddEmModel(-1, msc3, bRegion);
205 ph->RegisterProcess(msc, particle);
209 G4eCoulombScatteringModel* ssm =
new G4eCoulombScatteringModel();
210 G4CoulombScattering*
ss =
new G4CoulombScattering();
212 ss->SetMinKinEnergy(highEnergyLimit);
213 ssm->SetLowEnergyLimit(highEnergyLimit);
214 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
217 ph->RegisterProcess(
new G4eIonisation(), particle);
218 ph->RegisterProcess(
new G4eBremsstrahlung(), particle);
219 ph->RegisterProcess(
ss, particle);
222 particle = G4Positron::Positron();
227 msc1 =
new G4UrbanMscModel();
228 msc2 =
new G4WentzelVIModel();
229 msc1->SetHighEnergyLimit(highEnergyLimit);
230 msc2->SetLowEnergyLimit(highEnergyLimit);
233 if (
nullptr != aRegion) {
234 msc4 =
new G4UrbanMscModel();
235 msc4->SetHighEnergyLimit(highEnergyLimit);
241 msc4->SetLocked(
true);
245 if (
nullptr != bRegion) {
246 msc3 =
new G4GoudsmitSaundersonMscModel();
247 msc3->SetHighEnergyLimit(highEnergyLimit);
248 msc3->SetRangeFactor(0.08);
250 msc3->SetStepLimitType(fUseSafetyPlus);
251 msc3->SetLocked(
true);
254 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
255 G4ProcessManager* procManager = particle->GetProcessManager();
257 G4VProcess* removed = procManager->RemoveProcess(0);
258 if (removed->GetProcessName() !=
"Transportation") {
259 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
262 "replaced process is not G4Transportation!");
264 G4TransportationWithMsc* transportWithMsc =
266 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
267 transportWithMsc->SetMultipleSteps(
true);
269 transportWithMsc->AddMscModel(msc1);
270 transportWithMsc->AddMscModel(msc2);
271 if (msc4 !=
nullptr) {
272 transportWithMsc->AddMscModel(msc4, -1, aRegion);
274 if (msc3 !=
nullptr) {
275 transportWithMsc->AddMscModel(msc3, -1, bRegion);
277 procManager->AddProcess(transportWithMsc, -1, 0, 0);
280 G4eMultipleScattering* msc =
new G4eMultipleScattering;
281 msc->SetEmModel(msc1);
282 msc->SetEmModel(msc2);
283 if (msc4 !=
nullptr) {
284 msc->AddEmModel(-1, msc4, aRegion);
286 if (msc3 !=
nullptr) {
287 msc->AddEmModel(-1, msc3, bRegion);
289 ph->RegisterProcess(msc, particle);
293 ssm =
new G4eCoulombScatteringModel();
294 ss =
new G4CoulombScattering();
296 ss->SetMinKinEnergy(highEnergyLimit);
297 ssm->SetLowEnergyLimit(highEnergyLimit);
298 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
301 ph->RegisterProcess(
new G4eIonisation(), particle);
302 ph->RegisterProcess(
new G4eBremsstrahlung(), particle);
303 ph->RegisterProcess(
new G4eplusAnnihilation(), particle);
304 ph->RegisterProcess(
ss, particle);
309 G4Positron::Positron()->SetTrackingManager(hepEmTM);
313 particle = G4GenericIon::GenericIon();
314 G4ionIonisation* ionIoni =
new G4ionIonisation();
315 ph->RegisterProcess(hmsc, particle);
316 ph->RegisterProcess(ionIoni, particle);
319 G4EmBuilder::ConstructCharged(hmsc, pnuc);
Log< level::Info, true > LogVerbatim
void ConstructProcess() override
CMSEmStandardPhysicsXS(G4int ver, const edm::ParameterSet &p)
void ConstructParticle() override
G4MscStepLimitType fStepLimitType