28#include <nlohmann/json.hpp> 
   52   fPhiOffset(
TMath::Pi()),
 
 
  173   using namespace TMath;
 
 
  194   using namespace TMath;
 
 
  212   using namespace TMath;
 
 
  230   using namespace TMath;
 
 
  271   delta = 0.5*(max - min);
 
  273      fPhi       = 0.5*(max + min);
 
 
  298      cv->BuildCellIdCache();
 
 
  401   return TClass::GetClass<REveCalo2D>();
 
 
  412      assert(
"fValueIsColor" && 
false);
 
 
  434   j[
"sliceColors"] =  nlohmann::json::array();
 
  439   j[
"fSecondarySelect"] = 
true;
 
 
  455   fRnrEndCapFrame    (
kTRUE),
 
  456   fRnrBarrelFrame    (
kTRUE),
 
  458   fFrameColor        (
kGray+1),
 
  459   fFrameTransparency (80)
 
 
  472   using namespace TMath;
 
 
  537   using namespace TMath;
 
 
  605   fRenderData = std::make_unique<REveRenderData>(
"makeCalo3D");
 
 
  670   auto sarr = nlohmann::json::array();
 
  678         jsc[
"t"] = i->fTower;
 
  679         jsc[
"s"] = i->fSlice;
 
  680         jsc[
"f"] = i->fFraction;
 
  685   nlohmann::json rec = {};
 
 
  762   for(
UInt_t i = 0; i < 
n; ++i) {
 
  772   for(
UInt_t i = 0; i < 
n; ++i) {
 
 
  850               delete clv; 
clv = 
nullptr;
 
  864         if (low >= min && 
up <= max)
 
  869               delete clv; 
clv = 
nullptr;
 
 
  928   for(
UInt_t bin = 1; bin <= nBins; ++bin)
 
  938            if( (*i).fTower == (*j).fTower && (*i).fSlice == (*j).fSlice)
 
  943               outputCellLists[bin]->emplace_back((*i).fTower, (*i).fSlice, (*j).fFraction);
 
 
  998   x = -
r, 
y = 0, z = 0;
 
 1009   x = 0, 
y = 
r,  z = 0;
 
 1012   x = 0, 
y = -
r, z = 0;
 
 
 1033   auto sarr = nlohmann::json::array();
 
 1037   std::vector<REveCaloData::vCellId_t*> 
cellLists;
 
 1053               throw eh + 
"selected cell not in cell list cache.";
 
 1103               throw(
eh + 
"selected cell not in cell list cache.");
 
 1161   nlohmann::json rec = {};
 
 1163   rec[
"cells"] = 
sarr;
 
 
 1173   fRenderData = std::make_unique<REveRenderData>(
"makeCalo2D");
 
 1179      if ((*it) && (*it)->empty())
 
 
 1281   using namespace TMath;
 
 1318   for (
Int_t i = 0; i < 4; ++i)
 
 
 1385   using namespace TMath;
 
 1396   for (
Int_t i = 0; i < 4; ++i)
 
 
 1416      if ((*it).fSlice == slice)
 
 
 1448   fPlaneColor(
kRed-5),
 
 1449   fPlaneTransparency(60),
 
 1466   fHasFixedHeightIn2DMode(
kFALSE),
 
 1467   fFixedHeightValIn2DMode(0.f),
 
 1469   fDrawNumberCellPixels(18), 
 
 1470   fCellPixelFontSize(12) 
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
 
virtual void AddNiece(REveElement *el)
 
void BuildRenderData() override
Creates 2D point array for rendering.
 
void SetProjection(REveProjectionManager *proj, REveProjectable *model) override
Set projection manager and model object.
 
void MakeRhoZCell(Float_t thetaMin, Float_t thetaMax, Float_t &offset, Bool_t isBarrel, Bool_t phiPlus, Float_t towerH, float *pntsOut) const
Get cell vertices in RhoZ projection.
 
void BuildRenderDataRPhi()
Creates 2D point array in RPhi() projection.
 
bool IsRPhi() const
Is current projection type RPhi.
 
void WriteCoreJsonSelection(nlohmann::json &j, REveCaloData::vCellId_t) override
Fill core part of JSON representation for selection.
 
void ComputeBBox() override
Fill bounding-box information of the base-class TAttBBox (virtual method).
 
~REveCalo2D() override
Destructor.
 
std::vector< REveCaloData::vCellId_t * >::iterator vBinCells_i
 
void NewBinPicked(Int_t bin, Int_t slice, Int_t selectionId, Bool_t multi)
Client callback.
 
void CellSelectionChangedInternal(REveCaloData::vCellId_t &cells, std::vector< REveCaloData::vCellId_t * > &cellLists)
s////////////////////////////////// Sort selected cells in eta or phi bins.
 
REveProjection::EPType_e fOldProjectionType
 
REveCalo2D(const char *n="REveCalo2D", const char *t="")
Constructor.
 
void UpdateProjection() override
This is virtual method from base-class REveProjected.
 
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
 
std::vector< REveCaloData::vCellId_t * > fCellLists
 
std::vector< REveCaloData::vCellId_t * > fCellListsSelected
 
void BuildCellIdCache() override
Build lists of drawn cell IDs. See REveCalo2DGL::DirecDraw().
 
void BuildRenderDataRhoZ()
Creates 2D point array in RhoZ projection.
 
Float_t GetValToHeight() const override
Virtual function of REveCaloViz.
 
void MakeRPhiCell(Float_t phiMin, Float_t phiMax, Float_t towerH, Float_t offset, float *pntsOut) const
Calculate vertices for the calorimeter cell in RPhi projection.
 
void SetScaleAbs(Bool_t) override
Set absolute scale in projected calorimeter.
 
REveCalo3D(REveCaloData *d=nullptr, const char *n="REveCalo3D", const char *t="")
Constructor.
 
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
 
void ComputeBBox() override
Fill bounding-box information of the base-class TAttBBox (virtual method).
 
void MakeBarrelCell(const REveCaloData::CellGeom_t &cellData, float towerH, Float_t &offset, float *pnts) const
Make endcap cell.
 
void MakeEndCapCell(const REveCaloData::CellGeom_t &cellData, float towerH, Float_t &offset, float *pnts) const
Make endcap cell.
 
void WriteCoreJsonSelection(nlohmann::json &j, REveCaloData::vCellId_t) override
Fill core part of JSON representation for selection.
 
void BuildRenderData() override
Crates 3D point array for rendering.
 
void BuildCellIdCache() override
Build list of drawn cell IDs. See REveCalo3DGL::DirectDraw().
 
void NewTowerPicked(Int_t tower, Int_t slice, Int_t selectionId, Bool_t multi)
Client selection callback.
 
REveCaloData::vCellId_t fCellList
 
Color_t GetSliceColor(Int_t slice) const
Get color for given slice.
 
virtual Float_t GetMaxVal(Bool_t et) const
 
std::vector< CellId_t >::iterator vCellId_i
 
void SetSliceThreshold(Int_t slice, Float_t threshold)
Set threshold for given slice.
 
virtual void GetCellData(const CellId_t &id, CellData_t &data) const =0
 
virtual TAxis * GetEtaBins() const
 
static Float_t EtaToTheta(Float_t eta)
 
virtual Float_t GetEps() const
 
void ProcessSelection(vCellId_t &sel_cells, UInt_t selectionId, Bool_t multi)
Process newly selected cells with given select-record.
 
SliceInfo_t & RefSliceInfo(Int_t s)
 
virtual void GetEtaLimits(Double_t &min, Double_t &max) const =0
 
virtual void GetCellList(Float_t etaMin, Float_t etaMax, Float_t phi, Float_t phiRng, vCellId_t &out) const =0
 
virtual TAxis * GetPhiBins() const
 
std::vector< CellId_t > vCellId_t
 
void SetSliceColor(Int_t slice, Color_t col)
Set color for given slice.
 
virtual void GetPhiLimits(Double_t &min, Double_t &max) const =0
 
void BuildCellIdCache() override
Build list of drawn cell IDs. For more information see REveCaloLegoGL:DirectDraw().
 
virtual void SetData(REveCaloData *d)
 
void ComputeBBox() override
Fill bounding-box information of the base-class TAttBBox (virtual method).
 
REveCaloData::vCellId_t fCellList
 
REveCaloLego(REveCaloData *data=nullptr, const char *n="REveCaloLego", const char *t="")
Constructor.
 
Float_t GetPhiMax() const
 
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
 
virtual REveElement * ForwardSelection()
Management of selection state and ownership of selected cell list is done in REveCaloData.
 
Float_t GetPhiRng() const
 
Float_t GetBarrelRadius() const
 
Float_t GetEtaMin() const
 
Float_t GetMaxVal() const
 
Float_t GetEtaMax() const
 
Float_t GetBackwardEndCapPos() const
 
void SetPlotEt(Bool_t x)
Set E/Et plot.
 
Float_t GetTransitionTheta() const
Get transition angle between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
 
void SetPalette(REveRGBAPalette *p)
Set REveRGBAPalette object pointer.
 
Float_t GetPhiMin() const
 
virtual void SetScaleAbs(Bool_t x)
 
Float_t GetTransitionEtaForward() const
Get transition eta between barrel and forward end-cap cells.
 
void DataChanged()
Update setting and cache on data changed.
 
void SetDataSliceColor(Int_t slice, Color_t col)
Set slice color in data.
 
Float_t GetTransitionEta() const
Get transition eta between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
 
Color_t GetDataSliceColor(Int_t slice) const
Get slice color from data.
 
Float_t GetTransitionEtaBackward() const
Get transition eta between barrel and backward end-cap cells.
 
Bool_t AssertCellIdCache() const
Assert cell id cache is ok.
 
void SetPhiWithRng(Float_t x, Float_t r)
Set phi range.
 
~REveCaloViz() override
Destructor.
 
virtual Float_t GetValToHeight() const
Get transformation factor from E/Et to height.
 
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, returns REveCalo2D class.
 
Float_t GetDataSliceThreshold(Int_t slice) const
Get threshold for given slice.
 
Float_t GetForwardEndCapPos() const
 
Bool_t CellInEtaPhiRng(REveCaloData::CellData_t &) const
Returns true if given cell is in the ceta phi range.
 
void SetupHeight(Float_t value, Int_t slice, Float_t &height) const
Set color and height for a given value and slice using slice color or REveRGBAPalette.
 
Float_t GetEtaRng() const
 
Float_t GetTransitionThetaForward() const
Get transition angle between barrel and forward end-cap cells.
 
void SetData(REveCaloData *d)
Set calorimeter event data.
 
void InvalidateCellIdCache()
 
Float_t GetTransitionThetaBackward() const
Get transition angle between barrel and backward end-cap cells.
 
void AssignCaloVizParameters(REveCaloViz *cv)
Assign parameters from given model.
 
virtual REveElement * ForwardEdit()
Management of selection state and ownership of selected cell list is done in REveCaloData.
 
void SetDataSliceThreshold(Int_t slice, Float_t val)
Set threshold for given slice.
 
REveRGBAPalette * fPalette
 
REveRGBAPalette * AssertPalette()
Make sure the REveRGBAPalette pointer is not null.
 
void SetEta(Float_t l, Float_t u)
Set eta range.
 
void SetNameTitle(const std::string &name, const std::string &title)
Set name and title of an element.
 
Bool_t fCanEditMainTransparency
 
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
 
std::unique_ptr< REveRenderData > fRenderData
Externally assigned and controlled user data.
 
ElementId_t GetElementId() const
 
REveException Exception-type thrown by Eve classes.
 
virtual void SetProjection(REveProjectionManager *mng, REveProjectable *model)
Sets projection manager and reference in the projectable object.
 
REveProjectionManager * fManager
 
REveProjectionManager Manager class for steering of projections and managing projected objects.
 
REveProjection * GetProjection()
 
REveProjection Base for specific classes that implement non-linear projections.
 
virtual void ProjectPoint(Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e p=kPP_Full)=0
 
void SetMin(Int_t min)
Set current min value.
 
void SetMax(Int_t max)
Set current max value.
 
void SetLimits(Int_t low, Int_t high)
Set low/high limits on signal value.
 
void SetDefaultColor(Color_t ci)
Set default color.
 
static Bool_t IsU1IntervalOverlappingByMinMax(Float_t minM, Float_t maxM, Float_t minQ, Float_t maxQ)
Return true if interval Q is overlapping within interval M for U1 variables.
 
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.
 
const_iterator begin() const
 
const_iterator end() const
 
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
 
void BBoxZero(Float_t epsilon=0, Float_t x=0, Float_t y=0, Float_t z=0)
Create cube of volume (2*epsilon)^3 at (x,y,z).
 
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
 
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 GetBinWidth(Int_t bin) const
Return bin width.
 
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
 
TClass instances represent classes, structs and namespaces in the ROOT type system.
 
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
 
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
 
T1 Sign(T1 a, T2 b)
Returns a value with the magnitude of a and the sign of b.
 
Int_t CeilNint(Double_t x)
Returns the nearest integer of TMath::Ceil(x).