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" 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" 41 #include "G4ProcessManager.hh" 42 #include "G4TransportationWithMsc.hh" 44 #include "G4RegionStore.hh" 45 #include "G4Region.hh" 48 : G4VPhysicsConstructor(
"CMSEmStandard_emm") {
51 G4EmParameters* param = G4EmParameters::Instance();
53 param->SetVerbose(ver);
54 param->SetApplyCuts(
true);
55 param->SetStepFunction(0.8, 1 * CLHEP::mm);
56 param->SetMscRangeFactor(0.2);
57 param->SetMscStepLimitType(fMinimal);
58 param->SetFluo(
false);
59 SetPhysicsType(bElectromagnetic);
63 fLambdaLimit =
p.getParameter<
double>(
"G4MscLambdaLimit") * CLHEP::mm;
66 if (msc ==
"UseSafetyPlus") {
69 if (msc ==
"Minimal") {
72 double tcut =
p.getParameter<
double>(
"G4TrackingCut") * CLHEP::MeV;
73 param->SetLowestElectronEnergy(tcut);
74 param->SetLowestMuHadEnergy(tcut);
89 G4EmBuilder::ConstructMinimalEmSet();
94 edm::LogVerbatim(
"PhysicsList") <<
"### " << GetPhysicsName() <<
" Construct EM Processes";
101 G4EmBuilder::PrepareEMPhysics();
103 G4PhysicsListHelper*
ph = G4PhysicsListHelper::GetPhysicsListHelper();
105 G4hMultipleScattering* hmsc =
new G4hMultipleScattering(
"ionmsc");
106 G4NuclearStopping* pnuc(
nullptr);
109 auto param = G4EmParameters::Instance();
110 G4double highEnergyLimit = param->MscEnergyLimit();
112 const G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"HcalRegion",
false);
113 const G4Region* bRegion = G4RegionStore::GetInstance()->GetRegion(
"HGCalRegion",
false);
116 G4ParticleDefinition* particle = G4Gamma::Gamma();
118 G4PhotoElectricEffect* pee =
new G4PhotoElectricEffect();
120 if (param->GeneralProcessActive()) {
122 sp->AddEmProcess(pee);
123 sp->AddEmProcess(
new G4ComptonScattering());
124 sp->AddEmProcess(
new G4GammaConversion());
125 G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
126 ph->RegisterProcess(sp, particle);
129 ph->RegisterProcess(pee, particle);
130 ph->RegisterProcess(
new G4ComptonScattering(), particle);
131 ph->RegisterProcess(
new G4GammaConversion(), particle);
137 G4UrbanMscModel* msc1 =
new G4UrbanMscModel();
138 G4WentzelVIModel* msc2 =
new G4WentzelVIModel();
139 msc1->SetHighEnergyLimit(highEnergyLimit);
140 msc2->SetLowEnergyLimit(highEnergyLimit);
143 G4UrbanMscModel* msc3 =
nullptr;
144 if (
nullptr != aRegion ||
nullptr != bRegion) {
145 msc3 =
new G4UrbanMscModel();
146 msc3->SetHighEnergyLimit(highEnergyLimit);
152 msc3->SetLocked(
true);
155 G4TransportationWithMscType transportationWithMsc = param->TransportationWithMsc();
156 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
158 G4ProcessManager* procManager = particle->GetProcessManager();
159 G4VProcess* removed = procManager->RemoveProcess(0);
160 if (removed->GetProcessName() !=
"Transportation") {
161 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
164 "replaced process is not G4Transportation!");
166 G4TransportationWithMsc* transportWithMsc =
168 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
169 transportWithMsc->SetMultipleSteps(
true);
171 transportWithMsc->AddMscModel(msc1);
172 transportWithMsc->AddMscModel(msc2);
173 if (
nullptr != aRegion) {
174 transportWithMsc->AddMscModel(msc3, -1, aRegion);
176 if (
nullptr != bRegion) {
177 transportWithMsc->AddMscModel(msc3, -1, bRegion);
179 procManager->AddProcess(transportWithMsc, -1, 0, 0);
182 G4eMultipleScattering* msc =
new G4eMultipleScattering;
183 msc->SetEmModel(msc1);
184 msc->SetEmModel(msc2);
185 if (
nullptr != aRegion) {
186 msc->AddEmModel(-1, msc3, aRegion);
188 if (
nullptr != bRegion) {
189 msc->AddEmModel(-1, msc3, bRegion);
191 ph->RegisterProcess(msc, particle);
195 G4eCoulombScatteringModel* ssm =
new G4eCoulombScatteringModel();
196 G4CoulombScattering*
ss =
new G4CoulombScattering();
198 ss->SetMinKinEnergy(highEnergyLimit);
199 ssm->SetLowEnergyLimit(highEnergyLimit);
200 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
202 ph->RegisterProcess(
new G4eIonisation(), particle);
203 ph->RegisterProcess(
new G4eBremsstrahlung(), particle);
204 ph->RegisterProcess(
ss, particle);
207 particle = G4Positron::Positron();
209 msc1 =
new G4UrbanMscModel();
210 msc2 =
new G4WentzelVIModel();
211 msc1->SetHighEnergyLimit(highEnergyLimit);
212 msc2->SetLowEnergyLimit(highEnergyLimit);
215 if (
nullptr != aRegion ||
nullptr != bRegion) {
216 msc3 =
new G4UrbanMscModel();
217 msc3->SetHighEnergyLimit(highEnergyLimit);
223 msc3->SetLocked(
true);
226 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
227 G4ProcessManager* procManager = particle->GetProcessManager();
229 G4VProcess* removed = procManager->RemoveProcess(0);
230 if (removed->GetProcessName() !=
"Transportation") {
231 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
234 "replaced process is not G4Transportation!");
236 G4TransportationWithMsc* transportWithMsc =
238 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
239 transportWithMsc->SetMultipleSteps(
true);
241 transportWithMsc->AddMscModel(msc1);
242 transportWithMsc->AddMscModel(msc2);
243 if (
nullptr != aRegion) {
244 transportWithMsc->AddMscModel(msc3, -1, aRegion);
246 if (
nullptr != bRegion) {
247 transportWithMsc->AddMscModel(msc3, -1, bRegion);
249 procManager->AddProcess(transportWithMsc, -1, 0, 0);
252 G4eMultipleScattering* msc =
new G4eMultipleScattering;
253 msc->SetEmModel(msc1);
254 msc->SetEmModel(msc2);
255 if (
nullptr != aRegion) {
256 msc->AddEmModel(-1, msc3, aRegion);
258 if (
nullptr != bRegion) {
259 msc->AddEmModel(-1, msc3, bRegion);
261 ph->RegisterProcess(msc, particle);
265 ssm =
new G4eCoulombScatteringModel();
266 ss =
new G4CoulombScattering();
268 ss->SetMinKinEnergy(highEnergyLimit);
269 ssm->SetLowEnergyLimit(highEnergyLimit);
270 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
272 ph->RegisterProcess(
new G4eIonisation(), particle);
273 ph->RegisterProcess(
new G4eBremsstrahlung(), particle);
274 ph->RegisterProcess(
new G4eplusAnnihilation(), particle);
275 ph->RegisterProcess(
ss, particle);
280 G4Positron::Positron()->SetTrackingManager(hepEmTM);
284 particle = G4GenericIon::GenericIon();
285 G4ionIonisation* ionIoni =
new G4ionIonisation();
286 ph->RegisterProcess(hmsc, particle);
287 ph->RegisterProcess(ionIoni, particle);
290 G4EmBuilder::ConstructCharged(hmsc, pnuc);
Log< level::Info, true > LogVerbatim
void ConstructParticle() override
void ConstructProcess() override
G4MscStepLimitType fStepLimitType
CMSEmStandardPhysics(G4int ver, const edm::ParameterSet &p)