CMS 3D CMS Logo

GFlash.cc
Go to the documentation of this file.
5 
6 #include "G4DecayPhysics.hh"
7 #include "G4EmExtraPhysics.hh"
8 #include "G4HadronElasticPhysics.hh"
9 #include "G4HadronPhysicsQGSP_FTFP_BERT.hh"
10 #include "G4IonPhysics.hh"
11 #include "G4NeutronTrackingCut.hh"
12 #include "G4StoppingPhysics.hh"
13 
15 
16 #include <string>
17 
18 GFlash::GFlash(const edm::ParameterSet &p) : 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 CMSEmStandardPhysics95msc93("EM standard msc93", ver, region));
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 G4HadronPhysicsQGSP_FTFP_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 }
66 
68  if (thePar.getParameter<bool>("GflashHistogram")) {
69  if (theHisto)
70  delete theHisto;
71  }
72 }
73 
74 // define this as a plug-in
77 
ParametrisedPhysics.h
MessageLogger.h
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GFlash::GFlash
GFlash(const edm::ParameterSet &p)
Definition: GFlash.cc:18
tracking
Definition: TempMeasurements.h:8
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
GflashHistogram::setStoreFlag
void setStoreFlag(bool flag)
Definition: GflashHistogram.h:24
GFlash
Definition: GFlash.h:11
MakerMacros.h
PhysicsListFactory.h
ParametrisedPhysics
Definition: ParametrisedPhysics.h:14
GFlash.h
GflashHistogram.h
PhysicsList
Definition: PhysicsList.h:7
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88338
CMSEmStandardPhysics95msc93.h
DEFINE_PHYSICSLIST
#define DEFINE_PHYSICSLIST(type)
Definition: PhysicsListFactory.h:12
GFlash::~GFlash
~GFlash() override
Definition: GFlash.cc:67
GflashHistogram::instance
static GflashHistogram * instance()
Definition: GflashHistogram.cc:5
GFlash::theHisto
GflashHistogram * theHisto
Definition: GFlash.h:17
GflashHistogram::bookHistogram
void bookHistogram(std::string histFileName="gflash_histogram.root")
Definition: GflashHistogram.cc:13
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CMSEmStandardPhysics95msc93
Definition: CMSEmStandardPhysics95msc93.h:8
GFlash::thePar
edm::ParameterSet thePar
Definition: GFlash.h:18