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

Author
J.C. Sanabria – UniAndes, Bogota

Definition at line 17 of file GEMMaskReClusterizer.h.

Constructor & Destructor Documentation

GEMMaskReClusterizer::GEMMaskReClusterizer ( )

GEMMaskReClusterizer

Author
J.C. Sanabria – UniAndes, Bogota

Definition at line 10 of file GEMMaskReClusterizer.cc.

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

Definition at line 16 of file GEMMaskReClusterizer.cc.

17 {
18 
19 }

Member Function Documentation

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

Definition at line 22 of file GEMMaskReClusterizer.cc.

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

Referenced by GEMRecHitBaseAlgo::reconstruct().

25 {
26 
27  GEMClusterContainer finClusters;
28  GEMCluster prev;
29 
30  unsigned int j = 0;
31 
32 
33  for (GEMClusterContainer::const_iterator i = initClusters.begin(); i != initClusters.end(); i++ ) {
34 
35  GEMCluster 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  GEMCluster 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
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 
)