CMS 3D CMS Logo

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

#include <PixelClusterCountsInEvent.h>

Public Member Functions

unsigned int const & bxID () const
 
std::vector< int > const & counts () const
 
void increment (int mD, int count)
 
std::vector< int > const & modID () const
 
 PixelClusterCountsInEvent ()
 
void setbxID (unsigned int inputbxID)
 

Private Attributes

unsigned int m_bxID
 
std::vector< int > m_counts
 
std::vector< int > m_ModID
 

Detailed Description

Reconstructed PixelClusterCountsInEvent object that will contain the moduleID, bxID, and counts per event.

Authors
: Sam Higginbotham (shigg.nosp@m.inb@.nosp@m.cern..nosp@m.ch), Chris Palmer (capal.nosp@m.mer@.nosp@m.cern..nosp@m.ch), Attila Radl (attil.nosp@m.a.ra.nosp@m.dl@ce.nosp@m.rn.c.nosp@m.h)

Definition at line 15 of file PixelClusterCountsInEvent.h.

Constructor & Destructor Documentation

◆ PixelClusterCountsInEvent()

reco::PixelClusterCountsInEvent::PixelClusterCountsInEvent ( )
inline

Definition at line 17 of file PixelClusterCountsInEvent.h.

Member Function Documentation

◆ bxID()

unsigned int const& reco::PixelClusterCountsInEvent::bxID ( ) const
inline

Definition at line 34 of file PixelClusterCountsInEvent.h.

References m_bxID.

Referenced by reco::PixelClusterCounts::add().

◆ counts()

std::vector<int> const& reco::PixelClusterCountsInEvent::counts ( ) const
inline

Definition at line 30 of file PixelClusterCountsInEvent.h.

References m_counts.

Referenced by reco::PixelClusterCounts::add().

30 { return (m_counts); }

◆ increment()

void reco::PixelClusterCountsInEvent::increment ( int  mD,
int  count 
)
inline

Definition at line 19 of file PixelClusterCountsInEvent.h.

References submitPVResolutionJobs::count, HLT_2022v11_cff::distance, spr::find(), m_counts, and m_ModID.

19  {
20  size_t modIndex = std::distance(m_ModID.begin(), std::find(m_ModID.begin(), m_ModID.end(), mD));
21  if (modIndex == m_ModID.size()) {
22  m_ModID.push_back(mD);
23  m_counts.push_back(0);
24  }
25  m_counts[modIndex] += count;
26  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19

◆ modID()

std::vector<int> const& reco::PixelClusterCountsInEvent::modID ( ) const
inline

Definition at line 32 of file PixelClusterCountsInEvent.h.

References m_ModID.

Referenced by reco::PixelClusterCounts::add().

32 { return (m_ModID); }

◆ setbxID()

void reco::PixelClusterCountsInEvent::setbxID ( unsigned int  inputbxID)
inline

Definition at line 28 of file PixelClusterCountsInEvent.h.

References m_bxID.

28 { m_bxID = inputbxID; }

Member Data Documentation

◆ m_bxID

unsigned int reco::PixelClusterCountsInEvent::m_bxID
private

Definition at line 39 of file PixelClusterCountsInEvent.h.

Referenced by bxID(), and setbxID().

◆ m_counts

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

Definition at line 37 of file PixelClusterCountsInEvent.h.

Referenced by counts(), and increment().

◆ m_ModID

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

Definition at line 38 of file PixelClusterCountsInEvent.h.

Referenced by increment(), and modID().