Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TTRAP.h
Go to the documentation of this file.
1// @(#)root/g3d:$Id$
2// Author: Nenad Buncic 19/09/95
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TTRAP
13#define ROOT_TTRAP
14
15
16////////////////////////////////////////////////////////////////////////////
17// //
18// TTRAP //
19// //
20// TRAP is a general trapezoid, i.e. one for which the faces perpendicular//
21// to z are trapezia and their centres are not the same x, y. It has 11 //
22// parameters: the half length in z, the polar angles from the centre of //
23// the face at low z to that at high z, H1 the half length in y at low z, //
24// LB1 the half length in x at low z and y low edge, LB2 the half length //
25// in x at low z and y high edge, TH1 the angle w.r.t. the y axis from the//
26// centre of low y edge to the centre of the high y edge, and H2, LB2, //
27// LH2, TH2, the corresponding quantities at high z. //
28// //
29////////////////////////////////////////////////////////////////////////////
30
31#include "TBRIK.h"
32
33class TTRAP : public TBRIK {
34protected:
35 Float_t fH1; // half length in y at low z
36 Float_t fBl1; // half length in x at low z and y low edge
37 Float_t fTl1; // half length in x at low z and y high edge
38 Float_t fAlpha1; // angle w.r.t. the y axis
39 Float_t fH2; // half length in y at high z
40 Float_t fBl2; // half length in x at high z and y low edge
41 Float_t fTl2; // half length in x at high z and y high edge
42 Float_t fAlpha2; // angle w.r.t. the y axis
43
44 void SetPoints(Double_t *points) const override;
45
46public:
47 TTRAP();
48 TTRAP(const char *name, const char *title, const char *material, Float_t dz, Float_t theta, Float_t phi, Float_t h1,
49 Float_t bl1, Float_t tl1, Float_t alpha1, Float_t h2, Float_t bl2, Float_t tl2,
50 Float_t alpha2);
51 ~TTRAP() override;
52
53 virtual Float_t GetH1() const {return fH1;}
54 virtual Float_t GetBl1() const {return fBl1;}
55 virtual Float_t GetTl1() const {return fTl1;}
56 virtual Float_t GetAlpha1() const {return fAlpha1;}
57 virtual Float_t GetH2() const {return fH2;}
58 virtual Float_t GetBl2() const {return fBl2;}
59 virtual Float_t GetTl2() const {return fTl2;}
60 virtual Float_t GetAlpha2() const {return fAlpha2;}
61
62 ClassDefOverride(TTRAP,1) //TRAP shape
63};
64
65#endif
float Float_t
Definition RtypesCore.h:57
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
char name[80]
Definition TGX11.cxx:110
A box with faces perpendicular to the axes.
Definition TBRIK.h:26
A general trapezoid.
Definition TTRAP.h:33
Float_t fAlpha1
Definition TTRAP.h:38
Float_t fAlpha2
Definition TTRAP.h:42
Float_t fH1
Definition TTRAP.h:35
virtual Float_t GetH2() const
Definition TTRAP.h:57
virtual Float_t GetBl2() const
Definition TTRAP.h:58
~TTRAP() override
TRAP shape default destructor.
Definition TTRAP.cxx:89
Float_t fTl1
Definition TTRAP.h:37
TTRAP()
TRAP shape default constructor.
Definition TTRAP.cxx:57
Float_t fBl2
Definition TTRAP.h:40
virtual Float_t GetAlpha2() const
Definition TTRAP.h:60
void SetPoints(Double_t *points) const override
Create TRAP points.
Definition TTRAP.cxx:96
virtual Float_t GetH1() const
Definition TTRAP.h:53
virtual Float_t GetTl2() const
Definition TTRAP.h:59
Float_t fH2
Definition TTRAP.h:39
Float_t fBl1
Definition TTRAP.h:36
virtual Float_t GetTl1() const
Definition TTRAP.h:55
virtual Float_t GetAlpha1() const
Definition TTRAP.h:56
virtual Float_t GetBl1() const
Definition TTRAP.h:54
Float_t fTl2
Definition TTRAP.h:41
TH1F * h1
Definition legend1.C:5