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 "G4ProcessManager.hh" 43 #include "G4TransportationWithMsc.hh" 45 #include "G4RegionStore.hh" 46 #include "G4Region.hh" 50 : G4VPhysicsConstructor(
"CMSEmStandard_emm") {
53 G4EmParameters* param = G4EmParameters::Instance();
55 param->SetVerbose(ver);
56 param->SetApplyCuts(
true);
57 param->SetStepFunction(0.8, 1 * CLHEP::mm);
58 param->SetMscRangeFactor(0.2);
59 param->SetMscStepLimitType(fMinimal);
60 param->SetFluo(
false);
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 EM Processes";
103 G4EmBuilder::PrepareEMPhysics();
105 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);
139 G4eIonisation* eioni =
new G4eIonisation();
141 G4UrbanMscModel* msc1 =
new G4UrbanMscModel();
142 G4WentzelVIModel* msc2 =
new G4WentzelVIModel();
143 msc1->SetHighEnergyLimit(highEnergyLimit);
144 msc2->SetLowEnergyLimit(highEnergyLimit);
147 G4UrbanMscModel* msc3 =
nullptr;
148 if (
nullptr != aRegion ||
nullptr != bRegion) {
149 msc3 =
new G4UrbanMscModel();
150 msc3->SetHighEnergyLimit(highEnergyLimit);
156 msc3->SetLocked(
true);
159 G4TransportationWithMscType transportationWithMsc = param->TransportationWithMsc();
160 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
162 G4ProcessManager* procManager = particle->GetProcessManager();
163 G4VProcess* removed = procManager->RemoveProcess(0);
164 if (removed->GetProcessName() !=
"Transportation") {
165 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
168 "replaced process is not G4Transportation!");
170 G4TransportationWithMsc* transportWithMsc =
172 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
173 transportWithMsc->SetMultipleSteps(
true);
175 transportWithMsc->AddMscModel(msc1);
176 transportWithMsc->AddMscModel(msc2);
177 if (
nullptr != aRegion) {
178 transportWithMsc->AddMscModel(msc3, -1, aRegion);
180 if (
nullptr != bRegion) {
181 transportWithMsc->AddMscModel(msc3, -1, bRegion);
183 procManager->AddProcess(transportWithMsc, -1, 0, 0);
186 G4eMultipleScattering* msc =
new G4eMultipleScattering;
187 msc->SetEmModel(msc1);
188 msc->SetEmModel(msc2);
189 if (
nullptr != aRegion) {
190 msc->AddEmModel(-1, msc3, aRegion);
192 if (
nullptr != bRegion) {
193 msc->AddEmModel(-1, msc3, bRegion);
195 ph->RegisterProcess(msc, particle);
199 G4eCoulombScatteringModel* ssm =
new G4eCoulombScatteringModel();
200 G4CoulombScattering*
ss =
new G4CoulombScattering();
202 ss->SetMinKinEnergy(highEnergyLimit);
203 ssm->SetLowEnergyLimit(highEnergyLimit);
204 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
206 ph->RegisterProcess(eioni, particle);
207 ph->RegisterProcess(
new G4eBremsstrahlung(), particle);
208 ph->RegisterProcess(
ss, particle);
211 particle = G4Positron::Positron();
212 eioni =
new G4eIonisation();
214 msc1 =
new G4UrbanMscModel();
215 msc2 =
new G4WentzelVIModel();
216 msc1->SetHighEnergyLimit(highEnergyLimit);
217 msc2->SetLowEnergyLimit(highEnergyLimit);
220 if (
nullptr != aRegion ||
nullptr != bRegion) {
221 msc3 =
new G4UrbanMscModel();
222 msc3->SetHighEnergyLimit(highEnergyLimit);
228 msc3->SetLocked(
true);
231 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
232 G4ProcessManager* procManager = particle->GetProcessManager();
234 G4VProcess* removed = procManager->RemoveProcess(0);
235 if (removed->GetProcessName() !=
"Transportation") {
236 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
239 "replaced process is not G4Transportation!");
241 G4TransportationWithMsc* transportWithMsc =
243 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
244 transportWithMsc->SetMultipleSteps(
true);
246 transportWithMsc->AddMscModel(msc1);
247 transportWithMsc->AddMscModel(msc2);
248 if (
nullptr != aRegion) {
249 transportWithMsc->AddMscModel(msc3, -1, aRegion);
251 if (
nullptr != bRegion) {
252 transportWithMsc->AddMscModel(msc3, -1, bRegion);
254 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);
285 G4Positron::Positron()->SetTrackingManager(hepEmTM);
289 particle = G4GenericIon::GenericIon();
290 G4ionIonisation* ionIoni =
new G4ionIonisation();
291 ph->RegisterProcess(hmsc, particle);
292 ph->RegisterProcess(ionIoni, particle);
295 G4EmBuilder::ConstructCharged(hmsc, pnuc);
Log< level::Info, true > LogVerbatim
void ConstructParticle() override
void ConstructProcess() override
G4MscStepLimitType fStepLimitType
CMSEmStandardPhysics(G4int ver, const edm::ParameterSet &p)