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 
14  : SiPixelPhase1Base(iConfig) {
15  clustersToken_ = consumes<edmNew::DetSetVector<SiPixelCluster>>(iConfig.getParameter<edm::InputTag>("clusters"));
16 }
17 
19  // get clusters
21  iEvent.getByToken(clustersToken_, clusterColl);
22 
24  for (it = clusterColl->begin(); it != clusterColl->end(); ++it) {
25  auto id = DetId(it->detId());
26 
27  for (auto subit = it->begin(); subit != it->end(); ++subit) {
28  SiPixelCluster const &cluster = *subit;
29 
30  histo[CHARGE].fill(double(cluster.charge()), id, &iEvent);
31  histo[SIZE_X].fill(double(cluster.sizeX()), id, &iEvent);
32  histo[SIZE_Y].fill(double(cluster.sizeY()), id, &iEvent);
33  }
34  }
35 }
36 
SiPixelPhase1TrackClustersV
Definition: SiPixelPhase1TrackClustersV.h:15
SiPixelPhase1TrackClustersV.h
SiPixelPhase1TrackClustersV::SiPixelPhase1TrackClustersV
SiPixelPhase1TrackClustersV(const edm::ParameterSet &conf)
Definition: SiPixelPhase1TrackClustersV.cc:13
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:197
HistogramManagerHolder::histo
std::vector< HistogramManager > histo
Definition: SiPixelPhase1Base.h:37
edmNew::DetSetVector::begin
const_iterator begin(bool update=false) const
Definition: DetSetVectorNew.h:530
SiPixelCluster
Pixel cluster – collection of neighboring pixels above threshold.
Definition: SiPixelCluster.h:28
edm::Handle
Definition: AssociativeIterator.h:50
SiPixelPhase1Base
Definition: SiPixelPhase1Base.h:46
SiPixelPhase1TrackClustersV::SIZE_Y
Definition: SiPixelPhase1TrackClustersV.h:19
SiPixelPhase1TrackClustersV::clustersToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > clustersToken_
Definition: SiPixelPhase1TrackClustersV.h:27
DetId
Definition: DetId.h:17
MakerMacros.h
SiPixelCluster::sizeY
int sizeY() const
Definition: SiPixelCluster.h:132
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ParameterSet
Definition: ParameterSet.h:47
SiPixelPhase1TrackClustersV::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: SiPixelPhase1TrackClustersV.cc:18
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:58
edmNew::DetSetVector::end
const_iterator end(bool update=false) const
Definition: DetSetVectorNew.h:535
SiPixelCluster::charge
int charge() const
Definition: SiPixelCluster.h:134
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiPixelPhase1TrackClustersV::CHARGE
Definition: SiPixelPhase1TrackClustersV.h:17
SiPixelPhase1TrackClustersV::SIZE_X
Definition: SiPixelPhase1TrackClustersV.h:18
SiPixelCluster::sizeX
int sizeX() const
Definition: SiPixelCluster.h:129
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15