CMS 3D CMS Logo

Public Member Functions

GEMMaskReClusterizer Class Reference

#include <GEMMaskReClusterizer.h>

List of all members.

Public Member Functions

GEMClusterContainer doAction (const GEMDetId &, GEMClusterContainer &, const EtaPartitionMask &)
 GEMMaskReClusterizer ()
int get (const EtaPartitionMask &, int)
 ~GEMMaskReClusterizer ()

Detailed Description

GEMMaskReClusterizer

Date:
2013/04/24 17:16:34
Revision:
1.1
Author:
J.C. Sanabria -- UniAndes, Bogota

Definition at line 19 of file GEMMaskReClusterizer.h.


Constructor & Destructor Documentation

GEMMaskReClusterizer::GEMMaskReClusterizer ( )

GEMMaskReClusterizer

Date:
2013/04/24 17:16:34
Revision:
1.1
Author:
J.C. Sanabria -- UniAndes, Bogota

Definition at line 12 of file GEMMaskReClusterizer.cc.

{

}
GEMMaskReClusterizer::~GEMMaskReClusterizer ( )

Definition at line 18 of file GEMMaskReClusterizer.cc.

{

}

Member Function Documentation

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

Definition at line 24 of file GEMMaskReClusterizer.cc.

References GEMCluster::bx(), GEMCluster::firstStrip(), i, j, and GEMCluster::lastStrip().

Referenced by GEMRecHitBaseAlgo::reconstruct().

{

  GEMClusterContainer finClusters;
  GEMCluster prev;

  unsigned int j = 0;


  for (GEMClusterContainer::const_iterator i = initClusters.begin(); i != initClusters.end(); i++ ) {

    GEMCluster 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()) ) {

      GEMCluster 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 GEMMaskReClusterizer::get ( const EtaPartitionMask mask,
int  strip 
)

Definition at line 83 of file GEMMaskReClusterizer.cc.

{

  if ( mask.test(strip-1) ) return 1;
  else return 0;

}