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>
12 
14  pair<edm::Ptr<l1t::HGCalTriggerCell>, float> j) {
15  return (i.second < j.second);
16 }
17 
19 private:
20  static constexpr unsigned kNSides_ = 2;
21 
22 public:
24 
26 
27  /* dR-algorithms */
28  bool isPertinent(const l1t::HGCalTriggerCell& tc, const l1t::HGCalCluster& clu, double distXY) const;
29 
30  void clusterizeDR(const std::vector<edm::Ptr<l1t::HGCalTriggerCell>>& triggerCellsPtrs,
32 
33  /* NN-algorithms */
34  void mergeClusters(l1t::HGCalCluster& main_cluster, const l1t::HGCalCluster& secondary_cluster) const;
35 
36  void NNKernel(const std::vector<edm::Ptr<l1t::HGCalTriggerCell>>& reshuffledTriggerCells,
38  const HGCalTriggerGeometryBase& triggerGeometry);
39 
40  void clusterizeNN(const std::vector<edm::Ptr<l1t::HGCalTriggerCell>>& triggerCellsPtrs,
42  const HGCalTriggerGeometryBase& triggerGeometry);
43 
44  /* FW-algorithms */
45  void clusterizeDRNN(const std::vector<edm::Ptr<l1t::HGCalTriggerCell>>& triggerCellsPtrs,
47  const HGCalTriggerGeometryBase& triggerGeometry);
48 
49 private:
54  double dr_;
56  double calibSF_;
57  std::vector<double> layerWeights_;
60 
62  const std::vector<edm::Ptr<l1t::HGCalTriggerCell>>& triggerCellsPtrs,
64 
65  bool areTCneighbour(uint32_t detIDa, uint32_t detIDb, const HGCalTriggerGeometryBase& triggerGeometry);
66 
67  void removeUnconnectedTCinCluster(l1t::HGCalCluster& cluster, const HGCalTriggerGeometryBase& triggerGeometry);
68 
69  void calibratePt(l1t::HGCalCluster& cluster);
70 };
71 
72 #endif
bool distanceSorter(pair< edm::Ptr< l1t::HGCalTriggerCell >, float > i, pair< edm::Ptr< l1t::HGCalTriggerCell >, float > j)
void calibratePt(l1t::HGCalCluster &cluster)
std::vector< double > layerWeights_
bool isPertinent(const l1t::HGCalTriggerCell &tc, const l1t::HGCalCluster &clu, double distXY) const
void setGeometry(const HGCalTriggerGeometryBase *const)
void clusterizeDRNN(const std::vector< edm::Ptr< l1t::HGCalTriggerCell >> &triggerCellsPtrs, l1t::HGCalClusterBxCollection &clusters, const HGCalTriggerGeometryBase &triggerGeometry)
static constexpr unsigned kNSides_
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)
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 setGeometry(const HGCalTriggerGeometryBase *const geom)
double scintillatorTriggerCellThreshold_
void mergeClusters(l1t::HGCalCluster &main_cluster, const l1t::HGCalCluster &secondary_cluster) const