Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 09:33:14

0001 // @(#)root/graf:$Id$
0002 // Author: Rene Brun   08/08/2002
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, 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_TCrown
0013 #define ROOT_TCrown
0014 
0015 
0016 #include "TEllipse.h"
0017 
0018 
0019 class TCrown : public TEllipse {
0020    Double_t fYXRatio = 1;  // ratio between Y and X axis
0021 
0022 public:
0023    TCrown();
0024    TCrown(Double_t x1, Double_t y1,Double_t radin, Double_t radout,
0025           Double_t phimin=0,Double_t phimax=360);
0026    TCrown(const TCrown &crown);
0027    ~TCrown() override;
0028 
0029    void SetYXRatio(Double_t v = 1) { fYXRatio = v; }
0030    Double_t GetYXRatio() const { return fYXRatio; }
0031 
0032    void Copy(TObject &crown) const override;
0033    Int_t   DistancetoPrimitive(Int_t px, Int_t py) override;
0034    virtual TCrown *DrawCrown(Double_t x1, Double_t y1, Double_t radin, Double_t radout,
0035                              Double_t  phimin=0, Double_t  phimax=360, Option_t *option="");
0036    void    ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0037    Int_t   IsInside(Double_t x, Double_t y) const;
0038    void    Paint(Option_t *option="") override;
0039    void    SavePrimitive(std::ostream &out, Option_t *option = "") override;
0040 
0041    ClassDefOverride(TCrown,2)  //A crown or segment of crown
0042 };
0043 
0044 #endif