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.
9 
10 #include "G4DecayPhysics.hh"
11 #include "G4EmExtraPhysics.hh"
12 #include "G4IonPhysics.hh"
13 #include "G4StoppingPhysics.hh"
14 #include "G4HadronElasticPhysics.hh"
15 #include "G4NeutronTrackingCut.hh"
16 #include "HadronPhysicsQGSP_FTFP_BERT.hh"
17 
18 #include "G4DataQuestionaire.hh"
20 
21 #include <string>
22 
25  sim::FieldBuilder *fieldBuilder_,
26  const edm::ParameterSet & p) : PhysicsList(map, table_, fieldBuilder_, p),
27  thePar(p.getParameter<edm::ParameterSet>("GFlash")) {
28 
29  G4DataQuestionaire it(photon);
30 
31  //std::string hadronPhysics = thePar.getParameter<std::string>("GflashHadronPhysics");
32 
33  int ver = p.getUntrackedParameter<int>("Verbosity",0);
34  bool emPhys = p.getUntrackedParameter<bool>("EMPhysics",true);
35  bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics",true);
36  bool tracking= p.getParameter<bool>("TrackingCut");
37  std::string region = p.getParameter<std::string>("Region");
38  bool gem = thePar.getParameter<bool>("GflashEMShowerModel");
39  bool ghad = thePar.getParameter<bool>("GflashHadronShowerModel");
40 
41  edm::LogInfo("PhysicsList") << "You are using the simulation engine: "
42  << " + CMS GFLASH with Flags for EM Physics "
43  << gem << ", for Hadronic Physics "
44  << ghad
45  << " and tracking cut " << tracking
46  << " with special region " << region;
47 
48  RegisterPhysics(new ParametrisedPhysics("parametrised",thePar));
49 
50  if (emPhys) {
51  // EM Physics
52  RegisterPhysics( new CMSEmStandardPhysics95msc93("EM standard msc93",ver,region));
53 
54  // Synchroton Radiation & GN Physics
55  RegisterPhysics( new G4EmExtraPhysics(ver));
56  }
57 
58  // Decays
59  RegisterPhysics( new G4DecayPhysics(ver) );
60 
61  if (hadPhys) {
62  // Hadron Elastic scattering
63  RegisterPhysics( new G4HadronElasticPhysics(ver));
64 
65  // Hadron Physics
66  RegisterPhysics( new HadronPhysicsQGSP_FTFP_BERT(ver));
67  // Stopping Physics
68  RegisterPhysics( new G4StoppingPhysics(ver));
69 
70  // Ion Physics
71  RegisterPhysics( new G4IonPhysics(ver));
72 
73  // Neutron tracking cut
74  if (tracking) {
75  RegisterPhysics( new G4NeutronTrackingCut(ver));
76  }
77  /*
78  if(hadronPhysics=="QGSP_FTFP_BERT") {
79  RegisterPhysics( new HadronPhysicsQGSPCMS_FTFP_BERT_WP("hadron",quasiElastic));
80  }
81  else if(hadronPhysics=="QGSP_BERT") {
82  RegisterPhysics( new HadronPhysicsQGSP_BERT_WP("hadron",quasiElastic));
83  }
84  else if (hadronPhysics=="QGSP") {
85  RegisterPhysics( new HadronPhysicsQGSP_WP("hadron",quasiElastic));
86  }
87  else {
88  edm::LogInfo("PhysicsList") << hadronPhysics << " is not available for GflashHadronPhysics!"
89  << "... Using QGSP_FTFP_BERT\n";
90  RegisterPhysics( new HadronPhysicsQGSPCMS_FTFP_BERT_WP("hadron",quasiElastic));
91  }
92  // Stopping Physics
93  RegisterPhysics( new G4QStoppingPhysics("stopping"));
94 
95  // Ion Physics
96  RegisterPhysics( new G4IonPhysics("ion"));
97 
98  // Neutron tracking cut
99  if (tracking)
100  RegisterPhysics( new G4NeutronTrackingCut("Neutron tracking cut", ver));
101  */
102  }
103 
104  // Monopoles
105  RegisterPhysics( new CMSMonopolePhysics(table_,fieldBuilder_,p));
106 
107  // singleton histogram object
108  if(thePar.getParameter<bool>("GflashHistogram")) {
110  theHisto->setStoreFlag(true);
111  theHisto->bookHistogram(thePar.getParameter<std::string>("GflashHistogramName"));
112  }
113 
114 }
115 
117 
118  if(thePar.getParameter<bool>("GflashHistogram")) {
119  if(theHisto) delete theHisto;
120  }
121 
122 }
123 
124 //define this as a plug-in
127 
128 
130 
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual ~GFlash()
Definition: GFlash.cc:116
static GflashHistogram * instance()
#define DEFINE_PHYSICSLIST(type)
HepPDT::ParticleDataTable ParticleDataTable
GFlash(G4LogicalVolumeToDDLogicalPartMap &map, const HepPDT::ParticleDataTable *table_, sim::FieldBuilder *fieldBuilder_, const edm::ParameterSet &p)
Definition: GFlash.cc:23
Definition: GFlash.h:11
dictionary map
Definition: Association.py:205
edm::ParameterSet thePar
Definition: GFlash.h:19
void bookHistogram(std::string histFileName="gflash_histogram.root")
Table table_
Definition: Actions.cc:22
GflashHistogram * theHisto
Definition: GFlash.h:18
void setStoreFlag(bool flag)