CMS 3D CMS Logo

FWHGCalMultiClusterLegoProxyBuilder.cc
Go to the documentation of this file.
1 // system includes
2 #include <cmath>
3 
4 // user includes
5 #include "TEveCaloData.h"
6 #include "TEveCalo.h"
7 #include "TH2F.h"
8 
13 
17 
19 
21 
22 #include "TEveCompound.h"
23 
25  : FWCaloDataHistProxyBuilder(), m_towers(nullptr) {}
26 
28 
30  TEveElementList *product,
31  const FWViewContext *vc) {
32  m_towers = nullptr;
33  if (iItem) {
34  iItem->get(m_towers);
35  FWCaloDataProxyBuilderBase::build(iItem, product, vc);
36  }
37 }
38 
41 }
42 
44  m_hist->Reset();
45 
46  if (m_towers) {
47  if (item()->defaultDisplayProperties().isVisible()) {
48  unsigned int index = 0;
49  for (std::vector<reco::HGCalMultiCluster>::const_iterator tower = m_towers->begin(); tower != m_towers->end();
50  ++tower, ++index) {
52  if (info.displayProperties().isVisible()) {
53  addEntryToTEveCaloData(tower->eta(), tower->phi(), tower->pt(), info.isSelected());
54  }
55  }
56  }
57  }
58 }
59 
61  std::vector<reco::HGCalMultiCluster>,
62  "HGCMultiClusterLego",
static const TGPicture * info(bool iBackgroundIsBlack)
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
Definition: FWViewType.h:57
void get(const T *&oData) const
Definition: FWEventItem.h:78
FWHistSliceSelector * instantiateSliceSelector() override
const std::vector< reco::HGCalMultiCluster > * m_towers
void addEntryToTEveCaloData(float eta, float phi, float Et, bool isSelected)
static constexpr unsigned int k3DBit
Definition: FWViewType.h:49
static const int kAllLegoBits
Definition: FWViewType.h:59
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
const FWEventItem * item() const