CMS 3D CMS Logo

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 
12 
24 
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 
32  // get geometry
35  assert(tracker.isValid());
36 
37  // get the map
39  iEvent.getByToken(tracksToken_, tracks);
40 
41  // get clusters
43  iEvent.getByToken(clustersToken_, clusterColl);
44 
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 
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
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
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
SiPixelPhase1TrackClustersV::SIZE_X
Definition: SiPixelPhase1TrackClustersV.h:19
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
SiPixelPhase1TrackClustersV::CHARGE
Definition: SiPixelPhase1TrackClustersV.h:18
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
SiPixelPhase1TrackClustersV::SIZE_Y
Definition: SiPixelPhase1TrackClustersV.h:20
SiPixelCluster::sizeX
int sizeX() const
Definition: SiPixelCluster.h:125
edm::Event
Definition: Event.h:73
GlobalPoint.h
edm::InputTag
Definition: InputTag.h:15