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

In This Package:

TransportSvcDistanceInRadUnits.h

Go to the documentation of this file.
00001 // $Id: TransportSvcDistanceInRadUnits.h,v 1.3 2006/07/26 09:46:58 cattanem Exp $
00002 // ============================================================================
00003 #ifndef    __DETDESC_TRANSPORTSVC_TRASNPORTSVCDISTANCEINRADUNITS_H__
00004 #define    __DETDESC_TRANSPORTSVC_TRASNPORTSVCDISTANCEINRADUNITS_H__ 1
00005 
00006 // DetDesc
00007 #include "DetDesc/VolumeIntersectionIntervals.h"
00008 
00009 // local 
00010 #include "TransportSvc.h" 
00011 
00012 // ============================================================================
00021 // ============================================================================
00022 
00023 // ============================================================================
00034 // ============================================================================
00035 inline double TransportSvc::distanceInRadUnits
00036 ( const Gaudi::XYZPoint& point1         ,  
00037   const Gaudi::XYZPoint& point2         ,  
00038   double            threshold           ,  
00039   IGeometryInfo*    alternativeGeometry ,  
00040   IGeometryInfo*    geometryGuess       )  
00041 {
00042   // check for the  distance 
00043   if( point1 == point2 ) { return 0 ;} 
00044 
00045   // retrieve the history 
00046   Gaudi::XYZVector Vector( point2 - point1 ) ;
00047   // initial point on the line 
00048   // direction vector of the line 
00049   // minimal value of the parameter of the line  
00050   // maximal value of the parameter of the line 
00051   // (output) container of intersections 
00052   // threshold value 
00053   // source of the alternative geometry information 
00054   // a guess for navigation
00055   intersections( point1              ,   
00056                  Vector              ,   
00057                  0.0                 ,   
00058                  1.0                 ,   
00059                  m_local_intersects  ,   
00060                  threshold           ,
00061                  alternativeGeometry ,
00062                  geometryGuess       ); 
00063   
00064   //  radiation length in tick units 
00065   double RadLength = 
00066     std::accumulate
00067     (  m_local_intersects.begin()                              ,  
00068        m_local_intersects.end  ()                              , 
00069        0.0                                                     ,  
00070        VolumeIntersectionIntervals::AccumulateIntersections()  ); 
00071 
00072   // scale
00073   const ISolid::Tick TickLength = std::sqrt( Vector.mag2() ); 
00074   
00075   return RadLength * TickLength ;  
00077 };
00078 
00079 // ============================================================================
00080 // The End 
00081 // ============================================================================
00082 #endif  // __DETDESC_TRANSPORTSVC_TRASNPORTSVCDISTANCEINRADUNITS_H__
00083 // ============================================================================
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:02:42 2011 for DetDescSvc by doxygen 1.4.7