CMS 3D CMS Logo

Public Member Functions

RPCMaskReClusterizer Class Reference

#include <RPCMaskReClusterizer.h>

List of all members.

Public Member Functions

RPCClusterContainer doAction (const RPCDetId &, RPCClusterContainer &, const RollMask &)
int get (const RollMask &, int)
 RPCMaskReClusterizer ()
 ~RPCMaskReClusterizer ()

Detailed Description

RPCMaskReClusterizer

Date:
2008/12/04 17:11:11
Revision:
1.2
Author:
J.C. Sanabria -- UniAndes, Bogota

Definition at line 19 of file RPCMaskReClusterizer.h.


Constructor & Destructor Documentation

RPCMaskReClusterizer::RPCMaskReClusterizer ( )

RPCMaskReClusterizer

Date:
2008/10/14 08:52:31
Revision:
1.1
Author:
J.C. Sanabria -- UniAndes, Bogota

Definition at line 12 of file RPCMaskReClusterizer.cc.

{

}
RPCMaskReClusterizer::~RPCMaskReClusterizer ( )

Definition at line 18 of file RPCMaskReClusterizer.cc.

{

}

Member Function Documentation

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;

}