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 "G4DataQuestionaire.hh"
14 #include "G4HadronPhysicsFTFP_BERT.hh"
15 
17  : PhysicsList(p) {
18 
19  G4DataQuestionaire it(photon);
20 
21  int ver = p.getUntrackedParameter<int>("Verbosity",0);
22  bool emPhys = p.getUntrackedParameter<bool>("EMPhysics",true);
23  bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics",true);
24  bool tracking= p.getParameter<bool>("TrackingCut");
25  double timeLimit = p.getParameter<double>("MaxTrackTime")*CLHEP::ns;
26  edm::LogInfo("PhysicsList") << "You are using the simulation engine: "
27  << "FTFP_BERT_EML: \n Flags for EM Physics "
28  << emPhys << ", for Hadronic Physics "
29  << hadPhys << " and tracking cut " << tracking
30  << " t(ns)= " << timeLimit/CLHEP::ns;
31 
32  if (emPhys) {
33  // EM Physics
34  RegisterPhysics( new CMSEmStandardPhysics(ver));
35 
36  // Synchroton Radiation & GN Physics
37  G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
38  RegisterPhysics(gn);
39  }
40 
41  // Decays
42  this->RegisterPhysics( new G4DecayPhysics(ver) );
43 
44  if (hadPhys) {
45  G4HadronicProcessStore::Instance()->SetVerbose(ver);
46 
47  // Hadron Elastic scattering
48  RegisterPhysics( new G4HadronElasticPhysics(ver));
49 
50  // Hadron Physics
51  RegisterPhysics( new G4HadronPhysicsFTFP_BERT(ver));
52 
53  // Stopping Physics
54  RegisterPhysics( new G4StoppingPhysics(ver));
55 
56  // Ion Physics
57  RegisterPhysics( new G4IonPhysics(ver));
58 
59  // Neutron tracking cut
60  if (tracking) {
61  G4NeutronTrackingCut* ncut= new G4NeutronTrackingCut(ver);
62  ncut->SetTimeLimit(timeLimit);
63  RegisterPhysics(ncut);
64  }
65  }
66 }
67 
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
FTFPCMS_BERT_EML(const edm::ParameterSet &p)