CMS 3D CMS Logo

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