CMS 3D CMS Logo

List of all members | Public Member Functions
Phase2TrackerClusterizerSequentialAlgorithm Class Reference

#include <Phase2TrackerClusterizerSequentialAlgorithm.h>

Public Member Functions

void clusterizeDetUnit (const edm::DetSet< Phase2TrackerDigi > &, Phase2TrackerCluster1DCollectionNew::FastFiller &) const
 

Detailed Description

Definition at line 9 of file Phase2TrackerClusterizerSequentialAlgorithm.h.

Member Function Documentation

void Phase2TrackerClusterizerSequentialAlgorithm::clusterizeDetUnit ( const edm::DetSet< Phase2TrackerDigi > &  digis,
Phase2TrackerCluster1DCollectionNew::FastFiller clusters 
) const
inline

Definition at line 15 of file Phase2TrackerClusterizerSequentialAlgorithm.h.

References edm::DetSet< T >::begin(), gather_cfg::cout, edm::DetSet< T >::empty(), edm::DetSet< T >::end(), Phase2TrackerDigi::overThreshold(), and edmNew::DetSetVector< T >::FastFiller::push_back().

16  {
17  if (digis.empty())
18  return;
19  auto di = digis.begin();
20  unsigned int sizeCluster = 1;
21  Phase2TrackerDigi firstDigi = *di;
22  bool HIPbit = firstDigi.overThreshold();
23  auto previous = firstDigi;
24  ++di;
25  for (; di != digis.end(); ++di) {
26  auto digi = *di;
27 #ifdef VERIFY_PH2_TK_CLUS
28  if (!(previous < digi))
29  std::cout << "not ordered " << previous << ' ' << digi << std::endl;
30 #endif
31  if (digi - previous == 1) {
32  HIPbit |= digi.overThreshold();
33  ++sizeCluster;
34  } else {
35  clusters.push_back(Phase2TrackerCluster1D(firstDigi, sizeCluster, HIPbit));
36  firstDigi = digi;
37  HIPbit = digi.overThreshold();
38  sizeCluster = 1;
39  }
40  previous = digi;
41  }
42  clusters.push_back(Phase2TrackerCluster1D(firstDigi, sizeCluster, HIPbit));
43 }
iterator end()
Definition: DetSet.h:59
void push_back(data_type const &d)
bool overThreshold() const
iterator begin()
Definition: DetSet.h:58
bool empty() const
Definition: DetSet.h:63