SimG4Core
GFlash
plugins
GFlash.cc
Go to the documentation of this file.
1
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
2
#include "
SimG4Core/GFlash/interface/GFlash.h
"
3
#include "
SimG4Core/GFlash/interface/ParametrisedPhysics.h
"
4
#include "
SimG4Core/PhysicsLists/interface/CMSEmStandardPhysics95msc93.h
"
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
14
#include "
SimGeneral/GFlash/interface/GflashHistogram.h
"
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"
)) {
61
theHisto
=
GflashHistogram::instance
();
62
theHisto
->
setStoreFlag
(
true
);
63
theHisto
->
bookHistogram
(
thePar
.
getParameter
<
std::string
>(
"GflashHistogramName"
));
64
}
65
}
66
67
GFlash::~GFlash
() {
68
if
(
thePar
.
getParameter
<
bool
>(
"GflashHistogram"
)) {
69
if
(
theHisto
)
70
delete
theHisto
;
71
}
72
}
73
74
// define this as a plug-in
75
#include "
FWCore/Framework/interface/MakerMacros.h
"
76
#include "
SimG4Core/Physics/interface/PhysicsListFactory.h
"
77
78
DEFINE_PHYSICSLIST
(
GFlash
);
ParametrisedPhysics.h
MessageLogger.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
edm::LogInfo
Definition:
MessageLogger.h:254
GFlash::GFlash
GFlash(const edm::ParameterSet &p)
Definition:
GFlash.cc:18
tracking
Definition:
TempMeasurements.h:8
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:36
ParameterSet
Definition:
Functions.h:16
CMSEmStandardPhysics95msc93.h
DEFINE_PHYSICSLIST
#define DEFINE_PHYSICSLIST(type)
Definition:
PhysicsListFactory.h:12
GFlash::~GFlash
~GFlash() override
Definition:
GFlash.cc:67
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
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
HLT_2018_cff.region
region
Definition:
HLT_2018_cff.py:81479
CMSEmStandardPhysics95msc93
Definition:
CMSEmStandardPhysics95msc93.h:9
GFlash::thePar
edm::ParameterSet thePar
Definition:
GFlash.h:18
Generated for CMSSW Reference Manual by
1.8.16