CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
L1RegionData< T1 > Class Template Reference
Inheritance diagram for L1RegionData< T1 >:
L1RegionDataBase

Public Member Functions

void getEtaPhiRegions (const edm::Event &, std::vector< RectangularEtaPhiRegion > &, const L1CaloGeometry &) const override
 
template<>
void getEtaPhiRegions (const edm::Event &event, std::vector< RectangularEtaPhiRegion > &regions, const L1CaloGeometry &l1CaloGeom) const
 
template<>
void getEtaPhiRegions (const edm::Event &event, std::vector< RectangularEtaPhiRegion > &regions, const L1CaloGeometry &l1CaloGeom) const
 
 L1RegionData (const edm::ParameterSet &para, edm::ConsumesCollector &consumesColl)
 
- Public Member Functions inherited from L1RegionDataBase
virtual ~L1RegionDataBase ()
 

Static Public Member Functions

template<typename T2 >
static BXVector< T2 >::const_iterator beginIt (const BXVector< T2 > &coll)
 
template<typename T2 >
static T2::const_iterator beginIt (const T2 &coll)
 
template<typename T2 >
static BXVector< T2 >::const_iterator endIt (const BXVector< T2 > &coll)
 
template<typename T2 >
static T2::const_iterator endIt (const T2 &coll)
 

Private Attributes

double maxEt_
 
double minEt_
 
double regionEtaMargin_
 
double regionPhiMargin_
 
edm::EDGetTokenT< T1 > token_
 

Detailed Description

template<typename T1>
class L1RegionData< T1 >

Definition at line 58 of file HLTRecHitInAllL1RegionsProducer.cc.

Constructor & Destructor Documentation

◆ L1RegionData()

template<typename T1 >
L1RegionData< T1 >::L1RegionData ( const edm::ParameterSet para,
edm::ConsumesCollector consumesColl 
)
inline

Definition at line 67 of file HLTRecHitInAllL1RegionsProducer.cc.

68  : minEt_(para.getParameter<double>("minEt")),
69  maxEt_(para.getParameter<double>("maxEt")),
70  regionEtaMargin_(para.getParameter<double>("regionEtaMargin")),
71  regionPhiMargin_(para.getParameter<double>("regionPhiMargin")),
72  token_(consumesColl.consumes<T1>(para.getParameter<edm::InputTag>("inputColl"))) {}

Member Function Documentation

◆ beginIt() [1/2]

template<typename T1 >
template<typename T2 >
static BXVector<T2>::const_iterator L1RegionData< T1 >::beginIt ( const BXVector< T2 > &  coll)
inlinestatic

Definition at line 84 of file HLTRecHitInAllL1RegionsProducer.cc.

84  {
85  return coll.begin(0);
86  }

References BXVector< T >::begin().

◆ beginIt() [2/2]

template<typename T1 >
template<typename T2 >
static T2::const_iterator L1RegionData< T1 >::beginIt ( const T2 &  coll)
inlinestatic

Definition at line 76 of file HLTRecHitInAllL1RegionsProducer.cc.

76  {
77  return coll.begin();
78  }

◆ endIt() [1/2]

template<typename T1 >
template<typename T2 >
static BXVector<T2>::const_iterator L1RegionData< T1 >::endIt ( const BXVector< T2 > &  coll)
inlinestatic

Definition at line 88 of file HLTRecHitInAllL1RegionsProducer.cc.

88  {
89  return coll.end(0);
90  }

References BXVector< T >::end().

◆ endIt() [2/2]

template<typename T1 >
template<typename T2 >
static T2::const_iterator L1RegionData< T1 >::endIt ( const T2 &  coll)
inlinestatic

Definition at line 80 of file HLTRecHitInAllL1RegionsProducer.cc.

80  {
81  return coll.end();
82  }

◆ getEtaPhiRegions() [1/3]

template<typename L1CollType >
void L1RegionData< L1CollType >::getEtaPhiRegions ( const edm::Event event,
std::vector< RectangularEtaPhiRegion > &  regions,
const L1CaloGeometry  
) const
overridevirtual

