CMS 3D CMS Logo

Public Member Functions | Private Attributes

RPCCluster Class Reference

#include <RPCCluster.h>

List of all members.

Public Member Functions

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

Private Attributes

int16_t bunchx
uint16_t fstrip
uint16_t lstrip

Detailed Description

Definition at line 4 of file RPCCluster.h.


Constructor & Destructor Documentation

RPCCluster::RPCCluster ( )

Definition at line 7 of file RPCCluster.cc.

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

Definition at line 11 of file RPCCluster.cc.

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

Definition at line 16 of file RPCCluster.cc.

{
}

Member Function Documentation

int RPCCluster::bx ( ) const

Definition at line 39 of file RPCCluster.cc.

References bunchx.

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

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

Definition at line 33 of file RPCCluster.cc.

References fstrip, and lstrip.

Referenced by operator==().

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

Definition at line 44 of file RPCCluster.cc.

References bx(), and firstStrip().

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

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

Definition at line 27 of file RPCCluster.cc.

References lstrip.

Referenced by RPCRecHitStandardAlgo::compute(), and RPCMaskReClusterizer::doAction().

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

Definition at line 50 of file RPCCluster.cc.

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

Referenced by RPCClusterizer::doActualAction().

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

Definition at line 58 of file RPCCluster.cc.

References bx(), and firstStrip().

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

Definition at line 67 of file RPCCluster.cc.

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

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

Member Data Documentation

int16_t RPCCluster::bunchx [private]

Definition at line 24 of file RPCCluster.h.

Referenced by bx().

uint16_t RPCCluster::fstrip [private]

Definition at line 22 of file RPCCluster.h.

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

uint16_t RPCCluster::lstrip [private]

Definition at line 23 of file RPCCluster.h.

Referenced by clusterSize(), and lastStrip().