Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-04-18 22:50:38

0001 #include "FTFPCMS_BERT_XS_EML.h"
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003 
0004 #include "G4ThermalNeutrons.hh"
0005 #include "G4DecayPhysics.hh"
0006 #include "G4EmExtraPhysics.hh"
0007 #include "G4IonPhysics.hh"
0008 #include "G4StoppingPhysics.hh"
0009 #include "G4HadronElasticPhysicsXS.hh"
0010 #include "G4NeutronCrossSectionXS.hh"
0011 #include "G4NeutronTrackingCut.hh"
0012 #include "G4HadronicProcessStore.hh"
0013 
0014 #include "G4EmStandardPhysics_option1.hh"
0015 #include "G4HadronPhysicsFTFP_BERT.hh"
0016 
0017 FTFPCMS_BERT_XS_EML::FTFPCMS_BERT_XS_EML(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_BERT_XS_EML \n Flags for EM Physics " << emPhys << ", for Hadronic Physics "
0026                                   << hadPhys << " and tracking cut " << tracking
0027                                   << "   t(ns)= " << timeLimit / CLHEP::ns << " ThermalNeutrons: " << thermal;
0028 
0029   if (emPhys) {
0030     // EM Physics
0031     RegisterPhysics(new G4EmStandardPhysics_option1(ver));
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 G4HadronElasticPhysicsXS(ver));
0046 
0047     // Hadron Physics
0048     RegisterPhysics(new G4HadronPhysicsFTFP_BERT(ver));
0049 
0050     // Stopping Physics
0051     RegisterPhysics(new G4StoppingPhysics(ver));
0052 
0053     // Ion Physics
0054     RegisterPhysics(new G4IonPhysics(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 }