TEveJetCone.h

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveJetCone.h 35221 2010-09-10 11:46:37Z matevz $
00002 // Author: Matevz Tadel, Jochen Thaeder 2009
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TEveJetCone
00013 #define ROOT_TEveJetCone
00014 
00015 #include "TEveShape.h"
00016 #include "TEveVector.h"
00017 
00018 
00019 //------------------------------------------------------------------------------
00020 // TEveJetCone
00021 //------------------------------------------------------------------------------
00022 
00023 class TEveJetCone : public TEveShape
00024 {
00025    friend class TEveJetConeProjected;
00026    friend class TEveJetConeGL;
00027    friend class TEveJetConeProjectedGL;
00028 
00029 private:
00030    TEveJetCone(const TEveJetCone&);            // Not implemented
00031    TEveJetCone& operator=(const TEveJetCone&); // Not implemented
00032 
00033 protected:
00034    TEveVector      fApex;        // Apex of the cone.
00035    TEveVector      fAxis;        // Axis of the cone.
00036    TEveVector      fLimits;      // Border of Barrel/Cylinder to cut the cone.
00037    Float_t         fThetaC;      // Transition theta
00038    Float_t         fEta,  fPhi;
00039    Float_t         fDEta, fDPhi;
00040    Int_t           fNDiv;
00041 
00042    TEveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const;
00043    TEveVector CalcBaseVec  (Float_t eta, Float_t phi) const;
00044    TEveVector CalcBaseVec  (Float_t alpha) const;
00045    Bool_t     IsInTransitionRegion() const;
00046 
00047 public:
00048    TEveJetCone(const Text_t* n="TEveJetCone", const Text_t* t="");
00049    virtual ~TEveJetCone() {}
00050 
00051    virtual void    ComputeBBox();
00052    virtual TClass* ProjectedClass(const TEveProjection* p) const;
00053 
00054    void  SetApex(const TEveVector& a)      { fApex = a; }
00055    void  SetCylinder(Float_t r, Float_t z) { fLimits.Set(0, r, z); fThetaC = fLimits.Theta(); }
00056    void  SetRadius  (Float_t r)            { fLimits.Set(r, 0, 0); fThetaC = 10; }
00057 
00058    Int_t GetNDiv() const  { return fNDiv; }
00059    void  SetNDiv(Int_t n) { fNDiv = TMath::Max(3, n); }
00060 
00061    Int_t AddCone(Float_t eta, Float_t phi, Float_t cone_r, Float_t length=0);
00062    Int_t AddEllipticCone(Float_t eta, Float_t phi, Float_t reta, Float_t rphi, Float_t length=0);
00063 
00064    ClassDef(TEveJetCone, 0); // Short description.
00065 };
00066 
00067 
00068 //------------------------------------------------------------------------------
00069 // TEveJetConeProjected
00070 //------------------------------------------------------------------------------
00071 
00072 class TEveJetConeProjected : public TEveShape,
00073                              public TEveProjected
00074 {
00075    friend class TEveJetConeProjectedGL;
00076 
00077 private:
00078    TEveJetConeProjected(const TEveJetConeProjected&);            // Not implemented
00079    TEveJetConeProjected& operator=(const TEveJetConeProjected&); // Not implemented
00080 
00081 protected:
00082    virtual void SetDepthLocal(Float_t d);
00083 
00084 public:
00085    TEveJetConeProjected(const char* n="TEveJetConeProjected", const char* t="");
00086    virtual ~TEveJetConeProjected();
00087 
00088    // For TAttBBox:
00089    virtual void ComputeBBox();
00090 
00091    // Projected:
00092    virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable* model);
00093    virtual void UpdateProjection();
00094 
00095    virtual TEveElement* GetProjectedAsElement() { return this; }
00096 
00097    ClassDef(TEveJetConeProjected, 0); // Projection of TEveJetCone.
00098 };
00099 
00100 #endif

Generated on Tue Jul 5 14:14:57 2011 for ROOT_528-00b_version by  doxygen 1.5.1