| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

IGeometryInfo.h

Go to the documentation of this file.
00001 // $Id: IGeometryInfo.h,v 1.30 2009/02/02 12:20:22 marcocle Exp $ 
00002 // ===========================================================================
00003 #ifndef  DETDESC_IGEOMETRYINFO_H
00004 #define  DETDESC_IGEOMETRYINFO_H 1
00005 
00006 #include "GaudiKernel/IInterface.h"
00007 #include "GaudiKernel/Point3DTypes.h"
00008 #include "GaudiKernel/Transform3DTypes.h"
00010 #include <functional>
00012 #include "DetDesc/ILVolume.h"
00013 #include "DetDesc/AlignmentCondition.h"
00015 class StatusCode;
00016 
00017 
00021 static const InterfaceID IID_IGeometryInfo( 155 , 3 , 1 );
00022 
00034 class IGeometryInfo : virtual public IInterface
00035 {
00036 public:
00037 
00039   typedef  std::vector<IGeometryInfo*>  IGIChildrens;
00040   typedef IGeometryInfo::IGIChildrens::iterator IGIChildrenIterator;
00041   typedef IGeometryInfo::IGIChildrens::const_iterator IGIChildrenConstIterator;
00045   static const InterfaceID& interfaceID() { return IID_IGeometryInfo; }
00046   
00047 
00048   virtual StatusCode cache()=0;
00049   
00050   virtual StatusCode updateChildren()=0;
00051 
00076   virtual bool hasLVolume () const = 0;
00077 
00081   virtual bool hasSupport () const = 0;
00082 
00084 
00085   virtual const AlignmentCondition* alignmentCondition() const = 0;
00086 
00101   virtual const Gaudi::Transform3D&  toLocalMatrix() const = 0;
00102 
00110   virtual const Gaudi::Transform3D&  toLocalMatrixNominal() const = 0;  
00111 
00119   virtual const Gaudi::Transform3D&  toGlobalMatrixNominal() const = 0;  
00120 
00128   virtual const Gaudi::Transform3D&  ownToLocalMatrixNominal() const = 0;  
00129 
00137   virtual const Gaudi::Transform3D&  ownToNominalMatrix() const = 0;
00138 
00146   virtual Gaudi::Transform3D  ownToOffNominalMatrix() const = 0;
00147 
00155   virtual Gaudi::Transform3D  ownMatrix() const = 0;
00156 
00160   virtual StatusCode  ownToOffNominalMatrix(const Gaudi::Transform3D&) = 0;
00161 
00166   virtual StatusCode ownToOffNominalParams(const std::vector<double>& trans,
00167                                            const std::vector<double>& rot,
00168                                            const std::vector<double>& pivot =
00169                                            std::vector<double>(3)) =0;
00170 
00180   virtual const Gaudi::Transform3D&  toGlobalMatrix() const = 0;
00181 
00191   virtual Gaudi::XYZPoint toLocal ( const Gaudi::XYZPoint& globalPoint ) const = 0;
00192 
00201   virtual Gaudi::XYZPoint toGlobal ( const Gaudi::XYZPoint& localPoint  ) const = 0;
00202 
00212   virtual Gaudi::XYZVector toLocal ( const Gaudi::XYZVector& globalDirection ) const = 0;
00213 
00223   virtual Gaudi::XYZVector toGlobal ( const Gaudi::XYZVector& localDirection  ) const = 0;
00224 
00245   virtual bool isInside( const Gaudi::XYZPoint& globalPoint ) const = 0; // end of group PureGeometricalInfo
00247 
00270   virtual std::string belongsToPath
00271   ( const Gaudi::XYZPoint& globalPoint ) = 0;
00272   
00290   virtual IGeometryInfo* belongsTo 
00291   ( const Gaudi::XYZPoint& globalPoint ) = 0;
00292   
00318   virtual std::string belongsToPath
00319   ( const Gaudi::XYZPoint& globalPoint , const int         level ) = 0;
00320   
00345   virtual IGeometryInfo* belongsTo 
00346   ( const Gaudi::XYZPoint& globalPoint , const int         level ) = 0; // end of group BelongsTo
00348 
00376   virtual StatusCode fullGeoInfoForPoint
00377   ( const Gaudi::XYZPoint&        point       ,
00378     const int                level       ,
00379     IGeometryInfo*&          start       ,
00380     ILVolume::PVolumePath&   volumePath  ) = 0;
00381   
00390   virtual StatusCode fullGeoInfoForPoint
00391   ( const Gaudi::XYZPoint&        point       ,
00392     const int                level       ,
00393     IGeometryInfo*&          start       ,
00394     ILVolume::ReplicaPath&   replicaPath ) = 0;
00395   
00404   virtual StatusCode fullGeoInfoForPoint
00405   ( const Gaudi::XYZPoint&        point       ,
00406     const int                level       ,
00407     std::string&             start       ,
00408     ILVolume::PVolumePath&   volumePath  ) = 0;
00409   
00418   virtual StatusCode fullGeoInfoForPoint
00419   ( const Gaudi::XYZPoint&        point       ,
00420     const int                level       ,
00421     std::string&             start       ,
00422     ILVolume::ReplicaPath&   replicaPath ) = 0; // end of group FullGeometryInfo
00424 
00453   virtual const std::string& lvolumeName() const = 0 ;
00454 
00458   virtual const ILVolume* lvolume () const = 0 ;
00459   
00465   virtual StatusCode location
00466   ( IGeometryInfo*&        start ,
00467     ILVolume::ReplicaPath& replicaPath ) const = 0;
00468   
00474   virtual StatusCode location
00475   ( std::string&           start ,
00476     ILVolume::ReplicaPath& replicaPath ) const = 0;
00477   
00490   virtual std::string lvolumePath
00491   ( const std::string&           start       ,
00492     const ILVolume::ReplicaPath& replicaPath ) = 0;
00493   
00499   virtual const ILVolume* lvolume 
00500   ( const std::string&           start       ,
00501     const ILVolume::ReplicaPath& replicaPath ) = 0;
00502   
00508   virtual std::string lvolumePath
00509   ( IGeometryInfo*               start       ,
00510     const ILVolume::ReplicaPath& replicaPath ) = 0;
00511   
00517   virtual const ILVolume* lvolume 
00518   ( IGeometryInfo*               start       ,
00519     const ILVolume::ReplicaPath& replicaPath ) = 0;
00520   
00522   virtual const ILVolume::ReplicaPath& supportPath() const = 0;
00523  // end of group LogVol
00525   
00535   virtual IGeometryInfo* parentIGeometryInfo() = 0 ;
00536 
00540   virtual const IGeometryInfo* parentIGeometryInfo() const = 0 ;
00541 
00542   //  virtual IGeometryInfo* supportIGeometryInfo() = 0 ;
00543 
00544   virtual IGeometryInfo* supportIGeometryInfo() const = 0 ;
00545 
00549   virtual IGeometryInfo::IGIChildrens& childIGeometryInfos() = 0;
00550 
00554   virtual const IGeometryInfo::IGIChildrens& childIGeometryInfos() const = 0;
00555 
00559   virtual IGeometryInfo::IGIChildrens::iterator        childBegin()       = 0 ;
00560 
00564   virtual IGeometryInfo::IGIChildrens::const_iterator  childBegin() const = 0 ;
00565 
00569   virtual IGeometryInfo::IGIChildrens::iterator        childEnd  ()       = 0 ;
00570 
00574   virtual IGeometryInfo::IGIChildrens::const_iterator  childEnd  () const = 0 ; // end of group Navigation
00576 
00586   virtual std::ostream& printOut ( std::ostream& os = std::cout ) const = 0;
00587   
00591   virtual MsgStream&    printOut ( MsgStream&                   ) const = 0; // end of group IGeometryInfoPrintOut
00593   
00597   virtual IGeometryInfo* reset () = 0;
00598   
00599   virtual   ~IGeometryInfo() ;  
00600   
00601 };
00602 
00603 // ============================================================================
00608 // ============================================================================
00609 
00610 // ============================================================================
00616 // ============================================================================
00617 inline std::ostream& operator<<( std::ostream&        os ,
00618                                  const IGeometryInfo& gi )
00619 { return gi.printOut( os ); };
00620 
00621 // ============================================================================
00627 // ============================================================================
00628 inline std::ostream& operator<<( std::ostream& os        ,
00629                                  const IGeometryInfo* gi )
00630 { return ( 0 == gi ? (os<<"IGeometryInfo* points to NULL") : os<<*gi ); };
00631 
00632 // ============================================================================
00638 // ============================================================================
00639 inline MsgStream&    operator<<( MsgStream&           os ,
00640                                  const IGeometryInfo& gi )
00641 { return gi.printOut(os); };
00642 
00643 // ============================================================================
00649 // ============================================================================
00650 inline MsgStream&    operator<<( MsgStream&    os        ,
00651                                  const IGeometryInfo* gi )
00652 { return ( 0 == gi ? (os<<"IGeometryInfo* points to NULL") : os<<*gi ); };
00653 
00654 // ============================================================================ // end of group IGeometryInfoOperators
00656 // ============================================================================
00657 
00658 
00659 // ============================================================================
00665 // ============================================================================
00666 
00672 class IGeometryInfo_isInside : std::unary_function<const IGeometryInfo*,bool>
00673 {
00674 public:
00679   explicit IGeometryInfo_isInside( const Gaudi::XYZPoint& Point )
00680     : m_point( Point ) {};
00681   
00688   inline bool operator () ( const IGeometryInfo* gi )  const
00689   { return ( ( 0 == gi ) ? false : gi->isInside( m_point ) ); };
00690   
00691 private:
00692   
00693   Gaudi::XYZPoint  m_point; 
00694   
00695 };
00696 // ============================================================================ // end of group IGeometryInfoPredicates 
00698 // ============================================================================
00699 
00701 #endif  
00702 
00703 
00704 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:00:13 2011 for DetDesc by doxygen 1.4.7