CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/TrackPropagation/NavGeometry/interface/NavVolume6Faces.h

Go to the documentation of this file.
00001 #ifndef NavVolume6Faces_H
00002 #define NavVolume6Faces_H
00003 
00004 #include "TrackPropagation/NavGeometry/interface/NavVolume.h"
00005 #include "TrackPropagation/NavGeometry/interface/NavVolumeSide.h"
00006 
00007 #include <vector>
00008 
00009 class Bounds;
00010 class Plane;
00011 class TrajectoryStateOnSurface;
00012 
00013 class NavVolume6Faces : public NavVolume {
00014 public:
00015 
00016     NavVolume6Faces( const PositionType& pos, const RotationType& rot, 
00017                      DDSolidShape shape, const std::vector<NavVolumeSide>& faces,
00018                      const MagneticFieldProvider<float> * mfp);
00019 
00021     explicit NavVolume6Faces( const MagVolume& magvol, const bool isIron=false);
00022 
00024     virtual Container nextSurface( const NavVolume::LocalPoint& pos, 
00025                                    const NavVolume::LocalVector& mom,
00026                                    double charge, PropagationDirection propDir=alongMomentum) const;
00027 
00029     virtual Container nextSurface( const NavVolume::LocalPoint& pos, 
00030                                    const NavVolume::LocalVector& mom,
00031                                    double charge, PropagationDirection propDir,
00032                                    ConstReferenceCountingPointer<Surface> NotThisSurfaceP) const;
00033 
00035     virtual VolumeCrossReturnType crossToNextVolume( const TrajectoryStateOnSurface& currentState,
00036                                                      const Propagator& prop) const;
00037 
00039     virtual const std::vector<VolumeSide>& faces() const { return theFaces; }
00040 
00042     bool isIron() const { return isThisIron; }
00043 
00044     using MagVolume::inside;
00045     bool inside( const GlobalPoint& gp, double tolerance) const; 
00046 
00047 private:
00048 
00049     std::vector<VolumeSide> theFaces;
00050     Container theNavSurfaces;
00051     bool isThisIron; 
00052 
00053     void computeBounds(const std::vector<NavVolumeSide>& faces);
00054     Bounds* computeBounds( int index, const std::vector<const Plane*>& bpc);
00055     Bounds* computeBounds( int index, const std::vector<NavVolumeSide>& faces);
00056 
00057 };
00058 
00059 /* bool NavVolume6Faces::inside( const GlobalPoint& gp, double tolerance) const 
00060 {
00061    
00062   // check if the point is on the correct side of all delimiting surfaces
00063   for (std::vector<VolumeSide>::const_iterator i=theFaces.begin(); i!=theFaces.end(); i++) {
00064     Surface::Side side = i->surface().side( gp, tolerance);
00065     if ( side != i->surfaceSide() && side != SurfaceOrientation::onSurface) return false;
00066   }
00067   return true;
00068 }
00069 */
00070 
00071 #endif