CMS 3D CMS Logo

Public Member Functions | Private Attributes

GEMCluster Class Reference

#include <GEMCluster.h>

List of all members.

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 4 of file GEMCluster.h.


Constructor & Destructor Documentation

GEMCluster::GEMCluster ( )

Definition at line 7 of file GEMCluster.cc.

                       : fstrip(0), lstrip(0), bunchx(0)
{
}
GEMCluster::GEMCluster ( int  fs,
int  ls,
int  bx 
)

Definition at line 11 of file GEMCluster.cc.

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

Definition at line 16 of file GEMCluster.cc.

{
}

Member Function Documentation

int GEMCluster::bx ( ) const

Definition at line 39 of file GEMCluster.cc.

References bunchx.

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

{
  return bunchx;
}
int GEMCluster::clusterSize ( ) const

Definition at line 33 of file GEMCluster.cc.

References fstrip, and lstrip.

Referenced by operator==().

{
  return -(fstrip-lstrip)+1;
}
int GEMCluster::firstStrip ( ) const
bool GEMCluster::isAdjacent ( const GEMCluster cl) const

Definition at line 44 of file GEMCluster.cc.

References bx(), and firstStrip().

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

                                                     {
  
    return ((cl.firstStrip() == this->firstStrip()-1) &&
            (cl.bx() == this->bx()));
}
int GEMCluster::lastStrip ( ) const

Definition at line 27 of file GEMCluster.cc.

References lstrip.

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

{
  return lstrip;
}
void GEMCluster::merge ( const GEMCluster cl)

Definition at line 50 of file GEMCluster.cc.

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

Referenced by GEMClusterizer::doActualAction().

                                          {
  
   if(this->isAdjacent(cl))
     { 
       fstrip = cl.firstStrip();  
     }
}
bool GEMCluster::operator< ( const GEMCluster cl) const

Definition at line 58 of file GEMCluster.cc.

References bx(), and firstStrip().

                                                    {
  
if(cl.bx() == this->bx())
 return cl.firstStrip()<this->firstStrip();
else 
 return cl.bx()<this->bx();
}
bool GEMCluster::operator== ( const GEMCluster cl) const

Definition at line 67 of file GEMCluster.cc.

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

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

Member Data Documentation

int16_t GEMCluster::bunchx [private]

Definition at line 24 of file GEMCluster.h.

Referenced by bx().

uint16_t GEMCluster::fstrip [private]

Definition at line 22 of file GEMCluster.h.

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

uint16_t GEMCluster::lstrip [private]

Definition at line 23 of file GEMCluster.h.

Referenced by clusterSize(), and lastStrip().