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",
FWModelChangeManager.h
FWSimpleProxyHelper::itemChanged
void itemChanged(const FWEventItem *)
Definition: FWSimpleProxyHelper.cc:62
FWEventItem::modelInfo
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
CaloTower.h
configurableAnalysis::Candidate
char Candidate[]
Definition: modules.cc:20
FWViewType::kAllRPZBits
static const int kAllRPZBits
Definition: FWViewType.h:67
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition: FWProxyBuilderFactory.h:33
FWCandidateTowerProxyBuilder::getEt
virtual double getEt(const reco::Candidate &cand) const
Definition: FWCandidateTowerProxyBuilder.h:23
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
FWCandidateTowerProxyBuilder::instantiateSliceSelector
FWHistSliceSelector * instantiateSliceSelector() override
Definition: FWCandidateTowerProxyBuilder.cc:45
FWCandidateTowerProxyBuilder::m_helper
FWSimpleProxyHelper m_helper
Definition: FWCandidateTowerProxyBuilder.h:38
FWEventItem::modelData
const void * modelData(int iIndex) const
Definition: FWEventItem.cc:466
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
FWCandidateTowerProxyBuilder::fillCaloData
void fillCaloData() override
Definition: FWCandidateTowerProxyBuilder.cc:50
FWEventItem::ModelInfo
Definition: FWEventItem.h:58
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
FWHistSliceSelector
Definition: FWHistSliceSelector.h:7
FWCaloDataHistProxyBuilder::addEntryToTEveCaloData
void addEntryToTEveCaloData(float eta, float phi, float Et, bool isSelected)
Definition: FWCaloDataHistProxyBuilder.cc:76
FWViewType::kAllLegoBits
static const int kAllLegoBits
Definition: FWViewType.h:69
FWCandidateTowerProxyBuilder::~FWCandidateTowerProxyBuilder
~FWCandidateTowerProxyBuilder() override
Definition: FWCandidateTowerProxyBuilder.cc:25
FWCaloDataHistProxyBuilder::m_hist
TH2F * m_hist
Definition: FWCaloDataHistProxyBuilder.h:22
FWSimpleProxyHelper::offsetObject
const void * offsetObject(const void *iObj) const
Definition: FWSimpleProxyHelper.h:36
FWCandidateTowerProxyBuilder
Definition: FWCandidateTowerProxyBuilder.h:18
FWCandidateTowerProxyBuilder.h
FWCandidateTowerSliceSelector
Definition: FWCandidateTowerSliceSelector.h:7
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWEventItem.h
FWViewContext
Definition: FWViewContext.h:32
reco::Candidate
Definition: Candidate.h:27
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWEventItem
Definition: FWEventItem.h:56
FWCandidateTowerProxyBuilder::FWCandidateTowerProxyBuilder
FWCandidateTowerProxyBuilder()
Definition: FWCandidateTowerProxyBuilder.cc:23
FWViewType::k3DBit
Definition: FWViewType.h:50
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
FWCandidateTowerProxyBuilder::itemChangedImp
virtual void itemChangedImp(const FWEventItem *)
Definition: FWCandidateTowerProxyBuilder.cc:31
fw3dlego_xbins.h
FWCandidateTowerSliceSelector.h
FWEventItem::size
size_t size() const
Definition: FWEventItem.cc:457
Context.h