CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
FWCaloTowerProxyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Calo
4 // Class : FWCaloTowerProxyBuilderBase
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Wed Dec 3 11:28:28 EST 2008
11 //
12 
13 // system includes
14 #include <cmath>
15 
16 // user includes
17 #include "TEveCaloData.h"
18 #include "TEveCalo.h"
19 #include "TH2F.h"
20 
24 
28 
30 
31 //
32 // constructors , dectructors
33 //
35 
37 
38 void FWCaloTowerProxyBuilderBase::build(const FWEventItem* iItem, TEveElementList* el, const FWViewContext* ctx) {
39  m_towers = nullptr;
40  if (iItem) {
41  iItem->get(m_towers);
42  FWCaloDataProxyBuilderBase::build(iItem, el, ctx);
43  }
44 }
45 
47  return new FWCaloTowerSliceSelector(m_hist, item());
48 }
49 
51  m_hist->Reset();
52 
53  if (m_towers) {
54  if (item()->defaultDisplayProperties().isVisible()) {
55  unsigned int index = 0;
58  if (info.displayProperties().isVisible()) {
59  addEntryToTEveCaloData(tower->eta(), tower->phi(), getEt(*tower), info.isSelected());
60  }
61  }
62  }
63  }
64 }
65 
68  "ECal",
72  "HCal",
76  "HCal Outer",
FWCaloTowerProxyBuilderBase::instantiateSliceSelector
FWHistSliceSelector * instantiateSliceSelector() override
Definition: FWCaloTowerProxyBuilder.cc:46
FWModelChangeManager.h
FWEventItem::modelInfo
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
edm::SortedCollection< CaloTower >::const_iterator
std::vector< CaloTower >::const_iterator const_iterator
Definition: SortedCollection.h:80
CaloTower.h
FWViewType::kAllRPZBits
static const int kAllRPZBits
Definition: FWViewType.h:67
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition: FWProxyBuilderFactory.h:33
FWEventItem::get
void get(const T *&oData) const
Definition: FWEventItem.h:78
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
edm::SortedCollection< CaloTower >
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
FWEventItem::ModelInfo
Definition: FWEventItem.h:58
FWHistSliceSelector
Definition: FWHistSliceSelector.h:7
FWCaloDataHistProxyBuilder::addEntryToTEveCaloData
void addEntryToTEveCaloData(float eta, float phi, float Et, bool isSelected)
Definition: FWCaloDataHistProxyBuilder.cc:76
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
FWHOCaloTowerProxyBuilder
Definition: FWCaloTowerProxyBuilder.h:98
FWViewType::kAllLegoBits
static const int kAllLegoBits
Definition: FWViewType.h:69
FWCaloTowerProxyBuilder.h
FWCaloTowerProxyBuilderBase::m_towers
const CaloTowerCollection * m_towers
Definition: FWCaloTowerProxyBuilder.h:50
FWCaloDataHistProxyBuilder::m_hist
TH2F * m_hist
Definition: FWCaloDataHistProxyBuilder.h:22
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
FWHCalCaloTowerProxyBuilder
Definition: FWCaloTowerProxyBuilder.h:77
FWCaloTowerSliceSelector
Definition: FWCaloTowerSliceSelector.h:27
FWCaloDataHistProxyBuilder
Definition: FWCaloDataHistProxyBuilder.h:10
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWEventItem.h
FWViewContext
Definition: FWViewContext.h:32
FWCaloTowerSliceSelector.h
FWCaloTowerProxyBuilderBase::FWCaloTowerProxyBuilderBase
FWCaloTowerProxyBuilderBase()
Definition: FWCaloTowerProxyBuilder.cc:34
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWCaloTowerProxyBuilderBase::fillCaloData
void fillCaloData() override
Definition: FWCaloTowerProxyBuilder.cc:50
FWEventItem
Definition: FWEventItem.h:56
FWViewType::k3DBit
Definition: FWViewType.h:50
FWECalCaloTowerProxyBuilder
Definition: FWCaloTowerProxyBuilder.h:57
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
FWCaloTowerProxyBuilderBase::getEt
virtual double getEt(const CaloTower &) const =0
fw3dlego_xbins.h
Context.h
FWCaloTowerProxyBuilderBase::~FWCaloTowerProxyBuilderBase
~FWCaloTowerProxyBuilderBase() override
Definition: FWCaloTowerProxyBuilder.cc:36