9 #include "TEveCaloData.h"
24 double wrapPi(
double val)
26 using namespace TMath;
30 return val +=
TwoPi();
34 return val -=
TwoPi();
63 Bool_t
status = TH1::AddDirectoryStatus();
64 TH1::AddDirectory(kFALSE);
65 m_hist =
new TH2F(
"caloHist",
69 TH1::AddDirectory(status);
70 TEveCaloDataHist* ch =
static_cast<TEveCaloDataHist*
>(
m_caloData);
76 item()->defaultDisplayProperties().
color(),
77 item()->defaultDisplayProperties().transparency());
92 m_caloData->SetUserData(static_cast<FWFromEveSelectorBase*>(sel));
105 using namespace TMath;
106 static float d = 2.5*
Pi()/180;
113 m_hist->Fill(eta,wrapPi(phi - 3*
d), Et *0.25);
114 m_hist->Fill(eta,wrapPi(phi -
d), Et *0.25);
115 m_hist->Fill(eta,wrapPi(phi +
d), Et *0.25);
116 m_hist->Fill(eta,wrapPi(phi + 3*
d), Et *0.25);
120 m_hist->Fill(eta,wrapPi(phi -
d), Et *0.5);
121 m_hist->Fill(eta,wrapPi(phi +
d), Et *0.5);
125 m_hist->Fill(eta,phi, Et);
130 m_hist->Fill(eta,phi, Et);
133 TEveCaloData::vCellId_t& selected =
m_caloData->GetCellsSelected();
143 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi -3*
d)),
m_sliceIndex));
144 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi -
d)) ,
m_sliceIndex));
145 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi +
d)) ,
m_sliceIndex));
146 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi +3*
d)),
m_sliceIndex));
150 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi -
d)),
m_sliceIndex));
151 selected.push_back(TEveCaloData::CellId_t(
m_hist->FindBin(eta, wrapPi(phi +
d)),
m_sliceIndex));
const fireworks::Context & context() const
void addSliceSelector(int iSlice, FWFromSliceSelector *)
const FWEventItem * item() const
FWHistSliceSelector * m_sliceSelector
virtual FWHistSliceSelector * instantiateSliceSelector()=0
TEveCaloDataHist * getCaloData() const
void addEntryToTEveCaloData(float eta, float phi, float Et, bool isSelected)
virtual void itemBeingDestroyed(const FWEventItem *)
virtual bool assertCaloDataSlice()
virtual ~FWCaloDataHistProxyBuilder()
virtual void setCaloData(const fireworks::Context &)
virtual bool aggregatePhiCells() const
FWCaloDataHistProxyBuilder()
virtual void itemBeingDestroyed(const FWEventItem *)
TEveCaloData * m_caloData