test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
L1RegionData< T1 > Class Template Reference

#include <HLTRecHitInAllL1RegionsProducer.h>

Inheritance diagram for L1RegionData< T1 >:
L1RegionDataBase

Public Member Functions

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

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 53 of file HLTRecHitInAllL1RegionsProducer.h.

Constructor & Destructor Documentation

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

Definition at line 61 of file HLTRecHitInAllL1RegionsProducer.h.

61  :
62  minEt_(para.getParameter<double>("minEt")),
63  maxEt_(para.getParameter<double>("maxEt")),
64  regionEtaMargin_(para.getParameter<double>("regionEtaMargin")),
65  regionPhiMargin_(para.getParameter<double>("regionPhiMargin")),
66  token_(consumesColl.consumes<T1>(para.getParameter<edm::InputTag>("inputColl"))){}
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< T1 > token_

Member Function Documentation

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

Implements L1RegionDataBase.

Definition at line 233 of file HLTRecHitInAllL1RegionsProducer.h.

234 {
235  edm::Handle<L1CollType> l1Cands;
236  event.getByToken(token_,l1Cands);
237 
238  for(const auto& l1Cand : *l1Cands){
239  if(l1Cand.et() >= minEt_ && l1Cand.et() < maxEt_){
240 
241  double etaLow = l1Cand.eta() - regionEtaMargin_;
242  double etaHigh = l1Cand.eta() + regionEtaMargin_;
243  double phiLow = l1Cand.phi() - regionPhiMargin_;
244  double phiHigh = l1Cand.phi() + regionPhiMargin_;
245 
246  regions.push_back(EcalEtaPhiRegion(etaLow,etaHigh,phiLow,phiHigh));
247  }
248  }
249 }
edm::EDGetTokenT< T1 > token_
template<>
void L1RegionData< l1extra::L1JetParticleCollection >::getEtaPhiRegions ( const edm::Event event,
std::vector< EcalEtaPhiRegion > &  regions,
const L1CaloGeometry l1CaloGeom 
) const
virtual

Implements L1RegionDataBase.

Definition at line 252 of file HLTRecHitInAllL1RegionsProducer.h.

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

253 {
255  event.getByToken(token_,l1Cands);
256 
257  for(const auto& l1Cand : *l1Cands){
258  if(l1Cand.et() >= minEt_ && l1Cand.et() < maxEt_){
259 
260  // Access the GCT hardware object corresponding to the L1Extra EM object.
261  int etaIndex = l1Cand.gctJetCand()->etaIndex();
262  int phiIndex = l1Cand.gctJetCand()->phiIndex();
263 
264  // Use the L1CaloGeometry to find the eta, phi bin boundaries.
265  double etaLow = l1CaloGeom.etaBinLowEdge(etaIndex);
266  double etaHigh = l1CaloGeom.etaBinHighEdge(etaIndex);
267  double phiLow = l1CaloGeom.emJetPhiBinLowEdge( phiIndex ) ;
268  double phiHigh = l1CaloGeom.emJetPhiBinHighEdge( phiIndex ) ;
269 
270  etaLow -= regionEtaMargin_;
271  etaHigh += regionEtaMargin_;
272  phiLow -= regionPhiMargin_;
273  phiHigh += regionPhiMargin_;
274 
275 
276  regions.push_back(EcalEtaPhiRegion(etaLow,etaHigh,phiLow,phiHigh));
277  }
278  }
279 }
double etaBinHighEdge(unsigned int etaIndex, bool central=true) const
double etaBinLowEdge(unsigned int etaIndex, bool central=true) const
edm::EDGetTokenT< T1 > token_
double emJetPhiBinLowEdge(unsigned int phiIndex) const
double emJetPhiBinHighEdge(unsigned int phiIndex) const
template<>
void L1RegionData< l1extra::L1EmParticleCollection >::getEtaPhiRegions ( const edm::Event event,
std::vector< EcalEtaPhiRegion > &  regions,
const L1CaloGeometry l1CaloGeom 
) const
virtual

Implements L1RegionDataBase.

Definition at line 282 of file HLTRecHitInAllL1RegionsProducer.h.

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

283 {
285  event.getByToken(token_,l1Cands);
286 
287  for(const auto& l1Cand : *l1Cands){
288  if(l1Cand.et() >= minEt_ && l1Cand.et() < maxEt_){
289 
290  // Access the GCT hardware object corresponding to the L1Extra EM object.
291  int etaIndex = l1Cand.gctEmCand()->etaIndex();
292  int phiIndex = l1Cand.gctEmCand()->phiIndex();
293 
294  // Use the L1CaloGeometry to find the eta, phi bin boundaries.
295  double etaLow = l1CaloGeom.etaBinLowEdge(etaIndex);
296  double etaHigh = l1CaloGeom.etaBinHighEdge(etaIndex);
297  double phiLow = l1CaloGeom.emJetPhiBinLowEdge( phiIndex ) ;
298  double phiHigh = l1CaloGeom.emJetPhiBinHighEdge( phiIndex ) ;
299 
300  etaLow -= regionEtaMargin_;
301  etaHigh += regionEtaMargin_;
302  phiLow -= regionPhiMargin_;
303  phiHigh += regionPhiMargin_;
304 
305  regions.push_back(EcalEtaPhiRegion(etaLow,etaHigh,phiLow,phiHigh));
306  }
307  }
308 }
double etaBinHighEdge(unsigned int etaIndex, bool central=true) const
double etaBinLowEdge(unsigned int etaIndex, bool central=true) const
edm::EDGetTokenT< T1 > token_
double emJetPhiBinLowEdge(unsigned int phiIndex) const
double emJetPhiBinHighEdge(unsigned int phiIndex) const

Member Data Documentation

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

Definition at line 56 of file HLTRecHitInAllL1RegionsProducer.h.

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

Definition at line 55 of file HLTRecHitInAllL1RegionsProducer.h.

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

Definition at line 57 of file HLTRecHitInAllL1RegionsProducer.h.

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

Definition at line 58 of file HLTRecHitInAllL1RegionsProducer.h.

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

Definition at line 59 of file HLTRecHitInAllL1RegionsProducer.h.