Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Validation
Geometry
src
MaterialBudgetHcal.cc
Go to the documentation of this file.
1
#include "
Validation/Geometry/interface/MaterialBudgetHcal.h
"
2
3
#include "
FWCore/Framework/interface/Event.h
"
4
#include "
FWCore/Framework/interface/EventSetup.h
"
5
#include "
FWCore/Framework/interface/ESTransientHandle.h
"
6
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
7
8
#include "
SimG4Core/Notification/interface/BeginOfJob.h
"
9
#include "
SimG4Core/Notification/interface/BeginOfTrack.h
"
10
#include "
SimG4Core/Notification/interface/EndOfTrack.h
"
11
12
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
13
#include "
DetectorDescription/Core/interface/DDCompactView.h
"
14
15
#include "G4Step.hh"
16
#include "G4Track.hh"
17
18
#include <iostream>
19
20
MaterialBudgetHcal::MaterialBudgetHcal
(
const
edm::ParameterSet
&
p
) : theHistoHcal(nullptr), theHistoCastor(nullptr) {
21
edm::ParameterSet
m_p =
p
.getParameter<
edm::ParameterSet
>(
"MaterialBudgetHcal"
);
22
rMax
= m_p.
getUntrackedParameter
<
double
>(
"RMax"
, 4.5) *
CLHEP::m
;
23
zMax
= m_p.
getUntrackedParameter
<
double
>(
"ZMax"
, 13.0) *
CLHEP::m
;
24
bool
doHcal = m_p.
getUntrackedParameter
<
bool
>(
"DoHCAL"
,
true
);
25
edm::LogVerbatim
(
"MaterialBudget"
) <<
"MaterialBudgetHcal initialized with rMax "
<<
rMax
<<
" mm and zMax "
<<
zMax
26
<<
" mm doHcal is set to "
<< doHcal;
27
if
(doHcal)
28
theHistoHcal
=
new
MaterialBudgetHcalHistos
(m_p);
29
else
30
theHistoCastor
=
new
MaterialBudgetCastorHistos
(m_p);
31
}
32
33
MaterialBudgetHcal::~MaterialBudgetHcal
() {
34
if
(
theHistoHcal
)
35
delete
theHistoHcal
;
36
if
(
theHistoCastor
)
37
delete
theHistoCastor
;
38
}
39
40
void
MaterialBudgetHcal::update
(
const
BeginOfJob
* job) {
41
//----- Check that selected volumes are indeed part of the geometry
42
// Numbering From DDD
43
edm::ESTransientHandle<DDCompactView>
pDD;
44
(*job)()->get<IdealGeometryRecord>().get(pDD);
45
if
(
theHistoHcal
)
46
theHistoHcal
->
fillBeginJob
((*pDD));
47
}
48
49
void
MaterialBudgetHcal::update
(
const
BeginOfTrack
* trk) {
50
const
G4Track* aTrack = (*trk)();
// recover G4 pointer if wanted
51
if
(
theHistoHcal
)
52
theHistoHcal
->
fillStartTrack
(aTrack);
53
if
(
theHistoCastor
)
54
theHistoCastor
->
fillStartTrack
(aTrack);
55
}
56
57
void
MaterialBudgetHcal::update
(
const
G4Step* aStep) {
58
//---------- each step
59
if
(
theHistoHcal
)
60
theHistoHcal
->
fillPerStep
(aStep);
61
if
(
theHistoCastor
)
62
theHistoCastor
->
fillPerStep
(aStep);
63
64
//----- Stop tracking after selected position
65
if
(
stopAfter
(aStep)) {
66
G4Track*
track
= aStep->GetTrack();
67
track
->SetTrackStatus(fStopAndKill);
68
}
69
}
70
71
void
MaterialBudgetHcal::update
(
const
EndOfTrack
* trk) {
72
if
(
theHistoHcal
)
73
theHistoHcal
->
fillEndTrack
();
74
if
(
theHistoCastor
)
75
theHistoCastor
->
fillEndTrack
();
76
}
77
78
bool
MaterialBudgetHcal::stopAfter
(
const
G4Step* aStep) {
79
G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
80
double
rr
= hitPoint.perp();
81
double
zz
=
std::abs
(hitPoint.z());
82
83
if
(
rr
>
rMax
||
zz
>
zMax
) {
84
edm::LogVerbatim
(
"MaterialBudget"
) <<
" MaterialBudgetHcal::StopAfter R = "
<<
rr
<<
" and Z = "
<<
zz
;
85
return
true
;
86
}
else
{
87
return
false
;
88
}
89
}
geometryCSVtoXML.zz
zz
Definition:
geometryCSVtoXML.py:19
ESTransientHandle.h
MessageLogger.h
BeginOfJob.h
findQualityFiles.rr
string rr
Definition:
findQualityFiles.py:185
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
MaterialBudgetHcalHistos::fillPerStep
void fillPerStep(const G4Step *)
Definition:
MaterialBudgetHcalHistos.cc:108
EndOfTrack.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDCompactView.h
MaterialBudgetCastorHistos::fillPerStep
void fillPerStep(const G4Step *)
Definition:
MaterialBudgetCastorHistos.cc:64
EndOfTrack
Definition:
EndOfTrack.h:6
BeginOfTrack.h
MaterialBudgetHcal.h
visualization-live-secondInstance_cfg.m
m
Definition:
visualization-live-secondInstance_cfg.py:72
MaterialBudgetHcal::~MaterialBudgetHcal
~MaterialBudgetHcal() override
Definition:
MaterialBudgetHcal.cc:33
BeginOfTrack
Definition:
BeginOfTrack.h:6
BeginOfJob
Definition:
BeginOfJob.h:8
MaterialBudgetHcal::zMax
double zMax
Definition:
MaterialBudgetHcal.h:40
MaterialBudgetHcal::theHistoCastor
MaterialBudgetCastorHistos * theHistoCastor
Definition:
MaterialBudgetHcal.h:39
edm::ParameterSet
Definition:
ParameterSet.h:36
Event.h
MaterialBudgetCastorHistos::fillEndTrack
void fillEndTrack()
Definition:
MaterialBudgetCastorHistos.cc:151
MaterialBudgetHcal::MaterialBudgetHcal
MaterialBudgetHcal(const edm::ParameterSet &)
Definition:
MaterialBudgetHcal.cc:20
edm::LogVerbatim
Definition:
MessageLogger.h:297
IdealGeometryRecord.h
MaterialBudgetHcal::theHistoHcal
MaterialBudgetHcalHistos * theHistoHcal
Definition:
MaterialBudgetHcal.h:38
edm::ESTransientHandle
Definition:
ESTransientHandle.h:41
MaterialBudgetCastorHistos::fillStartTrack
void fillStartTrack(const G4Track *)
Definition:
MaterialBudgetCastorHistos.cc:38
MaterialBudgetHcal::update
void update(const BeginOfJob *) override
This routine will be called when the appropriate signal arrives.
Definition:
MaterialBudgetHcal.cc:40
MaterialBudgetHcal::rMax
double rMax
Definition:
MaterialBudgetHcal.h:40
MaterialBudgetCastorHistos
Definition:
MaterialBudgetCastorHistos.h:17
MaterialBudgetHcalHistos::fillEndTrack
void fillEndTrack()
Definition:
MaterialBudgetHcalHistos.cc:231
EventSetup.h
MaterialBudgetHcalHistos::fillStartTrack
void fillStartTrack(const G4Track *)
Definition:
MaterialBudgetHcalHistos.cc:81
HLT_2018_cff.track
track
Definition:
HLT_2018_cff.py:10352
MaterialBudgetHcal::stopAfter
bool stopAfter(const G4Step *)
Definition:
MaterialBudgetHcal.cc:78
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
MaterialBudgetHcalHistos
Definition:
MaterialBudgetHcalHistos.h:19
MaterialBudgetHcalHistos::fillBeginJob
void fillBeginJob(const DDCompactView &)
Definition:
MaterialBudgetHcalHistos.cc:35
Generated for CMSSW Reference Manual by
1.8.16