src
Validation
MuonCSCDigis
src
CSCBaseValidation.cc
Go to the documentation of this file.
1
#include "
DQMServices/Core/interface/DQMStore.h
"
2
#include "
Validation/MuonCSCDigis/interface/CSCBaseValidation.h
"
3
4
CSCBaseValidation::CSCBaseValidation
(
const
edm::ParameterSet
&ps)
5
: doSim_(ps.getParameter<
bool
>(
"doSim"
)), theSimHitMap(nullptr), theCSCGeometry(nullptr) {
6
const
auto
&
simTrack
= ps.
getParameter
<
edm::ParameterSet
>(
"simTrack"
);
7
simTrackMinPt_
=
simTrack
.getParameter<
double
>(
"minPt"
);
8
simTrackMinEta_
=
simTrack
.getParameter<
double
>(
"minEta"
);
9
simTrackMaxEta_
=
simTrack
.getParameter<
double
>(
"maxEta"
);
10
}
11
12
const
CSCLayer
*
CSCBaseValidation::findLayer
(
int
detId)
const
{
13
assert
(
theCSCGeometry
!=
nullptr
);
14
const
GeomDetUnit
*detUnit =
theCSCGeometry
->
idToDetUnit
(
CSCDetId
(detId));
15
return
dynamic_cast<
const
CSCLayer
*
>
(detUnit);
16
}
17
18
bool
CSCBaseValidation::isSimTrackGood
(
const
SimTrack
&
t
)
const
{
19
// SimTrack selection
20
if
(
t
.noVertex())
21
return
false
;
22
if
(
t
.noGenpart())
23
return
false
;
24
// only muons
25
if
(
std::abs
(
t
.type()) != 13)
26
return
false
;
27
// pt selection
28
if
(
t
.momentum().pt() <
simTrackMinPt_
)
29
return
false
;
30
// eta selection
31
const
float
eta
(
std::abs
(
t
.momentum().eta()));
32
if
(
eta
>
simTrackMaxEta_
||
eta
<
simTrackMinEta_
)
33
return
false
;
34
return
true
;
35
}
CSCBaseValidation::simTrackMaxEta_
double simTrackMaxEta_
Definition:
CSCBaseValidation.h:35
CSCBaseValidation.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
CSCBaseValidation::theCSCGeometry
const CSCGeometry * theCSCGeometry
Definition:
CSCBaseValidation.h:31
CSCBaseValidation::simTrackMinEta_
double simTrackMinEta_
Definition:
CSCBaseValidation.h:34
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:651
CSCDetId
Definition:
CSCDetId.h:26
GeomDet
Definition:
GeomDet.h:27
SimTrack
Definition:
SimTrack.h:9
PVValHelper::eta
Definition:
PVValidationHelpers.h:70
cscDigiValidation_cfi.simTrack
simTrack
Definition:
cscDigiValidation_cfi.py:76
cms::cuda::assert
assert(be >=bs)
CSCBaseValidation::simTrackMinPt_
double simTrackMinPt_
Definition:
CSCBaseValidation.h:33
CSCBaseValidation::isSimTrackGood
bool isSimTrackGood(const SimTrack &t) const
Definition:
CSCBaseValidation.cc:18
DQMStore.h
CSCBaseValidation::findLayer
const CSCLayer * findLayer(int detId) const
Definition:
CSCBaseValidation.cc:12
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
CSCBaseValidation::CSCBaseValidation
CSCBaseValidation(const edm::ParameterSet &ps)
Definition:
CSCBaseValidation.cc:4
electrons_cff.bool
bool
Definition:
electrons_cff.py:381
CSCLayer
Definition:
CSCLayer.h:24
edm::ParameterSet
Definition:
ParameterSet.h:47
CSCGeometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition:
CSCGeometry.cc:89
Generated for CMSSW Reference Manual by
1.8.14