CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GFlash Class Reference

#include <GFlash.h>

Inheritance diagram for GFlash:
PhysicsList

Public Member Functions

 GFlash (const edm::ParameterSet &p)
 
 ~GFlash () override
 
- Public Member Functions inherited from PhysicsList
 PhysicsList (const edm::ParameterSet &p)
 
void SetCuts () override
 
 ~PhysicsList () override
 

Private Attributes

GflashHistogramtheHisto
 
edm::ParameterSet thePar
 

Detailed Description

Definition at line 11 of file GFlash.h.

Constructor & Destructor Documentation

GFlash::GFlash ( const edm::ParameterSet p)

Definition at line 19 of file GFlash.cc.

References GflashHistogram::bookHistogram(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), GflashHistogram::instance(), muons2muons_cfi::photon, GflashHistogram::setStoreFlag(), AlCaHLTBitMon_QueryRunRegistry::string, theHisto, and thePar.

19  : PhysicsList(p), thePar(p.getParameter<edm::ParameterSet>("GFlash")) {
20  G4DataQuestionaire it(photon);
21 
22  int ver = p.getUntrackedParameter<int>("Verbosity", 0);
23  bool emPhys = p.getUntrackedParameter<bool>("EMPhysics", true);
24  bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics", true);
25  bool tracking = p.getParameter<bool>("TrackingCut");
26  std::string region = p.getParameter<std::string>("Region");
27 
28  edm::LogInfo("PhysicsList") << "You are using the obsolete simulation engine: "
29  << " GFlash with Flags for EM Physics " << emPhys << ", for Hadronic Physics " << hadPhys
30  << " and tracking cut " << tracking << " with special region " << region;
31 
32  RegisterPhysics(new ParametrisedPhysics("parametrised", thePar));
33 
34  if (emPhys) {
35  // EM Physics
36  RegisterPhysics(new CMSEmStandardPhysics95msc93("EM standard msc93", ver, region));
37 
38  // Synchroton Radiation & GN Physics
39  RegisterPhysics(new G4EmExtraPhysics(ver));
40  }
41 
42  // Decays
43  RegisterPhysics(new G4DecayPhysics(ver));
44 
45  if (hadPhys) {
46  // Hadron Elastic scattering
47  RegisterPhysics(new G4HadronElasticPhysics(ver));
48 
49  // Hadron Physics
50  RegisterPhysics(new G4HadronPhysicsQGSP_FTFP_BERT(ver));
51  // Stopping Physics
52  RegisterPhysics(new G4StoppingPhysics(ver));
53 
54  // Ion Physics
55  RegisterPhysics(new G4IonPhysics(ver));
56 
57  // Neutron tracking cut
58  if (tracking) {
59  RegisterPhysics(new G4NeutronTrackingCut(ver));
60  }
61  }
62  // singleton histogram object
63  if (thePar.getParameter<bool>("GflashHistogram")) {
65  theHisto->setStoreFlag(true);
66  theHisto->bookHistogram(thePar.getParameter<std::string>("GflashHistogramName"));
67  }
68 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static GflashHistogram * instance()
PhysicsList(const edm::ParameterSet &p)
Definition: PhysicsList.cc:3
edm::ParameterSet thePar
Definition: GFlash.h:18
void bookHistogram(std::string histFileName="gflash_histogram.root")
GflashHistogram * theHisto
Definition: GFlash.h:17
void setStoreFlag(bool flag)
GFlash::~GFlash ( )
override

Definition at line 70 of file GFlash.cc.

References DEFINE_PHYSICSLIST, edm::ParameterSet::getParameter(), theHisto, and thePar.

70  {
71  if (thePar.getParameter<bool>("GflashHistogram")) {
72  if (theHisto)
73  delete theHisto;
74  }
75 }
T getParameter(std::string const &) const
edm::ParameterSet thePar
Definition: GFlash.h:18
GflashHistogram * theHisto
Definition: GFlash.h:17

Member Data Documentation

GflashHistogram* GFlash::theHisto
private

Definition at line 17 of file GFlash.h.

Referenced by GFlash(), and ~GFlash().

edm::ParameterSet GFlash::thePar
private

Definition at line 18 of file GFlash.h.

Referenced by GFlash(), and ~GFlash().