CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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",
FWHistSliceSelector * instantiateSliceSelector() override
static const TGPicture * info(bool iBackgroundIsBlack)
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:64
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
Definition: FWViewType.h:67
virtual void itemChangedImp(const FWEventItem *)
bool isSelected() const
Definition: FWEventItem.h:65
const void * offsetObject(const void *iObj) const
const FWEventItem * item() const
void addEntryToTEveCaloData(float eta, float phi, float Et, bool isSelected)
size_t size() const
Definition: FWEventItem.cc:457
static const int kAllLegoBits
Definition: FWViewType.h:69
virtual double getEt(const reco::Candidate &cand) const
const void * modelData(int iIndex) const
Definition: FWEventItem.cc:466
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
void itemChanged(const FWEventItem *)
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity