Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-03-23 16:00:31

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   std::string type = p.getParameter<std::string>("type");
0021   edm::LogVerbatim("PhysicsList") << "CMS Physics List " << type << "\n Flags for EM Physics: " << emPhys
0022                                   << "; Hadronic Physics: " << hadPhys << "\n Transition energy Bertini/FTFP from "
0023                                   << minFTFP / CLHEP::GeV << " to " << maxBERT / CLHEP::GeV << "; for pions to "
0024                                   << maxBERTpi / CLHEP::GeV << " GeV";
0025 
0026   if (emPhys) {
0027     // EM Physics
0028     RegisterPhysics(new CMSEmStandardPhysics(ver, p));
0029 
0030     // Synchroton Radiation & GN Physics
0031     G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
0032     RegisterPhysics(gn);
0033     bool mu = p.getParameter<bool>("G4MuonPairProductionByMuon");
0034     gn->MuonToMuMu(mu);
0035     edm::LogVerbatim("PhysicsList") << " Muon pair production by muons: " << mu;
0036   }
0037 
0038   // Decays
0039   this->RegisterPhysics(new G4DecayPhysics(ver));
0040 
0041   if (hadPhys) {
0042     bool ngen = p.getParameter<bool>("G4NeutronGeneralProcess");
0043     bool bc = p.getParameter<bool>("G4BCHadronicProcess");
0044     bool hn = p.getParameter<bool>("G4LightHyperNucleiTracking");
0045     auto param = G4HadronicParameters::Instance();
0046     param->SetEnableNeutronGeneralProcess(ngen);
0047     param->SetEnableBCParticles(bc);
0048     param->SetEnableHyperNuclei(hn);
0049     edm::LogVerbatim("PhysicsList") << " Eneble neutron general process: " << ngen
0050                                     << "\n Enable b- and c- hadron physics: " << bc
0051                                     << "\n Enable light hyper-nuclei physics: " << hn;
0052 
0053     // Hadron Elastic scattering
0054     RegisterPhysics(new G4HadronElasticPhysics(ver));
0055 
0056     // Hadron Physics
0057     RegisterPhysics(new CMSHadronPhysicsFTFP_BERT(minFTFP, maxBERT, maxBERTpi, minFTFP, maxBERT));
0058 
0059     // Stopping Physics
0060     RegisterPhysics(new G4StoppingPhysics(ver));
0061 
0062     // Ion Physics
0063     RegisterPhysics(new G4IonPhysics(ver));
0064   }
0065 }