forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The new EMH physics list replaces the EM processes for electrons, positrons, and gammas with G4HepEm. Note that gamma-lepto-nuclear interactions are NOT implemented yet, and disabled for this physics list (by removing G4EmExtraPhysics).
- Loading branch information
Showing
7 changed files
with
182 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
SimG4Core/PhysicsLists/interface/CMSEmStandardPhysicsEMH.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef SimG4Core_PhysicsLists_CMSEmStandardPhysicsEMH_h | ||
#define SimG4Core_PhysicsLists_CMSEmStandardPhysicsEMH_h | ||
|
||
#include "G4VPhysicsConstructor.hh" | ||
#include "globals.hh" | ||
#include "G4MscStepLimitType.hh" | ||
|
||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
class CMSEmStandardPhysicsEMH : public G4VPhysicsConstructor { | ||
public: | ||
CMSEmStandardPhysicsEMH(G4int ver, const edm::ParameterSet& p); | ||
~CMSEmStandardPhysicsEMH() override; | ||
|
||
void ConstructParticle() override; | ||
void ConstructProcess() override; | ||
|
||
private: | ||
G4double fRangeFactor; | ||
G4double fGeomFactor; | ||
G4double fSafetyFactor; | ||
G4double fLambdaLimit; | ||
G4MscStepLimitType fStepLimitType; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include "FTFPCMS_BERT_EMH.h" | ||
#include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysicsEMH.h" | ||
#include "SimG4Core/PhysicsLists/interface/CMSHadronPhysicsFTFP_BERT.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
|
||
#include "G4DecayPhysics.hh" | ||
#include "G4IonPhysics.hh" | ||
#include "G4StoppingPhysics.hh" | ||
#include "G4HadronElasticPhysics.hh" | ||
|
||
FTFPCMS_BERT_EMH::FTFPCMS_BERT_EMH(const edm::ParameterSet& p) : PhysicsList(p) { | ||
int ver = p.getUntrackedParameter<int>("Verbosity", 0); | ||
bool emPhys = p.getUntrackedParameter<bool>("EMPhysics", true); | ||
bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics", true); | ||
double minFTFP = p.getParameter<double>("EminFTFP") * CLHEP::GeV; | ||
double maxBERT = p.getParameter<double>("EmaxBERT") * CLHEP::GeV; | ||
double maxBERTpi = p.getParameter<double>("EmaxBERTpi") * CLHEP::GeV; | ||
edm::LogVerbatim("PhysicsList") << "CMS Physics List FTFP_BERT_EMH: " | ||
<< "\n Flags for EM Physics: " << emPhys << "; Hadronic Physics: " << hadPhys | ||
<< "\n Transition energy Bertini/FTFP from " << minFTFP / CLHEP::GeV << " to " | ||
<< maxBERT / CLHEP::GeV << "; for pions to " << maxBERTpi / CLHEP::GeV << " GeV"; | ||
|
||
if (emPhys) { | ||
// EM Physics | ||
RegisterPhysics(new CMSEmStandardPhysicsEMH(ver, p)); | ||
} | ||
|
||
// Decays | ||
this->RegisterPhysics(new G4DecayPhysics(ver)); | ||
|
||
if (hadPhys) { | ||
// Hadron Elastic scattering | ||
RegisterPhysics(new G4HadronElasticPhysics(ver)); | ||
|
||
// Hadron Physics | ||
RegisterPhysics(new CMSHadronPhysicsFTFP_BERT(minFTFP, maxBERT, maxBERTpi, minFTFP, maxBERT)); | ||
|
||
// Stopping Physics | ||
RegisterPhysics(new G4StoppingPhysics(ver)); | ||
|
||
// Ion Physics | ||
RegisterPhysics(new G4IonPhysics(ver)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef SimG4Core_PhysicsLists_FTFPCMS_BERT_EMH_H | ||
#define SimG4Core_PhysicsLists_FTFPCMS_BERT_EMH_H | ||
|
||
#include "SimG4Core/Physics/interface/PhysicsList.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
class FTFPCMS_BERT_EMH : public PhysicsList { | ||
public: | ||
FTFPCMS_BERT_EMH(const edm::ParameterSet& p); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysicsEMH.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
|
||
#include "G4SystemOfUnits.hh" | ||
#include "G4ParticleDefinition.hh" | ||
#include "G4EmParameters.hh" | ||
#include "G4EmBuilder.hh" | ||
|
||
#include "G4MscStepLimitType.hh" | ||
|
||
#include "G4hIonisation.hh" | ||
#include "G4hMultipleScattering.hh" | ||
#include "G4ionIonisation.hh" | ||
|
||
#include "G4ParticleTable.hh" | ||
#include "G4Gamma.hh" | ||
#include "G4Electron.hh" | ||
#include "G4Positron.hh" | ||
#include "G4GenericIon.hh" | ||
|
||
#include "G4PhysicsListHelper.hh" | ||
#include "G4BuilderType.hh" | ||
#include "G4ProcessManager.hh" | ||
|
||
#include "G4HepEmProcess.hh" | ||
|
||
#include <string> | ||
|
||
CMSEmStandardPhysicsEMH::CMSEmStandardPhysicsEMH(G4int ver, const edm::ParameterSet& p) | ||
: G4VPhysicsConstructor("CMSEmStandard_emh") { | ||
SetVerboseLevel(ver); | ||
G4EmParameters* param = G4EmParameters::Instance(); | ||
param->SetDefaults(); | ||
param->SetVerbose(ver); | ||
param->SetApplyCuts(true); | ||
param->SetStepFunction(0.8, 1 * CLHEP::mm); | ||
param->SetMscRangeFactor(0.2); | ||
param->SetMscStepLimitType(fUseSafety); | ||
param->SetFluo(false); | ||
SetPhysicsType(bElectromagnetic); | ||
fRangeFactor = p.getParameter<double>("G4MscRangeFactor"); | ||
fGeomFactor = p.getParameter<double>("G4MscGeomFactor"); | ||
fSafetyFactor = p.getParameter<double>("G4MscSafetyFactor"); | ||
fLambdaLimit = p.getParameter<double>("G4MscLambdaLimit") * CLHEP::mm; | ||
std::string msc = p.getParameter<std::string>("G4MscStepLimit"); | ||
fStepLimitType = fUseSafety; | ||
if (msc == "UseSafetyPlus") { | ||
fStepLimitType = fUseSafetyPlus; | ||
} | ||
if (msc == "Minimal") { | ||
fStepLimitType = fMinimal; | ||
} | ||
double tcut = p.getParameter<double>("G4TrackingCut") * CLHEP::MeV; | ||
param->SetLowestElectronEnergy(tcut); | ||
param->SetLowestMuHadEnergy(tcut); | ||
} | ||
|
||
CMSEmStandardPhysicsEMH::~CMSEmStandardPhysicsEMH() {} | ||
|
||
void CMSEmStandardPhysicsEMH::ConstructParticle() { | ||
// minimal set of particles for EM physics | ||
G4EmBuilder::ConstructMinimalEmSet(); | ||
} | ||
|
||
void CMSEmStandardPhysicsEMH::ConstructProcess() { | ||
if (verboseLevel > 0) { | ||
edm::LogVerbatim("PhysicsList") << "### " << GetPhysicsName() << " Construct EM Processes"; | ||
} | ||
|
||
// This EM builder takes default models of Geant4 10 EMV. | ||
// Multiple scattering by WentzelVI for all particles except: | ||
// a) e+e- below 100 MeV for which the Urban model is used | ||
// b) ions for which Urban model is used | ||
G4EmBuilder::PrepareEMPhysics(); | ||
|
||
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); | ||
// processes used by several particles | ||
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc"); | ||
G4NuclearStopping* pnuc(nullptr); | ||
|
||
G4HepEmProcess* hepEmProcess = new G4HepEmProcess(); | ||
G4Electron::Electron()->GetProcessManager()->AddProcess(hepEmProcess, -1, -1, 1); | ||
G4Positron::Positron()->GetProcessManager()->AddProcess(hepEmProcess, -1, -1, 1); | ||
G4Gamma::Gamma()->GetProcessManager()->AddProcess(hepEmProcess, -1, -1, 1); | ||
|
||
// generic ion | ||
G4ParticleDefinition* particle = G4GenericIon::GenericIon(); | ||
G4ionIonisation* ionIoni = new G4ionIonisation(); | ||
ph->RegisterProcess(hmsc, particle); | ||
ph->RegisterProcess(ionIoni, particle); | ||
|
||
// muons, hadrons ions | ||
G4EmBuilder::ConstructCharged(hmsc, pnuc); | ||
} |