00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "TCONS.h"
00013 #include "TNode.h"
00014
00015
00016 ClassImp(TCONS)
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 TCONS::TCONS()
00045 {
00046
00047
00048 fRmin2 = 0.;
00049 fRmax2 = 0.;
00050 }
00051
00052
00053
00054 TCONS::TCONS(const char *name, const char *title, const char *material, Float_t dz, Float_t rmin1, Float_t rmax1, Float_t rmin2, Float_t rmax2,
00055 Float_t phi1, Float_t phi2)
00056 : TTUBS(name,title,material,rmin1,rmax1,dz,phi1,phi2)
00057 {
00058
00059
00060 fRmin2 = rmin2;
00061 fRmax2 = rmax2;
00062 }
00063
00064
00065
00066 TCONS::TCONS(const char *name, const char *title, const char *material, Float_t rmax1, Float_t dz
00067 , Float_t phi1, Float_t phi2, Float_t rmax2)
00068 : TTUBS(name,title,material,rmax1,dz,phi1,phi2)
00069 {
00070
00071
00072 fRmin2 = 0;
00073 fRmax2 = rmax2;
00074 }
00075
00076
00077 TCONS::~TCONS()
00078 {
00079
00080 }
00081
00082
00083 void TCONS::SetPoints(Double_t *points) const
00084 {
00085
00086
00087 Int_t j, n;
00088 Float_t rmin1, rmax1, dz;
00089
00090 n = GetNumberOfDivisions()+1;
00091
00092 rmin1 = TTUBE::fRmin;
00093 rmax1 = TTUBE::fRmax;
00094 dz = TTUBE::fDz;
00095
00096 Int_t indx = 0;
00097
00098 if (!fCoTab) MakeTableOfCoSin();
00099
00100 if (points) {
00101 for (j = 0; j < n; j++) {
00102 points[indx++] = rmin1 * fCoTab[j];
00103 points[indx++] = rmin1 * fSiTab[j];
00104 points[indx++] = -dz;
00105 }
00106 for (j = 0; j < n; j++) {
00107 points[indx++] = rmax1 * fCoTab[j];
00108 points[indx++] = rmax1 * fSiTab[j];
00109 points[indx++] = -dz;
00110 }
00111 for (j = 0; j < n; j++) {
00112 points[indx++] = fRmin2 * fCoTab[j];
00113 points[indx++] = fRmin2 * fSiTab[j];
00114 points[indx++] = dz;
00115 }
00116 for (j = 0; j < n; j++) {
00117 points[indx++] = fRmax2 * fCoTab[j];
00118 points[indx++] = fRmax2 * fSiTab[j];
00119 points[indx++] = dz;
00120 }
00121 }
00122 }