17 template<
typename FECODEC,
typename DATA>
44 clustering_threshold_scintillator_ = conf.
getParameterSet(
"C2d_parameters").
getParameter<
double>(
"clustering_threshold_scintillator");
47 clusteringAlgorithmType_ = dRC2d;
48 }
else if(type==
"NNC2d"){
49 clusteringAlgorithmType_ = NNC2d;
51 edm::LogWarning(
"ParameterError") <<
"Unknown clustering type '" << type
52 <<
"'. Using nearest neighbor NNC2d instead.\n";
53 clusteringAlgorithmType_ = NNC2d;
74 virtual void reset() override final
103 template<
typename FECODEC,
typename DATA>
110 for(
const auto& digi : coll ){
116 digi.decode(codec_, data);
118 for(
const auto& triggercell : data.payload)
121 if( triggercell.hwPt() > 0 )
124 calibration_.calibrateInGeV( calibratedtriggercell);
125 double clustering_threshold = (triggercell.subdetId()==
HGCHEB ? clustering_threshold_scintillator_ : clustering_threshold_silicon_);
126 if(calibratedtriggercell.
mipPt()<clustering_threshold)
continue;
127 trgcell_product_->push_back( 0, calibratedtriggercell );
140 triggerCellsHandle = evt.
put(
std::move( trgcell_product_ ),
"calibratedTriggerCells");
144 for(
unsigned i = 0;
i < triggerCellsHandle->
size(); ++
i ) {
150 switch(clusteringAlgorithmType_){
152 clustering_.clusterizeDR( triggerCellsPtrs, *cluster_product_);
155 clustering_.clusterizeNN( triggerCellsPtrs, *cluster_product_, *triggerGeometry_ );
163 clustersHandle = evt.
put(
std::move( cluster_product_ ),
"cluster2D");
167 for(
unsigned i = 0;
i < clustersHandle->
size(); ++
i ) {
173 multiclustering_.clusterize( clustersPtrs, *multicluster_product_ );
176 multiclustersHandle = evt.
put(
std::move( multicluster_product_ ),
"cluster3D");
186 "HGCClusterAlgoBestChoice");
190 "HGCClusterAlgoThreshold");
T getParameter(std::string const &) const
ClusterType clusteringAlgorithmType_
double clustering_threshold_silicon_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
HGCalTriggerCellCalibration calibration_
unsigned size(int bx) const
BXVector< HGCalTriggerCell > HGCalTriggerCellBxCollection
virtual void setProduces(edm::stream::EDProducer<> &prod) const override final
void push_back(Ptr< T > const &iPtr)
virtual void putInEvent(edm::Event &evt) override final
ParameterSet const & getParameterSet(ParameterSetID const &id)
HGCClusterAlgo< HGCalTriggerCellThresholdCodec, HGCalTriggerCellThresholdCodec::data_type > HGCClusterAlgoThreshold
HGCClusterAlgo(const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
std::unique_ptr< l1t::HGCalTriggerCellBxCollection > trgcell_product_
virtual void run(const l1t::HGCFETriggerDigiCollection &coll, const edm::EventSetup &es, edm::Event &evt) override final
HGCClusterAlgo< HGCalTriggerCellBestChoiceCodec, HGCalTriggerCellBestChoiceCodec::data_type > HGCClusterAlgoBestChoice
BXVector< HGCalMulticluster > HGCalMulticlusterBxCollection
HGCalMulticlusteringImpl multiclustering_
HGCalClusteringImpl clustering_
ParameterSet const & getParameterSet(std::string const &) const
virtual void reset() override final
std::unique_ptr< l1t::HGCalMulticlusterBxCollection > multicluster_product_
BXVector< HGCalCluster > HGCalClusterBxCollection
double clustering_threshold_scintillator_
char data[epos_bytes_allocation]
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_