CMS 3D CMS Logo

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

#include <RPCClusterizer.h>

Public Member Functions

RPCClusterContainer doAction (const RPCDigiCollection::Range &digiRange)
 
 RPCClusterizer ()
 
 ~RPCClusterizer ()
 

Private Member Functions

RPCClusterContainer doActualAction (RPCClusterContainer &initialclusters)
 

Private Attributes

RPCClusterContainer cls
 

Detailed Description

Author
M. Maggi – INFN Bari

Definition at line 11 of file RPCClusterizer.h.

Constructor & Destructor Documentation

RPCClusterizer::RPCClusterizer ( )

Definition at line 6 of file RPCClusterizer.cc.

7 {
8 }
RPCClusterizer::~RPCClusterizer ( )

Definition at line 10 of file RPCClusterizer.cc.

11 {
12 }

Member Function Documentation

RPCClusterContainer RPCClusterizer::doAction ( const RPCDigiCollection::Range digiRange)

Definition at line 15 of file RPCClusterizer.cc.

References GetRecoTauVFromDQM_MC_cff::cl, cls, and doActualAction().

Referenced by RPCRecHitBaseAlgo::reconstruct().

15  {
17  for (RPCDigiCollection::const_iterator digi = digiRange.first;
18  digi != digiRange.second;
19  digi++) {
20  RPCCluster cl(digi->strip(),digi->strip(),digi->bx());
21  cls.insert(cl);
22  }
23  RPCClusterContainer clsNew =this->doActualAction(cls);
24  return clsNew;
25 }
RPCClusterContainer doActualAction(RPCClusterContainer &initialclusters)
RPCClusterContainer cls
std::vector< RPCDigi >::const_iterator const_iterator
std::set< RPCCluster > RPCClusterContainer
RPCClusterContainer RPCClusterizer::doActualAction ( RPCClusterContainer initialclusters)
private

Definition at line 28 of file RPCClusterizer.cc.

References GetRecoTauVFromDQM_MC_cff::cl, i, RPCCluster::isAdjacent(), j, and RPCCluster::merge().

Referenced by doAction().

28  {
29 
30  RPCClusterContainer finalCluster;
31  RPCCluster prev;
32 
33  unsigned int j = 0;
34  for(RPCClusterContainer::const_iterator i=initialclusters.begin();
35  i != initialclusters.end(); i++){
36  RPCCluster cl = *i;
37 
38  if(i==initialclusters.begin()){
39  prev = cl;
40  j++;
41  if(j == initialclusters.size()){
42  finalCluster.insert(prev);
43  }
44  else if(j < initialclusters.size()){
45  continue;
46  }
47  }
48 
49  if(prev.isAdjacent(cl)) {
50  prev.merge(cl);
51  j++;
52  if(j == initialclusters.size()){
53  finalCluster.insert(prev);
54  }
55  }
56  else {
57  j++;
58  if(j < initialclusters.size()){
59  finalCluster.insert(prev);
60  prev = cl;
61  }
62  if(j == initialclusters.size()){
63  finalCluster.insert(prev);
64  finalCluster.insert(cl);
65  }
66  }
67  }
68 
69  return finalCluster;
70 }
int i
Definition: DBlmapReader.cc:9
void merge(const RPCCluster &cl)
Definition: RPCCluster.cc:50
int j
Definition: DBlmapReader.cc:9
std::set< RPCCluster > RPCClusterContainer
bool isAdjacent(const RPCCluster &cl) const
Definition: RPCCluster.cc:44

Member Data Documentation

RPCClusterContainer RPCClusterizer::cls
private

Definition at line 21 of file RPCClusterizer.h.

Referenced by doAction().