16 template<
typename FECODEC,
typename DATA>
38 HGCalEESensitive_( conf.getParameter<
std::
string>(
"HGCalEESensitive_tag") ),
39 HGCalHESiliconSensitive_( conf.getParameter<
std::
string>(
"HGCalHESiliconSensitive_tag") ),
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
109 template<
typename FECODEC,
typename DATA>
119 for(
const auto& digi : coll ){
125 digi.decode(codec_, data);
127 for(
const auto& triggercell : data.payload)
130 if( triggercell.hwPt() > 0 )
135 int cellThickness = 0;
137 if( subdet ==
HGCEE ){
138 cellThickness = hgceeTopoHandle_->dddConstants().waferTypeL( (
unsigned int)detid.wafer() );
140 else if( subdet ==
HGCHEF ){
141 cellThickness = hgchefTopoHandle_->dddConstants().waferTypeL( (
unsigned int)detid.wafer() );
143 else if( subdet ==
HGCHEB ){
144 edm::LogWarning(
"DataNotFound") <<
"ATTENTION: the BH trigger cells are not yet implemented";
148 calibration_.calibrateInGeV( calibratedtriggercell, cellThickness );
149 if(calibratedtriggercell.
mipPt()<clustering_threshold_)
continue;
150 trgcell_product_->push_back( 0, calibratedtriggercell );
163 triggerCellsHandle = evt.
put(
std::move( trgcell_product_ ),
"calibratedTriggerCells");
167 for(
unsigned i = 0;
i < triggerCellsHandle->
size(); ++
i ) {
173 switch(clusteringAlgorithmType_){
175 clustering_.clusterizeDR( triggerCellsPtrs, *cluster_product_);
178 clustering_.clusterizeNN( triggerCellsPtrs, *cluster_product_, *triggerGeometry_ );
186 clustersHandle = evt.
put(
std::move( cluster_product_ ),
"cluster2D");
190 for(
unsigned i = 0;
i < clustersHandle->
size(); ++
i ) {
196 multiclustering_.clusterize( clustersPtrs, *multicluster_product_ );
199 multiclustersHandle = evt.
put(
std::move( multicluster_product_ ),
"cluster3D");
209 "HGCClusterAlgoBestChoice");
213 "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) ...
double clustering_threshold_
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_