00001 //----------------------------------------------------------------------- 00002 // File from KalFit module 00003 // 00004 // Filename : KalFitCylinder.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 "KalFitAlg/KalFitElement.h" 00015 #include "CLHEP/Geometry/Point3D.h" 00016 #ifndef ENABLE_BACKWARDS_COMPATIBILITY 00017 typedef HepGeom::Point3D <double > HepPoint3D; 00018 #endif 00019 00021 class KalFitCylinder : public KalFitElement { 00022 protected: 00023 double ro_; 00024 double ri_; 00025 double zf_; 00026 double zb_; 00027 00028 public: 00030 KalFitCylinder(const KalFitMaterial* material, 00031 double radius, double thick, 00032 double length, double z0) 00033 : KalFitElement(material) 00034 { 00035 ri_ = radius; 00036 ro_ = radius + thick; 00037 zf_ = z0 + length * .5; 00038 zb_ = z0 - length * .5; 00039 } 00040 00042 virtual double intersect(const KalFitTrack& track, 00043 HepPoint3D& x) const; 00044 00045 virtual double intersect(const KalFitTrack& track, 00046 HepPoint3D& x, const HepPoint3D& point) const; 00047 00049 bool isInside(const HepPoint3D& x) const; 00050 bool isInside2(const HepPoint3D& x) const; 00051 00053 virtual double radius(void) const { return ro_; } 00054 }; 00055 #endif 00056