//*CMZ :  2.22/00 17/04/99  07.50.09  by  Rene Brun
//*CMZ :  2.00/12 07/10/98  08.52.28  by  Valery Fine(fine@mail.cern.ch)
//*CMZ :  1.03/09 07/12/97  16.04.56  by  Fons Rademakers
//*-- Author :    Nenad Buncic   18/09/95

//*KEEP,CopyRight,T=C.
/*************************************************************************
 * Copyright(c) 1995-1999, The ROOT System, All rights reserved.         *
 * Authors: Rene Brun and Fons Rademakers.                               *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/AA_LICENSE.                      *
 * For the list of contributors see $ROOTSYS/AA_CREDITS.                 *
 *************************************************************************/
//*KEND.

//*KEEP,TCONS.
#include "TCONS.h"
//*KEEP,TNode.
#include "TNode.h"
//*KEND.


ClassImp(TCONS)



//______________________________________________________________________________
//  

// CONS is a segment of a conical tube. It has 10 parameters: // // - name name of the shape // - title shape's title // - material (see TMaterial) // - dz half-length in z // - rmin1 inside radius at -DZ in z // - rmax1 outside radius at -DZ in z // - rmin2 inside radius at +DZ in z // - rmax2 outside radius at +DZ in z // - phi1 starting angle of the segment // - phi2 ending angle of the segment // // // NOTE: phi1 should be smaller than phi2. If this is not the case, // the system adds 360 degrees to phi2. //______________________________________________________________________________ TCONS::TCONS() { //*-*-*-*-*-*-*-*-*-*-*-*CONS shape default constructor*-*-*-*-*-*-*-*-*-*-*-*-* //*-* ============================== } //______________________________________________________________________________ TCONS::TCONS(Text_t *name, Text_t *title, Text_t *material, Float_t dz, Float_t rmin1, Float_t rmax1, Float_t rmin2, Float_t rmax2, Float_t phi1, Float_t phi2) : TTUBS(name,title,material,rmin1,rmax1,dz,phi1,phi2) { //*-*-*-*-*-*-*-*-*-*-*-*-*CONS shape normal constructor*-*-*-*-*-*-*-*-*-*-*-*-* //*-* ============================= fRmin2 = rmin2; fRmax2 = rmax2; } //______________________________________________________________________________ TCONS::TCONS(Text_t *name, Text_t *title, Text_t *material, Float_t rmax1, Float_t dz , Float_t phi1, Float_t phi2, Float_t rmax2) : TTUBS(name,title,material,rmax1,dz,phi1,phi2) { //*-*-*-*-*-*-*-*-*-*-*-*-*CONS shape normal constructor*-*-*-*-*-*-*-*-*-*-*-*-* //*-* ============================= fRmin2 = 0; fRmax2 = rmax2; } //______________________________________________________________________________ TCONS::~TCONS() { //*-*-*-*-*-*-*-*-*-*-*-*-*CONS shape default destructor*-*-*-*-*-*-*-*-*-*-*-*-* //*-* ============================= } //______________________________________________________________________________ void TCONS::SetPoints(Float_t *buff) { //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*Create CONS points*-*-*-*-*-*-*-*-*-*-*-*-*-*-* //*-* ================== Int_t j, n; Float_t rmin1, rmax1, dz; n = GetNumberOfDivisions()+1; rmin1 = TTUBE::fRmin; rmax1 = TTUBE::fRmax; dz = TTUBE::fDz; Int_t indx = 0; //*-* We've to checxk whether the table does exist and create it //*-* since fCoTab/fSiTab are not saved with any TShape::Streamer function if (!fCoTab) MakeTableOfCoSin(); if (buff) { for (j = 0; j < n; j++) { buff[indx++] = rmin1 * fCoTab[j]; buff[indx++] = rmin1 * fSiTab[j]; buff[indx++] = -dz; } for (j = 0; j < n; j++) { buff[indx++] = rmax1 * fCoTab[j]; buff[indx++] = rmax1 * fSiTab[j]; buff[indx++] = -dz; } for (j = 0; j < n; j++) { buff[indx++] = fRmin2 * fCoTab[j]; buff[indx++] = fRmin2 * fSiTab[j]; buff[indx++] = dz; } for (j = 0; j < n; j++) { buff[indx++] = fRmax2 * fCoTab[j]; buff[indx++] = fRmax2 * fSiTab[j]; buff[indx++] = dz; } } }


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.