54 ::Error(
"TEveCaloData::CellGeom_t::Configure",
"phiMin and phiMax should be between -2*pi and 2*pi (min=%f, max=%f). RhoZ projection will be wrong.",
84 printf(
"%f, %f %f, %f \n", fEtaMin, fEtaMax, fPhiMin, fPhiMax);
92 if (fBinData[bin] == -1)
94 fBinData[bin] = fSliceData.size();
96 for (
Int_t i=0; i<fNSlices; i++)
97 fSliceData.push_back(0.f);
100 return &fSliceData[fBinData[bin]];
197 printf(
"Tower [%d] Slice [%d] Value [%.2f] ", i->fTower, i->fSlice,
cellData.fValue);
210 typedef std::set<CellId_t>::iterator
sCellId_i;
240 if (rec.GetMultiple())
243 helper::fill_cell_set(
cs,
cells);
246 std::set<CellId_t>::iterator
csi =
cs.find(*i);
259 helper::fill_cell_vec(
cells,
cs);
269 helper::fill_cell_set(
cs,
cells);
292 if (!rec.GetMultiple())
372 calo->InvalidateCellIdCache();
373 calo->StampObjProps();
389 calo->StampObjProps();
404 calo->CellSelectionChanged();
405 calo->StampColorSelection();
413 using namespace TMath;
416 return Pi() - 2*ATan(Exp(- Abs(eta)));
418 return 2*ATan(Exp(- Abs(eta)));
462 fSliceVec.push_back(std::vector<Float_t> ());
515 using namespace TMath;
574 rdata.fBinData.assign((
ax->GetNbins()+2)*(
ay->GetNbins()+2), -1);
577 for (
vCellId_i it = ids.begin(); it != ids.end(); ++it)
619 using namespace TMath;
650 std::vector<Double_t> binX;
651 std::vector<Double_t>
binY;
657 binX.push_back(ch.
EtaMin());
658 binX.push_back(ch.
EtaMax());
663 std::sort(binX.begin(), binX.end());
673 std::vector<Double_t>
newX;
674 newX.push_back(binX.front());
678 val = (
sum +binX[i])/(cnt+1);
679 if (binX[i+1] -val >
epsX)
691 newX.push_back(binX.back());
696 std::vector<Double_t>
newY;
761 using namespace TMath;
802 using namespace TMath;
855 rdata.fBinData.assign((
ax->GetNbins()+2)*(
ay->GetNbins()+2), -1);
862 for (
vCellId_i it=ids.begin(); it!=ids.end(); ++it)
865 GetHist(it->fSlice)->GetBinXYZ((*it).fTower, i,
j,
w);
869 val =
rdata.GetSliceVals(bin);
873 val[(*it).fSlice] += cd.
Value(
et)*ratio;
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
const_iterator begin() const
const_iterator end() const
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
virtual Color_t GetLineColor() const
Return the line color.
Class to manage histogram axis.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
A central manager for calorimeter data of an event written in TH2F.
TH2F * GetHist(Int_t slice) const
Get histogram in given slice.
void Rebin(TAxis *ax, TAxis *ay, vCellId_t &in, Bool_t et, RebinData_t &out) const override
Rebin.
void GetCellList(Float_t etaMin, Float_t etaMax, Float_t phi, Float_t phiRng, vCellId_t &out) const override
Get list of cell IDs in given eta and phi range.
Int_t AddHistogram(TH2F *hist)
Add new slice to calo tower.
TEveCaloDataHist()
Constructor.
void GetEtaLimits(Double_t &min, Double_t &max) const override
Get eta limits.
void GetCellData(const TEveCaloData::CellId_t &id, TEveCaloData::CellData_t &data) const override
Get cell geometry and value from cell ID.
void DataChanged() override
Update limits and notify data users.
~TEveCaloDataHist() override
Destructor.
void GetPhiLimits(Double_t &min, Double_t &max) const override
Get phi limits.
Calo data for universal cell geometry.
void Rebin(TAxis *ax, TAxis *ay, vCellId_t &in, Bool_t et, RebinData_t &out) const override
Rebin cells.
Int_t AddSlice()
Add new slice.
void SetAxisFromBins(Double_t epsX=0.001, Double_t epsY=0.001)
Set XY axis from cells geometry.
~TEveCaloDataVec() override
Destructor.
TEveCaloDataVec(const TEveCaloDataVec &)
std::vector< vFloat_t >::iterator vvFloat_i
void FillSlice(Int_t slice, Float_t value)
Fill given slice in the current tower.
void DataChanged() override
Update limits and notify data users.
Int_t AddTower(Float_t etaMin, Float_t etaMax, Float_t phiMin, Float_t phiMax)
Add tower within eta/phi range.
void GetCellList(Float_t etaMin, Float_t etaMax, Float_t phi, Float_t phiRng, vCellId_t &out) const override
Get list of cell-ids for given eta/phi range.
void GetCellData(const TEveCaloData::CellId_t &id, TEveCaloData::CellData_t &data) const override
Get cell geometry and value from cell ID.
A central manager for calorimeter event data.
TEveCaloData(const TEveCaloData &)
void FillImpliedSelectedSet(Set_t &impSelSet) override
Populate set impSelSet with derived / dependant elements.
std::vector< CellId_t > vCellId_t
static Float_t EtaToTheta(Float_t eta)
void SetSliceColor(Int_t slice, Color_t col)
Set color for given slice.
void ProcessSelection(vCellId_t &sel_cells, TGLSelectRecord &rec)
Process newly selected cells with given select-record.
virtual void GetCellData(const CellId_t &id, CellData_t &data) const =0
Char_t GetSliceTransparency(Int_t slice) const
Get transparency for given slice.
vCellId_t fCellsHighlighted
void UnHighlighted() override
Virtual method TEveElement::UnHighlighted.
void SetSliceTransparency(Int_t slice, Char_t t)
Set transparency for given slice.
void SetSliceThreshold(Int_t slice, Float_t threshold)
Set threshold for given slice.
virtual void InvalidateUsersCellIdCache()
Invalidate cell ids cache on back ptr references.
Color_t GetSliceColor(Int_t slice) const
Get color for given slice.
virtual void DataChanged()
Tell users (TEveCaloViz instances using this data) that data has changed and they should update the l...
TString GetHighlightTooltip() override
std::vector< CellGeom_t >::const_iterator vCellGeom_ci
virtual void CellSelectionChanged()
Tell users (TEveCaloViz instances using this data) that cell selection has changed and they should up...
Float_t GetSliceThreshold(Int_t slice) const
Get threshold for given slice.
void UnSelected() override
Virtual method TEveElement::UnSelect.
void PrintCellsSelected()
Print selected cells info.
std::vector< CellId_t >::iterator vCellId_i
Base class for calorimeter data visualization.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
std::set< TEveElement * > Set_t
List_t::const_iterator List_ci
static Float_t GetFraction(Float_t minM, Float_t maxM, Float_t minQ, Float_t maxQ)
Get fraction of interval [minQ, maxQ] in [minM, maxM].
static Bool_t IsU1IntervalContainedByMinMax(Float_t minM, Float_t maxM, Float_t minQ, Float_t maxQ)
Return true if interval Q is contained within interval M for U1 variables.
Standard selection record including information about containing scene and details ob out selected ob...
@ kModifyingInternalSelection
virtual void GetBinXYZ(Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const
Return binx, biny, binz corresponding to the global bin number globalbin see TH1::GetBin function abo...
2-D histogram with a float per channel (see TH1 documentation)
Service class for 2-D histogram classes.
Int_t GetBin(Int_t binx, Int_t biny, Int_t binz=0) const override
Return Global bin number corresponding to binx,y,z.
Double_t GetBinContent(Int_t binx, Int_t biny) const override
The Histogram stack class.
virtual void Add(TH1 *h, Option_t *option="")
Add a new histogram to the list.
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
constexpr Double_t TwoPi()
Cell data inner structure.
Float_t Value(Bool_t) const
Return energy value associated with the cell, usually Et.
void Dump() const override
Print member data.
Cell geometry inner structure.
virtual void Dump() const
Print member data.
void Configure(Float_t etaMin, Float_t etaMax, Float_t phiMin, Float_t phiMax)
Float_t * GetSliceVals(Int_t bin)
static uint64_t sum(uint64_t i)