#ifndef ROOT_TEveCalo
#define ROOT_TEveCalo
#include "TEveElement.h"
#include "TEveProjectionBases.h"
#include "TEveProjectionManager.h"
#include "TAtt3D.h"
#include "TAttBBox.h"
#include "TEveCaloData.h"
class TClass;
class TEveRGBAPalette;
class TEveCaloViz : public TEveElement,
public TNamed,
public TAtt3D,
public TAttBBox,
public TEveProjectable
{
friend class TEveCaloVizEditor;
private:
TEveCaloViz(const TEveCaloViz&);
TEveCaloViz& operator=(const TEveCaloViz&);
protected:
TEveCaloData* fData;
Double_t fEtaMin;
Double_t fEtaMax;
Double_t fPhi;
Double_t fPhiOffset;
Float_t fBarrelRadius;
Float_t fEndCapPos;
Float_t fPlotEt;
Float_t fMaxTowerH;
Bool_t fScaleAbs;
Float_t fMaxValAbs;
Bool_t fValueIsColor;
TEveRGBAPalette* fPalette;
Bool_t fCellIdCacheOK;
void AssignCaloVizParameters(TEveCaloViz* cv);
void SetupColorHeight(Float_t value, Int_t slice, Float_t& height) const;
virtual Float_t GetValToHeight() const;
virtual void BuildCellIdCache() = 0;
public:
TEveCaloViz(const Text_t* n="TEveCaloViz", const Text_t* t="");
TEveCaloViz(TEveCaloData* data, const Text_t* n="TEveCaloViz", const Text_t* t="");
virtual ~TEveCaloViz();
TEveCaloData* GetData() const { return fData; }
virtual void SetData(TEveCaloData* d);
virtual void DataChanged();
Float_t GetDataSliceThreshold(Int_t slice) const;
void SetDataSliceThreshold(Int_t slice, Float_t val);
Color_t GetDataSliceColor(Int_t slice) const;
void SetDataSliceColor(Int_t slice, Color_t col);
Float_t GetBarrelRadius() const { return fBarrelRadius; }
void SetBarrelRadius(Float_t r) { fBarrelRadius = r; ResetBBox(); }
Float_t GetEndCapPos () const { return fEndCapPos; }
void SetEndCapPos (Float_t z) { fEndCapPos = z; ResetBBox(); }
Bool_t GetPlotEt() const { return fPlotEt; }
virtual void SetPlotEt(Bool_t x);
void SetMaxTowerH(Float_t x) { fMaxTowerH = x; }
Float_t GetMaxTowerH() const { return fMaxTowerH; }
void SetScaleAbs(Bool_t x) { fScaleAbs = x; }
Bool_t GetScaleAbs() const { return fScaleAbs; }
void SetMaxValAbs(Float_t x) { fMaxValAbs = x; }
Float_t GetMaxValAbs() const { return fMaxValAbs; }
Float_t GetMaxVal() const;
Float_t GetTransitionEta() const;
Float_t GetTransitionTheta() const;
TEveRGBAPalette* GetPalette() const { return fPalette; }
void SetPalette(TEveRGBAPalette* p);
TEveRGBAPalette* AssertPalette();
Bool_t GetValueIsColor() const { return fValueIsColor;}
void SetValueIsColor(Bool_t x) { fValueIsColor = x;}
void SetEta(Float_t l, Float_t u);
Float_t GetEta() const { return (fEtaMin+fEtaMax)*0.5f;}
Float_t GetEtaMin() const {return fEtaMin;}
Float_t GetEtaMax() const {return fEtaMax;}
Float_t GetEtaRng() const {return fEtaMax-fEtaMin;}
virtual void SetPhi(Float_t phi) { SetPhiWithRng(phi, fPhiOffset); }
virtual void SetPhiRng(Float_t rng) { SetPhiWithRng(fPhi, rng); }
virtual void SetPhiWithRng(Float_t x, Float_t r);
Float_t GetPhi() const { return fPhi;}
Float_t GetPhiMin() const {return fPhi-fPhiOffset;}
Float_t GetPhiMax() const {return fPhi+fPhiOffset;}
Float_t GetPhiRng() const {return fPhiOffset*2;}
void InvalidateCellIdCache() { fCellIdCacheOK=kFALSE; ResetBBox(); }
virtual void Paint(Option_t* option="");
virtual TClass* ProjectedClass() const;
ClassDef(TEveCaloViz, 0);
};
class TEveCalo3D : public TEveCaloViz
{
friend class TEveCalo3DGL;
private:
TEveCalo3D(const TEveCalo3D&);
TEveCalo3D& operator=(const TEveCalo3D&);
protected:
TEveCaloData::vCellId_t fCellList;
virtual void BuildCellIdCache();
public:
TEveCalo3D(const Text_t* n="TEveCalo3D", const Text_t* t=""):TEveCaloViz(n, t){}
TEveCalo3D(TEveCaloData* data): TEveCaloViz(data) { SetElementName("TEveCalo3D");}
virtual ~TEveCalo3D() {}
virtual void ComputeBBox();
ClassDef(TEveCalo3D, 0);
};
class TEveCalo2D : public TEveCaloViz,
public TEveProjected
{
friend class TEveCalo2DGL;
private:
TEveCalo2D(const TEveCalo2D&);
TEveCalo2D& operator=(const TEveCalo2D&);
TEveProjection::EPType_e fOldProjectionType;
protected:
std::vector<TEveCaloData::vCellId_t*> fCellLists;
virtual void BuildCellIdCache();
public:
TEveCalo2D(const Text_t* n="TEveCalo2D", const Text_t* t="");
virtual ~TEveCalo2D(){}
virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable* model);
virtual void UpdateProjection();
virtual void SetDepth(Float_t x){fDepth = x;}
virtual void ComputeBBox();
ClassDef(TEveCalo2D, 0);
};
class TEveCaloLego : public TEveCaloViz
{
friend class TEveCaloLegoGL;
public:
enum EProjection_e { kAuto, k3D, k2D };
enum E2DMode_e { kValColor, kValSize };
enum EBoxMode_e { kNone, kFrontBack, kBack};
private:
TEveCaloLego(const TEveCaloLego&);
TEveCaloLego& operator=(const TEveCaloLego&);
protected:
TEveCaloData::vCellId_t fCellList;
Color_t fFontColor;
Color_t fGridColor;
Color_t fPlaneColor;
UChar_t fPlaneTransparency;
Int_t fNZSteps;
Float_t fZAxisStep;
Int_t fBinWidth;
EProjection_e fProjection;
E2DMode_e f2DMode;
EBoxMode_e fBoxMode;
Bool_t fDrawHPlane;
Float_t fHPlaneVal;
virtual void BuildCellIdCache();
public:
TEveCaloLego(const Text_t* n="TEveCaloLego", const Text_t* t="");
TEveCaloLego(TEveCaloData* data);
virtual ~TEveCaloLego(){}
Color_t GetFontColor() const { return fFontColor; }
void SetFontColor(Color_t ci) { fFontColor=ci; }
Color_t GetGridColor() const { return fGridColor; }
void SetGridColor(Color_t ci) { fGridColor=ci; }
Color_t GetPlaneColor() const { return fPlaneColor; }
void SetPlaneColor(Color_t ci) { fPlaneColor=ci; }
UChar_t GetPlaneTransparency() const { return fPlaneTransparency; }
void SetPlaneTransparency(UChar_t t) { fPlaneTransparency=t; }
Int_t GetNZSteps() const { return fNZSteps; }
void SetNZSteps(Int_t s) { fNZSteps = s;}
Int_t GetBinWidth() const { return fBinWidth; }
void SetBinWidth(Int_t bw) { fBinWidth = bw; }
void SetProjection(EProjection_e p) { fProjection = p; }
EProjection_e GetProjection() { return fProjection; }
void Set2DMode(E2DMode_e p) { f2DMode = p; }
E2DMode_e Get2DMode() { return f2DMode; }
void SetBoxMode(EBoxMode_e p) { fBoxMode = p; }
EBoxMode_e GetBoxMode() { return fBoxMode; }
Bool_t GetDrawHPlane() const { return fDrawHPlane; }
void SetDrawHPlane(Bool_t s) { fDrawHPlane = s;}
Float_t GetHPlaneVal() const { return fHPlaneVal; }
void SetHPlaneVal(Float_t s) { fHPlaneVal = s;}
virtual void ComputeBBox();
ClassDef(TEveCaloLego, 0);
};
#endif
Last change: Wed Jun 25 08:36:36 2008
Last generated: 2008-06-25 08:36
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.