CMS 3D CMS Logo

List of all members | Public Member Functions
RPCMaskReClusterizer Class Reference

#include <RPCMaskReClusterizer.h>

Public Member Functions

RPCClusterContainer doAction (const RPCDetId &id, RPCClusterContainer &initClusters, const RollMask &mask) const
 
bool get (const RollMask &mask, int strip) const
 
 RPCMaskReClusterizer ()
 
 ~RPCMaskReClusterizer ()
 

Detailed Description

RPCMaskReClusterizer

Author
J.C. Sanabria – UniAndes, Bogota

Definition at line 12 of file RPCMaskReClusterizer.h.

Constructor & Destructor Documentation

RPCMaskReClusterizer::RPCMaskReClusterizer ( )
inline

Definition at line 15 of file RPCMaskReClusterizer.h.

15 {};
RPCMaskReClusterizer::~RPCMaskReClusterizer ( )
inline

Member Function Documentation

RPCClusterContainer RPCMaskReClusterizer::doAction ( const RPCDetId id,
RPCClusterContainer initClusters,
const RollMask mask 
) const

RPCMaskReClusterizer

Author
J.C. Sanabria – UniAndes, Bogota

Definition at line 9 of file RPCMaskReClusterizer.cc.

References RPCCluster::bx(), haddnano::cl, RPCCluster::firstStrip(), RPCCluster::lastStrip(), and GetRecoTauVFromDQM_MC_cff::next.

Referenced by RPCRecHitBaseAlgo::reconstruct(), and ~RPCMaskReClusterizer().

12 {
13  RPCClusterContainer finClusters;
14  if ( initClusters.empty() ) return finClusters;
15 
16  RPCCluster prev = *initClusters.begin();
17  for ( auto cl = std::next(initClusters.begin()); cl != initClusters.end(); ++cl ) {
18  // Merge this cluster if it is adjacent by 1 masked strip
19  // Note that the RPCClusterContainer collection is sorted in DECREASING ORDER of strip #
20  // So the prev. cluster is placed after the current cluster (check the < operator of RPCCluster carefully)
21  if ( (prev.firstStrip()-cl->lastStrip()) == 2 and
22  this->get(mask, cl->lastStrip()+1) and prev.bx() == cl->bx() ) {
23  RPCCluster merged(cl->firstStrip(), prev.lastStrip(), cl->bx());
24  prev = merged;
25  }
26  else {
27  finClusters.insert(prev);
28  prev = *cl;
29  }
30  }
31 
32  // Finalize by putting the last cluster to the collection
33  finClusters.insert(prev);
34 
35  return finClusters;
36 
37 }
int bx() const
Definition: RPCCluster.cc:25
int lastStrip() const
Definition: RPCCluster.cc:23
int firstStrip() const
Definition: RPCCluster.cc:22
std::set< RPCCluster > RPCClusterContainer
bool RPCMaskReClusterizer::get ( const RollMask mask,
int  strip 
) const