00001 // @(#)root/g3d:$Id: TTRAP.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: Nenad Buncic 19/09/95 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2000, 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_TTRAP 00013 #define ROOT_TTRAP 00014 00015 00016 //////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // TTRAP // 00019 // // 00020 // TRAP is a general trapezoid, i.e. one for which the faces perpendicular// 00021 // to z are trapezia and their centres are not the same x, y. It has 11 // 00022 // parameters: the half length in z, the polar angles from the centre of // 00023 // the face at low z to that at high z, H1 the half length in y at low z, // 00024 // LB1 the half length in x at low z and y low edge, LB2 the half length // 00025 // in x at low z and y high edge, TH1 the angle w.r.t. the y axis from the// 00026 // centre of low y edge to the centre of the high y edge, and H2, LB2, // 00027 // LH2, TH2, the corresponding quantities at high z. // 00028 // // 00029 //////////////////////////////////////////////////////////////////////////// 00030 00031 #ifndef ROOT_TBRIK 00032 #include "TBRIK.h" 00033 #endif 00034 00035 class TTRAP : public TBRIK { 00036 protected: 00037 Float_t fH1; // half length in y at low z 00038 Float_t fBl1; // half length in x at low z and y low edge 00039 Float_t fTl1; // half length in x at low z and y high edge 00040 Float_t fAlpha1; // angle w.r.t. the y axis 00041 Float_t fH2; // half length in y at high z 00042 Float_t fBl2; // half length in x at high z and y low edge 00043 Float_t fTl2; // half length in x at high z and y high edge 00044 Float_t fAlpha2; // angle w.r.t. the y axis 00045 00046 virtual void SetPoints(Double_t *points) const; 00047 00048 public: 00049 TTRAP(); 00050 TTRAP(const char *name, const char *title, const char *material, Float_t dz, Float_t theta, Float_t phi, Float_t h1, 00051 Float_t bl1, Float_t tl1, Float_t alpha1, Float_t h2, Float_t bl2, Float_t tl2, 00052 Float_t alpha2); 00053 virtual ~TTRAP(); 00054 00055 virtual Float_t GetH1() const {return fH1;} 00056 virtual Float_t GetBl1() const {return fBl1;} 00057 virtual Float_t GetTl1() const {return fTl1;} 00058 virtual Float_t GetAlpha1() const {return fAlpha1;} 00059 virtual Float_t GetH2() const {return fH2;} 00060 virtual Float_t GetBl2() const {return fBl2;} 00061 virtual Float_t GetTl2() const {return fTl2;} 00062 virtual Float_t GetAlpha2() const {return fAlpha2;} 00063 00064 ClassDef(TTRAP,1) //TRAP shape 00065 }; 00066 00067 #endif