CMS 3D CMS Logo

FWCandidateTowerProxyBuilder.cc
Go to the documentation of this file.
2 
3 // system includes
4 #include <cmath>
5 
6 // user includes
7 #include "TEveCaloData.h"
8 #include "TEveCalo.h"
9 #include "TH2F.h"
10 
15 
17 
19 
20 //
21 // constructors , dectructors
22 //
24 
26 
27 //
28 // member functions
29 //
30 
32  if (iItem) {
33  m_helper.itemChanged(iItem);
34  }
35 }
36 
37 void FWCandidateTowerProxyBuilder::build(const FWEventItem* iItem, TEveElementList* el, const FWViewContext* ctx) {
38  // m_towers=0;
39  if (iItem) {
40  // iItem->get(m_towers);
41  FWCaloDataProxyBuilderBase::build(iItem, el, ctx);
42  }
43 }
44 
47  return ss;
48 }
49 
51  m_hist->Reset();
52 
53  // if (m_towers)
54  {
55  if (item()->defaultDisplayProperties().isVisible()) {
56  // assert(item()->size() >= m_towers->size());
57  for (size_t index = 0; index < item()->size(); ++index) {
59  if (info.displayProperties().isVisible()) {
60  const void* modelData = item()->modelData((int)index);
61 
62  const reco::Candidate* tower = reinterpret_cast<const reco::Candidate*>(m_helper.offsetObject(modelData));
63  addEntryToTEveCaloData(tower->eta(), tower->phi(), getEt(*tower), info.isSelected());
64  }
65  }
66  }
67  }
68 }
69 
72  "CaloTower",
size_t size() const
Definition: FWEventItem.cc:457
FWHistSliceSelector * instantiateSliceSelector() override
const void * modelData(int iIndex) const
Definition: FWEventItem.cc:466
static const TGPicture * info(bool iBackgroundIsBlack)
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
Definition: FWViewType.h:57
virtual void itemChangedImp(const FWEventItem *)
void addEntryToTEveCaloData(float eta, float phi, float Et, bool isSelected)
const void * offsetObject(const void *iObj) const
virtual double getEt(const reco::Candidate &cand) const
static constexpr unsigned int k3DBit
Definition: FWViewType.h:49
static const int kAllLegoBits
Definition: FWViewType.h:59
fixed size matrix
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
const FWEventItem * item() const
void itemChanged(const FWEventItem *)