Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TTRD1.cxx
Go to the documentation of this file.
1// @(#)root/g3d:$Id$
2// Author: Nenad Buncic 17/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#include "TTRD1.h"
13#include "TNode.h"
14
15
16/** \class TTRD1
17\ingroup g3d
18A trapezoid with the x dimension varying along z.
19
20\image html g3d_trd1.png
21
22It has 7 parameters:
23
24 - name: name of the shape
25 - title: shape's title
26 - material: (see TMaterial)
27 - dx1: half-length along x at the z surface positioned at -DZ
28 - dx2: half-length along x at the z surface positioned at +DZ
29 - dy: half-length along the y-axis
30 - dz: half-length along the z-axis
31*/
32
33////////////////////////////////////////////////////////////////////////////////
34/// TRD1 shape default constructor
35
37{
38 fDx2 = 0.;
39}
40
41////////////////////////////////////////////////////////////////////////////////
42/// TRD1 shape normal constructor
43
44TTRD1::TTRD1(const char *name, const char *title, const char *material, Float_t dx1, Float_t dx2, Float_t dy, Float_t dz)
45 : TBRIK(name, title,material,dx1,dy,dz)
46{
47 fDx2 = dx2;
48}
49
50////////////////////////////////////////////////////////////////////////////////
51/// TRD1 shape default destructor
52
54{
55}
56
57////////////////////////////////////////////////////////////////////////////////
58/// Create TRD1 points
59
61{
62 Float_t dx1, dx2, dy, dz;
63
65 dx2 = fDx2;
66 dy = TBRIK::fDy;
67 dz = TBRIK::fDz;
68
69 if (points) {
70 points[ 0] = -dx1 ; points[ 1] = -dy ; points[ 2] = -dz;
71 points[ 3] = -dx1 ; points[ 4] = dy ; points[ 5] = -dz;
72 points[ 6] = dx1 ; points[ 7] = dy ; points[ 8] = -dz;
73 points[ 9] = dx1 ; points[10] = -dy ; points[11] = -dz;
74 points[12] = -dx2 ; points[13] = -dy ; points[14] = dz;
75 points[15] = -dx2 ; points[16] = dy ; points[17] = dz;
76 points[18] = dx2 ; points[19] = dy ; points[20] = dz;
77 points[21] = dx2 ; points[22] = -dy ; points[23] = dz;
78 }
79}
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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
Float_t fDz
Definition TBRIK.h:31
Float_t fDy
Definition TBRIK.h:30
Float_t fDx
Definition TBRIK.h:29
Float_t fDx2
Definition TTRD1.h:30
void SetPoints(Double_t *points) const override
Create TRD1 points.
Definition TTRD1.cxx:60
TTRD1()
TRD1 shape default constructor.
Definition TTRD1.cxx:36
~TTRD1() override
TRD1 shape default destructor.
Definition TTRD1.cxx:53