CMS 3D CMS Logo

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