CMS 3D CMS Logo

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

#include <GEMCluster.h>

Public Member Functions

int bx () const
 
int clusterSize () const
 
int firstStrip () const
 
 GEMCluster ()
 
 GEMCluster (int fs, int ls, int bx)
 
bool isAdjacent (const GEMCluster &cl) const
 
int lastStrip () const
 
void merge (const GEMCluster &cl)
 
bool operator< (const GEMCluster &cl) const
 
bool operator== (const GEMCluster &cl) const
 
 ~GEMCluster ()
 

Private Attributes

int16_t bunchx
 
uint16_t fstrip
 
uint16_t lstrip
 

Detailed Description

Definition at line 5 of file GEMCluster.h.

Constructor & Destructor Documentation

◆ GEMCluster() [1/2]

GEMCluster::GEMCluster ( )

Definition at line 7 of file GEMCluster.cc.

7 : fstrip(0), lstrip(0), bunchx(0) {}

◆ GEMCluster() [2/2]

GEMCluster::GEMCluster ( int  fs,
int  ls,
int  bx 
)

Definition at line 9 of file GEMCluster.cc.

9 : fstrip(fs), lstrip(ls), bunchx(bx) {}

◆ ~GEMCluster()

GEMCluster::~GEMCluster ( )

Definition at line 11 of file GEMCluster.cc.

11 {}

Member Function Documentation

◆ bx()

int GEMCluster::bx ( ) const

Definition at line 19 of file GEMCluster.cc.

19 { return bunchx; }

References bunchx.

Referenced by GEMMaskReClusterizer::doAction(), isAdjacent(), operator<(), and operator==().

◆ clusterSize()

int GEMCluster::clusterSize ( ) const

Definition at line 17 of file GEMCluster.cc.

17 { return -(fstrip - lstrip) + 1; }

References fstrip, and lstrip.

Referenced by GEMRecHitStandardAlgo::compute(), and operator==().

◆ firstStrip()

int GEMCluster::firstStrip ( ) const

Definition at line 13 of file GEMCluster.cc.

13 { return fstrip; }

References fstrip.

Referenced by GEMRecHitStandardAlgo::compute(), GEMMaskReClusterizer::doAction(), isAdjacent(), operator<(), and operator==().

◆ isAdjacent()

bool GEMCluster::isAdjacent ( const GEMCluster cl) const

Definition at line 21 of file GEMCluster.cc.

21  {
22  return ((cl.firstStrip() == this->firstStrip() - 1) && (cl.bx() == this->bx()));
23 }

References bx(), GetRecoTauVFromDQM_MC_cff::cl, and firstStrip().

Referenced by GEMClusterizer::doAction(), and merge().

◆ lastStrip()

int GEMCluster::lastStrip ( ) const

Definition at line 15 of file GEMCluster.cc.

15 { return lstrip; }

References lstrip.

Referenced by GEMRecHitStandardAlgo::compute(), and GEMMaskReClusterizer::doAction().

◆ merge()

void GEMCluster::merge ( const GEMCluster cl)

Definition at line 25 of file GEMCluster.cc.

25  {
26  if (this->isAdjacent(cl)) {
27  fstrip = cl.firstStrip();
28  }
29 }

References GetRecoTauVFromDQM_MC_cff::cl, fstrip, and isAdjacent().

Referenced by GEMClusterizer::doAction().

◆ operator<()

bool GEMCluster::operator< ( const GEMCluster cl) const

Definition at line 31 of file GEMCluster.cc.

31  {
32  if (cl.bx() == this->bx())
33  return cl.firstStrip() < this->firstStrip();
34  else
35  return cl.bx() < this->bx();
36 }

References bx(), GetRecoTauVFromDQM_MC_cff::cl, and firstStrip().

◆ operator==()

bool GEMCluster::operator== ( const GEMCluster cl) const

Definition at line 38 of file GEMCluster.cc.

38  {
39  return ((this->clusterSize() == cl.clusterSize()) && (this->bx() == cl.bx()) &&
40  (this->firstStrip() == cl.firstStrip()));
41 }

References bx(), clusterSize(), and firstStrip().

Member Data Documentation

◆ bunchx

int16_t GEMCluster::bunchx
private

Definition at line 25 of file GEMCluster.h.

Referenced by bx().

◆ fstrip

uint16_t GEMCluster::fstrip
private

Definition at line 23 of file GEMCluster.h.

Referenced by clusterSize(), firstStrip(), and merge().

◆ lstrip

uint16_t GEMCluster::lstrip
private

Definition at line 24 of file GEMCluster.h.

Referenced by clusterSize(), and lastStrip().

GEMCluster::clusterSize
int clusterSize() const
Definition: GEMCluster.cc:17
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
GEMCluster::lstrip
uint16_t lstrip
Definition: GEMCluster.h:24
GEMCluster::firstStrip
int firstStrip() const
Definition: GEMCluster.cc:13
GEMCluster::fstrip
uint16_t fstrip
Definition: GEMCluster.h:23
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
GEMCluster::bunchx
int16_t bunchx
Definition: GEMCluster.h:25
GEMCluster::isAdjacent
bool isAdjacent(const GEMCluster &cl) const
Definition: GEMCluster.cc:21
GEMCluster::bx
int bx() const
Definition: GEMCluster.cc:19