File indexing completed on 2025-01-18 10:12:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_TMarker3DBox
0012 #define ROOT_TMarker3DBox
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 #include "TObject.h"
0031 #include "TAttLine.h"
0032 #include "TAttFill.h"
0033 #include "TAtt3D.h"
0034
0035 class TH1;
0036
0037 class TMarker3DBox : public TObject, public TAttLine, public TAttFill,
0038 public TAtt3D {
0039 protected:
0040 Float_t fX;
0041 Float_t fY;
0042 Float_t fZ;
0043 Float_t fDx;
0044 Float_t fDy;
0045 Float_t fDz;
0046
0047 Float_t fTheta;
0048 Float_t fPhi;
0049 TObject *fRefObject;
0050
0051 TMarker3DBox(const TMarker3DBox&);
0052 TMarker3DBox& operator=(const TMarker3DBox&);
0053
0054 enum { kTemporary = BIT(23) };
0055
0056 public:
0057 TMarker3DBox();
0058 TMarker3DBox(Float_t x, Float_t y, Float_t z,
0059 Float_t dx, Float_t dy, Float_t dz,
0060 Float_t theta, Float_t phi);
0061 ~TMarker3DBox() override;
0062
0063 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0064 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0065 TObject *GetRefObject() const {return fRefObject;}
0066 virtual void GetDirection(Float_t &theta, Float_t &phi) const {theta = fTheta; phi = fPhi;}
0067 virtual void GetPosition(Float_t &x, Float_t &y, Float_t &z) const {x=fX; y=fY, z=fZ;}
0068 virtual void GetSize(Float_t &dx, Float_t &dy, Float_t &dz) const {dx=fDx; dy=fDy; dz=fDz;}
0069
0070 void Paint(Option_t *option) override;
0071 static void PaintH3(TH1 *h, Option_t *option);
0072 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0073 virtual void SetPoints(Double_t *buff) const;
0074 virtual void SetDirection(Float_t theta, Float_t phi);
0075 virtual void SetPosition(Float_t x, Float_t y, Float_t z);
0076 virtual void SetSize(Float_t dx, Float_t dy, Float_t dz);
0077 virtual void SetRefObject(TObject *obj = nullptr) {fRefObject = obj;}
0078
0079 ClassDefOverride(TMarker3DBox,2)
0080 };
0081
0082 #endif