CMS 3D CMS Logo

FTFPCMS_BERT_HP_EMM.cc
Go to the documentation of this file.
1 #include "FTFPCMS_BERT_HP_EMM.h"
5 
6 #include "G4DecayPhysics.hh"
7 #include "G4EmExtraPhysics.hh"
8 #include "G4IonPhysics.hh"
9 #include "G4StoppingPhysics.hh"
10 #include "G4HadronElasticPhysicsHP.hh"
11 #include "G4HadronElasticPhysics.hh"
12 #include "G4NeutronTrackingCut.hh"
13 #include "G4HadronicProcessStore.hh"
14 
15 #include "G4DataQuestionaire.hh"
16 #include "G4HadronPhysicsFTFP_BERT_HP.hh"
17 
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  bool thermal = p.getUntrackedParameter<bool>("ThermalNeutrons");
26  double timeLimit = p.getParameter<double>("MaxTrackTime") * CLHEP::ns;
27  edm::LogInfo("PhysicsList") << "You are using the simulation engine: "
28  << "FTFP_BERT_HP_EMM \n Flags for EM Physics " << emPhys << ", for Hadronic Physics "
29  << hadPhys << " and tracking cut " << tracking << " t(ns)= " << timeLimit / CLHEP::ns
30  << " ThermalNeutrons: " << thermal;
31 
32  if (emPhys) {
33  // EM Physics
34  RegisterPhysics(new CMSEmStandardPhysicsLPM(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 G4HadronElasticPhysicsHP(ver));
49 
50  // Hadron Physics
51  RegisterPhysics(new G4HadronPhysicsFTFP_BERT_HP(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  if (thermal) {
66  RegisterPhysics(new CMSThermalNeutrons(ver));
67  }
68  }
69 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
FTFPCMS_BERT_HP_EMM(const edm::ParameterSet &p)