Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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:36
CSCBaseValidation.h
CSCBaseValidation::theCSCGeometry
const CSCGeometry * theCSCGeometry
Definition:
CSCBaseValidation.h:32
CSCDetId
CSCDetId
Definition:
RecoLocalMuon_RECO.doi:36
CSCBaseValidation::simTrackMinEta_
double simTrackMinEta_
Definition:
CSCBaseValidation.h:35
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
GeomDet
Definition:
GeomDet.h:27
SimTrack
Definition:
SimTrack.h:9
PVValHelper::eta
Definition:
PVValidationHelpers.h:70
CSCBaseValidation::isSimTrackGood
bool isSimTrackGood(const SimTrack &t) const
Definition:
CSCBaseValidation.cc:18
cms::cuda::assert
assert(be >=bs)
CSCBaseValidation::simTrackMinPt_
double simTrackMinPt_
Definition:
CSCBaseValidation.h:34
SimTrack::noGenpart
bool noGenpart() const
Definition:
SimTrack.h:38
DQMStore.h
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
CSCBaseValidation::CSCBaseValidation
CSCBaseValidation(const edm::ParameterSet &ps)
Definition:
CSCBaseValidation.cc:4
SimTrack::noVertex
bool noVertex() const
Definition:
SimTrack.h:34
CSCLayer
Definition:
CSCLayer.h:24
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
CoreSimTrack::type
int type() const
particle type (HEP PDT convension)
Definition:
CoreSimTrack.h:22
CoreSimTrack::momentum
const math::XYZTLorentzVectorD & momentum() const
Definition:
CoreSimTrack.h:19
edm::ParameterSet
Definition:
ParameterSet.h:47
cscDigiValidation_cfi.simTrack
tuple simTrack
Definition:
cscDigiValidation_cfi.py:76
CSCBaseValidation::findLayer
const CSCLayer * findLayer(int detId) const
Definition:
CSCBaseValidation.cc:12
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.5