Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:26:59

0001 #include "Fireworks/Candidates/interface/FWCandidateTowerSliceSelector.h"
0002 
0003 #include "DataFormats/PatCandidates/interface/PackedCandidate.h"
0004 
0005 #include "Fireworks/Core/interface/FWModelChangeManager.h"
0006 #include "Fireworks/Core/interface/FWEventItem.h"
0007 #include "Fireworks/Core/interface/FWSimpleProxyHelper.h"
0008 
0009 FWCandidateTowerSliceSelector::FWCandidateTowerSliceSelector(TH2F* h, const FWEventItem* i, FWSimpleProxyHelper* helper)
0010     : FWHistSliceSelector(h, i), m_helper(helper) {}
0011 
0012 FWCandidateTowerSliceSelector::~FWCandidateTowerSliceSelector() {}
0013 void FWCandidateTowerSliceSelector::getItemEntryEtaPhi(int itemIdx, float& eta, float& phi) const {
0014   const void* modelData = m_item->modelData(itemIdx);
0015   if (modelData) {
0016     const reco::Candidate* tower = reinterpret_cast<const reco::Candidate*>(m_helper->offsetObject(modelData));
0017     eta = tower->eta();
0018     phi = tower->phi();
0019   }
0020 }