File indexing completed on 2023-03-17 11:25:01
0001 #include "FTFPCMS_INCLXX_EMM.h"
0002 #include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysics.h"
0003 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0004
0005 #include "G4DecayPhysics.hh"
0006 #include "G4EmExtraPhysics.hh"
0007 #include "G4IonINCLXXPhysics.hh"
0008 #include "G4StoppingPhysics.hh"
0009 #include "G4HadronElasticPhysics.hh"
0010 #include "G4NeutronTrackingCut.hh"
0011 #include "G4HadronicProcessStore.hh"
0012
0013 #include "G4HadronPhysicsINCLXX.hh"
0014
0015 FTFPCMS_INCLXX_EMM::FTFPCMS_INCLXX_EMM(const edm::ParameterSet& p) : PhysicsList(p) {
0016 int ver = p.getUntrackedParameter<int>("Verbosity", 0);
0017 bool emPhys = p.getUntrackedParameter<bool>("EMPhysics", true);
0018 bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics", true);
0019 bool tracking = p.getParameter<bool>("TrackingCut");
0020 double timeLimit = p.getParameter<double>("MaxTrackTime") * CLHEP::ns;
0021 edm::LogVerbatim("PhysicsList") << "You are using the simulation engine: "
0022 << "FTFP_INCLXX_EMM \n Flags for EM Physics " << emPhys << ", for Hadronic Physics "
0023 << hadPhys << " and tracking cut " << tracking
0024 << " t(ns)= " << timeLimit / CLHEP::ns;
0025
0026 if (emPhys) {
0027
0028 RegisterPhysics(new CMSEmStandardPhysics(ver, p));
0029
0030
0031 G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
0032 RegisterPhysics(gn);
0033 }
0034
0035
0036 this->RegisterPhysics(new G4DecayPhysics(ver));
0037
0038 if (hadPhys) {
0039 G4HadronicProcessStore::Instance()->SetVerbose(ver);
0040
0041
0042 RegisterPhysics(new G4HadronElasticPhysics(ver));
0043
0044
0045 RegisterPhysics(new G4HadronPhysicsINCLXX("hInelastic INCLXX", true, false, true));
0046
0047
0048 RegisterPhysics(new G4StoppingPhysics(ver));
0049
0050
0051 RegisterPhysics(new G4IonINCLXXPhysics(ver));
0052
0053
0054 if (tracking) {
0055 G4NeutronTrackingCut* ncut = new G4NeutronTrackingCut(ver);
0056 ncut->SetTimeLimit(timeLimit);
0057 RegisterPhysics(ncut);
0058 }
0059 }
0060 }