Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
SimG4Core
GFlash
plugins
GFlash.cc
Go to the documentation of this file.
1
#include "
SimG4Core/GFlash/interface/GFlash.h
"
2
#include "
SimG4Core/GFlash/interface/ParametrisedPhysics.h
"
3
#include "
SimG4Core/GFlash/interface/HadronPhysicsQGSP_WP.h
"
4
#include "
SimG4Core/GFlash/interface/HadronPhysicsQGSP_BERT_WP.h
"
5
#include "
SimG4Core/GFlash/interface/HadronPhysicsQGSPCMS_FTFP_BERT_WP.h
"
6
#include "
SimG4Core/PhysicsLists/interface/CMSEmStandardPhysics92.h
"
7
#include "
SimG4Core/PhysicsLists/interface/CMSMonopolePhysics.h
"
8
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
9
10
#include "G4DecayPhysics.hh"
11
#include "G4EmExtraPhysics.hh"
12
#include "G4IonPhysics.hh"
13
#include "G4QStoppingPhysics.hh"
14
#include "G4HadronElasticPhysics.hh"
15
#include "G4NeutronTrackingCut.hh"
16
17
#include "G4DataQuestionaire.hh"
18
#include "
SimGeneral/GFlash/interface/GflashHistogram.h
"
19
20
#include <string>
21
22
GFlash::GFlash
(
G4LogicalVolumeToDDLogicalPartMap
&
map
,
23
const
HepPDT::ParticleDataTable
*
table_
,
24
sim::FieldBuilder
*fieldBuilder_,
25
const
edm::ParameterSet
&
p
) :
PhysicsList
(map, table_, fieldBuilder_, p),
26
thePar(p.getParameter<edm::
ParameterSet
>(
"GFlash"
)) {
27
28
G4DataQuestionaire it(photon);
29
30
std::string hadronPhysics =
thePar
.
getParameter
<std::string>(
"GflashHadronPhysics"
);
31
32
int
ver = p.
getUntrackedParameter
<
int
>(
"Verbosity"
,0);
33
bool
emPhys = p.
getUntrackedParameter
<
bool
>(
"EMPhysics"
,
true
);
34
bool
hadPhys = p.
getUntrackedParameter
<
bool
>(
"HadPhysics"
,
true
);
35
bool
tracking= p.
getParameter
<
bool
>(
"TrackingCut"
);
36
std::string region = p.
getParameter
<std::string>(
"Region"
);
37
38
edm::LogInfo
(
"PhysicsList"
) <<
"You are using the simulation engine: "
39
<< hadronPhysics <<
" + CMS GFLASH with Flags for EM Physics "
40
<< emPhys <<
", for Hadronic Physics "
41
<< hadPhys <<
" and tracking cut "
<< tracking
42
<<
" with special region "
<< region;
43
44
RegisterPhysics(
new
ParametrisedPhysics
(
"parametrised"
,
thePar
));
45
46
if
(emPhys) {
47
// EM Physics
48
RegisterPhysics(
new
CMSEmStandardPhysics92
(
"standard EM EML"
,ver,region));
49
50
// Synchroton Radiation & GN Physics
51
RegisterPhysics(
new
G4EmExtraPhysics(
"extra EM"
));
52
}
53
54
// Decays
55
RegisterPhysics(
new
G4DecayPhysics(
"decay"
,ver) );
56
57
if
(hadPhys) {
58
// Hadron Elastic scattering
59
RegisterPhysics(
new
G4HadronElasticPhysics(
"elastic"
,ver,
false
));
60
61
// Hadron Physics
62
G4bool quasiElastic=
true
;
63
64
if
(hadronPhysics==
"QGSP_FTFP_BERT"
) {
65
RegisterPhysics(
new
HadronPhysicsQGSPCMS_FTFP_BERT_WP
(
"hadron"
,quasiElastic));
66
}
67
else
if
(hadronPhysics==
"QGSP_BERT"
) {
68
RegisterPhysics(
new
HadronPhysicsQGSP_BERT_WP
(
"hadron"
,quasiElastic));
69
}
70
else
if
(hadronPhysics==
"QGSP"
) {
71
RegisterPhysics(
new
HadronPhysicsQGSP_WP
(
"hadron"
,quasiElastic));
72
}
73
else
{
74
edm::LogInfo
(
"PhysicsList"
) << hadronPhysics <<
" is not available for GflashHadronPhysics!"
75
<<
"... Using QGSP_FTFP_BERT\n"
;
76
RegisterPhysics(
new
HadronPhysicsQGSPCMS_FTFP_BERT_WP
(
"hadron"
,quasiElastic));
77
}
78
// Stopping Physics
79
RegisterPhysics(
new
G4QStoppingPhysics(
"stopping"
));
80
81
// Ion Physics
82
RegisterPhysics(
new
G4IonPhysics(
"ion"
));
83
84
// Neutron tracking cut
85
if
(tracking)
86
RegisterPhysics(
new
G4NeutronTrackingCut(
"Neutron tracking cut"
, ver));
87
}
88
89
// Monopoles
90
RegisterPhysics(
new
CMSMonopolePhysics
(table_,fieldBuilder_,p));
91
92
// singleton histogram object
93
if
(
thePar
.
getParameter
<
bool
>(
"GflashHistogram"
)) {
94
theHisto
=
GflashHistogram::instance
();
95
theHisto
->
setStoreFlag
(
true
);
96
theHisto
->
bookHistogram
(
thePar
.
getParameter
<std::string>(
"GflashHistogramName"
));
97
}
98
99
}
100
101
GFlash::~GFlash
() {
102
103
if
(
thePar
.
getParameter
<
bool
>(
"GflashHistogram"
)) {
104
if
(
theHisto
)
delete
theHisto
;
105
}
106
107
}
108
109
//define this as a plug-in
110
#include "
FWCore/Framework/interface/MakerMacros.h
"
111
#include "
SimG4Core/Physics/interface/PhysicsListFactory.h
"
112
113
114
DEFINE_PHYSICSLIST
(
GFlash
);
115
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
GFlash::~GFlash
virtual ~GFlash()
Definition:
GFlash.cc:101
GflashHistogram::instance
static GflashHistogram * instance()
Definition:
GflashHistogram.cc:5
MessageLogger.h
DEFINE_PHYSICSLIST
#define DEFINE_PHYSICSLIST(type)
Definition:
PhysicsListFactory.h:12
ParticleDataTable
HepPDT::ParticleDataTable ParticleDataTable
Definition:
ParticleDataTable.h:9
ParameterSet
Definition:
Functions.h:16
CMSEmStandardPhysics92
Definition:
CMSEmStandardPhysics92.h:9
GFlash::GFlash
GFlash(G4LogicalVolumeToDDLogicalPartMap &map, const HepPDT::ParticleDataTable *table_, sim::FieldBuilder *fieldBuilder_, const edm::ParameterSet &p)
Definition:
GFlash.cc:22
MakerMacros.h
GFlash
Definition:
GFlash.h:11
HadronPhysicsQGSP_WP
Definition:
HadronPhysicsQGSP_WP.h:67
HadronPhysicsQGSP_BERT_WP.h
sim::FieldBuilder
Definition:
FieldBuilder.h:19
Association.map
dictionary map
Definition:
Association.py:205
PhysicsList
Definition:
PhysicsList.h:13
GFlash::thePar
edm::ParameterSet thePar
Definition:
GFlash.h:19
GflashHistogram::bookHistogram
void bookHistogram(std::string histFileName="gflash_histogram.root")
Definition:
GflashHistogram.cc:17
ParametrisedPhysics
Definition:
ParametrisedPhysics.h:13
HadronPhysicsQGSP_BERT_WP
Definition:
HadronPhysicsQGSP_BERT_WP.h:70
ParametrisedPhysics.h
DDMapper< G4LogicalVolume *, DDLogicalPart >
edm::LogInfo
Definition:
MessageLogger.h:214
CMSEmStandardPhysics92.h
HadronPhysicsQGSPCMS_FTFP_BERT_WP.h
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
CMSMonopolePhysics
Definition:
CMSMonopolePhysics.h:15
CMSMonopolePhysics.h
GFlash.h
edm::ParameterSet
Definition:
ParameterSet.h:35
PhysicsListFactory.h
HadronPhysicsQGSP_WP.h
HadronPhysicsQGSPCMS_FTFP_BERT_WP
Definition:
HadronPhysicsQGSPCMS_FTFP_BERT_WP.h:30
table_
Table table_
Definition:
Actions.cc:22
GFlash::theHisto
GflashHistogram * theHisto
Definition:
GFlash.h:18
GflashHistogram::setStoreFlag
void setStoreFlag(bool flag)
Definition:
GflashHistogram.h:26
GflashHistogram.h
Generated for CMSSW Reference Manual by
1.8.5