00001 //----------------------------------------------------------------------- 00002 // File from RkFit module 00003 // 00004 // Filename : RkFitCylinder.h 00005 //------------------------------------------------------------------------ 00006 // Description : 00007 // Cylinder is an Element whose shape is a cylinder. 00008 //------------------------------------------------------------------------ 00009 // Modif : 00010 //------------------------------------------------------------------------ 00011 00012 #ifndef _DEFINE_CYLINDER_H_ 00013 #define _DEFINE_CYLINDER_H_ 00014 #include "CLHEP/Geometry/Point3D.h" 00015 #ifndef ENABLE_BACKWARDS_COMPATIBILITY 00016 typedef HepGeom::Point3D <double > HepPoint3D; 00017 #endif 00018 #include "TrkReco/RkFitMaterial.h" 00019 #include "TrkReco/TRunge.h" 00021 class RkFitCylinder { 00022 protected: 00023 double ro_; 00024 double ri_; 00025 double zf_; 00026 double zb_; 00027 public: 00028 const RkFitMaterial* material_; 00030 RkFitCylinder(const RkFitMaterial* material, 00031 double radius, double thick, 00032 double length, double z0) 00033 { 00034 material_=material; 00035 ri_ = radius; 00036 ro_ = radius + thick; 00037 zf_ = z0 + length * .5; 00038 zb_ = z0 - length * .5; 00039 } 00040 00042 double intersect( TRunge& track, 00043 HepPoint3D& x) const; 00044 00045 double intersect( TRunge& track, 00046 HepPoint3D& x, const HepPoint3D& point) const; 00047 void updateTrack(TRunge& track,double y[6])const; 00048 00050 bool isInside(const HepPoint3D& x) const; 00051 bool isInside2(const HepPoint3D& x) const; 00052 00054 virtual double radius(void) const { return ro_; } 00055 }; 00056 #endif 00057