CMS 3D CMS Logo

SingleCellClusterAlgo.cc
Go to the documentation of this file.
7 
8 using namespace HGCalTriggerBackend;
9 
10 template<typename FECODEC, typename DATA>
11 class SingleCellClusterAlgo : public Algorithm<FECODEC>
12 {
13  public:
15 
16  protected:
18 
19  public:
21  Algorithm<FECODEC>(conf,cc),
22  cluster_product_( new l1t::HGCalTriggerCellBxCollection ),
23  calibration_(conf.getParameterSet("calib_parameters")){}
24 
25  typedef std::unique_ptr<HGCalTriggerGeometryBase> ReturnType;
26 
28  {
30  }
31 
33  edm::Event&evt
34  ) final
35  {
36 
37  for( const auto& digi : coll )
38  {
39  HGCalDetId module_id(digi.id());
40  DATA data;
41  data.reset();
42  digi.decode(codec_, data);
43  for(const auto& triggercell : data.payload)
44  {
45  if(triggercell.hwPt()>0)
46  {
47 
48  HGCalDetId detid(triggercell.detId());
49  l1t::HGCalTriggerCell calibratedtriggercell(triggercell);
50  calibration_.calibrateInGeV(calibratedtriggercell);
51  cluster_product_->push_back(0,calibratedtriggercell);
52  }
53  }
54  }
55  }
56 
57  void putInEvent(edm::Event& evt) final
58  {
59  evt.put(std::move(cluster_product_),name());
60  }
61 
62  void reset() final
63  {
64  cluster_product_.reset( new l1t::HGCalTriggerCellBxCollection );
65  }
66 
67  private:
68 
69  std::unique_ptr<l1t::HGCalTriggerCellBxCollection> cluster_product_;
70 
74 
75 };
76 
79 
82  "SingleCellClusterAlgoBestChoice");
83 
86  "SingleCellClusterAlgoThreshold");
BXVector< HGCalTriggerCell > HGCalTriggerCellBxCollection
ParameterSet const & getParameterSet(ParameterSetID const &id)
SingleCellClusterAlgo(const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
delete x;
Definition: CaloConfig.h:22
void run(const l1t::HGCFETriggerDigiCollection &coll, const edm::EventSetup &es, edm::Event &evt) final
SingleCellClusterAlgo< HGCalTriggerCellThresholdCodec, HGCalTriggerCellThresholdCodec::data_type > SingleCellClusterAlgoThreshold
edm::ESHandle< HGCalTopology > hgchefTopoHandle_
std::unique_ptr< l1t::HGCalTriggerCellBxCollection > cluster_product_
void setProduces(edm::stream::EDProducer<> &prod) const final
edm::ESHandle< HGCalTopology > hgceeTopoHandle_
JetCorrectorParametersCollection coll
Definition: classes.h:10
HGCalTriggerCellCalibration calibration_
SingleCellClusterAlgo< HGCalTriggerCellBestChoiceCodec, HGCalTriggerCellBestChoiceCodec::data_type > SingleCellClusterAlgoBestChoice
std::unique_ptr< HGCalTriggerGeometryBase > ReturnType
void putInEvent(edm::Event &evt) final
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
#define DEFINE_EDM_PLUGIN(factory, type, name)
def move(src, dest)
Definition: eostools.py:510