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",
FWModelChangeManager.h
FWEventItem::modelInfo
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
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
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
FWHGCalMultiClusterLegoProxyBuilder
Definition: FWHGCalMultiClusterLegoProxyBuilder.h:15
EventBase.h
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
FWHGCalMultiClusterLegoProxyBuilder::m_towers
const std::vector< reco::HGCalMultiCluster > * m_towers
Definition: FWHGCalMultiClusterLegoProxyBuilder.h:31
FWViewType::kAllLegoBits
static const int kAllLegoBits
Definition: FWViewType.h:69
FWGeometry.h
FWCaloDataHistProxyBuilder::m_hist
TH2F * m_hist
Definition: FWCaloDataHistProxyBuilder.h:22
FWHGCalMultiClusterLegoProxyBuilder::instantiateSliceSelector
FWHistSliceSelector * instantiateSliceSelector() override
Definition: FWHGCalMultiClusterLegoProxyBuilder.cc:39
FWHGCalMultiClusterLegoProxyBuilder::fillCaloData
void fillCaloData() override
Definition: FWHGCalMultiClusterLegoProxyBuilder.cc:43
FWCaloDataHistProxyBuilder
Definition: FWCaloDataHistProxyBuilder.h:10
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWEventItem.h
FWHGCalMultiClusterSliceSelector.h
FWViewContext
Definition: FWViewContext.h:32
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWEventItem
Definition: FWEventItem.h:56
DetId.h
FWViewType::k3DBit
Definition: FWViewType.h:50
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
FWHGCalMultiClusterLegoProxyBuilder::~FWHGCalMultiClusterLegoProxyBuilder
~FWHGCalMultiClusterLegoProxyBuilder() override
Definition: FWHGCalMultiClusterLegoProxyBuilder.cc:27
FWHGCalMultiClusterSliceSelector
Definition: FWHGCalMultiClusterSliceSelector.h:7
fw3dlego_xbins.h
FWHGCalMultiClusterLegoProxyBuilder::FWHGCalMultiClusterLegoProxyBuilder
FWHGCalMultiClusterLegoProxyBuilder()
Definition: FWHGCalMultiClusterLegoProxyBuilder.cc:24
FWHGCalMultiClusterLegoProxyBuilder.h
Context.h