CMS 3D CMS Logo

Phase2TrackerClusterizerSequentialAlgorithm.h
Go to the documentation of this file.
1 #ifndef RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizerSequentialAlgorithm_h
2 #define RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizerSequentialAlgorithm_h
3 
8 
9 
11  public:
13 };
14 
15 void
17  if (digis.empty()) return;
18  auto di = digis.begin();
19  unsigned int sizeCluster=1;
20  Phase2TrackerDigi firstDigi = *di;
21  bool HIPbit = firstDigi.overThreshold();
22  auto previous = firstDigi;
23  ++di;
24  for (;di!=digis.end(); ++di) {
25  auto digi = *di;
26 #ifdef VERIFY_PH2_TK_CLUS
27  if ( !(previous<digi)) std::cout << "not ordered " << previous << ' ' << digi << std::endl;
28 #endif
29  if (digi-previous == 1) {
30  HIPbit |= digi.overThreshold();
31  ++sizeCluster;
32  } else {
33  clusters.push_back(Phase2TrackerCluster1D(firstDigi, sizeCluster, HIPbit));
34  firstDigi=digi;
35  HIPbit = digi.overThreshold();
36  sizeCluster=1;
37  }
38  previous=digi;
39  }
40  clusters.push_back(Phase2TrackerCluster1D(firstDigi, sizeCluster, HIPbit));
41 
42 }
43 
44 
45 #endif
46 
iterator end()
Definition: DetSet.h:60
void push_back(data_type const &d)
bool overThreshold() const
void clusterizeDetUnit(const edm::DetSet< Phase2TrackerDigi > &, Phase2TrackerCluster1DCollectionNew::FastFiller &) const
iterator begin()
Definition: DetSet.h:59
bool empty() const
Definition: DetSet.h:64