Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:04:34

0001 #include "QGSPCMS_FTFP_BERT_EMN.h"
0002 #include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysicsXS.h"
0003 #include "SimG4Core/PhysicsLists/interface/HadronPhysicsQGSPCMS_FTFP_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 "G4NeutronTrackingCut.hh"
0012 #include "G4HadronicProcessStore.hh"
0013 
0014 #include "G4HadronPhysicsQGSP_FTFP_BERT.hh"
0015 
0016 QGSPCMS_FTFP_BERT_EMN::QGSPCMS_FTFP_BERT_EMN(const edm::ParameterSet& p) : PhysicsList(p) {
0017   int ver = p.getUntrackedParameter<int>("Verbosity", 0);
0018   bool emPhys = p.getUntrackedParameter<bool>("EMPhysics", true);
0019   bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics", true);
0020   bool tracking = p.getParameter<bool>("TrackingCut");
0021   double timeLimit = p.getParameter<double>("MaxTrackTime") * CLHEP::ns;
0022   double minFTFP = p.getParameter<double>("EminFTFP") * CLHEP::GeV;
0023   double maxBERT = p.getParameter<double>("EmaxBERT") * CLHEP::GeV;
0024   double minQGSP = p.getParameter<double>("EminQGSP") * CLHEP::GeV;
0025   double maxFTFP = p.getParameter<double>("EmaxFTFP") * CLHEP::GeV;
0026   double maxBERTpi = p.getParameter<double>("EmaxBERTpi") * CLHEP::GeV;
0027   edm::LogVerbatim("PhysicsList") << "You are using the simulation engine: "
0028                                   << "QGSP_FTFP_BERT_EMN \n Flags for EM Physics " << emPhys
0029                                   << ", for Hadronic Physics " << hadPhys << " and tracking cut " << tracking
0030                                   << "   t(ns)= " << timeLimit / CLHEP::ns << "\n  transition energy Bertini/FTFP from "
0031                                   << minFTFP / CLHEP::GeV << " to " << maxBERTpi / CLHEP::GeV << ":"
0032                                   << maxBERT / CLHEP::GeV << " GeV"
0033                                   << "\n  transition energy FTFP/QGSP from " << minQGSP / CLHEP::GeV << " to "
0034                                   << maxFTFP / CLHEP::GeV << " GeV";
0035 
0036   if (emPhys) {
0037     // EM Physics
0038     RegisterPhysics(new CMSEmStandardPhysicsXS(ver, p));
0039 
0040     // Synchroton Radiation & GN Physics
0041     G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
0042     RegisterPhysics(gn);
0043   }
0044 
0045   // Decays
0046   RegisterPhysics(new G4DecayPhysics(ver));
0047 
0048   if (hadPhys) {
0049     G4HadronicProcessStore::Instance()->SetVerbose(ver);
0050 
0051     // Hadron Elastic scattering
0052     RegisterPhysics(new G4HadronElasticPhysics(ver));
0053 
0054     // Hadron Physics
0055     RegisterPhysics(new HadronPhysicsQGSPCMS_FTFP_BERT(minFTFP, maxBERT, minQGSP, maxFTFP, maxBERTpi));
0056 
0057     // Stopping Physics
0058     RegisterPhysics(new G4StoppingPhysics(ver));
0059 
0060     // Ion Physics
0061     RegisterPhysics(new G4IonPhysics(ver));
0062 
0063     // Neutron tracking cut
0064     if (tracking) {
0065       G4NeutronTrackingCut* ncut = new G4NeutronTrackingCut(ver);
0066       ncut->SetTimeLimit(timeLimit);
0067       RegisterPhysics(ncut);
0068     }
0069   }
0070 }