Implements L1RegionDataBase.

Definition at line 278 of file HLTRecHitInAllL1RegionsProducer.cc.

280  {
281  edm::Handle<L1CollType> l1Cands;
282  event.getByToken(token_, l1Cands);
283 
284  for (auto l1CandIt = beginIt(*l1Cands); l1CandIt != endIt(*l1Cands); ++l1CandIt) {
285  if (l1CandIt->et() >= minEt_ && l1CandIt->et() < maxEt_) {
286  double etaLow = l1CandIt->eta() - regionEtaMargin_;
287  double etaHigh = l1CandIt->eta() + regionEtaMargin_;
288  double phiLow = l1CandIt->phi() - regionPhiMargin_;
289  double phiHigh = l1CandIt->phi() + regionPhiMargin_;
290 
291  regions.push_back(RectangularEtaPhiRegion(etaLow, etaHigh, phiLow, phiHigh));
292  }
293  }
294 }

References Phase1L1TJetProducer_cfi::phiLow.

◆ getEtaPhiRegions() [2/3]

template<>
void L1RegionData< l1extra::L1JetParticleCollection >::getEtaPhiRegions ( const edm::Event event,
std::vector< RectangularEtaPhiRegion > &  regions,
const L1CaloGeometry l1CaloGeom 
) const
virtual

Implements L1RegionDataBase.

Definition at line 297 of file HLTRecHitInAllL1RegionsProducer.cc.

299  {
301  event.getByToken(token_, l1Cands);
302 
303  for (const auto& l1Cand : *l1Cands) {
304  if (l1Cand.et() >= minEt_ && l1Cand.et() < maxEt_) {
305  // Access the GCT hardware object corresponding to the L1Extra EM object.
306  int etaIndex = l1Cand.gctJetCand()->etaIndex();
307  int phiIndex = l1Cand.gctJetCand()->phiIndex();
308 
309  // Use the L1CaloGeometry to find the eta, phi bin boundaries.
310  double etaLow = l1CaloGeom.etaBinLowEdge(etaIndex);
311  double etaHigh = l1CaloGeom.etaBinHighEdge(etaIndex);
312  double phiLow = l1CaloGeom.emJetPhiBinLowEdge(phiIndex);
313  double phiHigh = l1CaloGeom.emJetPhiBinHighEdge(phiIndex);
314 
315  etaLow -= regionEtaMargin_;
316  etaHigh += regionEtaMargin_;
318  phiHigh += regionPhiMargin_;
319 
320  regions.push_back(RectangularEtaPhiRegion(etaLow, etaHigh, phiLow, phiHigh));
321  }
322  }
323 }

References L1CaloGeometry::emJetPhiBinHighEdge(), L1CaloGeometry::emJetPhiBinLowEdge(), L1CaloGeometry::etaBinHighEdge(), L1CaloGeometry::etaBinLowEdge(), and Phase1L1TJetProducer_cfi::phiLow.

◆ getEtaPhiRegions() [3/3]

template<>
void L1RegionData< l1extra::L1EmParticleCollection >::getEtaPhiRegions ( const edm::Event event,
std::vector< RectangularEtaPhiRegion > &  regions,
const L1CaloGeometry l1CaloGeom 
) const
virtual

Implements L1RegionDataBase.

Definition at line 326 of file HLTRecHitInAllL1RegionsProducer.cc.

328  {
330  event.getByToken(token_, l1Cands);
331 
332  for (const auto& l1Cand : *l1Cands) {
333  if (l1Cand.et() >= minEt_ && l1Cand.et() < maxEt_) {
334  // Access the GCT hardware object corresponding to the L1Extra EM object.
335  int etaIndex = l1Cand.gctEmCand()->etaIndex();
336  int phiIndex = l1Cand.gctEmCand()->phiIndex();
337 
338  // Use the L1CaloGeometry to find the eta, phi bin boundaries.
339  double etaLow = l1CaloGeom.etaBinLowEdge(etaIndex);
340  double etaHigh = l1CaloGeom.etaBinHighEdge(etaIndex);
341  double phiLow = l1CaloGeom.emJetPhiBinLowEdge(phiIndex);
342  double phiHigh = l1CaloGeom.emJetPhiBinHighEdge(phiIndex);
343 
344  etaLow -= regionEtaMargin_;
345  etaHigh += regionEtaMargin_;
347  phiHigh += regionPhiMargin_;
348 
349  regions.push_back(RectangularEtaPhiRegion(etaLow, etaHigh, phiLow, phiHigh));
350  }
351  }
352 }

