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);
82 G4EmBuilder::ConstructMinimalEmSet();
87 edm::LogVerbatim(
"PhysicsList") <<
"### " << GetPhysicsName() <<
" Construct EM Processes";
94 G4EmBuilder::PrepareEMPhysics();
96 G4PhysicsListHelper*
ph = G4PhysicsListHelper::GetPhysicsListHelper();
98 G4hMultipleScattering* hmsc =
new G4hMultipleScattering(
"ionmsc");
99 G4NuclearStopping* pnuc(
nullptr);
102 auto param = G4EmParameters::Instance();
103 G4double highEnergyLimit = param->MscEnergyLimit();
105 const G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"HcalRegion",
false);
106 const G4Region* bRegion = G4RegionStore::GetInstance()->GetRegion(
"HGCalRegion",
false);
109 G4ParticleDefinition* particle = G4Gamma::Gamma();
111 G4PhotoElectricEffect* pee =
new G4PhotoElectricEffect();
113 if (param->GeneralProcessActive()) {
115 sp->AddEmProcess(pee);
116 sp->AddEmProcess(
new G4ComptonScattering());
117 sp->AddEmProcess(
new G4GammaConversion());
118 G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
119 ph->RegisterProcess(sp, particle);
122 ph->RegisterProcess(pee, particle);
123 ph->RegisterProcess(
new G4ComptonScattering(), particle);
124 ph->RegisterProcess(
new G4GammaConversion(), particle);
130 G4eIonisation* eioni =
new G4eIonisation();
132 G4UrbanMscModel* msc1 =
new G4UrbanMscModel();
133 G4WentzelVIModel* msc2 =
new G4WentzelVIModel();
134 msc1->SetHighEnergyLimit(highEnergyLimit);
135 msc2->SetLowEnergyLimit(highEnergyLimit);
138 G4UrbanMscModel* msc3 =
nullptr;
139 if (
nullptr != aRegion ||
nullptr != bRegion) {
140 msc3 =
new G4UrbanMscModel();
141 msc3->SetHighEnergyLimit(highEnergyLimit);
147 msc3->SetLocked(
true);
150 G4TransportationWithMscType transportationWithMsc = param->TransportationWithMsc();
151 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
153 G4ProcessManager* procManager = particle->GetProcessManager();
154 G4VProcess* removed = procManager->RemoveProcess(0);
155 if (removed->GetProcessName() !=
"Transportation") {
156 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
159 "replaced process is not G4Transportation!");
161 G4TransportationWithMsc* transportWithMsc =
163 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
164 transportWithMsc->SetMultipleSteps(
true);
166 transportWithMsc->AddMscModel(msc1);
167 transportWithMsc->AddMscModel(msc2);
168 if (
nullptr != aRegion) {
169 transportWithMsc->AddMscModel(msc3, -1, aRegion);
171 if (
nullptr != bRegion) {
172 transportWithMsc->AddMscModel(msc3, -1, bRegion);
174 procManager->AddProcess(transportWithMsc, -1, 0, 0);
177 G4eMultipleScattering* msc =
new G4eMultipleScattering;
178 msc->SetEmModel(msc1);
179 msc->SetEmModel(msc2);
180 if (
nullptr != aRegion) {
181 msc->AddEmModel(-1, msc3, aRegion);
183 if (
nullptr != bRegion) {
184 msc->AddEmModel(-1, msc3, bRegion);
186 ph->RegisterProcess(msc, particle);
190 G4eCoulombScatteringModel* ssm =
new G4eCoulombScatteringModel();
191 G4CoulombScattering*
ss =
new G4CoulombScattering();
193 ss->SetMinKinEnergy(highEnergyLimit);
194 ssm->SetLowEnergyLimit(highEnergyLimit);
195 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
197 ph->RegisterProcess(eioni, particle);
198 ph->RegisterProcess(
new G4eBremsstrahlung(), particle);
199 ph->RegisterProcess(
ss, particle);
202 particle = G4Positron::Positron();
203 eioni =
new G4eIonisation();
205 msc1 =
new G4UrbanMscModel();
206 msc2 =
new G4WentzelVIModel();
207 msc1->SetHighEnergyLimit(highEnergyLimit);
208 msc2->SetLowEnergyLimit(highEnergyLimit);
211 if (
nullptr != aRegion ||
nullptr != bRegion) {
212 msc3 =
new G4UrbanMscModel();
213 msc3->SetHighEnergyLimit(highEnergyLimit);
219 msc3->SetLocked(
true);
222 if (transportationWithMsc != G4TransportationWithMscType::fDisabled) {
223 G4ProcessManager* procManager = particle->GetProcessManager();
225 G4VProcess* removed = procManager->RemoveProcess(0);
226 if (removed->GetProcessName() !=
"Transportation") {
227 G4Exception(
"CMSEmStandardPhysics::ConstructProcess",
230 "replaced process is not G4Transportation!");
232 G4TransportationWithMsc* transportWithMsc =
234 if (transportationWithMsc == G4TransportationWithMscType::fMultipleSteps) {
235 transportWithMsc->SetMultipleSteps(
true);
237 transportWithMsc->AddMscModel(msc1);
238 transportWithMsc->AddMscModel(msc2);
239 if (
nullptr != aRegion) {
240 transportWithMsc->AddMscModel(msc3, -1, aRegion);
242 if (
nullptr != bRegion) {
243 transportWithMsc->AddMscModel(msc3, -1, bRegion);
245 procManager->AddProcess(transportWithMsc, -1, 0, 0);
248 G4eMultipleScattering* msc =
new G4eMultipleScattering;
249 msc->SetEmModel(msc1);
250 msc->SetEmModel(msc2);
251 if (
nullptr != aRegion) {
252 msc->AddEmModel(-1, msc3, aRegion);
254 if (
nullptr != bRegion) {
255 msc->AddEmModel(-1, msc3, bRegion);
257 ph->RegisterProcess(msc, particle);
261 ssm =
new G4eCoulombScatteringModel();
262 ss =
new G4CoulombScattering();
264 ss->SetMinKinEnergy(highEnergyLimit);
265 ssm->SetLowEnergyLimit(highEnergyLimit);
266 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
268 ph->RegisterProcess(eioni, particle);
269 ph->RegisterProcess(
new G4eBremsstrahlung(), particle);
270 ph->RegisterProcess(
new G4eplusAnnihilation(), particle);
271 ph->RegisterProcess(
ss, particle);
276 G4Positron::Positron()->SetTrackingManager(hepEmTM);
280 particle = G4GenericIon::GenericIon();
281 G4ionIonisation* ionIoni =
new G4ionIonisation();
282 ph->RegisterProcess(hmsc, particle);
283 ph->RegisterProcess(ionIoni, particle);
286 G4EmBuilder::ConstructCharged(hmsc, pnuc);
Log< level::Info, true > LogVerbatim
void ConstructParticle() override
void ConstructProcess() override
G4MscStepLimitType fStepLimitType
CMSEmStandardPhysics(G4int ver, const edm::ParameterSet &p)