CMS 3D CMS Logo

HGCalClusteringImpl.h
Go to the documentation of this file.
1 #ifndef __L1Trigger_L1THGCal_HGCalClusteringImpl_h__
2 #define __L1Trigger_L1THGCal_HGCalClusteringImpl_h__
3 
4 #include <array>
5 #include <string>
13 
14 
15 bool distanceSorter (pair<edm::Ptr<l1t::HGCalTriggerCell>,float> i,pair<edm::Ptr<l1t::HGCalTriggerCell>,float> j) { return (i.second<j.second); }
16 
17 
19 
20 private:
21  static const unsigned kNSides_ = 2;
22 
23 public:
24 
25  HGCalClusteringImpl( const edm::ParameterSet & conf);
26 
28 
29  /* dR-algorithms */
30  bool isPertinent( const l1t::HGCalTriggerCell & tc,
31  const l1t::HGCalCluster & clu,
32  double distXY) const;
33 
34  void clusterizeDR( const std::vector<edm::Ptr<l1t::HGCalTriggerCell>> & triggerCellsPtrs,
36  );
37 
38  /* NN-algorithms */
39  void mergeClusters( l1t::HGCalCluster & main_cluster,
40  const l1t::HGCalCluster & secondary_cluster ) const;
41 
42  void NNKernel( const std::vector<edm::Ptr<l1t::HGCalTriggerCell>> &reshuffledTriggerCells,
44  const HGCalTriggerGeometryBase & triggerGeometry
45  );
46 
47  void clusterizeNN( const std::vector<edm::Ptr<l1t::HGCalTriggerCell>> & triggerCellsPtrs,
49  const HGCalTriggerGeometryBase & triggerGeometry
50  );
51 
52  /* FW-algorithms */
53  void clusterizeDRNN( const std::vector<edm::Ptr<l1t::HGCalTriggerCell>> & triggerCellsPtrs,
55  const HGCalTriggerGeometryBase & triggerGeometry
56  );
57 
58 
59 
60 private:
61 
66  double dr_;
68  double calibSF_;
69  std::vector<double> layerWeights_;
72 
73  void triggerCellReshuffling( const std::vector<edm::Ptr<l1t::HGCalTriggerCell>> & triggerCellsPtrs,
74  std::array<std::vector<std::vector<edm::Ptr<l1t::HGCalTriggerCell>>>, kNSides_> & reshuffledTriggerCells );
75 
76  bool areTCneighbour( uint32_t detIDa, uint32_t detIDb, const HGCalTriggerGeometryBase & triggerGeometry );
77 
79  const HGCalTriggerGeometryBase & triggerGeometry
80  );
81 
82  void calibratePt( l1t::HGCalCluster & cluster );
83 
84 };
85 
86 #endif
void eventSetup(const edm::EventSetup &)
bool distanceSorter(pair< edm::Ptr< l1t::HGCalTriggerCell >, float > i, pair< edm::Ptr< l1t::HGCalTriggerCell >, float > j)
void calibratePt(l1t::HGCalCluster &cluster)
void mergeClusters(l1t::HGCalCluster &main_cluster, const l1t::HGCalCluster &secondary_cluster) const
std::vector< double > layerWeights_
void clusterizeDRNN(const std::vector< edm::Ptr< l1t::HGCalTriggerCell >> &triggerCellsPtrs, l1t::HGCalClusterBxCollection &clusters, const HGCalTriggerGeometryBase &triggerGeometry)
bool isPertinent(const l1t::HGCalTriggerCell &tc, const l1t::HGCalCluster &clu, double distXY) const
void clusterizeNN(const std::vector< edm::Ptr< l1t::HGCalTriggerCell >> &triggerCellsPtrs, l1t::HGCalClusterBxCollection &clusters, const HGCalTriggerGeometryBase &triggerGeometry)
std::string clusteringAlgorithmType_
void removeUnconnectedTCinCluster(l1t::HGCalCluster &cluster, const HGCalTriggerGeometryBase &triggerGeometry)
void triggerCellReshuffling(const std::vector< edm::Ptr< l1t::HGCalTriggerCell >> &triggerCellsPtrs, std::array< std::vector< std::vector< edm::Ptr< l1t::HGCalTriggerCell >>>, kNSides_ > &reshuffledTriggerCells)
static const unsigned kNSides_
HGCalTriggerTools triggerTools_
HGCalClusteringImpl(const edm::ParameterSet &conf)
void NNKernel(const std::vector< edm::Ptr< l1t::HGCalTriggerCell >> &reshuffledTriggerCells, l1t::HGCalClusterBxCollection &clusters, const HGCalTriggerGeometryBase &triggerGeometry)
void clusterizeDR(const std::vector< edm::Ptr< l1t::HGCalTriggerCell >> &triggerCellsPtrs, l1t::HGCalClusterBxCollection &clusters)
bool areTCneighbour(uint32_t detIDa, uint32_t detIDb, const HGCalTriggerGeometryBase &triggerGeometry)
void eventSetup(const edm::EventSetup &es)
double scintillatorTriggerCellThreshold_