16 template<
typename FECODEC,
typename DATA>
38 HGCalEESensitive_( conf.getParameter<
std::
string>(
"HGCalEESensitive_tag") ),
39 HGCalHESiliconSensitive_( conf.getParameter<
std::
string>(
"HGCalHESiliconSensitive_tag") ),
46 clusteringAlgorithmType_ = dRC2d;
47 }
else if(type==
"NNC2d"){
48 clusteringAlgorithmType_ = NNC2d;
50 edm::LogWarning(
"ParameterError") <<
"Unknown clustering type '" << type
51 <<
"'. Using nearest neighbor NNC2d instead.\n";
52 clusteringAlgorithmType_ = NNC2d;
73 virtual void reset() override final
107 template<
typename FECODEC,
typename DATA>
117 for(
const auto& digi : coll ){
123 digi.decode(codec_, data);
125 for(
const auto& triggercell : data.payload)
128 if( triggercell.hwPt() > 0 )
133 int cellThickness = 0;
135 if( subdet ==
HGCEE ){
136 cellThickness = hgceeTopoHandle_->dddConstants().waferTypeL( (
unsigned int)detid.wafer() );
138 else if( subdet ==
HGCHEF ){
139 cellThickness = hgchefTopoHandle_->dddConstants().waferTypeL( (
unsigned int)detid.wafer() );
141 else if( subdet ==
HGCHEB ){
142 edm::LogWarning(
"DataNotFound") <<
"ATTENTION: the BH trigger cells are not yet implemented";
146 calibration_.calibrateInGeV( calibratedtriggercell, cellThickness );
147 trgcell_product_->push_back( 0, calibratedtriggercell );
161 triggerCellsHandle = evt.
put(
std::move( trgcell_product_ ),
"calibratedTriggerCells");
165 for(
unsigned i = 0;
i < triggerCellsHandle->
size(); ++
i ) {
171 switch(clusteringAlgorithmType_){
173 clustering_.clusterizeDR( triggerCellsPtrs, *cluster_product_);
176 clustering_.clusterizeNN( triggerCellsPtrs, *cluster_product_, *triggerGeometry_ );
184 clustersHandle = evt.
put(
std::move( cluster_product_ ),
"cluster2D");
188 for(
unsigned i = 0;
i < clustersHandle->
size(); ++
i ) {
194 multiclustering_.clusterize( clustersPtrs, *multicluster_product_ );
197 multiclustersHandle = evt.
put(
std::move( multicluster_product_ ),
"cluster3D");
207 "HGCClusterAlgoBestChoice");
211 "HGCClusterAlgoThreshold");
T getParameter(std::string const &) const
ClusterType clusteringAlgorithmType_
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)
edm::ESHandle< HGCalTopology > hgchefTopoHandle_
std::string HGCalEESensitive_
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_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
HGCalClusteringImpl clustering_
std::string HGCalHESiliconSensitive_
ParameterSet const & getParameterSet(std::string const &) const
virtual void reset() override final
std::unique_ptr< l1t::HGCalMulticlusterBxCollection > multicluster_product_
BXVector< HGCalCluster > HGCalClusterBxCollection
char data[epos_bytes_allocation]
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
edm::ESHandle< HGCalTopology > hgceeTopoHandle_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_