CMS 3D CMS Logo

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

#include <SiPixelPhase1Clusters.h>

Inheritance diagram for SiPixelPhase1Clusters:
SiPixelPhase1Base DQMEDAnalyzer HistogramManagerHolder edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 SiPixelPhase1Clusters (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 DQMEDAnalyzer
void beginRun (edm::Run const &, edm::EventSetup const &) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 
- Public Member Functions inherited from HistogramManagerHolder
 HistogramManagerHolder (const edm::ParameterSet &iConfig)
 

Private Types

enum  {
  CHARGE, SIZE, SIZEX, SIZEY,
  NCLUSTERS, NCLUSTERSINCLUSIVE, EVENTRATE, POSITION_B,
  POSITION_F, POSITION_XZ, POSITION_YZ, SIZE_VS_ETA,
  READOUT_CHARGE, READOUT_NCLUSTERS, PIXEL_TO_STRIP_RATIO
}
 

Private Attributes

edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelSrcToken_
 
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripSrcToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from SiPixelPhase1Base
bool checktrigger (const edm::Event &iEvent, const edm::EventSetup &iSetup, const unsigned trgidx) const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from HistogramManagerHolder
GeometryInterface geometryInterface
 
std::vector< HistogramManagerhisto
 

Detailed Description

Definition at line 15 of file SiPixelPhase1Clusters.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
CHARGE 
SIZE 
SIZEX 
SIZEY 
NCLUSTERS 
NCLUSTERSINCLUSIVE 
EVENTRATE 
POSITION_B 
POSITION_F 
POSITION_XZ 
POSITION_YZ 
SIZE_VS_ETA 
READOUT_CHARGE 
READOUT_NCLUSTERS 
PIXEL_TO_STRIP_RATIO 

Definition at line 16 of file SiPixelPhase1Clusters.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file SiPixelPhase1Clusters.cc.

References edm::ParameterSet::getParameter(), pixelSrcToken_, and stripSrcToken_.

21  :
22  SiPixelPhase1Base(iConfig)
23 {
24  pixelSrcToken_ = consumes<edmNew::DetSetVector<SiPixelCluster>>(iConfig.getParameter<edm::InputTag>("pixelSrc"));
25 
26  stripSrcToken_ = consumes<edmNew::DetSetVector<SiStripCluster>>(iConfig.getParameter<edm::InputTag>("stripSrc"));
27 }
SiPixelPhase1Base(const edm::ParameterSet &iConfig)
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripSrcToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelSrcToken_

Member Function Documentation

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

Definition at line 29 of file SiPixelPhase1Clusters.cc.

References CHARGE, cuy::col, DEFINE_FWK_MODULE, PV3DBase< T, PVType, FrameType >::eta(), EVENTRATE, edm::EventSetup::get(), edm::Event::getByToken(), HistogramManagerHolder::histo, triggerObjects_cff::id, TrackerGeometry::idToDet(), iEvent, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), Topology::localPosition(), NCLUSTERS, NCLUSTERSINCLUSIVE, PV3DBase< T, PVType, FrameType >::phi(), PIXEL_TO_STRIP_RATIO, pixelSrcToken_, POSITION_B, POSITION_F, POSITION_XZ, POSITION_YZ, edm::Handle< T >::product(), READOUT_CHARGE, READOUT_NCLUSTERS, SIZE, SIZE_VS_ETA, SIZEX, SIZEY, stripSrcToken_, mixOne_simraw_on_sim_cfi::tracker, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

29  {
31  iEvent.getByToken(pixelSrcToken_, inputPixel);
32  if (!inputPixel.isValid()) return;
33 
35  iEvent.getByToken(stripSrcToken_, inputStrip);
36  if (inputStrip.isValid())
37  {
38  if (!inputStrip.product()->data().empty())
39  {
40  histo[PIXEL_TO_STRIP_RATIO].fill((double)inputPixel.product()->data().size() / (double) inputStrip.product()->data().size(), DetId(0), &iEvent);
41  }
42  }
43 
44  bool hasClusters=false;
45 
47  iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
48  assert(tracker.isValid());
49 
51  for (it = inputPixel->begin(); it != inputPixel->end(); ++it) {
52  auto id = DetId(it->detId());
53 
54  const PixelGeomDetUnit* theGeomDet = dynamic_cast<const PixelGeomDetUnit*> ( tracker->idToDet(id) );
55  const PixelTopology& topol = theGeomDet->specificTopology();
56 
57  for(SiPixelCluster const& cluster : *it) {
58  int row = cluster.x()-0.5, col = cluster.y()-0.5;
61  // if( checktrigger(iEvent,iSetup,FLAG_HLT) )
62  histo[READOUT_CHARGE].fill(double(cluster.charge()), id, &iEvent, col, row);
63  histo[CHARGE].fill(double(cluster.charge()), id, &iEvent, col, row);
64  histo[SIZE ].fill(double(cluster.size() ), id, &iEvent, col, row);
65  histo[SIZEX ].fill(double(cluster.sizeX() ), id, &iEvent, col, row);
66  histo[SIZEY ].fill(double(cluster.sizeY() ), id, &iEvent, col, row);
67  histo[NCLUSTERS].fill(id, &iEvent, col, row);
68  histo[NCLUSTERSINCLUSIVE].fill(id, &iEvent);
69  hasClusters=true;
70  if (cluster.size()>1){
71  histo[READOUT_NCLUSTERS].fill(id, &iEvent);
72  }
73 
74  LocalPoint clustlp = topol.localPosition(MeasurementPoint(cluster.x(), cluster.y()));
75  GlobalPoint clustgp = theGeomDet->surface().toGlobal(clustlp);
76  histo[POSITION_B ].fill(clustgp.z(), clustgp.phi(), id, &iEvent);
77  histo[POSITION_F ].fill(clustgp.x(), clustgp.y(), id, &iEvent);
78  histo[POSITION_XZ].fill(clustgp.x(), clustgp.z(), id, &iEvent);
79  histo[POSITION_YZ].fill(clustgp.y(), clustgp.z(), id, &iEvent);
80  histo[SIZE_VS_ETA].fill(clustgp.eta(), cluster.sizeY(), id, &iEvent);
81 
82  }
83  }
84 
85 
86  if (hasClusters) histo[EVENTRATE].fill(DetId(0), &iEvent);
87 
88  histo[NCLUSTERS].executePerEventHarvesting(&iEvent);
89  histo[READOUT_NCLUSTERS].executePerEventHarvesting(&iEvent);
90  histo[NCLUSTERSINCLUSIVE].executePerEventHarvesting(&iEvent);
91 
92 }
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
int iEvent
Definition: GenABIO.cc:230
T z() const
Definition: PV3DBase.h:64
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripSrcToken_
bool isValid() const
Definition: HandleBase.h:74
Definition: DetId.h:18
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:55
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
std::vector< HistogramManager > histo
T eta() const
Definition: PV3DBase.h:76
Pixel cluster – collection of neighboring pixels above threshold.
col
Definition: cuy.py:1008
const TrackerGeomDet * idToDet(DetId) const override
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelSrcToken_
bool isValid() const
Definition: ESHandle.h:47
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > SiPixelPhase1Clusters::pixelSrcToken_
private

Definition at line 45 of file SiPixelPhase1Clusters.h.

Referenced by analyze(), and SiPixelPhase1Clusters().

edm::EDGetTokenT<edmNew::DetSetVector<SiStripCluster> > SiPixelPhase1Clusters::stripSrcToken_
private

Definition at line 46 of file SiPixelPhase1Clusters.h.

Referenced by analyze(), and SiPixelPhase1Clusters().