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 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) 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 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 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, SiPixelPhase1Base::checktrigger(), cuy::col, SiPixelPhase1Base::DCS, 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  {
30  if( !checktrigger(iEvent,iSetup,DCS) ) return;
31 
33  iEvent.getByToken(pixelSrcToken_, inputPixel);
34  if (!inputPixel.isValid()) return;
35 
37  iEvent.getByToken(stripSrcToken_, inputStrip);
38  if (inputStrip.isValid())
39  {
40  if (!inputStrip.product()->data().empty())
41  {
42  histo[PIXEL_TO_STRIP_RATIO].fill((double)inputPixel.product()->data().size() / (double) inputStrip.product()->data().size(), DetId(0), &iEvent);
43  }
44  }
45 
46  bool hasClusters=false;
47 
49  iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
50  assert(tracker.isValid());
51 
53  for (it = inputPixel->begin(); it != inputPixel->end(); ++it) {
54  auto id = DetId(it->detId());
55 
56  const PixelGeomDetUnit* theGeomDet = dynamic_cast<const PixelGeomDetUnit*> ( tracker->idToDet(id) );
57  const PixelTopology& topol = theGeomDet->specificTopology();
58 
59  for(SiPixelCluster const& cluster : *it) {
60  int row = cluster.x()-0.5, col = cluster.y()-0.5;
61  histo[READOUT_CHARGE].fill(double(cluster.charge()), id, &iEvent, col, row);
62  histo[CHARGE].fill(double(cluster.charge()), id, &iEvent, col, row);
63  histo[SIZE ].fill(double(cluster.size() ), id, &iEvent, col, row);
64  histo[SIZEX ].fill(double(cluster.sizeX() ), id, &iEvent, col, row);
65  histo[SIZEY ].fill(double(cluster.sizeY() ), id, &iEvent, col, row);
66  histo[NCLUSTERS].fill(id, &iEvent, col, row);
67  histo[NCLUSTERSINCLUSIVE].fill(id, &iEvent);
68  hasClusters=true;
69  if (cluster.size()>1){
70  histo[READOUT_NCLUSTERS].fill(id, &iEvent);
71  }
72 
73  LocalPoint clustlp = topol.localPosition(MeasurementPoint(cluster.x(), cluster.y()));
74  GlobalPoint clustgp = theGeomDet->surface().toGlobal(clustlp);
75  histo[POSITION_B ].fill(clustgp.z(), clustgp.phi(), id, &iEvent);
76  histo[POSITION_F ].fill(clustgp.x(), clustgp.y(), id, &iEvent);
77  histo[POSITION_XZ].fill(clustgp.x(), clustgp.z(), id, &iEvent);
78  histo[POSITION_YZ].fill(clustgp.y(), clustgp.z(), id, &iEvent);
79  histo[SIZE_VS_ETA].fill(clustgp.eta(), cluster.sizeY(), id, &iEvent);
80 
81  }
82  }
83 
84 
85  if (hasClusters) histo[EVENTRATE].fill(DetId(0), &iEvent);
86 
87  histo[NCLUSTERS].executePerEventHarvesting(&iEvent);
88  histo[READOUT_NCLUSTERS].executePerEventHarvesting(&iEvent);
89  histo[NCLUSTERSINCLUSIVE].executePerEventHarvesting(&iEvent);
90 
91 }
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
bool checktrigger(const edm::Event &iEvent, const edm::EventSetup &iSetup, const unsigned trgidx) const
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:58
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 39 of file SiPixelPhase1Clusters.h.

Referenced by analyze(), and SiPixelPhase1Clusters().

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

Definition at line 40 of file SiPixelPhase1Clusters.h.

Referenced by analyze(), and SiPixelPhase1Clusters().