CMS 3D CMS Logo

GEMClusterizer.cc
Go to the documentation of this file.
2 
4  GEMClusterContainer initialCluster, finalCluster;
5  // Return empty container for null input
6  if (std::distance(digiRange.second, digiRange.first) == 0)
7  return finalCluster;
8 
9  // Start from single digi recHits
10  for (auto digi = digiRange.first; digi != digiRange.second; ++digi) {
11  if (mask.test(digi->strip()))
12  continue;
13  GEMCluster cl(digi->strip(), digi->strip(), digi->bx());
14  initialCluster.insert(cl);
15  }
16  if (initialCluster.empty())
17  return finalCluster; // Confirm the collection is valid
18 
19  // Start from the first initial cluster
20  GEMCluster prev = *initialCluster.begin();
21 
22  // Loop over the remaining digis
23  // Note that the last one remains as open in this loop
24  for (auto cl = std::next(initialCluster.begin()); cl != initialCluster.end(); ++cl) {
25  if (prev.isAdjacent(*cl)) {
26  // Merged digi to the previous one
27  prev.merge(*cl);
28  } else {
29  // Close the previous cluster and start new cluster
30  finalCluster.insert(prev);
31  prev = *cl;
32  }
33  }
34 
35  // Finalize by adding the last cluster
36  finalCluster.insert(prev);
37 
38  return finalCluster;
39 }
GEMClusterizer.h
GEMCluster::merge
void merge(const GEMCluster &cl)
Definition: GEMCluster.cc:25
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
GEMClusterContainer
std::set< GEMCluster > GEMClusterContainer
Definition: GEMClusterContainer.h:5
EtaPartitionMask
std::bitset< maskSIZE > EtaPartitionMask
Definition: GEMEtaPartitionMask.h:8
GEMClusterizer::doAction
GEMClusterContainer doAction(const GEMDigiCollection::Range &digiRange, const EtaPartitionMask &mask)
Definition: GEMClusterizer.cc:3
GEMCluster
Definition: GEMCluster.h:5
MuonDigiCollection::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
GEMCluster::isAdjacent
bool isAdjacent(const GEMCluster &cl) const
Definition: GEMCluster.cc:21
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7796
GetRecoTauVFromDQM_MC_cff.next
next
Definition: GetRecoTauVFromDQM_MC_cff.py:31