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