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 
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiPixelPhase1TrackClustersV(const edm::ParameterSet &conf)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
int sizeY() const
const_iterator end(bool update=false) const
int charge() const
int iEvent
Definition: GenABIO.cc:224
int sizeX() const
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetId.h:17
const_iterator begin(bool update=false) const
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< HistogramManager > histo
Pixel cluster – collection of neighboring pixels above threshold.
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > clustersToken_