CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes
HGCalBackendLayer2Processor3DClustering Class Reference
Inheritance diagram for HGCalBackendLayer2Processor3DClustering:
HGCalProcessorBaseT< InputCollection, OutputCollection >

Public Member Functions

 HGCalBackendLayer2Processor3DClustering (const edm::ParameterSet &conf)
 
void run (const edm::Handle< l1t::HGCalClusterBxCollection > &collHandle, l1t::HGCalMulticlusterBxCollection &collCluster3D, const edm::EventSetup &es) override
 
- Public Member Functions inherited from HGCalProcessorBaseT< InputCollection, OutputCollection >
 HGCalProcessorBaseT (const edm::ParameterSet &conf)
 
const std::string & name () const
 
virtual void run (const InputCollection &inputColl, OutputCollection &outColl, const edm::EventSetup &es)=0
 
void setGeometry (const HGCalTriggerGeometryBase *const geom)
 
virtual ~HGCalProcessorBaseT ()
 

Private Types

enum  MulticlusterType { dRC3d, DBSCANC3d, HistoC3d }
 

Private Attributes

std::unique_ptr< HGCalMulticlusteringImplmulticlustering_
 
MulticlusterType multiclusteringAlgoType_
 
std::unique_ptr< HGCalHistoClusteringImplmulticlusteringHistoClustering_
 
std::unique_ptr< HGCalHistoSeedingImplmulticlusteringHistoSeeding_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 

Additional Inherited Members

- Protected Attributes inherited from HGCalProcessorBaseT< InputCollection, OutputCollection >
const HGCalTriggerGeometryBasegeometry_
 

Detailed Description

Definition at line 12 of file HGCalBackendLayer2Processor3DClustering.cc.

Member Enumeration Documentation

Constructor & Destructor Documentation

HGCalBackendLayer2Processor3DClustering::HGCalBackendLayer2Processor3DClustering ( const edm::ParameterSet conf)
inline

Definition at line 14 of file HGCalBackendLayer2Processor3DClustering.cc.

References DBSCANC3d, dRC3d, Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), HistoC3d, multiclustering_, multiclusteringAlgoType_, multiclusteringHistoClustering_, multiclusteringHistoSeeding_, and AlCaHLTBitMon_QueryRunRegistry::string.

15  std::string typeMulticluster(conf.getParameterSet("C3d_parameters").getParameter<std::string>("type_multicluster"));
16  if (typeMulticluster == "dRC3d") {
18  multiclustering_ = std::make_unique<HGCalMulticlusteringImpl>(conf.getParameterSet("C3d_parameters"));
19  } else if (typeMulticluster == "DBSCANC3d") {
21  multiclustering_ = std::make_unique<HGCalMulticlusteringImpl>(conf.getParameterSet("C3d_parameters"));
22  } else if (typeMulticluster.find("Histo") != std::string::npos) {
24  multiclusteringHistoSeeding_ = std::make_unique<HGCalHistoSeedingImpl>(conf.getParameterSet("C3d_parameters"));
26  std::make_unique<HGCalHistoClusteringImpl>(conf.getParameterSet("C3d_parameters"));
27  } else {
28  throw cms::Exception("HGCTriggerParameterError") << "Unknown Multiclustering type '" << typeMulticluster << "'";
29  }
30  }
T getParameter(std::string const &) const
std::unique_ptr< HGCalMulticlusteringImpl > multiclustering_
std::unique_ptr< HGCalHistoSeedingImpl > multiclusteringHistoSeeding_
std::unique_ptr< HGCalHistoClusteringImpl > multiclusteringHistoClustering_
ParameterSet const & getParameterSet(std::string const &) const
HGCalProcessorBaseT< edm::Handle< l1t::HGCalClusterBxCollection >, l1t::HGCalMulticlusterBxCollection > HGCalBackendLayer2ProcessorBase

Member Function Documentation

void HGCalBackendLayer2Processor3DClustering::run ( const edm::Handle< l1t::HGCalClusterBxCollection > &  collHandle,
l1t::HGCalMulticlusterBxCollection collCluster3D,
const edm::EventSetup es 
)
inlineoverride

Definition at line 32 of file HGCalBackendLayer2Processor3DClustering.cc.

References DBSCANC3d, dRC3d, edm::EventSetup::get(), HistoC3d, mps_fire::i, multiclustering_, multiclusteringAlgoType_, multiclusteringHistoClustering_, multiclusteringHistoSeeding_, BXVector< T >::size(), and triggerGeometry_.

34  {
36  if (multiclustering_)
37  multiclustering_->eventSetup(es);
39  multiclusteringHistoSeeding_->eventSetup(es);
41  multiclusteringHistoClustering_->eventSetup(es);
42 
43  /* create a persistent vector of pointers to the trigger-cells */
44  std::vector<edm::Ptr<l1t::HGCalCluster>> clustersPtrs;
45  for (unsigned i = 0; i < collHandle->size(); ++i) {
46  edm::Ptr<l1t::HGCalCluster> ptr(collHandle, i);
47  clustersPtrs.push_back(ptr);
48  }
49 
50  /* create a vector of seed positions and their energy*/
51  std::vector<std::pair<GlobalPoint, double>> seedPositionsEnergy;
52 
53  /* call to multiclustering and compute shower shape*/
54  switch (multiclusteringAlgoType_) {
55  case dRC3d:
56  multiclustering_->clusterizeDR(clustersPtrs, collCluster3D, *triggerGeometry_);
57  break;
58  case DBSCANC3d:
59  multiclustering_->clusterizeDBSCAN(clustersPtrs, collCluster3D, *triggerGeometry_);
60  break;
61  case HistoC3d:
62  multiclusteringHistoSeeding_->findHistoSeeds(clustersPtrs, seedPositionsEnergy);
63  multiclusteringHistoClustering_->clusterizeHisto(
64  clustersPtrs, seedPositionsEnergy, *triggerGeometry_, collCluster3D);
65  break;
66  default:
67  // Should not happen, clustering type checked in constructor
68  break;
69  }
70  }
unsigned size(int bx) const
std::unique_ptr< HGCalMulticlusteringImpl > multiclustering_
std::unique_ptr< HGCalHistoSeedingImpl > multiclusteringHistoSeeding_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
std::unique_ptr< HGCalHistoClusteringImpl > multiclusteringHistoClustering_
T get() const
Definition: EventSetup.h:71

Member Data Documentation

std::unique_ptr<HGCalMulticlusteringImpl> HGCalBackendLayer2Processor3DClustering::multiclustering_
private
MulticlusterType HGCalBackendLayer2Processor3DClustering::multiclusteringAlgoType_
private
std::unique_ptr<HGCalHistoClusteringImpl> HGCalBackendLayer2Processor3DClustering::multiclusteringHistoClustering_
private
std::unique_ptr<HGCalHistoSeedingImpl> HGCalBackendLayer2Processor3DClustering::multiclusteringHistoSeeding_
private
edm::ESHandle<HGCalTriggerGeometryBase> HGCalBackendLayer2Processor3DClustering::triggerGeometry_
private

Definition at line 75 of file HGCalBackendLayer2Processor3DClustering.cc.

Referenced by run().