#include <RPCMaskReClusterizer.h>
Public Member Functions | |
RPCClusterContainer | doAction (const RPCDetId &, RPCClusterContainer &, const RollMask &) |
int | get (const RollMask &, int) |
RPCMaskReClusterizer () | |
~RPCMaskReClusterizer () |
RPCMaskReClusterizer::RPCMaskReClusterizer | ( | ) |
RPCMaskReClusterizer::~RPCMaskReClusterizer | ( | ) |
Definition at line 18 of file RPCMaskReClusterizer.cc.
{ }
RPCClusterContainer RPCMaskReClusterizer::doAction | ( | const RPCDetId & | id, |
RPCClusterContainer & | initClusters, | ||
const RollMask & | mask | ||
) |
Definition at line 24 of file RPCMaskReClusterizer.cc.
References RPCCluster::bx(), RPCCluster::firstStrip(), i, j, and RPCCluster::lastStrip().
Referenced by RPCRecHitBaseAlgo::reconstruct().
{ RPCClusterContainer finClusters; RPCCluster prev; unsigned int j = 0; for (RPCClusterContainer::const_iterator i = initClusters.begin(); i != initClusters.end(); i++ ) { RPCCluster cl = *i; if ( i == initClusters.begin() ) { prev = cl; j++; if ( j == initClusters.size() ) { finClusters.insert(prev); } else if ( j < initClusters.size() ) { continue; } } if ( ((prev.firstStrip()-cl.lastStrip()) == 2 && this->get(mask,(cl.lastStrip()+1))) && (cl.bx() == prev.bx()) ) { RPCCluster merged(cl.firstStrip(),prev.lastStrip(),cl.bx()); prev = merged; j++; if ( j == initClusters.size() ) { finClusters.insert(prev); } } else { j++; if ( j < initClusters.size() ) { finClusters.insert(prev); prev = cl; } if ( j == initClusters.size() ) { finClusters.insert(prev); finClusters.insert(cl); } } } return finClusters; }
int RPCMaskReClusterizer::get | ( | const RollMask & | mask, |
int | strip | ||
) |
Definition at line 83 of file RPCMaskReClusterizer.cc.
{ if ( mask.test(strip-1) ) return 1; else return 0; }