27const int RootGM::Polycone::fgkMaxNofZPlanes = 50;
28double* RootGM::Polycone::fgZBuffer = 0;
29double* RootGM::Polycone::fgRinBuffer = 0;
30double* RootGM::Polycone::fgRoutBuffer = 0;
34 int nofZPlanes,
double* z,
double* rin,
double* rout)
35 :
VGM::ISolid(),
VGM::IPolycone(),
BaseVGM::VPolycone(), fPolycone(0)
46 double* param =
new double[3 + 3 * nofZPlanes];
51 param[2] = nofZPlanes;
53 for (
int i = 0; i < nofZPlanes; i++) {
60 fPolycone =
new TGeoPcon(param);
61 fPolycone->SetName(name.data());
71 :
VGM::ISolid(),
VGM::IPolycone(),
BaseVGM::VPolycone(), fPolycone(polycone)
88 :
VGM::ISolid(rhs),
VGM::IPolycone(rhs),
BaseVGM::VPolycone(rhs)
100void RootGM::Polycone::CreateBuffers()
102 if (!fgZBuffer) fgZBuffer =
new double[fgkMaxNofZPlanes];
103 if (!fgRinBuffer) fgRinBuffer =
new double[fgkMaxNofZPlanes];
104 if (!fgRoutBuffer) fgRoutBuffer =
new double[fgkMaxNofZPlanes];
128 int nofZPlanes = NofZPlanes();
129 if (nofZPlanes > fgkMaxNofZPlanes) {
130 nofZPlanes = fgkMaxNofZPlanes;
131 std::cerr <<
"+++ Warning +++" << std::endl;
132 std::cerr <<
" Number of Zplanes > size of buffer." << std::endl;
133 std::cerr <<
" only " << nofZPlanes <<
" values are returned."
137 for (
int i = 0; i < nofZPlanes; i++)
146 int nofZPlanes = NofZPlanes();
147 if (nofZPlanes > fgkMaxNofZPlanes) {
148 nofZPlanes = fgkMaxNofZPlanes;
149 std::cerr <<
"+++ Warning +++" << std::endl;
150 std::cerr <<
" Number of Zplanes > size of buffer." << std::endl;
151 std::cerr <<
" only " << nofZPlanes <<
" values are returned."
155 for (
int i = 0; i < nofZPlanes; i++)
164 int nofZPlanes = NofZPlanes();
165 if (nofZPlanes > fgkMaxNofZPlanes) {
166 nofZPlanes = fgkMaxNofZPlanes;
167 std::cerr <<
"+++ Warning +++" << std::endl;
168 std::cerr <<
" Number of Zplanes > size of buffer." << std::endl;
169 std::cerr <<
" only " << nofZPlanes <<
" values are returned."
173 for (
int i = 0; i < nofZPlanes; i++)
VGM implementation for Root polycone solid.
virtual double StartPhi() const
Return starting phi angle of the segment in deg.
virtual int NofZPlanes() const
Return number of planes perpendicular to the z axis.
virtual double * ZValues() const
Return the array of z positions of the planes in mm.
virtual double * InnerRadiusValues() const
Return the array of inner radius of the planes in mm.
virtual double * OuterRadiusValues() const
Return the array of outer radius of the planes in mm.
virtual double DeltaPhi() const
Return opening phi angle of the segment in deg.
virtual std::string Name() const
Return the name of this solid.
void AddSolid(VGM::ISolid *, TGeoShape *)
static SolidMap * Instance()
static double Length()
Return Root length unit in VGM units.
static double Angle()
Return Root angle unit in VGM units.