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.

20  : PhysicsList(p),
21  thePar(p.getParameter<edm::ParameterSet>("GFlash")) {
22 
23  G4DataQuestionaire it(photon);
24 
25  int ver = p.getUntrackedParameter<int>("Verbosity",0);
26  bool emPhys = p.getUntrackedParameter<bool>("EMPhysics",true);
27  bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics",true);
28  bool tracking= p.getParameter<bool>("TrackingCut");
29  std::string region = p.getParameter<std::string>("Region");
30 
31  edm::LogInfo("PhysicsList") << "You are using the obsolete simulation engine: "
32  << " GFlash with Flags for EM Physics "
33  << emPhys << ", for Hadronic Physics "
34  << hadPhys
35  << " and tracking cut " << tracking
36  << " with special region " << region;
37 
38  RegisterPhysics(new ParametrisedPhysics("parametrised",thePar));
39 
40  if (emPhys) {
41  // EM Physics
42  RegisterPhysics( new CMSEmStandardPhysics95msc93("EM standard msc93",ver,region));
43 
44  // Synchroton Radiation & GN Physics
45  RegisterPhysics( new G4EmExtraPhysics(ver));
46  }
47 
48  // Decays
49  RegisterPhysics( new G4DecayPhysics(ver) );
50 
51  if (hadPhys) {
52  // Hadron Elastic scattering
53  RegisterPhysics( new G4HadronElasticPhysics(ver));
54 
55  // Hadron Physics
56  RegisterPhysics( new G4HadronPhysicsQGSP_FTFP_BERT(ver));
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  // singleton histogram object
69  if(thePar.getParameter<bool>("GflashHistogram")) {
71  theHisto->setStoreFlag(true);
72  theHisto->bookHistogram(thePar.getParameter<std::string>("GflashHistogramName"));
73  }
74 }
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:19
void bookHistogram(std::string histFileName="gflash_histogram.root")
GflashHistogram * theHisto
Definition: GFlash.h:18
void setStoreFlag(bool flag)
GFlash::~GFlash ( )
override

Definition at line 76 of file GFlash.cc.

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

76  {
77 
78  if(thePar.getParameter<bool>("GflashHistogram")) {
79  if(theHisto) delete theHisto;
80  }
81 
82 }
T getParameter(std::string const &) const
edm::ParameterSet thePar
Definition: GFlash.h:19
GflashHistogram * theHisto
Definition: GFlash.h:18

Member Data Documentation

GflashHistogram* GFlash::theHisto
private

Definition at line 18 of file GFlash.h.

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

edm::ParameterSet GFlash::thePar
private

Definition at line 19 of file GFlash.h.

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