CMS 3D CMS Logo

HGCalBackendLayer2Processor3DClustering.cc
Go to the documentation of this file.
2 
10 
11 
13 {
14  public:
17  multiclustering_( conf.getParameterSet("C3d_parameters") )
18  {
19  std::string typeMulticluster(conf.getParameterSet("C3d_parameters").getParameter<std::string>("type_multicluster"));
20  if(typeMulticluster=="dRC3d"){
22  }else if(typeMulticluster=="DBSCANC3d"){
24  }else {
25  throw cms::Exception("HGCTriggerParameterError")
26  << "Unknown Multiclustering type '" << typeMulticluster;
27  }
28  }
29 
32  const edm::EventSetup& es) override
33  {
36 
37  /* create a persistent vector of pointers to the trigger-cells */
38  std::vector<edm::Ptr<l1t::HGCalCluster>> clustersPtrs;
39  for( unsigned i = 0; i < collHandle->size(); ++i ) {
40  edm::Ptr<l1t::HGCalCluster> ptr(collHandle,i);
41  clustersPtrs.push_back(ptr);
42  }
43 
44  /* call to multiclustering and compute shower shape*/
46  case dRC3d :
47  multiclustering_.clusterizeDR( clustersPtrs, collCluster3D, *triggerGeometry_);
48  break;
49  case DBSCANC3d:
50  multiclustering_.clusterizeDBSCAN( clustersPtrs, collCluster3D, *triggerGeometry_);
51  break;
52  default:
53  // Should not happen, clustering type checked in constructor
54  break;
55  }
56  }
57 
58  private:
62  };
63 
65 
66  /* algorithms instances */
68 
69  /* algorithm type */
71 };
72 
75  "HGCalBackendLayer2Processor3DClustering");
T getParameter(std::string const &) const
unsigned size(int bx) const
ParameterSet const & getParameterSet(ParameterSetID const &id)
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
void run(const edm::Handle< l1t::HGCalClusterBxCollection > &collHandle, l1t::HGCalMulticlusterBxCollection &collCluster3D, const edm::EventSetup &es) override
void eventSetup(const edm::EventSetup &es)
void clusterizeDR(const std::vector< edm::Ptr< l1t::HGCalCluster >> &clustersPtr, l1t::HGCalMulticlusterBxCollection &multiclusters, const HGCalTriggerGeometryBase &triggerGeometry)
ParameterSet const & getParameterSet(std::string const &) const
T get() const
Definition: EventSetup.h:68
#define DEFINE_EDM_PLUGIN(factory, type, name)
void clusterizeDBSCAN(const std::vector< edm::Ptr< l1t::HGCalCluster >> &clustersPtr, l1t::HGCalMulticlusterBxCollection &multiclusters, const HGCalTriggerGeometryBase &triggerGeometry)