CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GFlash.cc
Go to the documentation of this file.
6 
7 #include "G4DecayPhysics.hh"
8 #include "G4EmExtraPhysics.hh"
9 #include "G4IonPhysics.hh"
10 #include "G4StoppingPhysics.hh"
11 #include "G4HadronElasticPhysics.hh"
12 #include "G4NeutronTrackingCut.hh"
13 #include "G4HadronPhysicsQGSP_FTFP_BERT.hh"
14 
15 #include "G4DataQuestionaire.hh"
17 
18 #include <string>
19 
22  sim::ChordFinderSetter *chordFinderSetter_,
23  const edm::ParameterSet & p) : PhysicsList(map, table_, chordFinderSetter_, p),
24  thePar(p.getParameter<edm::ParameterSet>("GFlash")) {
25 
26  G4DataQuestionaire it(photon);
27 
28  int ver = p.getUntrackedParameter<int>("Verbosity",0);
29  bool emPhys = p.getUntrackedParameter<bool>("EMPhysics",true);
30  bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics",true);
31  bool tracking= p.getParameter<bool>("TrackingCut");
33 
34  edm::LogInfo("PhysicsList") << "You are using the obsolete simulation engine: "
35  << " GFlash with Flags for EM Physics "
36  << emPhys << ", for Hadronic Physics "
37  << hadPhys
38  << " and tracking cut " << tracking
39  << " with special region " << region;
40 
41  RegisterPhysics(new ParametrisedPhysics("parametrised",thePar));
42 
43  if (emPhys) {
44  // EM Physics
45  RegisterPhysics( new CMSEmStandardPhysics95msc93("EM standard msc93",ver,region));
46 
47  // Synchroton Radiation & GN Physics
48  RegisterPhysics( new G4EmExtraPhysics(ver));
49  }
50 
51  // Decays
52  RegisterPhysics( new G4DecayPhysics(ver) );
53 
54  if (hadPhys) {
55  // Hadron Elastic scattering
56  RegisterPhysics( new G4HadronElasticPhysics(ver));
57 
58  // Hadron Physics
59  RegisterPhysics( new G4HadronPhysicsQGSP_FTFP_BERT(ver));
60  // Stopping Physics
61  RegisterPhysics( new G4StoppingPhysics(ver));
62 
63  // Ion Physics
64  RegisterPhysics( new G4IonPhysics(ver));
65 
66  // Neutron tracking cut
67  if (tracking) {
68  RegisterPhysics( new G4NeutronTrackingCut(ver));
69  }
70  }
71 
72  // Monopoles
73  RegisterPhysics( new CMSMonopolePhysics(table_,chordFinderSetter_,p));
74 
75  // singleton histogram object
76  if(thePar.getParameter<bool>("GflashHistogram")) {
78  theHisto->setStoreFlag(true);
79  theHisto->bookHistogram(thePar.getParameter<std::string>("GflashHistogramName"));
80  }
81 }
82 
84 
85  if(thePar.getParameter<bool>("GflashHistogram")) {
86  if(theHisto) delete theHisto;
87  }
88 
89 }
90 
91 //define this as a plug-in
94 
95 
97 
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual ~GFlash()
Definition: GFlash.cc:83
static GflashHistogram * instance()
GFlash(G4LogicalVolumeToDDLogicalPartMap &map, const HepPDT::ParticleDataTable *table_, sim::ChordFinderSetter *chordFinderSetter_, const edm::ParameterSet &p)
Definition: GFlash.cc:20
#define DEFINE_PHYSICSLIST(type)
HepPDT::ParticleDataTable ParticleDataTable
Definition: GFlash.h:11
edm::ParameterSet thePar
Definition: GFlash.h:19
void bookHistogram(std::string histFileName="gflash_histogram.root")
Table table_
GflashHistogram * theHisto
Definition: GFlash.h:18
void setStoreFlag(bool flag)