Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:29:52

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