Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-08 22:26:30

0001 #ifndef __L1Trigger_L1THGCal_HGCalMulticlusteringImpl_h__
0002 #define __L1Trigger_L1THGCal_HGCalMulticlusteringImpl_h__
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "DataFormats/L1THGCal/interface/HGCalCluster.h"
0006 #include "DataFormats/L1THGCal/interface/HGCalMulticluster.h"
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008 
0009 #include "L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h"
0010 #include "L1Trigger/L1THGCal/interface/backend/HGCalShowerShape.h"
0011 #include "L1Trigger/L1THGCal/interface/HGCalTriggerTools.h"
0012 #include "L1Trigger/L1THGCal/interface/backend/HGCalTriggerClusterIdentificationBase.h"
0013 
0014 class HGCalMulticlusteringImpl {
0015 public:
0016   HGCalMulticlusteringImpl(const edm::ParameterSet& conf);
0017 
0018   void setGeometry(const HGCalTriggerGeometryBase* const geom) {
0019     triggerTools_.setGeometry(geom);
0020     shape_.setGeometry(geom);
0021   }
0022 
0023   bool isPertinent(const l1t::HGCalCluster& clu, const l1t::HGCalMulticluster& mclu, double dR) const;
0024 
0025   void clusterizeDR(const std::vector<edm::Ptr<l1t::HGCalCluster>>& clustersPtr,
0026                     l1t::HGCalMulticlusterBxCollection& multiclusters,
0027                     const HGCalTriggerGeometryBase& triggerGeometry);
0028 
0029   void clusterizeDBSCAN(const std::vector<edm::Ptr<l1t::HGCalCluster>>& clustersPtr,
0030                         l1t::HGCalMulticlusterBxCollection& multiclusters,
0031                         const HGCalTriggerGeometryBase& triggerGeometry);
0032 
0033 private:
0034   void findNeighbor(const std::vector<std::pair<unsigned int, double>>& rankedList,
0035                     unsigned int searchInd,
0036                     const std::vector<edm::Ptr<l1t::HGCalCluster>>& clustersPtr,
0037                     std::vector<unsigned int>& neigbors);
0038   void finalizeClusters(std::vector<l1t::HGCalMulticluster>&,
0039                         l1t::HGCalMulticlusterBxCollection&,
0040                         const HGCalTriggerGeometryBase&);
0041 
0042   double dr_;
0043   double ptC3dThreshold_;
0044   std::string multiclusterAlgoType_;
0045   double distDbscan_ = 0.005;
0046   unsigned minNDbscan_ = 3;
0047 
0048   HGCalShowerShape shape_;
0049   HGCalTriggerTools triggerTools_;
0050   std::unique_ptr<HGCalTriggerClusterIdentificationBase> id_;
0051 };
0052 
0053 #endif