Fireworks
Calo
plugins
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
9
#include "
Fireworks/Core/interface/Context.h
"
10
#include "
Fireworks/Core/interface/FWEventItem.h
"
11
#include "
Fireworks/Core/interface/FWGeometry.h
"
12
#include "
Fireworks/Core/interface/FWModelChangeManager.h
"
13
14
#include "
Fireworks/Core/interface/fw3dlego_xbins.h
"
15
#include "
Fireworks/Calo/plugins/FWHGCalMultiClusterLegoProxyBuilder.h
"
16
#include "
Fireworks/Calo/plugins/FWHGCalMultiClusterSliceSelector.h
"
17
18
#include "
FWCore/Common/interface/EventBase.h
"
19
20
#include "
DataFormats/DetId/interface/DetId.h
"
21
22
#include "TEveCompound.h"
23
24
FWHGCalMultiClusterLegoProxyBuilder::FWHGCalMultiClusterLegoProxyBuilder
()
25
:
FWCaloDataHistProxyBuilder
(), m_towers(nullptr) {}
26
27
FWHGCalMultiClusterLegoProxyBuilder::~FWHGCalMultiClusterLegoProxyBuilder
() {}
28
29
void
FWHGCalMultiClusterLegoProxyBuilder::build
(
const
FWEventItem
*iItem,
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
39
FWHistSliceSelector
*
FWHGCalMultiClusterLegoProxyBuilder::instantiateSliceSelector
() {
40
return
new
FWHGCalMultiClusterSliceSelector
(
m_hist
,
item
());
41
}
42
43
void
FWHGCalMultiClusterLegoProxyBuilder::fillCaloData
() {
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
) {
51
const
FWEventItem::ModelInfo
&
info
=
item
()->
modelInfo
(
index
);
52
if
(
info
.displayProperties().isVisible()) {
53
addEntryToTEveCaloData
(
tower
->eta(),
tower
->phi(),
tower
->pt(),
info
.isSelected());
54
}
55
}
56
}
57
}
58
}
59
60
REGISTER_FWPROXYBUILDER
(
FWHGCalMultiClusterLegoProxyBuilder
,
61
std::vector<reco::HGCalMultiCluster>,
62
"HGCMultiClusterLego"
,
63
FWViewType::k3DBit
|
FWViewType::kAllRPZBits
|
FWViewType::kAllLegoBits
);
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:3
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition:
FWCollectionSummaryWidget.cc:152
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
Generated for CMSSW Reference Manual by
1.8.16