CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FullModuleSumAlgo< FECODEC, DATA > Class Template Reference
Inheritance diagram for FullModuleSumAlgo< FECODEC, DATA >:
HGCalTriggerBackend::Algorithm< FECODEC > HGCalTriggerBackendAlgorithmBase

Public Member Functions

 FullModuleSumAlgo (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
virtual void putInEvent (edm::Event &evt) override final
 
virtual void reset () override final
 
virtual void run (const l1t::HGCFETriggerDigiCollection &coll, const edm::EventSetup &es, edm::Event &evt) override final
 
virtual void setProduces (edm::stream::EDProducer<> &prod) const override final
 
- Public Member Functions inherited from HGCalTriggerBackend::Algorithm< FECODEC >
 Algorithm (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
virtual void setGeometry (const HGCalTriggerGeometryBase *const geom) override final
 
- Public Member Functions inherited from HGCalTriggerBackendAlgorithmBase
 HGCalTriggerBackendAlgorithmBase (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
const std::string & name () const
 
virtual ~HGCalTriggerBackendAlgorithmBase ()
 

Private Attributes

std::unique_ptr< l1t::HGCalClusterBxCollectioncluster_product_
 

Additional Inherited Members

- Protected Attributes inherited from HGCalTriggerBackend::Algorithm< FECODEC >
FECODEC codec_
 
- Protected Attributes inherited from HGCalTriggerBackendAlgorithmBase
const HGCalTriggerGeometryBasegeometry_
 

Detailed Description

template<typename FECODEC, typename DATA>
class FullModuleSumAlgo< FECODEC, DATA >

Definition at line 11 of file FullModuleSumAlgo.cc.

Constructor & Destructor Documentation

template<typename FECODEC , typename DATA >
FullModuleSumAlgo< FECODEC, DATA >::FullModuleSumAlgo ( const edm::ParameterSet conf,
edm::ConsumesCollector cc 
)
inline

Definition at line 22 of file FullModuleSumAlgo.cc.

22  :
23  Algorithm<FECODEC>(conf,cc),
25  {}
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_

Member Function Documentation

template<typename FECODEC , typename DATA >
virtual void FullModuleSumAlgo< FECODEC, DATA >::putInEvent ( edm::Event evt)
inlinefinaloverridevirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 33 of file FullModuleSumAlgo.cc.

References eostools::move(), dataset::name, and edm::Event::put().

34  {
36  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:127
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
def move(src, dest)
Definition: eostools.py:510
template<typename FECODEC , typename DATA >
virtual void FullModuleSumAlgo< FECODEC, DATA >::reset ( void  )
inlinefinaloverridevirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 38 of file FullModuleSumAlgo.cc.

39  {
41  }
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
template<typename FECODEC , typename DATA >
void FullModuleSumAlgo< FECODEC, DATA >::run ( const l1t::HGCFETriggerDigiCollection coll,
const edm::EventSetup es,
edm::Event evt 
)
finaloverridevirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 50 of file FullModuleSumAlgo.cc.

References cscdqm::DATA, data, l1t::HGCalCluster::setModule(), and HGCalDetId::wafer().

55 {
56  for( const auto& digi : coll )
57  {
58  DATA data;
59  data.reset();
60  const HGCalDetId& moduleId = digi.getDetId<HGCalDetId>();
61  digi.decode(codec_, data);
62 
63  // Sum of trigger cells inside the module
64  uint32_t moduleSum = 0;
65  for(const auto& triggercell : data.payload)
66  {
67  moduleSum += triggercell.hwPt();
68  }
69  // dummy cluster without position
70  // moduleId filled in place of hardware eta
72  moduleSum, 0, 0);
73  cluster.setModule(moduleId.wafer());
74  cluster_product_->push_back(0,cluster);
75  }
76 }
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
int wafer() const
get the wafer #
Definition: HGCalDetId.h:42
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: LeafCandidate.h:23
template<typename FECODEC , typename DATA >
virtual void FullModuleSumAlgo< FECODEC, DATA >::setProduces ( edm::stream::EDProducer<> &  prod) const
inlinefinaloverridevirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 27 of file FullModuleSumAlgo.cc.

References coll, dataset::name, parseEventContent::prod, and findQualityFiles::run.

28  {
29  prod.produces<l1t::HGCalClusterBxCollection>(name());
30  }

Member Data Documentation

template<typename FECODEC , typename DATA >
std::unique_ptr<l1t::HGCalClusterBxCollection> FullModuleSumAlgo< FECODEC, DATA >::cluster_product_
private

Definition at line 44 of file FullModuleSumAlgo.cc.