CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
RPCMaskReClusterizer Class Reference

#include <RPCMaskReClusterizer.h>

Public Member Functions

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

Detailed Description

RPCMaskReClusterizer

Author
J.C. Sanabria – UniAndes, Bogota

Definition at line 17 of file RPCMaskReClusterizer.h.

Constructor & Destructor Documentation

RPCMaskReClusterizer::RPCMaskReClusterizer ( )

RPCMaskReClusterizer

Author
J.C. Sanabria – UniAndes, Bogota

Definition at line 10 of file RPCMaskReClusterizer.cc.

11 {
12 
13 }
RPCMaskReClusterizer::~RPCMaskReClusterizer ( )

Definition at line 16 of file RPCMaskReClusterizer.cc.

17 {
18 
19 }

Member Function Documentation

RPCClusterContainer RPCMaskReClusterizer::doAction ( const RPCDetId id,
RPCClusterContainer initClusters,
const RollMask mask 
)

Definition at line 22 of file RPCMaskReClusterizer.cc.

References RPCCluster::bx(), GetRecoTauVFromDQM_MC_cff::cl, RPCCluster::firstStrip(), i, j, and RPCCluster::lastStrip().

Referenced by RPCRecHitBaseAlgo::reconstruct().

25 {
26 
27  RPCClusterContainer finClusters;
28  RPCCluster prev;
29 
30  unsigned int j = 0;
31 
32 
33  for (RPCClusterContainer::const_iterator i = initClusters.begin(); i != initClusters.end(); i++ ) {
34 
35  RPCCluster cl = *i;
36 
37  if ( i == initClusters.begin() ) {
38  prev = cl;
39  j++;
40  if ( j == initClusters.size() ) {
41  finClusters.insert(prev);
42  }
43  else if ( j < initClusters.size() ) {
44  continue;
45  }
46  }
47 
48 
49  if ( ((prev.firstStrip()-cl.lastStrip()) == 2 && this->get(mask,(cl.lastStrip()+1)))
50  && (cl.bx() == prev.bx()) ) {
51 
52  RPCCluster merged(cl.firstStrip(),prev.lastStrip(),cl.bx());
53  prev = merged;
54  j++;
55  if ( j == initClusters.size() ) {
56  finClusters.insert(prev);
57  }
58  }
59 
60  else {
61 
62  j++;
63  if ( j < initClusters.size() ) {
64  finClusters.insert(prev);
65  prev = cl;
66  }
67  if ( j == initClusters.size() ) {
68  finClusters.insert(prev);
69  finClusters.insert(cl);
70  }
71  }
72 
73  }
74 
75  return finClusters;
76 
77 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
int bx() const
Definition: RPCCluster.cc:39
int lastStrip() const
Definition: RPCCluster.cc:27
int firstStrip() const
Definition: RPCCluster.cc:21
std::set< RPCCluster > RPCClusterContainer
int RPCMaskReClusterizer::get ( const RollMask mask,
int  strip 
)