CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCalConcentratorTrigSumImpl Class Reference

#include <HGCalConcentratorTrigSumImpl.h>

Public Member Functions

void doSum (uint32_t module_id, const std::vector< l1t::HGCalTriggerCell > &trigCellVecInput, std::vector< l1t::HGCalTriggerSums > &trigSumsVecOutput) const
 
void eventSetup (const edm::EventSetup &es)
 
 HGCalConcentratorTrigSumImpl (const edm::ParameterSet &conf)
 

Private Attributes

HGCalTriggerTools triggerTools_
 

Detailed Description

Definition at line 10 of file HGCalConcentratorTrigSumImpl.h.

Constructor & Destructor Documentation

◆ HGCalConcentratorTrigSumImpl()

HGCalConcentratorTrigSumImpl::HGCalConcentratorTrigSumImpl ( const edm::ParameterSet conf)

Definition at line 3 of file HGCalConcentratorTrigSumImpl.cc.

3 {}

Member Function Documentation

◆ doSum()

void HGCalConcentratorTrigSumImpl::doSum ( uint32_t  module_id,
const std::vector< l1t::HGCalTriggerCell > &  trigCellVecInput,
std::vector< l1t::HGCalTriggerSums > &  trigSumsVecOutput 
) const

Definition at line 5 of file HGCalConcentratorTrigSumImpl.cc.

7  {
8  double ptsum = 0;
9  double mipptsum = 0;
10  double hwptsum = 0;
11 
12  for (const auto& trigCell : trigCellVecInput) {
13  // detId selection is already done in HGCalConcentratorProcessorSelection:
14  // here we do not worry about it and assume all cells are from the same module
15  ptsum += trigCell.pt();
16  mipptsum += trigCell.mipPt();
17  hwptsum += trigCell.hwPt();
18  }
19  if (!trigCellVecInput.empty()) {
21 
22  math::PtEtaPhiMLorentzVector p4(ptsum, module_pos.eta(), module_pos.phi(), 0);
24  ts.setP4(p4);
25  ts.setDetId(module_id);
26  ts.setPosition(module_pos);
27  ts.setMipPt(mipptsum);
28  ts.setHwPt(hwptsum);
29  trigSumsVecOutput.push_back(ts);
30  }
31 }

References PV3DBase< T, PVType, FrameType >::eta(), HGCalTriggerGeometryBase::getModulePosition(), HGCalTriggerTools::getTriggerGeometry(), p4, PV3DBase< T, PVType, FrameType >::phi(), reco::LeafCandidate::setP4(), and triggerTools_.

◆ eventSetup()

void HGCalConcentratorTrigSumImpl::eventSetup ( const edm::EventSetup es)
inline

Member Data Documentation

◆ triggerTools_

HGCalTriggerTools HGCalConcentratorTrigSumImpl::triggerTools_
private

Definition at line 21 of file HGCalConcentratorTrigSumImpl.h.

Referenced by doSum(), and eventSetup().

HGCalConcentratorTrigSumImpl::triggerTools_
HGCalTriggerTools triggerTools_
Definition: HGCalConcentratorTrigSumImpl.h:21
HGCalTriggerTools::eventSetup
void eventSetup(const edm::EventSetup &)
Definition: HGCalTriggerTools.cc:35
HGCalTriggerTools::getTriggerGeometry
const HGCalTriggerGeometryBase * getTriggerGeometry() const
Definition: HGCalTriggerTools.h:70
Point3DBase< float, GlobalTag >
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
p4
double p4[4]
Definition: TauolaWrapper.h:92
reco::LeafCandidate::setP4
void setP4(const LorentzVector &p4) final
set 4-momentum
Definition: LeafCandidate.h:158
HGCalTriggerGeometryBase::getModulePosition
virtual GlobalPoint getModulePosition(const unsigned module_det_id) const =0
math::PtEtaPhiMLorentzVector
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
l1t::HGCalTriggerSums
Definition: HGCalTriggerSums.h:14
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66