CMS 3D CMS Logo

List of all members | Public Member Functions
GEMMaskReClusterizer Class Reference

#include <GEMMaskReClusterizer.h>

Public Member Functions

GEMClusterContainer doAction (const GEMDetId &id, GEMClusterContainer &initClusters, const EtaPartitionMask &mask) const
 
 GEMMaskReClusterizer ()
 
bool get (const EtaPartitionMask &mask, int strip) const
 
 ~GEMMaskReClusterizer ()
 

Detailed Description

GEMMaskReClusterizer

Author
J.C. Sanabria – UniAndes, Bogota

Definition at line 11 of file GEMMaskReClusterizer.h.

Constructor & Destructor Documentation

GEMMaskReClusterizer::GEMMaskReClusterizer ( )
inline

Definition at line 14 of file GEMMaskReClusterizer.h.

14 {};
GEMMaskReClusterizer::~GEMMaskReClusterizer ( )
inline

Member Function Documentation

GEMClusterContainer GEMMaskReClusterizer::doAction ( const GEMDetId id,
GEMClusterContainer initClusters,
const EtaPartitionMask mask 
) const

GEMMaskReClusterizer

Author
J.C. Sanabria – UniAndes, Bogota

Definition at line 8 of file GEMMaskReClusterizer.cc.

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

Referenced by GEMRecHitBaseAlgo::reconstruct(), and ~GEMMaskReClusterizer().

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