References L1CaloGeometry::emJetPhiBinHighEdge(), L1CaloGeometry::emJetPhiBinLowEdge(), L1CaloGeometry::etaBinHighEdge(), L1CaloGeometry::etaBinLowEdge(), and Phase1L1TJetProducer_cfi::phiLow.

Member Data Documentation

◆ maxEt_

template<typename T1 >
double L1RegionData< T1 >::maxEt_
private

Definition at line 61 of file HLTRecHitInAllL1RegionsProducer.cc.

◆ minEt_

template<typename T1 >
double L1RegionData< T1 >::minEt_
private

Definition at line 60 of file HLTRecHitInAllL1RegionsProducer.cc.

◆ regionEtaMargin_

template<typename T1 >
double L1RegionData< T1 >::regionEtaMargin_
private

Definition at line 62 of file HLTRecHitInAllL1RegionsProducer.cc.

◆ regionPhiMargin_

template<typename T1 >
double L1RegionData< T1 >::regionPhiMargin_
private

Definition at line 63 of file HLTRecHitInAllL1RegionsProducer.cc.

◆ token_

template<typename T1 >
edm::EDGetTokenT<T1> L1RegionData< T1 >::token_
private

Definition at line 64 of file HLTRecHitInAllL1RegionsProducer.cc.

L1CaloGeometry::emJetPhiBinHighEdge
double emJetPhiBinHighEdge(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:232
L1CaloGeometry::etaBinHighEdge
double etaBinHighEdge(unsigned int etaIndex, bool central=true) const
Definition: L1CaloGeometry.cc:205
edm::Handle
Definition: AssociativeIterator.h:50
RectangularEtaPhiRegion
Definition: RectangularEtaPhiRegion.h:6
L1RegionData::token_
edm::EDGetTokenT< T1 > token_
Definition: HLTRecHitInAllL1RegionsProducer.cc:64
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
BXVector::begin
const_iterator begin(int bx) const
Phase1L1TJetProducer_cfi.phiLow
phiLow
Definition: Phase1L1TJetProducer_cfi.py:21
L1RegionData::minEt_
double minEt_
Definition: HLTRecHitInAllL1RegionsProducer.cc:60
BXVector::end
const_iterator end(int bx) const
L1RegionData::beginIt
static T2::const_iterator beginIt(const T2 &coll)
Definition: HLTRecHitInAllL1RegionsProducer.cc:76
L1CaloGeometry::emJetPhiBinLowEdge
double emJetPhiBinLowEdge(unsigned int phiIndex) const
Definition: L1CaloGeometry.cc:228
L1RegionData::endIt
static T2::const_iterator endIt(const T2 &coll)
Definition: HLTRecHitInAllL1RegionsProducer.cc:80
L1RegionData::regionPhiMargin_
double regionPhiMargin_
Definition: HLTRecHitInAllL1RegionsProducer.cc:63
L1RegionData::regionEtaMargin_
double regionEtaMargin_
Definition: HLTRecHitInAllL1RegionsProducer.cc:62
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1RegionData::maxEt_
double maxEt_
Definition: HLTRecHitInAllL1RegionsProducer.cc:61
AlignmentPI::regions
regions
Definition: AlignmentPayloadInspectorHelper.h:76
edm::InputTag
Definition: InputTag.h:15
L1CaloGeometry::etaBinLowEdge
double etaBinLowEdge(unsigned int etaIndex, bool central=true) const
Definition: L1CaloGeometry.cc:186