5 #include "G4SystemOfUnits.hh" 6 #include "G4ParticleDefinition.hh" 7 #include "G4EmParameters.hh" 8 #include "G4EmBuilder.hh" 10 #include "G4ComptonScattering.hh" 11 #include "G4GammaConversion.hh" 12 #include "G4PhotoElectricEffect.hh" 13 #include "G4LivermorePhotoElectricModel.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" 24 #include "G4eIonisation.hh" 25 #include "G4eBremsstrahlung.hh" 26 #include "G4eplusAnnihilation.hh" 28 #include "G4hIonisation.hh" 29 #include "G4ionIonisation.hh" 31 #include "G4ParticleTable.hh" 33 #include "G4Electron.hh" 34 #include "G4Positron.hh" 35 #include "G4GenericIon.hh" 37 #include "G4PhysicsListHelper.hh" 38 #include "G4BuilderType.hh" 39 #include "G4GammaGeneralProcess.hh" 40 #include "G4LossTableManager.hh" 42 #include "G4Version.hh" 43 #if G4VERSION_NUMBER >= 1110 44 #include "G4ProcessManager.hh" 45 #include "G4TransportationWithMsc.hh" 48 #include "G4RegionStore.hh" 49 #include "G4Region.hh" 53 : G4VPhysicsConstructor(
"CMSEmStandard_emm") {
56 G4EmParameters* param = G4EmParameters::Instance();
58 param->SetVerbose(ver);
59 param->SetApplyCuts(
true);
60 param->SetStepFunction(0.8, 1 * CLHEP::mm);
61 param->SetMscRangeFactor(0.2);
62 param->SetMscStepLimitType(fMinimal);
63 param->SetFluo(
false);
64 SetPhysicsType(bElectromagnetic);
68 fLambdaLimit =
p.getParameter<
double>(
"G4MscLambdaLimit") * CLHEP::mm;
71 if (msc ==
"UseSafetyPlus") {
74 if (msc ==
"Minimal") {
77 double tcut =
p.getParameter<
double>(
"G4TrackingCut") * CLHEP::MeV;
78 param->SetLowestElectronEnergy(tcut);
79 param->SetLowestMuHadEnergy(tcut);
85 G4EmBuilder::ConstructMinimalEmSet();
90 edm::LogVerbatim(
"PhysicsList") <<
"### " << GetPhysicsName() <<
" Construct EM Processes";
97 G4EmBuilder::PrepareEMPhysics();
99 G4PhysicsListHelper*
ph = G4PhysicsListHelper::GetPhysicsListHelper();
101 G4hMultipleScattering* hmsc =
new G4hMultipleScattering(
"ionmsc");
102 G4NuclearStopping* pnuc(
nullptr);
105 auto param = G4EmParameters::Instance();
106 G4double highEnergyLimit = param->MscEnergyLimit();
108 const G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"HcalRegion",
false);
109 const G4Region* bRegion = G4RegionStore::GetInstance()->GetRegion(
"HGCalRegion",
false);
112 G4ParticleDefinition* particle = G4Gamma::Gamma();
114 G4PhotoElectricEffect* pee =
new G4PhotoElectricEffect();
116 if (param->GeneralProcessActive()) {
118 sp->AddEmProcess(pee);
119 sp->AddEmProcess(
new G4ComptonScattering());
120 sp->AddEmProcess(
new G4GammaConversion());
121 G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
122 ph->RegisterProcess(sp, particle);
125 ph->RegisterProcess(pee, particle);
126 ph->RegisterProcess(
new G4ComptonScattering(), particle);
127 ph->RegisterProcess(
new G4GammaConversion(), particle);
133 G4eIonisation* eioni =
new G4eIonisation();
135 G4UrbanMscModel* msc1 =
new G4UrbanMscModel();
136 G4WentzelVIModel* msc2 =
new G4WentzelVIModel();
137 msc1->SetHighEnergyLimit(highEnergyLimit);
138 msc2->SetLowEnergyLimit(highEnergyLimit);
141 G4UrbanMscModel* msc3 =
nullptr;
142 if (
nullptr != aRegion ||
nullptr != bRegion) {
143 msc3 =
new G4UrbanMscModel();
144 msc3->SetHighEnergyLimit(highEnergyLimit);
150 msc3->SetLocked(
true);
153 #if G4VERSION_NUMBER >= 1110 154 G4TransportationWithMscType transportationWithMsc = param->TransportationWithMsc();
155 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
157 G4ProcessManager* procManager = particle->GetProcessManager();
158 G4VProcess* removed = procManager->RemoveProcess(0);
159 if (removed->GetProcessName() !=
"Transportation") {
160 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
163 "replaced process is not G4Transportation!");
165 G4TransportationWithMsc* transportWithMsc =
167 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
168 transportWithMsc->SetMultipleSteps(
true);
170 transportWithMsc->AddMscModel(msc1);
171 transportWithMsc->AddMscModel(msc2);
172 if (
nullptr != aRegion) {
173 transportWithMsc->AddMscModel(msc3, -1, aRegion);
175 if (
nullptr != bRegion) {
176 transportWithMsc->AddMscModel(msc3, -1, bRegion);
178 procManager->AddProcess(transportWithMsc, -1, 0, 0);
183 G4eMultipleScattering* msc =
new G4eMultipleScattering;
184 msc->SetEmModel(msc1);
185 msc->SetEmModel(msc2);
186 if (
nullptr != aRegion) {
187 msc->AddEmModel(-1, msc3, aRegion);
189 if (
nullptr != bRegion) {
190 msc->AddEmModel(-1, msc3, bRegion);
192 ph->RegisterProcess(msc, particle);
196 G4eCoulombScatteringModel* ssm =
new G4eCoulombScatteringModel();
197 G4CoulombScattering*
ss =
new G4CoulombScattering();
199 ss->SetMinKinEnergy(highEnergyLimit);
200 ssm->SetLowEnergyLimit(highEnergyLimit);
201 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
203 ph->RegisterProcess(eioni, particle);
204 ph->RegisterProcess(
new G4eBremsstrahlung(), particle);
205 ph->RegisterProcess(
ss, particle);
208 particle = G4Positron::Positron();
209 eioni =
new G4eIonisation();
211 msc1 =
new G4UrbanMscModel();
212 msc2 =
new G4WentzelVIModel();
213 msc1->SetHighEnergyLimit(highEnergyLimit);
214 msc2->SetLowEnergyLimit(highEnergyLimit);
217 if (
nullptr != aRegion ||
nullptr != bRegion) {
218 msc3 =
new G4UrbanMscModel();
219 msc3->SetHighEnergyLimit(highEnergyLimit);
225 msc3->SetLocked(
true);
228 #if G4VERSION_NUMBER >= 1110 229 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
230 G4ProcessManager* procManager = particle->GetProcessManager();
232 G4VProcess* removed = procManager->RemoveProcess(0);
233 if (removed->GetProcessName() !=
"Transportation") {
234 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
237 "replaced process is not G4Transportation!");
239 G4TransportationWithMsc* transportWithMsc =
241 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
242 transportWithMsc->SetMultipleSteps(
true);
244 transportWithMsc->AddMscModel(msc1);
245 transportWithMsc->AddMscModel(msc2);
246 if (
nullptr != aRegion) {
247 transportWithMsc->AddMscModel(msc3, -1, aRegion);
249 if (
nullptr != bRegion) {
250 transportWithMsc->AddMscModel(msc3, -1, bRegion);
252 procManager->AddProcess(transportWithMsc, -1, 0, 0);
257 G4eMultipleScattering* msc =
new G4eMultipleScattering;
258 msc->SetEmModel(msc1);
259 msc->SetEmModel(msc2);
260 if (
nullptr != aRegion) {
261 msc->AddEmModel(-1, msc3, aRegion);
263 if (
nullptr != bRegion) {
264 msc->AddEmModel(-1, msc3, bRegion);
266 ph->RegisterProcess(msc, particle);
270 ssm =
new G4eCoulombScatteringModel();
271 ss =
new G4CoulombScattering();
273 ss->SetMinKinEnergy(highEnergyLimit);
274 ssm->SetLowEnergyLimit(highEnergyLimit);
275 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
277 ph->RegisterProcess(eioni, particle);
278 ph->RegisterProcess(
new G4eBremsstrahlung(), particle);
279 ph->RegisterProcess(
new G4eplusAnnihilation(), particle);
280 ph->RegisterProcess(
ss, particle);
282 #if G4VERSION_NUMBER >= 1110 284 auto* hepEmTM =
new CMSHepEmTrackingManager(highEnergyLimit);
286 G4Positron::Positron()->SetTrackingManager(hepEmTM);
291 particle = G4GenericIon::GenericIon();
292 G4ionIonisation* ionIoni =
new G4ionIonisation();
293 ph->RegisterProcess(hmsc, particle);
294 ph->RegisterProcess(ionIoni, particle);
297 G4EmBuilder::ConstructCharged(hmsc, pnuc);
Log< level::Info, true > LogVerbatim
void ConstructParticle() override
void ConstructProcess() override
G4MscStepLimitType fStepLimitType
CMSEmStandardPhysics(G4int ver, const edm::ParameterSet &p)