CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes
SiPixelPhase1TrackClustersV Class Reference

#include <SiPixelPhase1TrackClustersV.h>

Inheritance diagram for SiPixelPhase1TrackClustersV:
SiPixelPhase1Base one::DQMEDAnalyzer< T > HistogramManagerHolder one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 SiPixelPhase1TrackClustersV (const edm::ParameterSet &conf)
 
- Public Member Functions inherited from SiPixelPhase1Base
void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override=0
 
void bookHistograms (DQMStore::IBooker &iBooker, edm::Run const &run, edm::EventSetup const &iSetup) override
 
 SiPixelPhase1Base (const edm::ParameterSet &iConfig)
 
 ~SiPixelPhase1Base () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from HistogramManagerHolder
 HistogramManagerHolder (const edm::ParameterSet &iConfig)
 

Private Types

enum  { CHARGE, SIZE_X, SIZE_Y }
 

Private Attributes

edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > clustersToken_
 
edm::EDGetTokenT< reco::TrackCollectiontracksToken_
 

Additional Inherited Members

- Protected Types inherited from SiPixelPhase1Base
enum  { DCS }
 
- Protected Member Functions inherited from SiPixelPhase1Base
bool checktrigger (const edm::Event &iEvent, const edm::EventSetup &iSetup, const unsigned trgidx) const
 
- Protected Attributes inherited from HistogramManagerHolder
GeometryInterface geometryInterface
 
std::vector< HistogramManagerhisto
 

Detailed Description

Definition at line 16 of file SiPixelPhase1TrackClustersV.h.

Member Enumeration Documentation

anonymous enum
private

Constructor & Destructor Documentation

SiPixelPhase1TrackClustersV::SiPixelPhase1TrackClustersV ( const edm::ParameterSet conf)
explicit

Definition at line 25 of file SiPixelPhase1TrackClustersV.cc.

References clustersToken_, edm::ParameterSet::getParameter(), and tracksToken_.

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 }
SiPixelPhase1Base(const edm::ParameterSet &iConfig)
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > clustersToken_

Member Function Documentation

void SiPixelPhase1TrackClustersV::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 31 of file SiPixelPhase1TrackClustersV.cc.

References edmNew::DetSetVector< T >::begin(), CHARGE, SiPixelCluster::charge(), clustersToken_, DEFINE_FWK_MODULE, edmNew::DetSetVector< T >::end(), edm::EventSetup::get(), edm::Event::getByToken(), HistogramManagerHolder::histo, edm::ESHandleBase::isValid(), SIZE_X, SIZE_Y, SiPixelCluster::sizeX(), SiPixelCluster::sizeY(), trackingTruthProducer_cfi::tracker, l1t::tracks, and tracksToken_.

31  {
32  // get geometry
34  iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
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 }
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator end(bool update=false) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
int charge() const
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
Definition: DetId.h:18
std::vector< HistogramManager > histo
int sizeY() const
Pixel cluster – collection of neighboring pixels above threshold.
T get() const
Definition: EventSetup.h:71
bool isValid() const
Definition: ESHandle.h:44
int sizeX() const
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > clustersToken_
const_iterator begin(bool update=false) const

Member Data Documentation

edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > SiPixelPhase1TrackClustersV::clustersToken_
private

Definition at line 28 of file SiPixelPhase1TrackClustersV.h.

Referenced by analyze(), and SiPixelPhase1TrackClustersV().

edm::EDGetTokenT<reco::TrackCollection> SiPixelPhase1TrackClustersV::tracksToken_
private

Definition at line 29 of file SiPixelPhase1TrackClustersV.h.

Referenced by analyze(), and SiPixelPhase1TrackClustersV().