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.
7 
8 #include "G4DecayPhysics.hh"
9 #include "G4EmExtraPhysics.hh"
10 #include "G4IonPhysics.hh"
11 #include "G4QStoppingPhysics.hh"
12 #include "G4HadronElasticPhysics.hh"
13 #include "G4NeutronTrackingCut.hh"
14 
15 #include "G4DataQuestionaire.hh"
17 
20  sim::FieldBuilder *fieldBuilder_,
21  const edm::ParameterSet & p) : PhysicsList(map, table_, fieldBuilder_, p),
22  thePar(p.getParameter<edm::ParameterSet>("GFlash")) {
23 
24  G4DataQuestionaire it(photon);
25 
26  int ver = p.getUntrackedParameter<int>("Verbosity",0);
27  std::string region = p.getParameter<std::string>("Region");
28  edm::LogInfo("PhysicsList") << "You are using the simulation engine: "
29  << "QGSP_BERT_EML 3.3 + CMS GFLASH with"
30  << " special region " << region;
31 
32  RegisterPhysics(new ParametrisedPhysics("parametrised",thePar));
33 
34  // EM Physics
35  RegisterPhysics( new CMSEmStandardPhysics92("standard EM EML",ver,region));
36 
37  // Synchroton Radiation & GN Physics
38  RegisterPhysics(new G4EmExtraPhysics("extra EM"));
39 
40  // Decays
41  RegisterPhysics(new G4DecayPhysics("decay",ver));
42 
43  // Hadron Elastic scattering
44  RegisterPhysics(new G4HadronElasticPhysics("elastic",ver,false));
45 
46  // Hadron Physics
47  G4bool quasiElastic=true;
48  std::string hadronPhysics = thePar.getParameter<std::string>("GflashHadronPhysics");
49  if(hadronPhysics=="QGSP_BERT") {
50  RegisterPhysics(new HadronPhysicsQGSP_BERT_WP("hadron",quasiElastic));
51  }
52  else if (hadronPhysics=="QGSP") {
53  RegisterPhysics(new HadronPhysicsQGSP_WP("hadron",quasiElastic));
54  }
55  else {
56  edm::LogInfo("PhysicsList") << hadronPhysics << " is not available for GflashHadronPhysics!"
57  << "... Using QGSP_BERT\n";
58  RegisterPhysics(new HadronPhysicsQGSP_BERT_WP("hadron",quasiElastic));
59  }
60 
61  // Stopping Physics
62  RegisterPhysics(new G4QStoppingPhysics("stopping"));
63 
64  // Ion Physics
65  RegisterPhysics(new G4IonPhysics("ion"));
66 
67  // Neutron tracking cut
68  RegisterPhysics( new G4NeutronTrackingCut("Neutron tracking cut", ver));
69 
70 
71  // singleton histogram object
72  if(thePar.getParameter<bool>("GflashHistogram")) {
74  theHisto->setStoreFlag(true);
75  theHisto->bookHistogram(thePar.getParameter<std::string>("GflashHistogramName"));
76  }
77 
78 }
79 
81  /*
82  if(thePar.getParameter<bool>("GflashHistogram")) {
83  if(theHisto) delete theHisto;
84  }
85  */
86 }
87 
88 //define this as a plug-in
91 
92 
94 
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual ~GFlash()
Definition: GFlash.cc:80
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:18
Definition: GFlash.h:11
dictionary map
Definition: Association.py:160
edm::ParameterSet thePar
Definition: GFlash.h:19
void bookHistogram(std::string histFileName="gflash_histogram.root")
Table table_
Definition: Actions.cc:23
GflashHistogram * theHisto
Definition: GFlash.h:18
void setStoreFlag(bool flag)