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

Date:
2008/10/14 09:18:20
Revision:
1.1
Author
J.C. Sanabria – UniAndes, Bogota

Definition at line 19 of file RPCMaskReClusterizer.h.

Constructor & Destructor Documentation

RPCMaskReClusterizer::RPCMaskReClusterizer ( )

RPCMaskReClusterizer

Date:
2008/08/12 16:06:39
Revision:
1.0
Author
J.C. Sanabria – UniAndes, Bogota

Definition at line 12 of file RPCMaskReClusterizer.cc.

13 {
14 
15 }
RPCMaskReClusterizer::~RPCMaskReClusterizer ( )

Definition at line 18 of file RPCMaskReClusterizer.cc.

19 {
20 
21 }

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().

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

Definition at line 83 of file RPCMaskReClusterizer.cc.

Referenced by Options.Options::__getitem__().

84 {
85 
86  if ( mask.test(strip-1) ) return 1;
87  else return 0;
88 
89 }
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16