CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
const_iterator end(bool update=false) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
SiPixelPhase1TrackClustersV(const edm::ParameterSet &conf)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
int charge() const
int iEvent
Definition: GenABIO.cc:224
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetId.h:17
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< HistogramManager > histo
int sizeY() const
Pixel cluster – collection of neighboring pixels above threshold.
int sizeX() const
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > clustersToken_
const_iterator begin(bool update=false) const