CMS 3D CMS Logo

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

Public Member Functions

 HGCalBackendLayer1Processor2DClustering (const edm::ParameterSet &conf)
 
void run (const edm::Handle< l1t::HGCalTriggerCellBxCollection > &collHandle, l1t::HGCalClusterBxCollection &collCluster2D, 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  ClusterType { dRC2d, NNC2d, dRNNC2d }
 

Private Attributes

HGCalClusteringImpl clustering_
 
ClusterType clusteringAlgorithmType_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 

Additional Inherited Members

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

Detailed Description

Definition at line 12 of file HGCalBackendLayer1Processor2DClustering.cc.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Definition at line 15 of file HGCalBackendLayer1Processor2DClustering.cc.

References clusteringAlgorithmType_, dRC2d, dRNNC2d, Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), NNC2d, and AlCaHLTBitMon_QueryRunRegistry::string.

15  :
17  clustering_( conf.getParameterSet("C2d_parameters") )
18  {
19  std::string typeCluster(conf.getParameterSet("C2d_parameters").getParameter<std::string>("clusterType"));
20  if(typeCluster=="dRC2d"){
22  }else if(typeCluster=="NNC2d"){
24  }else if(typeCluster=="dRNNC2d"){
26  }else {
27  throw cms::Exception("HGCTriggerParameterError")
28  << "Unknown clustering type '" << typeCluster;
29  }
30  }
T getParameter(std::string const &) const
HGCalProcessorBaseT< edm::Handle< l1t::HGCalTriggerCellBxCollection >, l1t::HGCalClusterBxCollection > HGCalBackendLayer1ProcessorBase
ParameterSet const & getParameterSet(std::string const &) const

Member Function Documentation

void HGCalBackendLayer1Processor2DClustering::run ( const edm::Handle< l1t::HGCalTriggerCellBxCollection > &  collHandle,
l1t::HGCalClusterBxCollection collCluster2D,
const edm::EventSetup es 
)
inlineoverride

Definition at line 32 of file HGCalBackendLayer1Processor2DClustering.cc.

References a, b, clustering_, clusteringAlgorithmType_, HGCalClusteringImpl::clusterizeDR(), HGCalClusteringImpl::clusterizeDRNN(), HGCalClusteringImpl::clusterizeNN(), dRC2d, dRNNC2d, HGCalClusteringImpl::eventSetup(), edm::EventSetup::get(), mps_fire::i, l1t::HGCalTriggerCell::mipPt(), NNC2d, BXVector< T >::size(), and triggerGeometry_.

35  {
38 
39  /* create a persistent vector of pointers to the trigger-cells */
40  std::vector<edm::Ptr<l1t::HGCalTriggerCell>> triggerCellsPtrs;
41  for( unsigned i = 0; i < collHandle->size(); ++i ) {
42  edm::Ptr<l1t::HGCalTriggerCell> ptr(collHandle,i);
43  triggerCellsPtrs.push_back(ptr);
44  }
45 
46  std::sort(triggerCellsPtrs.begin(), triggerCellsPtrs.end(),
48  const edm::Ptr<l1t::HGCalTriggerCell>& b) -> bool
49  {
50  return a->mipPt() > b->mipPt();
51  }
52  );
53 
54  /* call to C2d clustering */
56  case dRC2d :
57  clustering_.clusterizeDR(triggerCellsPtrs, collCluster2D);
58  break;
59  case NNC2d:
60  clustering_.clusterizeNN( triggerCellsPtrs, collCluster2D, *triggerGeometry_ );
61  break;
62  case dRNNC2d:
63  clustering_.clusterizeDRNN( triggerCellsPtrs, collCluster2D, *triggerGeometry_ );
64  break;
65  default:
66  // Should not happen, clustering type checked in constructor
67  break;
68  }
69  }
unsigned size(int bx) const
double mipPt() const
void clusterizeDRNN(const std::vector< edm::Ptr< l1t::HGCalTriggerCell >> &triggerCellsPtrs, l1t::HGCalClusterBxCollection &clusters, const HGCalTriggerGeometryBase &triggerGeometry)
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
void clusterizeNN(const std::vector< edm::Ptr< l1t::HGCalTriggerCell >> &triggerCellsPtrs, l1t::HGCalClusterBxCollection &clusters, const HGCalTriggerGeometryBase &triggerGeometry)
double b
Definition: hdecay.h:120
void clusterizeDR(const std::vector< edm::Ptr< l1t::HGCalTriggerCell >> &triggerCellsPtrs, l1t::HGCalClusterBxCollection &clusters)
double a
Definition: hdecay.h:121
void eventSetup(const edm::EventSetup &es)
T get() const
Definition: EventSetup.h:68

Member Data Documentation

HGCalClusteringImpl HGCalBackendLayer1Processor2DClustering::clustering_
private

Definition at line 81 of file HGCalBackendLayer1Processor2DClustering.cc.

Referenced by run().

ClusterType HGCalBackendLayer1Processor2DClustering::clusteringAlgorithmType_
private
edm::ESHandle<HGCalTriggerGeometryBase> HGCalBackendLayer1Processor2DClustering::triggerGeometry_
private

Definition at line 78 of file HGCalBackendLayer1Processor2DClustering.cc.

Referenced by run().