CMS 3D CMS Logo

FWPFCandidateTowerProxyBuilder.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 //
39 // member functions
40 //
41 
42 void FWPFCandidateTowerProxyBuilder::build(const FWEventItem* iItem, TEveElementList* el, const FWViewContext* ctx) {
43  m_towers = nullptr;
44  if (iItem) {
45  iItem->get(m_towers);
46  FWCaloDataProxyBuilderBase::build(iItem, el, ctx);
47  }
48 }
49 
52 }
53 
55  m_hist->Reset();
56 
57  if (m_towers) {
58  if (item()->defaultDisplayProperties().isVisible()) {
59  // assert(item()->size() >= m_towers->size());
60  unsigned int index = 0;
61  for (reco::PFCandidateConstIterator tower = m_towers->begin(); tower != m_towers->end(); ++tower, ++index) {
63  if (info.displayProperties().isVisible()) {
64  addEntryToTEveCaloData(tower->eta(), tower->phi(), getEt(*tower), info.isSelected());
65  }
66  }
67  }
68  }
69 }
70 
73  "CaloTowerPfCandEcal",
77  "CaloTowerPfCandHcal",
FWModelChangeManager.h
FWEventItem::modelInfo
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
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
reco::PFCandidateConstIterator
PFCandidateCollection::const_iterator PFCandidateConstIterator
iterator
Definition: PFCandidateFwd.h:18
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
FWPFCandidateTowerProxyBuilder::getEt
virtual double getEt(const reco::PFCandidate &) const =0
FWEventItem::ModelInfo
Definition: FWEventItem.h:58
FWPFCandidateTowerSliceSelector
Definition: FWPFCandidateTowerSliceSelector.h:6
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
FWPFCandidateTowerProxyBuilder::m_towers
const reco::PFCandidateCollection * m_towers
Definition: FWPFCandidateTowerProxyBuilder.h:47
FWHCalPFCandidateProxyBuilder
Definition: FWPFCandidateTowerProxyBuilder.h:76
FWCaloDataHistProxyBuilder::m_hist
TH2F * m_hist
Definition: FWCaloDataHistProxyBuilder.h:22
FWECalPFCandidateProxyBuilder
Definition: FWPFCandidateTowerProxyBuilder.h:54
FWPFCandidateTowerProxyBuilder.h
FWPFCandidateTowerProxyBuilder::instantiateSliceSelector
FWHistSliceSelector * instantiateSliceSelector() override
Definition: FWPFCandidateTowerProxyBuilder.cc:50
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWEventItem.h
FWViewContext
Definition: FWViewContext.h:32
FWProxyBuilderBase::item
const FWEventItem * item() const
Definition: FWProxyBuilderBase.h:64
FWEventItem
Definition: FWEventItem.h:56
FWPFCandidateTowerProxyBuilder::~FWPFCandidateTowerProxyBuilder
~FWPFCandidateTowerProxyBuilder() override
Definition: FWPFCandidateTowerProxyBuilder.cc:36
FWViewType::k3DBit
Definition: FWViewType.h:50
reco::PFCandidateCollection
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
Definition: PFCandidateFwd.h:12
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
FWPFCandidateTowerProxyBuilder::FWPFCandidateTowerProxyBuilder
FWPFCandidateTowerProxyBuilder()
Definition: FWPFCandidateTowerProxyBuilder.cc:34
FWPFCandidateTowerProxyBuilder::fillCaloData
void fillCaloData() override
Definition: FWPFCandidateTowerProxyBuilder.cc:54
fw3dlego_xbins.h
FWPFCandidateTowerSliceSelector.h
Context.h