Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "FTFPCMS_INCLXX_HP_EMM.h"
0002 #include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysics.h"
0003 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0004 
0005 #include "G4ThermalNeutrons.hh"
0006 #include "G4DecayPhysics.hh"
0007 #include "G4EmExtraPhysics.hh"
0008 #include "G4IonINCLXXPhysics.hh"
0009 #include "G4StoppingPhysics.hh"
0010 #include "G4HadronElasticPhysicsHP.hh"
0011 #include "G4HadronElasticPhysics.hh"
0012 #include "G4NeutronTrackingCut.hh"
0013 #include "G4HadronicProcessStore.hh"
0014 
0015 #include "G4HadronPhysicsINCLXX.hh"
0016 
0017 FTFPCMS_INCLXX_HP_EMM::FTFPCMS_INCLXX_HP_EMM(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   bool thermal = p.getUntrackedParameter<bool>("ThermalNeutrons");
0023   double timeLimit = p.getParameter<double>("MaxTrackTime") * CLHEP::ns;
0024   edm::LogVerbatim("PhysicsList") << "You are using the simulation engine: "
0025                                   << "FTFP_INCLXX_HP_EMM \n Flags for EM Physics " << emPhys
0026                                   << ", for Hadronic Physics " << hadPhys << " and tracking cut " << tracking
0027                                   << "   t(ns)= " << timeLimit / CLHEP::ns << " ThermalNeutrons: " << thermal;
0028 
0029   if (emPhys) {
0030     // EM Physics
0031     RegisterPhysics(new CMSEmStandardPhysics(ver, p));
0032 
0033     // Synchroton Radiation & GN Physics
0034     G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
0035     RegisterPhysics(gn);
0036   }
0037 
0038   // Decays
0039   this->RegisterPhysics(new G4DecayPhysics(ver));
0040 
0041   if (hadPhys) {
0042     G4HadronicProcessStore::Instance()->SetVerbose(ver);
0043 
0044     // Hadron Elastic scattering
0045     RegisterPhysics(new G4HadronElasticPhysicsHP(ver));
0046 
0047     // Hadron Physics
0048     RegisterPhysics(new G4HadronPhysicsINCLXX("hInelastic INCLXX_HP", true, true, true));
0049 
0050     // Stopping Physics
0051     RegisterPhysics(new G4StoppingPhysics(ver));
0052 
0053     // Ion Physics
0054     RegisterPhysics(new G4IonINCLXXPhysics(ver));
0055 
0056     // Neutron tracking cut
0057     if (tracking) {
0058       G4NeutronTrackingCut* ncut = new G4NeutronTrackingCut(ver);
0059       ncut->SetTimeLimit(timeLimit);
0060       RegisterPhysics(ncut);
0061     }
0062     if (thermal) {
0063       RegisterPhysics(new G4ThermalNeutrons(ver));
0064     }
0065   }
0066 }