#include <RPCClusterizer.h>
Public Member Functions | |
RPCClusterContainer | doAction (const RPCDigiCollection::Range &digiRange) |
RPCClusterizer () | |
~RPCClusterizer () | |
Private Member Functions | |
RPCClusterContainer | doActualAction (RPCClusterContainer &initialclusters) |
Private Attributes | |
RPCClusterContainer | cls |
RPCClusterizer::RPCClusterizer | ( | ) |
Definition at line 6 of file RPCClusterizer.cc.
{ }
RPCClusterizer::~RPCClusterizer | ( | ) |
Definition at line 10 of file RPCClusterizer.cc.
{ }
RPCClusterContainer RPCClusterizer::doAction | ( | const RPCDigiCollection::Range & | digiRange | ) |
Definition at line 15 of file RPCClusterizer.cc.
References cl, cls, and doActualAction().
Referenced by RPCRecHitBaseAlgo::reconstruct().
{ RPCClusterContainer cls; for (RPCDigiCollection::const_iterator digi = digiRange.first; digi != digiRange.second; digi++) { RPCCluster cl(digi->strip(),digi->strip(),digi->bx()); cls.insert(cl); } RPCClusterContainer clsNew =this->doActualAction(cls); return clsNew; }
RPCClusterContainer RPCClusterizer::doActualAction | ( | RPCClusterContainer & | initialclusters | ) | [private] |
Definition at line 28 of file RPCClusterizer.cc.
References cl, i, RPCCluster::isAdjacent(), j, and RPCCluster::merge().
Referenced by doAction().
{ RPCClusterContainer finalCluster; RPCCluster prev; unsigned int j = 0; for(RPCClusterContainer::const_iterator i=initialclusters.begin(); i != initialclusters.end(); i++){ RPCCluster cl = *i; if(i==initialclusters.begin()){ prev = cl; j++; if(j == initialclusters.size()){ finalCluster.insert(prev); } else if(j < initialclusters.size()){ continue; } } if(prev.isAdjacent(cl)) { prev.merge(cl); j++; if(j == initialclusters.size()){ finalCluster.insert(prev); } } else { j++; if(j < initialclusters.size()){ finalCluster.insert(prev); prev = cl; } if(j == initialclusters.size()){ finalCluster.insert(prev); finalCluster.insert(cl); } } } return finalCluster; }
RPCClusterContainer RPCClusterizer::cls [private] |
Definition at line 23 of file RPCClusterizer.h.
Referenced by doAction().