00001
00002
00003
00004
00005 #ifndef __DETDESC_TRANSPORTSVC_TRANSPORTSVCGOODLOCALGI_H__
00006 #define __DETDESC_TRANSPORTSVC_TRANSPORTSVCGOODLOCALGI_H__ 1
00007
00008 #include "TransportSvc.h"
00009
00016 inline bool TransportSvc::goodLocalGI
00017 ( const Gaudi::XYZPoint& point1 ,
00018 const Gaudi::XYZPoint& point2 ,
00019 IGeometryInfo* gi ) const
00020 {
00021 bool debug = false;
00022
00024 if( 0 == gi ) {
00025 if ( debug ) std::cout << " goodLocalGI : no gi" << std::endl;
00026 return false ; }
00028 const ILVolume* lv = gi->lvolume();
00030 if( 0 == lv ) {
00031 if ( debug ) std::cout << " goodLocalGI : gi has no lv" << std::endl;
00032 return false ; }
00034 if( lv->isAssembly() ) {
00035 if ( debug ) std::cout << " goodLocalGI : lv " << lv->name()
00036 << " is Assembly " << std::endl;
00037 return false ;
00038 }
00039
00041 ISolid::Tick tickMin = 0;
00042 ISolid::Tick tickMax = 1;
00044 unsigned int nInt =
00045 lv->solid()->intersectionTicks
00046 ( gi->toLocalMatrix() * point1 ,
00047 gi->toLocalMatrix() * Gaudi::XYZVector( point2 - point1 ) ,
00048 tickMin , tickMax , m_local_ticks ) ;
00050 if ( debug ) std::cout << " goodLocalGI : nInt " << nInt << std::endl;
00051 return ( 2 == nInt && tickMin == *(m_local_ticks.begin() )
00052 && tickMax == *(m_local_ticks.rbegin()) ) ? true : false ;
00054 };
00055
00056
00057
00058
00059 #endif // __DETDESC_TRANSPORTSVC_TRANSPORTSVCGOODLOCALGI_H__
00060