CMS 3D CMS Logo

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 
15 
16 class Alignable;
17 class AlignableDet;
18 class AlignableExtras;
19 class GeomDet;
20 
24 
26 public:
28  explicit AlignableNavigator(Alignable* tracker, Alignable* muon = nullptr);
29 
31  explicit AlignableNavigator(AlignableExtras* extras, Alignable* tracker, Alignable* muon = nullptr);
32 
34  explicit AlignableNavigator(const align::Alignables&);
35 
36  typedef std::map<DetId, AlignableDetOrUnitPtr> MapType;
38 
41 
44 
46  std::vector<AlignableDetOrUnitPtr> alignablesFromHits(const std::vector<const TransientTrackingRecHit*>& hitvec);
47 
49  std::vector<AlignableDetOrUnitPtr> alignablesFromHits(const TransientTrackingRecHit::ConstRecHitContainer& hitVec);
50 
52  std::vector<AlignableDetOrUnitPtr> alignableDetOrUnits();
53 
55  int size(void) { return theMap.size(); }
56 
58  bool detAndSubdetInMap(const DetId& detid) const;
59 
60 private:
64  unsigned int recursiveGetId(Alignable* alignable);
65 
67  std::vector<std::pair<int, int> > theDetAndSubdet;
68 };
69 
70 #endif
AlignableNavigator::detAndSubdetInMap
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...
Definition: AlignableNavigator.cc:193
GeomDet
Definition: GeomDet.h:27
AlignableNavigator::size
int size(void)
Returns number of elements in map.
Definition: AlignableNavigator.h:55
muon
Definition: MuonCocktails.h:17
AlignableNavigator::PairType
MapType::value_type PairType
Definition: AlignableNavigator.h:37
AlignableNavigator::AlignableNavigator
AlignableNavigator(Alignable *tracker, Alignable *muon=nullptr)
Constructor from one or two Alignables.
Definition: AlignableNavigator.cc:18
Alignable
Definition: Alignable.h:27
AlignableNavigator::recursiveGetId
unsigned int recursiveGetId(Alignable *alignable)
Definition: AlignableNavigator.cc:104
TransientTrackingRecHit.h
AlignableNavigator::alignableFromGeomDet
AlignableDetOrUnitPtr alignableFromGeomDet(const GeomDet *geomDet)
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
Definition: AlignableNavigator.cc:86
AlignableDetOrUnitPtr
Definition: AlignableDetOrUnitPtr.h:30
AlignableDet
Definition: AlignableDet.h:8
DetId
Definition: DetId.h:17
AlignableExtras
Definition: AlignableExtras.h:19
AlignableNavigator
Definition: AlignableNavigator.h:25
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
AlignableDetOrUnitPtr.h
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
Utilities.h
AlignableNavigator::alignablesFromHits
std::vector< AlignableDetOrUnitPtr > alignablesFromHits(const std::vector< const TransientTrackingRecHit * > &hitvec)
Returns vector AlignableDetOrUnitPtr for given vector of Hits.
Definition: AlignableNavigator.cc:152
AlignableNavigator::theDetAndSubdet
std::vector< std::pair< int, int > > theDetAndSubdet
Definition: AlignableNavigator.h:67
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
AlignableNavigator::alignableFromDetId
AlignableDetOrUnitPtr alignableFromDetId(const DetId &detid)
Returns AlignableDetOrUnitPtr corresponding to given DetId.
Definition: AlignableNavigator.cc:91
AlignableNavigator::alignableDetOrUnits
std::vector< AlignableDetOrUnitPtr > alignableDetOrUnits()
return all AlignableDetOrUnitPtrs
Definition: AlignableNavigator.cc:181
AlignableNavigator::theMap
MapType theMap
Definition: AlignableNavigator.h:66
AlignableNavigator::MapType
std::map< DetId, AlignableDetOrUnitPtr > MapType
Definition: AlignableNavigator.h:36