00001 //-------------------------------------------------------------------------- 00002 // File and Version Information: 00003 // $Id: TrkVolume.h,v 1.2 2006/03/28 01:02:36 zhangy Exp $ 00004 // 00005 // Description: 00006 // TrkVolume Class - 00007 // Abstract interface for the description 00008 // of the tracking volume of any subdetector 00009 // 00010 // Environment: 00011 // Software developed for the BaBar Detector at the SLAC B-Factory. 00012 // 00013 // Author List: 00014 // Gautier Hamel de Monchenault - CEN Saclay & Lawrence Berkeley Lab 00015 // 00016 // History (add to end): 00017 // Gautier May 6, 1997 - creation 00018 // Dave Brown 5/11/97 Add a name member 00019 // 00020 // Copyright Information: 00021 // Copyright (C) 1997 Lawrence Berkeley Laboratory 00022 // Copyright (C) 1997 CEA - Centre d'Etude de Saclay 00023 // 00024 //------------------------------------------------------------------------ 00025 00026 #ifndef TRKVOLUME_HH 00027 #define TRKVOLUME_HH 00028 00029 #include "TrkBase/TrkDirection.h" 00030 #include <string> 00031 #include "CLHEP/Geometry/Point3D.h" 00032 00033 #ifndef ENABLE_BACKWARDS_COMPATIBILITY 00034 // backwards compatibility will be enabled ONLY in CLHEP 1.9 00035 typedef HepGeom::Point3D<double> HepPoint3D; 00036 #endif 00037 00038 class Trajectory; 00039 00040 class TrkVolume { 00041 00042 public: 00043 // Default ctor 00044 TrkVolume(); 00045 TrkVolume(const char*); 00046 // Destructor 00047 virtual ~TrkVolume(); 00048 // 00049 virtual bool extendThrough( const Trajectory* theTraj, 00050 double& theFlightDist, 00051 trkDirection theDirection=trkOut, 00052 double* theStartingFlightDist=0) const = 0; 00053 // returns false if the point is outside the volume 00054 virtual bool isInside( const HepPoint3D& ) const = 0; 00055 // Access to the name 00056 const std::string& name() const {return _tvname;} 00057 private: 00058 std::string _tvname; // define the volume name 00059 }; 00060 00061 #endif