#include <AlignableNavigator.h>
Public Types | |
typedef std::map< DetId, AlignableDetOrUnitPtr > | MapType |
typedef MapType::value_type | PairType |
Public Member Functions | |
std::vector< AlignableDetOrUnitPtr > | alignableDetOrUnits () |
return all AlignableDetOrUnitPtrs More... | |
AlignableDetOrUnitPtr | alignableFromDetId (const DetId &detid) |
Returns AlignableDetOrUnitPtr corresponding to given DetId. More... | |
AlignableDetOrUnitPtr | alignableFromGeomDet (const GeomDet *geomDet) |
Returns AlignableDetOrUnitPtr corresponding to given GeomDet. More... | |
AlignableNavigator (Alignable *tracker, Alignable *muon=nullptr) | |
Constructor from one or two Alignables. More... | |
AlignableNavigator (AlignableExtras *extras, Alignable *tracker, Alignable *muon=nullptr) | |
Constructor from one or two Alignables. More... | |
AlignableNavigator (const align::Alignables &) | |
Constructor from list of Alignbable. More... | |
std::vector< AlignableDetOrUnitPtr > | alignablesFromHits (const std::vector< const TransientTrackingRecHit * > &hitvec) |
Returns vector AlignableDetOrUnitPtr for given vector of Hits. More... | |
std::vector< AlignableDetOrUnitPtr > | alignablesFromHits (const TransientTrackingRecHit::ConstRecHitContainer &hitVec) |
Returns vector of AlignableDetOrUnitPtr for given vector of Hits. More... | |
bool | detAndSubdetInMap (const DetId &detid) const |
Given a DetId, returns true if DetIds with this detector and subdetector id are in the map (not necessarily the exact DetId) More... | |
int | size (void) |
Returns number of elements in map. More... | |
Private Member Functions | |
unsigned int | recursiveGetId (Alignable *alignable) |
Private Attributes | |
std::vector< std::pair< int, int > > | theDetAndSubdet |
MapType | theMap |
A class to navigate from a DetId to the corresponding AlignableDetOrUnitPtr. A map is created at construction time from all sub-structures of the constructor's argument(s) that are AlignableDet or AlignableDetUnit.
Definition at line 25 of file AlignableNavigator.h.
typedef std::map<DetId, AlignableDetOrUnitPtr> AlignableNavigator::MapType |
Definition at line 36 of file AlignableNavigator.h.
typedef MapType::value_type AlignableNavigator::PairType |
Definition at line 37 of file AlignableNavigator.h.
Constructor from one or two Alignables.
Definition at line 18 of file AlignableNavigator.cc.
References recursiveGetId(), and theMap.
|
explicit |
Constructor from one or two Alignables.
Definition at line 38 of file AlignableNavigator.cc.
References AlignableExtras::components(), recursiveGetId(), and theMap.
|
explicit |
Constructor from list of Alignbable.
Definition at line 64 of file AlignableNavigator.cc.
References recursiveGetId(), and theMap.
std::vector< AlignableDetOrUnitPtr > AlignableNavigator::alignableDetOrUnits | ( | ) |
return all AlignableDetOrUnitPtrs
Definition at line 181 of file AlignableNavigator.cc.
References mps_fire::result, and theMap.
AlignableDetOrUnitPtr AlignableNavigator::alignableFromDetId | ( | const DetId & | detid | ) |
Returns AlignableDetOrUnitPtr corresponding to given DetId.
Definition at line 91 of file AlignableNavigator.cc.
References Exception, position, DetId::rawId(), and theMap.
Referenced by alignableFromGeomDet(), alignablesFromHits(), SurveyInputCSCfromPins::analyze(), MuonGeometrySVGTemplate::analyze(), CSCAlignmentCorrections::applyAlignment(), AlignmentMonitorTemplate::event(), AlignmentMonitorGeneric::event(), ApeSettingAlgorithm::initialize(), MuonAlignment::moveAlignableGlobalCoord(), MuonAlignment::moveAlignableLocalCoord(), CSCChamberFitter::radiusCorrection(), and ApeSettingAlgorithm::terminate().
AlignableDetOrUnitPtr AlignableNavigator::alignableFromGeomDet | ( | const GeomDet * | geomDet | ) |
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
Definition at line 86 of file AlignableNavigator.cc.
References alignableFromDetId(), and GeomDet::geographicalId().
Referenced by MuonMillepedeAlgorithm::run().
std::vector< AlignableDetOrUnitPtr > AlignableNavigator::alignablesFromHits | ( | const std::vector< const TransientTrackingRecHit * > & | hitvec | ) |
Returns vector AlignableDetOrUnitPtr for given vector of Hits.
Definition at line 152 of file AlignableNavigator.cc.
References alignableFromDetId(), and mps_fire::result.
Referenced by MuonMillepedeAlgorithm::run().
std::vector< AlignableDetOrUnitPtr > AlignableNavigator::alignablesFromHits | ( | const TransientTrackingRecHit::ConstRecHitContainer & | hitVec | ) |
Returns vector of AlignableDetOrUnitPtr for given vector of Hits.
Definition at line 166 of file AlignableNavigator.cc.
References alignableFromDetId(), and mps_fire::result.
bool AlignableNavigator::detAndSubdetInMap | ( | const DetId & | detid | ) | const |
Given a DetId, returns true if DetIds with this detector and subdetector id are in the map (not necessarily the exact DetId)
Definition at line 193 of file AlignableNavigator.cc.
References DetId::det(), mps_fire::i, DetId::subdetId(), theDetAndSubdet, and trackerHitRTTI::vector.
Referenced by AlignmentMonitorTemplate::event(), AlignmentMonitorMuonResiduals::event(), recursiveGetId(), and MuonMillepedeAlgorithm::run().
|
private |
Add recursively DetId-AlignableDetOrUnitPtr pairs to map. Returns number of Alignables with DetId!=0 which are (illegaly) neither AlignableDet nor AlignableDetUnit and are thus not added to the map.
Definition at line 104 of file AlignableNavigator.cc.
References align::AlignableDet, Alignable::alignableObjectId(), AlCaHLTBitMon_QueryRunRegistry::comp, Alignable::components(), detAndSubdetInMap(), Alignable::geomDetId(), theDetAndSubdet, and theMap.
Referenced by AlignableNavigator().
|
inline |
Returns number of elements in map.
Definition at line 55 of file AlignableNavigator.h.
References theMap.
Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().
|
private |
Definition at line 67 of file AlignableNavigator.h.
Referenced by detAndSubdetInMap(), and recursiveGetId().
|
private |
Definition at line 66 of file AlignableNavigator.h.
Referenced by alignableDetOrUnits(), alignableFromDetId(), AlignableNavigator(), recursiveGetId(), and size().