9 #include "TEveCaloData.h"
18 double wrapPi(
double val) {
19 using namespace TMath;
22 return val +=
TwoPi();
25 return val -=
TwoPi();
43 Bool_t
status = TH1::AddDirectoryStatus();
44 TH1::AddDirectory(kFALSE);
46 TH1::AddDirectory(status);
47 TEveCaloDataHist* ch =
static_cast<TEveCaloDataHist*
>(
m_caloData);
53 item()->defaultDisplayProperties().color(),
54 item()->defaultDisplayProperties().transparency());
66 m_caloData->SetUserData(static_cast<FWFromEveSelectorBase*>(sel));
77 using namespace TMath;
78 static float d = 2.5 *
Pi() / 180;
83 m_hist->Fill(eta, wrapPi(phi - 3 *
d), Et * 0.25);
84 m_hist->Fill(eta, wrapPi(phi -
d), Et * 0.25);
85 m_hist->Fill(eta, wrapPi(phi +
d), Et * 0.25);
86 m_hist->Fill(eta, wrapPi(phi + 3 *
d), Et * 0.25);
88 m_hist->Fill(eta, wrapPi(phi -
d), Et * 0.5);
89 m_hist->Fill(eta, wrapPi(phi +
d), Et * 0.5);
91 m_hist->Fill(eta, phi, Et);
94 m_hist->Fill(eta, phi, Et);
97 TEveCaloData::vCellId_t& selected =
m_caloData->GetCellsSelected();
105 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi - 3 *
d)),
m_sliceIndex));
106 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi -
d)),
m_sliceIndex));
107 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi +
d)),
m_sliceIndex));
108 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi + 3 *
d)),
m_sliceIndex));
111 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi -
d)),
m_sliceIndex));
112 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi +
d)),
m_sliceIndex));
const fireworks::Context & context() const
void itemBeingDestroyed(const FWEventItem *) override
void addSliceSelector(int iSlice, FWFromSliceSelector *)
const FWEventItem * item() const
FWHistSliceSelector * m_sliceSelector
virtual FWHistSliceSelector * instantiateSliceSelector()=0
void itemBeingDestroyed(const FWEventItem *) override
void setCaloData(const fireworks::Context &) override
TEveCaloDataHist * getCaloData() const
void addEntryToTEveCaloData(float eta, float phi, float Et, bool isSelected)
~FWCaloDataHistProxyBuilder() override
bool isSelected(const std::vector< L1HPSPFTauQualityCut > &qualityCuts, const l1t::PFCandidate &pfCand, float_t primaryVertexZ)
virtual bool aggregatePhiCells() const
FWCaloDataHistProxyBuilder()
bool assertCaloDataSlice() override
TEveCaloData * m_caloData