CMS 3D CMS Logo

FTFPCMS_BERT_EML.cc
Go to the documentation of this file.
1 #include "FTFPCMS_BERT_EML.h"
4 
5 #include "G4DecayPhysics.hh"
6 #include "G4EmExtraPhysics.hh"
7 #include "G4IonPhysics.hh"
8 #include "G4StoppingPhysics.hh"
9 #include "G4HadronElasticPhysics.hh"
10 #include "G4NeutronTrackingCut.hh"
11 #include "G4HadronicProcessStore.hh"
12 
13 #include "G4HadronPhysicsFTFP_BERT.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::LogInfo("PhysicsList") << "You are using the simulation engine: "
22  << "FTFP_BERT_EML: \n Flags for EM Physics " << emPhys << ", for Hadronic Physics "
23  << hadPhys << " and tracking cut " << tracking << " t(ns)= " << timeLimit / CLHEP::ns;
24 
25  if (emPhys) {
26  // EM Physics
27  RegisterPhysics(new CMSEmStandardPhysics(ver));
28 
29  // Synchroton Radiation & GN Physics
30  G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
31  RegisterPhysics(gn);
32  }
33 
34  // Decays
35  this->RegisterPhysics(new G4DecayPhysics(ver));
36 
37  if (hadPhys) {
38  G4HadronicProcessStore::Instance()->SetVerbose(ver);
39 
40  // Hadron Elastic scattering
41  RegisterPhysics(new G4HadronElasticPhysics(ver));
42 
43  // Hadron Physics
44  RegisterPhysics(new G4HadronPhysicsFTFP_BERT(ver));
45 
46  // Stopping Physics
47  RegisterPhysics(new G4StoppingPhysics(ver));
48 
49  // Ion Physics
50  RegisterPhysics(new G4IonPhysics(ver));
51 
52  // Neutron tracking cut
53  if (tracking) {
54  G4NeutronTrackingCut* ncut = new G4NeutronTrackingCut(ver);
55  ncut->SetTimeLimit(timeLimit);
56  RegisterPhysics(ncut);
57  }
58  }
59 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
FTFPCMS_BERT_EML(const edm::ParameterSet &p)