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::vector< std::unique_ptr< HGCalTriggerClusterInterpreterBase > > energy_interpreters_
 
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 13 of file HGCalBackendLayer2Processor3DClustering.cc.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Definition at line 15 of file HGCalBackendLayer2Processor3DClustering.cc.

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

16  std::string typeMulticluster(conf.getParameterSet("C3d_parameters").getParameter<std::string>("type_multicluster"));
17  if (typeMulticluster == "dRC3d") {
19  multiclustering_ = std::make_unique<HGCalMulticlusteringImpl>(conf.getParameterSet("C3d_parameters"));
20  } else if (typeMulticluster == "DBSCANC3d") {
22  multiclustering_ = std::make_unique<HGCalMulticlusteringImpl>(conf.getParameterSet("C3d_parameters"));
23  } else if (typeMulticluster == "Histo") {
25  multiclusteringHistoSeeding_ = std::make_unique<HGCalHistoSeedingImpl>(
26  conf.getParameterSet("C3d_parameters").getParameterSet("histoMax_C3d_seeding_parameters"));
27  multiclusteringHistoClustering_ = std::make_unique<HGCalHistoClusteringImpl>(
28  conf.getParameterSet("C3d_parameters").getParameterSet("histoMax_C3d_clustering_parameters"));
29  } else {
30  throw cms::Exception("HGCTriggerParameterError") << "Unknown Multiclustering type '" << typeMulticluster << "'";
31  }
32 
33  for (const auto& interpretationPset : conf.getParameter<std::vector<edm::ParameterSet>>("energy_interpretations")) {
34  std::unique_ptr<HGCalTriggerClusterInterpreterBase> interpreter{
35  HGCalTriggerClusterInterpreterFactory::get()->create(interpretationPset.getParameter<std::string>("type"))};
36  interpreter->initialize(interpretationPset);
37  energy_interpreters_.push_back(std::move(interpreter));
38  }
39  }
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
std::vector< std::unique_ptr< HGCalTriggerClusterInterpreterBase > > energy_interpreters_
HGCalProcessorBaseT< edm::Handle< l1t::HGCalClusterBxCollection >, l1t::HGCalMulticlusterBxCollection > HGCalBackendLayer2ProcessorBase
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

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

Definition at line 41 of file HGCalBackendLayer2Processor3DClustering.cc.

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

43  {
45  if (multiclustering_)
46  multiclustering_->eventSetup(es);
48  multiclusteringHistoSeeding_->eventSetup(es);
50  multiclusteringHistoClustering_->eventSetup(es);
51 
52  /* create a persistent vector of pointers to the trigger-cells */
53  std::vector<edm::Ptr<l1t::HGCalCluster>> clustersPtrs;
54  for (unsigned i = 0; i < collHandle->size(); ++i) {
55  edm::Ptr<l1t::HGCalCluster> ptr(collHandle, i);
56  clustersPtrs.push_back(ptr);
57  }
58 
59  /* create a vector of seed positions and their energy*/
60  std::vector<std::pair<GlobalPoint, double>> seedPositionsEnergy;
61 
62  /* call to multiclustering and compute shower shape*/
63  switch (multiclusteringAlgoType_) {
64  case dRC3d:
65  multiclustering_->clusterizeDR(clustersPtrs, collCluster3D, *triggerGeometry_);
66  break;
67  case DBSCANC3d:
68  multiclustering_->clusterizeDBSCAN(clustersPtrs, collCluster3D, *triggerGeometry_);
69  break;
70  case HistoC3d:
71  multiclusteringHistoSeeding_->findHistoSeeds(clustersPtrs, seedPositionsEnergy);
72  multiclusteringHistoClustering_->clusterizeHisto(
73  clustersPtrs, seedPositionsEnergy, *triggerGeometry_, collCluster3D);
74  break;
75  default:
76  // Should not happen, clustering type checked in constructor
77  break;
78  }
79 
80  // Call all the energy interpretation modules on the cluster collection
81  for (const auto& interpreter : energy_interpreters_) {
82  interpreter->eventSetup(es);
83  interpreter->interpret(collCluster3D);
84  }
85  }
unsigned size(int bx) const
std::unique_ptr< HGCalMulticlusteringImpl > multiclustering_
std::unique_ptr< HGCalHistoSeedingImpl > multiclusteringHistoSeeding_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
std::unique_ptr< HGCalHistoClusteringImpl > multiclusteringHistoClustering_
std::vector< std::unique_ptr< HGCalTriggerClusterInterpreterBase > > energy_interpreters_
T get() const
Definition: EventSetup.h:73

Member Data Documentation

std::vector<std::unique_ptr<HGCalTriggerClusterInterpreterBase> > HGCalBackendLayer2Processor3DClustering::energy_interpreters_
private
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 90 of file HGCalBackendLayer2Processor3DClustering.cc.

Referenced by run().