Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:27

0001 #include "FTFPCMS_BERT_EMM.h"
0002 #include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysics.h"
0003 #include "SimG4Core/PhysicsLists/interface/CMSHadronPhysicsFTFP_BERT.h"
0004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0005 
0006 #include "G4DecayPhysics.hh"
0007 #include "G4EmExtraPhysics.hh"
0008 #include "G4IonPhysics.hh"
0009 #include "G4StoppingPhysics.hh"
0010 #include "G4HadronElasticPhysics.hh"
0011 #include "G4HadronicParameters.hh"
0012 
0013 FTFPCMS_BERT_EMM::FTFPCMS_BERT_EMM(const edm::ParameterSet& p) : PhysicsList(p) {
0014   int ver = p.getUntrackedParameter<int>("Verbosity", 0);
0015   bool emPhys = p.getUntrackedParameter<bool>("EMPhysics", true);
0016   bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics", true);
0017   double minFTFP = p.getParameter<double>("EminFTFP") * CLHEP::GeV;
0018   double maxBERT = p.getParameter<double>("EmaxBERT") * CLHEP::GeV;
0019   double maxBERTpi = p.getParameter<double>("EmaxBERTpi") * CLHEP::GeV;
0020   edm::LogVerbatim("PhysicsList") << "CMS Physics List FTFP_BERT_EMM: "
0021                                   << "\n Flags for EM Physics: " << emPhys << "; Hadronic Physics: " << hadPhys
0022                                   << "\n Transition energy Bertini/FTFP from " << minFTFP / CLHEP::GeV << " to "
0023                                   << maxBERT / CLHEP::GeV << "; for pions to " << maxBERTpi / CLHEP::GeV << " GeV";
0024 
0025   if (emPhys) {
0026     // EM Physics
0027     RegisterPhysics(new CMSEmStandardPhysics(ver, p));
0028 
0029     // Synchroton Radiation & GN Physics
0030     G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
0031     RegisterPhysics(gn);
0032     bool mu = p.getParameter<bool>("G4MuonPairProductionByMuon");
0033     gn->MuonToMuMu(mu);
0034     edm::LogVerbatim("PhysicsList") << " Muon pair production by muons: " << mu;
0035   }
0036 
0037   // Decays
0038   this->RegisterPhysics(new G4DecayPhysics(ver));
0039 
0040   if (hadPhys) {
0041     bool ngen = p.getParameter<bool>("G4NeutronGeneralProcess");
0042     bool bc = p.getParameter<bool>("G4BCHadronicProcess");
0043     bool hn = p.getParameter<bool>("G4LightHyperNucleiTracking");
0044     auto param = G4HadronicParameters::Instance();
0045     param->SetEnableNeutronGeneralProcess(ngen);
0046     param->SetEnableBCParticles(bc);
0047     param->SetEnableHyperNuclei(hn);
0048     edm::LogVerbatim("PhysicsList") << " Eneble neutron general process: " << ngen
0049                                     << "\n Enable b- and c- hadron physics: " << bc
0050                                     << "\n Enable light hyper-nuclei physics: " << hn;
0051 
0052     // Hadron Elastic scattering
0053     RegisterPhysics(new G4HadronElasticPhysics(ver));
0054 
0055     // Hadron Physics
0056     RegisterPhysics(new CMSHadronPhysicsFTFP_BERT(minFTFP, maxBERT, maxBERTpi, minFTFP, maxBERT));
0057 
0058     // Stopping Physics
0059     RegisterPhysics(new G4StoppingPhysics(ver));
0060 
0061     // Ion Physics
0062     RegisterPhysics(new G4IonPhysics(ver));
0063   }
0064 }