Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TEveJetCone.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/eve:$Id$
0002 // Author: Matevz Tadel, Jochen Thaeder 2009
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TEveJetCone
0013 #define ROOT_TEveJetCone
0014 
0015 #include "TEveShape.h"
0016 #include "TEveVector.h"
0017 
0018 
0019 //------------------------------------------------------------------------------
0020 // TEveJetCone
0021 //------------------------------------------------------------------------------
0022 
0023 class TEveJetCone : public TEveShape
0024 {
0025    friend class TEveJetConeProjected;
0026    friend class TEveJetConeGL;
0027    friend class TEveJetConeProjectedGL;
0028 
0029 private:
0030    TEveJetCone(const TEveJetCone&);            // Not implemented
0031    TEveJetCone& operator=(const TEveJetCone&); // Not implemented
0032 
0033 protected:
0034    TEveVector      fApex;        // Apex of the cone.
0035    TEveVector      fAxis;        // Axis of the cone.
0036    TEveVector      fLimits;      // Border of Barrel/Cylinder to cut the cone.
0037    Float_t         fThetaC;      // Transition theta
0038    Float_t         fEta,  fPhi;
0039    Float_t         fDEta, fDPhi;
0040    Int_t           fNDiv;
0041 
0042    TEveVector CalcEtaPhiVec(Float_t eta, Float_t phi) const;
0043    TEveVector CalcBaseVec  (Float_t eta, Float_t phi) const;
0044    TEveVector CalcBaseVec  (Float_t alpha) const;
0045    Bool_t     IsInTransitionRegion() const;
0046 
0047 public:
0048    TEveJetCone(const Text_t* n="TEveJetCone", const Text_t* t="");
0049    ~TEveJetCone() override {}
0050 
0051    void    ComputeBBox() override;
0052    TClass* ProjectedClass(const TEveProjection* p) const override;
0053 
0054    void  SetApex(const TEveVector& a)      { fApex = a; }
0055    void  SetCylinder(Float_t r, Float_t z) { fLimits.Set(0, r, z); fThetaC = fLimits.Theta(); }
0056    void  SetRadius  (Float_t r)            { fLimits.Set(r, 0, 0); fThetaC = 10; }
0057 
0058    Int_t GetNDiv() const  { return fNDiv; }
0059    void  SetNDiv(Int_t n) { fNDiv = TMath::Max(3, n); }
0060 
0061    Int_t AddCone(Float_t eta, Float_t phi, Float_t cone_r, Float_t length=0);
0062    Int_t AddEllipticCone(Float_t eta, Float_t phi, Float_t reta, Float_t rphi, Float_t length=0);
0063 
0064    ClassDefOverride(TEveJetCone, 0); // Short description.
0065 };
0066 
0067 
0068 //------------------------------------------------------------------------------
0069 // TEveJetConeProjected
0070 //------------------------------------------------------------------------------
0071 
0072 class TEveJetConeProjected : public TEveShape,
0073                              public TEveProjected
0074 {
0075    friend class TEveJetConeProjectedGL;
0076 
0077 private:
0078    TEveJetConeProjected(const TEveJetConeProjected&);            // Not implemented
0079    TEveJetConeProjected& operator=(const TEveJetConeProjected&); // Not implemented
0080 
0081 protected:
0082    void SetDepthLocal(Float_t d) override;
0083 
0084 public:
0085    TEveJetConeProjected(const char* n="TEveJetConeProjected", const char* t="");
0086    ~TEveJetConeProjected() override;
0087 
0088    // For TAttBBox:
0089    void ComputeBBox() override;
0090 
0091    // Projected:
0092    void SetProjection(TEveProjectionManager* mng, TEveProjectable* model) override;
0093    void UpdateProjection() override;
0094 
0095    TEveElement* GetProjectedAsElement() override { return this; }
0096 
0097    ClassDefOverride(TEveJetConeProjected, 0); // Projection of TEveJetCone.
0098 };
0099 
0100 #endif