CMS 3D CMS Logo

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, const edm::EventSetup& es) override final;
21 
22  virtual void putInEvent(edm::Event& evt) override final {
23  evt.put(std::move(cluster_product_),name());
24  }
25 
26  virtual void reset() override final {
27  cluster_product_.reset( new l1t::HGCalClusterBxCollection );
28  }
29 
30 private:
31  std::unique_ptr<l1t::HGCalClusterBxCollection> cluster_product_;
32 
33 };
34 
36  for( const auto& digi : coll ) {
38  digi.decode(codec_,my_data);
39 
40  unsigned word1 = my_data.payload & 0xffff;
41  unsigned word2 = (my_data.payload >> 16) & 0xffff;
42  unsigned word3 = (my_data.payload >> 32) & 0xffff;
43  unsigned word4 = (my_data.payload >> 48) & 0xffff;
44 
46  word1, word2, word3^word4 );
47 
48  cluster_product_->push_back(0,cluster);
49  }
50 }
51 
54  "RandomClusterAlgo");
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
virtual void putInEvent(edm::Event &evt) override final
virtual void setProduces(edm::EDProducer &prod) const override final
delete x;
Definition: CaloConfig.h:22
virtual void run(const l1t::HGCFETriggerDigiCollection &coll, const edm::EventSetup &es) override final
virtual void reset() override final
JetCorrectorParametersCollection coll
Definition: classes.h:10
BXVector< HGCalCluster > HGCalClusterBxCollection
Definition: HGCalCluster.h:59
#define DEFINE_EDM_PLUGIN(factory, type, name)
RandomClusterAlgo(const edm::ParameterSet &conf)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: LeafCandidate.h:23
def move(src, dest)
Definition: eostools.py:510