File indexing completed on 2024-04-06 11:56:05
0001
0002
0003
0004
0005 #ifndef Alignment_CommonAlignment_AlignableNavigator_h
0006 #define Alignment_CommonAlignment_AlignableNavigator_h
0007
0008 #include <map>
0009 #include <vector>
0010
0011 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
0012
0013 #include "Alignment/CommonAlignment/interface/AlignableDetOrUnitPtr.h"
0014 #include "Alignment/CommonAlignment/interface/Utilities.h"
0015
0016 class Alignable;
0017 class AlignableDet;
0018 class AlignableExtras;
0019 class GeomDet;
0020
0021
0022
0023
0024
0025 class AlignableNavigator {
0026 public:
0027
0028 explicit AlignableNavigator(Alignable* tracker, Alignable* muon = nullptr);
0029
0030
0031 explicit AlignableNavigator(AlignableExtras* extras, Alignable* tracker, Alignable* muon = nullptr);
0032
0033
0034 explicit AlignableNavigator(const align::Alignables&);
0035
0036 typedef std::map<DetId, AlignableDetOrUnitPtr> MapType;
0037 typedef MapType::value_type PairType;
0038
0039
0040 AlignableDetOrUnitPtr alignableFromDetId(const DetId& detid);
0041
0042
0043 AlignableDetOrUnitPtr alignableFromGeomDet(const GeomDet* geomDet);
0044
0045
0046 std::vector<AlignableDetOrUnitPtr> alignablesFromHits(const std::vector<const TransientTrackingRecHit*>& hitvec);
0047
0048
0049 std::vector<AlignableDetOrUnitPtr> alignablesFromHits(const TransientTrackingRecHit::ConstRecHitContainer& hitVec);
0050
0051
0052 std::vector<AlignableDetOrUnitPtr> alignableDetOrUnits();
0053
0054
0055 int size(void) { return theMap.size(); }
0056
0057
0058 bool detAndSubdetInMap(const DetId& detid) const;
0059
0060 private:
0061
0062
0063
0064 unsigned int recursiveGetId(Alignable* alignable);
0065
0066 MapType theMap;
0067 std::vector<std::pair<int, int> > theDetAndSubdet;
0068 };
0069
0070 #endif