Validation
SiPixelPhase1TrackClustersV
src
SiPixelPhase1TrackClustersV.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: SiPixelPhase1TrackClustersV
4
// Class: SiPixelPhase1TrackClustersV
5
//
6
7
// Original Author: Marcel Schneider
8
// Additional Authors: Alexander Morton - modifying code for validation use
9
10
#include "
FWCore/Framework/interface/MakerMacros.h
"
11
#include "
Validation/SiPixelPhase1TrackClustersV/interface/SiPixelPhase1TrackClustersV.h
"
12
13
#include "
DataFormats/GeometryVector/interface/GlobalPoint.h
"
14
#include "
DataFormats/GeometryVector/interface/LocalPoint.h
"
15
#include "
DataFormats/SiPixelDetId/interface/PixelSubdetector.h
"
16
#include "
DataFormats/TrackReco/interface/Track.h
"
17
#include "
DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h
"
18
#include "
FWCore/Framework/interface/ESHandle.h
"
19
#include "
Geometry/CommonTopologies/interface/PixelTopology.h
"
20
#include "
Geometry/Records/interface/TrackerDigiGeometryRecord.h
"
21
#include "
Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h
"
22
#include "
Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h
"
23
#include "
TrackingTools/TrackFitters/interface/TrajectoryStateCombiner.h
"
24
25
SiPixelPhase1TrackClustersV::SiPixelPhase1TrackClustersV
(
const
edm::ParameterSet
&iConfig)
26
:
SiPixelPhase1Base
(iConfig) {
27
clustersToken_
= consumes<edmNew::DetSetVector<SiPixelCluster>>(iConfig.
getParameter
<
edm::InputTag
>(
"clusters"
));
28
tracksToken_
= consumes<reco::TrackCollection>(iConfig.
getParameter
<
edm::InputTag
>(
"tracks"
));
29
}
30
31
void
SiPixelPhase1TrackClustersV::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
&iSetup) {
32
// get geometry
33
edm::ESHandle<TrackerGeometry>
tracker
;
34
iSetup.
get
<
TrackerDigiGeometryRecord
>().
get
(
tracker
);
35
assert
(
tracker
.isValid());
36
37
// get the map
38
edm::Handle<reco::TrackCollection>
tracks
;
39
iEvent
.getByToken(
tracksToken_
,
tracks
);
40
41
// get clusters
42
edm::Handle<edmNew::DetSetVector<SiPixelCluster>
> clusterColl;
43
iEvent
.getByToken(
clustersToken_
, clusterColl);
44
45
edmNew::DetSetVector<SiPixelCluster>::const_iterator
it;
46
for
(it = clusterColl->begin(); it != clusterColl->end(); ++it) {
47
auto
id
=
DetId
(it->detId());
48
49
for
(
auto
subit = it->
begin
(); subit != it->
end
(); ++subit) {
50
SiPixelCluster
const
&cluster = *subit;
51
52
histo
[
CHARGE
].fill(
double
(cluster.
charge
()),
id
, &
iEvent
);
53
histo
[
SIZE_X
].fill(
double
(cluster.
sizeX
()),
id
, &
iEvent
);
54
histo
[
SIZE_Y
].fill(
double
(cluster.
sizeY
()),
id
, &
iEvent
);
55
}
56
}
57
}
58
59
DEFINE_FWK_MODULE
(
SiPixelPhase1TrackClustersV
);
TrajectoryStateCombiner.h
PDWG_EXOHSCP_cff.tracks
tracks
Definition:
PDWG_EXOHSCP_cff.py:28
SiPixelPhase1TrackClustersV
Definition:
SiPixelPhase1TrackClustersV.h:16
PixelSubdetector.h
SiPixelPhase1TrackClustersV.h
TrackerGeometry.h
SiPixelPhase1TrackClustersV::SiPixelPhase1TrackClustersV
SiPixelPhase1TrackClustersV(const edm::ParameterSet &conf)
Definition:
SiPixelPhase1TrackClustersV.cc:25
PixelTopology.h
ESHandle.h
SiPixelPhase1TrackClustersV::CHARGE
Definition:
SiPixelPhase1TrackClustersV.h:18
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition:
DetSetVectorNew.h:231
cms::cuda::assert
assert(be >=bs)
HistogramManagerHolder::histo
std::vector< HistogramManager > histo
Definition:
SiPixelPhase1Base.h:37
edmNew::DetSetVector::begin
const_iterator begin(bool update=false) const
Definition:
DetSetVectorNew.h:572
SiPixelCluster
Pixel cluster – collection of neighboring pixels above threshold.
Definition:
SiPixelCluster.h:27
edm::Handle< reco::TrackCollection >
SiPixelPhase1TrackClustersV::tracksToken_
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
Definition:
SiPixelPhase1TrackClustersV.h:29
SiPixelPhase1TrackClustersV::SIZE_Y
Definition:
SiPixelPhase1TrackClustersV.h:20
SiPixelPhase1Base
Definition:
SiPixelPhase1Base.h:46
SiPixelPhase1TrackClustersV::clustersToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > clustersToken_
Definition:
SiPixelPhase1TrackClustersV.h:28
DetId
Definition:
DetId.h:17
MakerMacros.h
SiPixelCluster::sizeY
int sizeY() const
Definition:
SiPixelCluster.h:128
Track.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:73
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
TrackerDigiGeometryRecord
Definition:
TrackerDigiGeometryRecord.h:15
edm::ESHandle< TrackerGeometry >
SiPixelRecHit.h
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition:
PbPb_ZMuSkimMuonDPG_cff.py:60
TrackerDigiGeometryRecord.h
edm::ParameterSet
Definition:
ParameterSet.h:36
SiPixelPhase1TrackClustersV::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
SiPixelPhase1TrackClustersV.cc:31
iEvent
int iEvent
Definition:
GenABIO.cc:224
SiPixelPhase1TrackClustersV::SIZE_X
Definition:
SiPixelPhase1TrackClustersV.h:19
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
LocalPoint.h
edmNew::DetSetVector::end
const_iterator end(bool update=false) const
Definition:
DetSetVectorNew.h:577
PixelGeomDetUnit.h
SiPixelCluster::charge
int charge() const
Definition:
SiPixelCluster.h:130
SiPixelCluster::sizeX
int sizeX() const
Definition:
SiPixelCluster.h:125
edm::Event
Definition:
Event.h:73
GlobalPoint.h
edm::InputTag
Definition:
InputTag.h:15
Generated for CMSSW Reference Manual by
1.8.16