CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Alignment/CommonAlignment/interface/AlignableNavigator.h

Go to the documentation of this file.
00001 //   $Revision: 1.16 $
00002 //   $Date: 2010/09/10 10:30:03 $
00003 //   (last update by $Author: mussgill $)
00004 
00005 #ifndef Alignment_CommonAlignment_AlignableNavigator_h
00006 #define Alignment_CommonAlignment_AlignableNavigator_h
00007 
00008 #include <map>
00009 #include <vector>
00010 
00011 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00012 
00013 #include "Alignment/CommonAlignment/interface/AlignableDetOrUnitPtr.h"
00014 
00015 class Alignable;
00016 class AlignableDet;
00017 class AlignableExtras;
00018 class GeomDet;
00019 
00020 
00024 
00025 class AlignableNavigator 
00026 {
00027 
00028 public:
00029   
00031   explicit AlignableNavigator(Alignable* tracker, Alignable* muon = 0);
00032   
00034   explicit AlignableNavigator(AlignableExtras* extras, Alignable* tracker, Alignable* muon = 0);
00035 
00037   explicit AlignableNavigator( std::vector<Alignable*> alignables );
00038 
00039   typedef std::map<DetId, AlignableDetOrUnitPtr> MapType;
00040   typedef MapType::value_type PairType;
00041 
00043   AlignableDetOrUnitPtr alignableFromDetId( const DetId& detid );
00044 
00046   AlignableDetOrUnitPtr alignableFromGeomDet( const GeomDet* geomDet );
00047 
00049   std::vector<AlignableDetOrUnitPtr> 
00050     alignablesFromHits(const std::vector<const TransientTrackingRecHit*>& hitvec);
00051 
00053   std::vector<AlignableDetOrUnitPtr> alignablesFromHits
00054     (const TransientTrackingRecHit::ConstRecHitContainer &hitVec);
00055 
00057   std::vector<AlignableDetOrUnitPtr> alignableDetOrUnits();
00058 
00060   int size( void ) { return theMap.size(); }
00061 
00063   bool detAndSubdetInMap( const DetId& detid ) const;
00064 
00065 private:
00069   unsigned int recursiveGetId(Alignable* alignable);
00070 
00071   MapType                          theMap;
00072   std::vector<std::pair<int,int> > theDetAndSubdet;
00073 };
00074 
00075 #endif