CMS 3D CMS Logo

FTFPCMS_INCLXX_EMM.cc
Go to the documentation of this file.
1 #include "FTFPCMS_INCLXX_EMM.h"
4 
5 #include "G4DecayPhysics.hh"
6 #include "G4EmExtraPhysics.hh"
7 #include "G4IonINCLXXPhysics.hh"
8 #include "G4StoppingPhysics.hh"
9 #include "G4HadronElasticPhysics.hh"
10 #include "G4NeutronTrackingCut.hh"
11 #include "G4HadronicProcessStore.hh"
12 
13 #include "G4HadronPhysicsINCLXX.hh"
14 
16  int ver = p.getUntrackedParameter<int>("Verbosity", 0);
17  bool emPhys = p.getUntrackedParameter<bool>("EMPhysics", true);
18  bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics", true);
19  bool tracking = p.getParameter<bool>("TrackingCut");
20  double timeLimit = p.getParameter<double>("MaxTrackTime") * CLHEP::ns;
21  edm::LogVerbatim("PhysicsList") << "You are using the simulation engine: "
22  << "FTFP_INCLXX_EMM \n Flags for EM Physics " << emPhys << ", for Hadronic Physics "
23  << hadPhys << " and tracking cut " << tracking
24  << " t(ns)= " << timeLimit / CLHEP::ns;
25 
26  if (emPhys) {
27  // EM Physics
28  RegisterPhysics(new CMSEmStandardPhysics(ver, p));
29 
30  // Synchroton Radiation & GN Physics
31  G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
32  RegisterPhysics(gn);
33  }
34 
35  // Decays
36  this->RegisterPhysics(new G4DecayPhysics(ver));
37 
38  if (hadPhys) {
39  G4HadronicProcessStore::Instance()->SetVerbose(ver);
40 
41  // Hadron Elastic scattering
42  RegisterPhysics(new G4HadronElasticPhysics(ver));
43 
44  // Hadron Physics
45  RegisterPhysics(new G4HadronPhysicsINCLXX("hInelastic INCLXX", true, false, true));
46 
47  // Stopping Physics
48  RegisterPhysics(new G4StoppingPhysics(ver));
49 
50  // Ion Physics
51  RegisterPhysics(new G4IonINCLXXPhysics(ver));
52 
53  // Neutron tracking cut
54  if (tracking) {
55  G4NeutronTrackingCut* ncut = new G4NeutronTrackingCut(ver);
56  ncut->SetTimeLimit(timeLimit);
57  RegisterPhysics(ncut);
58  }
59  }
60 }
Log< level::Info, true > LogVerbatim
FTFPCMS_INCLXX_EMM(const edm::ParameterSet &p)