CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::PixelClusterCounts Class Reference

#include <PixelClusterCounts.h>

Public Member Functions

void add (reco::PixelClusterCountsInEvent const &pccInEvent)
 
void eventCounter (unsigned int bxID)
 
void increment (int mD, unsigned int bxID, int count)
 
 PixelClusterCounts ()
 
std::vector< int > const & readCounts () const
 
std::vector< int > const & readEvents () const
 
std::vector< int > const & readModID () const
 

Private Attributes

std::vector< int > m_counts
 
std::vector< int > m_events
 
std::vector< int > m_ModID
 

Detailed Description

Reconstructed PixelClusterCounts object that will contain the moduleID, BX, and counts.

Authors
: Sam Higginbotham shigg.nosp@m.inb@.nosp@m.cern..nosp@m.ch and Chris Palmer capal.nosp@m.mer@.nosp@m.cern..nosp@m.ch

Definition at line 23 of file PixelClusterCounts.h.

Constructor & Destructor Documentation

◆ PixelClusterCounts()

reco::PixelClusterCounts::PixelClusterCounts ( )
inline

Definition at line 25 of file PixelClusterCounts.h.

Member Function Documentation

◆ add()

void reco::PixelClusterCounts::add ( reco::PixelClusterCountsInEvent const &  pccInEvent)
inline

Definition at line 38 of file PixelClusterCounts.h.

38  {
39  std::vector<int> const& countsInEvent = pccInEvent.counts();
40  std::vector<int> const& modIDInEvent = pccInEvent.modID();
41  int bxIDInEvent = pccInEvent.bxID();
42  for (unsigned int i = 0; i < modIDInEvent.size(); i++) {
43  increment(modIDInEvent[i], bxIDInEvent, countsInEvent.at(i));
44  }
45  }

References reco::PixelClusterCountsInEvent::bxID(), reco::PixelClusterCountsInEvent::counts(), mps_fire::i, increment(), and reco::PixelClusterCountsInEvent::modID().

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ eventCounter()

void reco::PixelClusterCounts::eventCounter ( unsigned int  bxID)
inline

Definition at line 36 of file PixelClusterCounts.h.

36 { m_events.at(bxID - 1)++; }

References m_events.

◆ increment()

void reco::PixelClusterCounts::increment ( int  mD,
unsigned int  bxID,
int  count 
)
inline

Definition at line 27 of file PixelClusterCounts.h.

27  {
28  size_t modIndex = std::distance(m_ModID.begin(), std::find(m_ModID.begin(), m_ModID.end(), mD));
29  if (modIndex == m_ModID.size()) {
30  m_ModID.push_back(mD);
31  m_counts.resize(m_counts.size() + LumiConstants::numBX, 0);
32  }
33  m_counts.at(LumiConstants::numBX * modIndex + bxID - 1) += count;
34  }

References submitPVResolutionJobs::count, HLT_FULL_cff::distance, spr::find(), m_counts, m_ModID, and LumiConstants::numBX.

Referenced by add().

◆ readCounts()

std::vector<int> const& reco::PixelClusterCounts::readCounts ( ) const
inline

Definition at line 47 of file PixelClusterCounts.h.

47 { return (m_counts); }

References m_counts.

Referenced by RawPCCProducer::globalEndLuminosityBlockProduce().

◆ readEvents()

std::vector<int> const& reco::PixelClusterCounts::readEvents ( ) const
inline

Definition at line 48 of file PixelClusterCounts.h.

48 { return (m_events); }

References m_events.

Referenced by RawPCCProducer::globalEndLuminosityBlockProduce().

◆ readModID()

std::vector<int> const& reco::PixelClusterCounts::readModID ( ) const
inline

Definition at line 49 of file PixelClusterCounts.h.

49 { return (m_ModID); }

References m_ModID.

Referenced by RawPCCProducer::globalEndLuminosityBlockProduce().

Member Data Documentation

◆ m_counts

std::vector<int> reco::PixelClusterCounts::m_counts
private

Definition at line 52 of file PixelClusterCounts.h.

Referenced by increment(), and readCounts().

◆ m_events

std::vector<int> reco::PixelClusterCounts::m_events
private

Definition at line 53 of file PixelClusterCounts.h.

Referenced by eventCounter(), and readEvents().

◆ m_ModID

std::vector<int> reco::PixelClusterCounts::m_ModID
private

Definition at line 54 of file PixelClusterCounts.h.

Referenced by increment(), and readModID().

mps_fire.i
i
Definition: mps_fire.py:428
LumiConstants::numBX
static const unsigned int numBX
Definition: LumiConstants.h:8
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
reco::PixelClusterCounts::increment
void increment(int mD, unsigned int bxID, int count)
Definition: PixelClusterCounts.h:27
reco::PixelClusterCounts::m_events
std::vector< int > m_events
Definition: PixelClusterCounts.h:53
reco::PixelClusterCounts::m_counts
std::vector< int > m_counts
Definition: PixelClusterCounts.h:52
reco::PixelClusterCounts::m_ModID
std::vector< int > m_ModID
Definition: PixelClusterCounts.h:54
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7733