CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QBBCCMS.cc
Go to the documentation of this file.
1 #include "QBBCCMS.hh"
4 
5 #include "G4EmStandardPhysics_option1.hh"
6 #include "G4DecayPhysics.hh"
7 #include "G4EmExtraPhysics.hh"
8 #include "G4StoppingPhysics.hh"
9 #include "G4HadronicProcessStore.hh"
10 
11 #include "G4DataQuestionaire.hh"
12 #include "G4HadronInelasticQBBC.hh"
13 #include "G4HadronElasticPhysicsXS.hh"
14 #include "G4IonPhysics.hh"
15 #include "G4NeutronTrackingCut.hh"
16 
17 QBBCCMS::QBBCCMS(G4LogicalVolumeToDDLogicalPartMap& map,
19  sim::FieldBuilder *fieldBuilder_,
20  const edm::ParameterSet & p) : PhysicsList(map, table_, fieldBuilder_, p) {
21 
22  G4DataQuestionaire it(photon);
23 
24  int ver = p.getUntrackedParameter<int>("Verbosity",0);
25  bool emPhys = p.getUntrackedParameter<bool>("EMPhysics",true);
26  bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics",true);
27  bool tracking= p.getParameter<bool>("TrackingCut");
28  bool munucl = p.getParameter<bool>("FlagMuNucl");
29  edm::LogInfo("PhysicsList") << "You are using the simulation engine: "
30  << "QBBC with Flags for EM Physics "
31  << emPhys << " and for Hadronic Physics "
32  << hadPhys
33  << " and tracking cut " << tracking;
34 
35  if (emPhys) {
36  // EM Physics
37  RegisterPhysics( new G4EmStandardPhysics_option1(ver));
38 
39  // Synchroton Radiation & GN Physics
40  G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
41  if(munucl) { G4String yes = "on"; gn->MuonNuclear(yes); }
42  RegisterPhysics(gn);
43  }
44 
45  // Decays
46  RegisterPhysics(new G4DecayPhysics(ver));
47 
48  if (hadPhys) {
49  G4HadronicProcessStore::Instance()->SetVerbose(ver);
50 
51  // Hadron Elastic scattering
52  RegisterPhysics(new G4HadronElasticPhysicsXS(ver));
53 
54  // Hadron Physics
55  RegisterPhysics( new G4HadronInelasticQBBC(ver));
56 
57  // Stopping Physics
58  RegisterPhysics(new G4StoppingPhysics(ver));
59 
60  // Ion Physics
61  RegisterPhysics(new G4IonPhysics(ver));
62 
63  // Neutron tracking cut
64  if (tracking) {
65  RegisterPhysics( new G4NeutronTrackingCut(ver));
66  }
67  }
68 
69  // Monopoles
70  RegisterPhysics( new CMSMonopolePhysics(table_,fieldBuilder_,p));
71 }
72 
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
HepPDT::ParticleDataTable ParticleDataTable
Table table_