CMS 3D CMS Logo

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

#include <GEMMaskReClusterizer.h>

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.

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

Definition at line 18 of file GEMMaskReClusterizer.cc.

19 {
20 
21 }

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

27 {
28 
29  GEMClusterContainer finClusters;
30  GEMCluster prev;
31 
32  unsigned int j = 0;
33 
34 
35  for (GEMClusterContainer::const_iterator i = initClusters.begin(); i != initClusters.end(); i++ ) {
36 
37  GEMCluster 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  GEMCluster 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
std::set< GEMCluster > GEMClusterContainer
int j
Definition: DBlmapReader.cc:9
int lastStrip() const
Definition: GEMCluster.cc:27
int bx() const
Definition: GEMCluster.cc:39
int firstStrip() const
Definition: GEMCluster.cc:21
int GEMMaskReClusterizer::get ( const EtaPartitionMask mask,
int  strip 
)