test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RandomClusterAlgo.cc
Go to the documentation of this file.
3 
5 
6 using namespace HGCalTriggerBackend;
7 
8 class RandomClusterAlgo : public Algorithm<HGCal64BitRandomCodec> {
9 public:
10 
13  cluster_product_( new l1t::HGCalClusterBxCollection ){
14  }
15 
16  virtual void setProduces(edm::EDProducer& prod) const override final {
18  }
19 
20  virtual void run(const l1t::HGCFETriggerDigiCollection& coll,
21  const std::unique_ptr<HGCalTriggerGeometryBase>& geom) override final;
22 
23  virtual void putInEvent(edm::Event& evt) override final {
24  evt.put(std::move(cluster_product_),name());
25  }
26 
27  virtual void reset() override final {
28  cluster_product_.reset( new l1t::HGCalClusterBxCollection );
29  }
30 
31 private:
32  std::unique_ptr<l1t::HGCalClusterBxCollection> cluster_product_;
33 
34 };
35 
37  const std::unique_ptr<HGCalTriggerGeometryBase>& geom) {
38  for( const auto& digi : coll ) {
40  digi.decode(codec_,my_data);
41 
42  unsigned word1 = my_data.payload & 0xffff;
43  unsigned word2 = (my_data.payload >> 16) & 0xffff;
44  unsigned word3 = (my_data.payload >> 32) & 0xffff;
45  unsigned word4 = (my_data.payload >> 48) & 0xffff;
46 
48  word1, word2, word3^word4 );
49 
50  cluster_product_->push_back(0,cluster);
51  }
52 }
53 
56  "RandomClusterAlgo");
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
virtual void putInEvent(edm::Event &evt) overridefinal
def move
Definition: eostools.py:510
virtual void run(const l1t::HGCFETriggerDigiCollection &coll, const std::unique_ptr< HGCalTriggerGeometryBase > &geom) overridefinal
JetCorrectorParametersCollection coll
Definition: classes.h:10
BXVector< HGCalCluster > HGCalClusterBxCollection
Definition: HGCalCluster.h:59
virtual void reset() overridefinal
#define DEFINE_EDM_PLUGIN(factory, type, name)
RandomClusterAlgo(const edm::ParameterSet &conf)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: LeafCandidate.h:23
virtual void setProduces(edm::EDProducer &prod) const overridefinal