File indexing completed on 2024-04-06 12:11:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "TH2F.h"
0017 #include "TMath.h"
0018 #include "Fireworks/Calo/plugins/FWCaloTowerSliceSelector.h"
0019 #include "Fireworks/Core/interface/FWModelChangeManager.h"
0020 #include "Fireworks/Core/interface/FWEventItem.h"
0021 #include "DataFormats/CaloTowers/interface/CaloTower.h"
0022 #include "DataFormats/CaloTowers/interface/CaloTowerDefs.h"
0023
0024 FWCaloTowerSliceSelector::FWCaloTowerSliceSelector(TH2F* h, const FWEventItem* i) : FWHistSliceSelector(h, i) {}
0025
0026 FWCaloTowerSliceSelector::~FWCaloTowerSliceSelector() {}
0027
0028 void FWCaloTowerSliceSelector::getItemEntryEtaPhi(int itemIdx, float& eta, float& phi) const {
0029 const CaloTowerCollection* towers = nullptr;
0030 m_item->get(towers);
0031 assert(nullptr != towers);
0032 CaloTowerCollection::const_iterator tower = towers->begin();
0033 std::advance(tower, itemIdx);
0034
0035 eta = tower->eta();
0036 phi = tower->phi();
0037 }