Skip to content

Commit 93cbca9

Browse files
committed
Add back EMH physics list as alias for EMM + G4HepEm
1 parent c96e8b6 commit 93cbca9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

SimG4Core/PhysicsLists/plugins/module.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ typedef FTFCMS_BIC FTF_BIC;
2929
DEFINE_PHYSICSLIST(FTF_BIC);
3030
typedef FTFPCMS_BERT FTFP_BERT;
3131
DEFINE_PHYSICSLIST(FTFP_BERT);
32+
// EMH is aliased to EMM for the moment and forces the usage of G4HepEm.
33+
typedef FTFPCMS_BERT_EMM FTFP_BERT_EMH;
34+
DEFINE_PHYSICSLIST(FTFP_BERT_EMH);
3235
typedef FTFPCMS_BERT_EML FTFP_BERT_EML;
3336
DEFINE_PHYSICSLIST(FTFP_BERT_EML);
3437
typedef FTFPCMS_BERT_EMM FTFP_BERT_EMM;

SimG4Core/PhysicsLists/src/CMSEmStandardPhysics.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ CMSEmStandardPhysics::CMSEmStandardPhysics(G4int ver, const edm::ParameterSet& p
7373
param->SetLowestElectronEnergy(tcut);
7474
param->SetLowestMuHadEnergy(tcut);
7575
fG4HepEmActive = p.getParameter<bool>("G4HepEmActive");
76+
std::string type = p.getParameter<std::string>("type");
77+
if (type == "SimG4Core/Physics/FTFP_BERT_EMH") {
78+
edm::LogVerbatim("PhysicsList") << "EMM -> EMH: Forcing usage of G4HepEm";
79+
fG4HepEmActive = true;
80+
}
7681
if (fG4HepEmActive) {
7782
// At the moment, G4HepEm supports only one configuration of MSC, so use
7883
// the most generic parameters everywhere.
@@ -275,6 +280,9 @@ void CMSEmStandardPhysics::ConstructProcess() {
275280
ph->RegisterProcess(ss, particle);
276281

277282
if (fG4HepEmActive) {
283+
if (verboseLevel > 0) {
284+
edm::LogVerbatim("PhysicsList") << "G4HepEm is active, registering G4HepEmTrackingManager";
285+
}
278286
auto* hepEmTM = new CMSHepEmTrackingManager(highEnergyLimit);
279287
G4Electron::Electron()->SetTrackingManager(hepEmTM);
280288
G4Positron::Positron()->SetTrackingManager(hepEmTM);

0 commit comments

Comments
 (0)