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::GFlash ( const edm::ParameterSet p)

Definition at line 18 of file GFlash.cc.

References GflashHistogram::bookHistogram(), edm::ParameterSet::getParameter(), GflashHistogram::instance(), AlCaHLTBitMon_ParallelJobs::p, nano_mu_digi_cff::region, GflashHistogram::setStoreFlag(), AlCaHLTBitMon_QueryRunRegistry::string, theHisto, and thePar.

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

◆ ~GFlash()

GFlash::~GFlash ( )
override

Definition at line 67 of file GFlash.cc.

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

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

Member Data Documentation

◆ theHisto

GflashHistogram* GFlash::theHisto
private

Definition at line 17 of file GFlash.h.

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

◆ thePar

edm::ParameterSet GFlash::thePar
private

Definition at line 18 of file GFlash.h.

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