Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 // system include files
0002 #include <typeinfo>
0003 
0004 // user include files
0005 #include "TH2F.h"
0006 #include "TMath.h"
0007 #include "Fireworks/Calo/plugins/FWHGCalMultiClusterSliceSelector.h"
0008 #include "Fireworks/Core/interface/FWModelChangeManager.h"
0009 #include "Fireworks/Core/interface/FWEventItem.h"
0010 #include "DataFormats/CaloTowers/interface/CaloTower.h"
0011 #include "DataFormats/CaloTowers/interface/CaloTowerDefs.h"
0012 
0013 #include "DataFormats/ParticleFlowReco/interface/HGCalMultiCluster.h"
0014 
0015 FWHGCalMultiClusterSliceSelector::FWHGCalMultiClusterSliceSelector(TH2F *h, const FWEventItem *i)
0016     : FWHistSliceSelector(h, i) {}
0017 
0018 FWHGCalMultiClusterSliceSelector::~FWHGCalMultiClusterSliceSelector() {}
0019 
0020 void FWHGCalMultiClusterSliceSelector::getItemEntryEtaPhi(int itemIdx, float &eta, float &phi) const {
0021   const std::vector<reco::HGCalMultiCluster> *towers = nullptr;
0022   m_item->get(towers);
0023   assert(nullptr != towers);
0024 
0025   std::vector<reco::HGCalMultiCluster>::const_iterator tower = towers->begin();
0026   std::advance(tower, itemIdx);
0027 
0028   eta = tower->eta();
0029   phi = tower->phi();
0030 }