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::GEMCluster ( )

Definition at line 7 of file GEMCluster.cc.

7 : fstrip(0), lstrip(0), bunchx(0) {}
int16_t bunchx
Definition: GEMCluster.h:25
uint16_t lstrip
Definition: GEMCluster.h:24
uint16_t fstrip
Definition: GEMCluster.h:23
GEMCluster::GEMCluster ( int  fs,
int  ls,
int  bx 
)

Definition at line 9 of file GEMCluster.cc.

9 : fstrip(fs), lstrip(ls), bunchx(bx) {}
int16_t bunchx
Definition: GEMCluster.h:25
uint16_t lstrip
Definition: GEMCluster.h:24
def ls(path, rec=False)
Definition: eostools.py:349
int bx() const
Definition: GEMCluster.cc:19
uint16_t fstrip
Definition: GEMCluster.h:23
GEMCluster::~GEMCluster ( )

Definition at line 11 of file GEMCluster.cc.

11 {}

Member Function Documentation

int GEMCluster::bx ( ) const

Definition at line 19 of file GEMCluster.cc.

References bunchx.

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

19 { return bunchx; }
int16_t bunchx
Definition: GEMCluster.h:25
int GEMCluster::clusterSize ( ) const

Definition at line 17 of file GEMCluster.cc.

References fstrip, and lstrip.

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

17 { return -(fstrip - lstrip) + 1; }
uint16_t lstrip
Definition: GEMCluster.h:24
uint16_t fstrip
Definition: GEMCluster.h:23
int GEMCluster::firstStrip ( ) const

Definition at line 13 of file GEMCluster.cc.

References fstrip.

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

13 { return fstrip; }
uint16_t fstrip
Definition: GEMCluster.h:23
bool GEMCluster::isAdjacent ( const GEMCluster cl) const

Definition at line 21 of file GEMCluster.cc.

References bx(), and firstStrip().

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

21  {
22  return ((cl.firstStrip() == this->firstStrip() - 1) && (cl.bx() == this->bx()));
23 }
int bx() const
Definition: GEMCluster.cc:19
int firstStrip() const
Definition: GEMCluster.cc:13
int GEMCluster::lastStrip ( ) const

Definition at line 15 of file GEMCluster.cc.

References lstrip.

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

15 { return lstrip; }
uint16_t lstrip
Definition: GEMCluster.h:24
void GEMCluster::merge ( const GEMCluster cl)

Definition at line 25 of file GEMCluster.cc.

References firstStrip(), fstrip, and isAdjacent().

Referenced by GEMClusterizer::doAction().

25  {
26  if (this->isAdjacent(cl)) {
27  fstrip = cl.firstStrip();
28  }
29 }
int firstStrip() const
Definition: GEMCluster.cc:13
uint16_t fstrip
Definition: GEMCluster.h:23
bool isAdjacent(const GEMCluster &cl) const
Definition: GEMCluster.cc:21
bool GEMCluster::operator< ( const GEMCluster cl) const

Definition at line 31 of file GEMCluster.cc.

References bx(), and firstStrip().

31  {
32  if (cl.bx() == this->bx())
33  return cl.firstStrip() < this->firstStrip();
34  else
35  return cl.bx() < this->bx();
36 }
int bx() const
Definition: GEMCluster.cc:19
int firstStrip() const
Definition: GEMCluster.cc:13
bool GEMCluster::operator== ( const GEMCluster cl) const

Definition at line 38 of file GEMCluster.cc.

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

38  {
39  return ((this->clusterSize() == cl.clusterSize()) && (this->bx() == cl.bx()) &&
40  (this->firstStrip() == cl.firstStrip()));
41 }
int bx() const
Definition: GEMCluster.cc:19
int firstStrip() const
Definition: GEMCluster.cc:13
int clusterSize() const
Definition: GEMCluster.cc:17

Member Data Documentation

int16_t GEMCluster::bunchx
private

Definition at line 25 of file GEMCluster.h.

Referenced by bx().

uint16_t GEMCluster::fstrip
private

Definition at line 23 of file GEMCluster.h.

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

uint16_t GEMCluster::lstrip
private

Definition at line 24 of file GEMCluster.h.

Referenced by clusterSize(), and lastStrip().