File indexing completed on 2024-04-06 12:11:50
0001 #include "Fireworks/ParticleFlow/plugins/FWPFCandidateTowerSliceSelector.h"
0002 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
0003 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
0004
0005 #include "Fireworks/Core/interface/FWModelChangeManager.h"
0006 #include "Fireworks/Core/interface/FWEventItem.h"
0007
0008 FWPFCandidateTowerSliceSelector::FWPFCandidateTowerSliceSelector(TH2F* h, const FWEventItem* i)
0009 : FWHistSliceSelector(h, i) {}
0010
0011 FWPFCandidateTowerSliceSelector::~FWPFCandidateTowerSliceSelector() {}
0012 void FWPFCandidateTowerSliceSelector::getItemEntryEtaPhi(int itemIdx, float& eta, float& phi) const {
0013 const reco::PFCandidateCollection* towers = nullptr;
0014 m_item->get(towers);
0015 assert(nullptr != towers);
0016 reco::PFCandidateCollection::const_iterator tower = towers->begin();
0017 std::advance(tower, itemIdx);
0018
0019 eta = tower->eta();
0020 phi = tower->phi();
0021 }