test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignableNavigator.h
Go to the documentation of this file.
1 // $Revision: 1.15 $
2 // $Date: 2009/02/28 21:06:53 $
3 // (last update by $Author: flucke $)
4 
5 #ifndef Alignment_CommonAlignment_AlignableNavigator_h
6 #define Alignment_CommonAlignment_AlignableNavigator_h
7 
8 #include <map>
9 #include <vector>
10 
12 
14 
15 class Alignable;
16 class AlignableDet;
17 class AlignableExtras;
18 class GeomDet;
19 
20 
24 
26 {
27 
28 public:
29 
32 
34  explicit AlignableNavigator(AlignableExtras* extras, Alignable* tracker, Alignable* muon = 0);
35 
37  explicit AlignableNavigator( const std::vector<Alignable*>& alignables );
38 
39  typedef std::map<DetId, AlignableDetOrUnitPtr> MapType;
41 
44 
47 
49  std::vector<AlignableDetOrUnitPtr>
50  alignablesFromHits(const std::vector<const TransientTrackingRecHit*>& hitvec);
51 
53  std::vector<AlignableDetOrUnitPtr> alignablesFromHits
55 
57  std::vector<AlignableDetOrUnitPtr> alignableDetOrUnits();
58 
60  int size( void ) { return theMap.size(); }
61 
63  bool detAndSubdetInMap( const DetId& detid ) const;
64 
65 private:
69  unsigned int recursiveGetId(Alignable* alignable);
70 
72  std::vector<std::pair<int,int> > theDetAndSubdet;
73 };
74 
75 #endif
AlignableDetOrUnitPtr alignableFromGeomDet(const GeomDet *geomDet)
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
unsigned int recursiveGetId(Alignable *alignable)
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: DetId.h:18
std::map< DetId, AlignableDetOrUnitPtr > MapType
std::vector< AlignableDetOrUnitPtr > alignableDetOrUnits()
return all AlignableDetOrUnitPtrs
AlignableNavigator(Alignable *tracker, Alignable *muon=0)
Constructor from one or two Alignables.
std::vector< AlignableDetOrUnitPtr > alignablesFromHits(const std::vector< const TransientTrackingRecHit * > &hitvec)
Returns vector AlignableDetOrUnitPtr for given vector of Hits.
std::vector< std::pair< int, int > > theDetAndSubdet
int size(void)
Returns number of elements in map.
bool detAndSubdetInMap(const DetId &detid) const
Given a DetId, returns true if DetIds with this detector and subdetector id are in the map (not neces...
AlignableDetOrUnitPtr alignableFromDetId(const DetId &detid)
Returns AlignableDetOrUnitPtr corresponding to given DetId.
MapType::value_type PairType