#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=0) | |
Constructor from one or two Alignables. More... | |
AlignableNavigator (AlignableExtras *extras, Alignable *tracker, Alignable *muon=0) | |
Constructor from one or two Alignables. More... | |
AlignableNavigator (const std::vector< Alignable * > &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 39 of file AlignableNavigator.h.
typedef MapType::value_type AlignableNavigator::PairType |
Definition at line 40 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 39 of file AlignableNavigator.cc.
References AlignableExtras::components(), recursiveGetId(), and theMap.
|
explicit |
Constructor from list of Alignbable.
Definition at line 67 of file AlignableNavigator.cc.
References recursiveGetId(), and theMap.
std::vector< AlignableDetOrUnitPtr > AlignableNavigator::alignableDetOrUnits | ( | ) |
return all AlignableDetOrUnitPtrs
Definition at line 195 of file AlignableNavigator.cc.
References query::result, and theMap.
AlignableDetOrUnitPtr AlignableNavigator::alignableFromDetId | ( | const DetId & | detid | ) |
Returns AlignableDetOrUnitPtr corresponding to given DetId.
Definition at line 96 of file AlignableNavigator.cc.
References Exception, position, DetId::rawId(), and theMap.
Referenced by MillePedeAlignmentAlgorithm::addGlobalData(), MillePedeAlignmentAlgorithm::addLasBeam(), MillePedeAlignmentAlgorithm::addMeasurementData(), MillePedeAlignmentAlgorithm::addPxbSurvey(), alignableFromGeomDet(), alignablesFromHits(), SurveyInputCSCfromPins::analyze(), MuonGeometrySVGTemplate::analyze(), CSCAlignmentCorrections::applyAlignment(), AlignmentMonitorTemplate::event(), AlignmentMonitorGeneric::event(), ApeSettingAlgorithm::initialize(), MuonAlignment::moveAlignableGlobalCoord(), MuonAlignment::moveAlignableLocalCoord(), MuonResidualsFromTrack::MuonResidualsFromTrack(), CSCChamberFitter::radiusCorrection(), and ApeSettingAlgorithm::terminate().
AlignableDetOrUnitPtr AlignableNavigator::alignableFromGeomDet | ( | const GeomDet * | geomDet | ) |
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
Definition at line 90 of file AlignableNavigator.cc.
References alignableFromDetId(), and GeomDet::geographicalId().
Referenced by MuonMillepedeAlgorithm::run(), and HIPAlignmentAlgorithm::run().
std::vector< AlignableDetOrUnitPtr > AlignableNavigator::alignablesFromHits | ( | const std::vector< const TransientTrackingRecHit * > & | hitvec | ) |
Returns vector AlignableDetOrUnitPtr for given vector of Hits.
Definition at line 164 of file AlignableNavigator.cc.
References alignableFromDetId(), and query::result.
Referenced by MuonMillepedeAlgorithm::run(), and HIPAlignmentAlgorithm::run().
std::vector< AlignableDetOrUnitPtr > AlignableNavigator::alignablesFromHits | ( | const TransientTrackingRecHit::ConstRecHitContainer & | hitVec | ) |
Returns vector of AlignableDetOrUnitPtr for given vector of Hits.
Definition at line 180 of file AlignableNavigator.cc.
References query::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 208 of file AlignableNavigator.cc.
References DetId::det(), i, DetId::subdetId(), and theDetAndSubdet.
Referenced by AlignmentMonitorTemplate::event(), AlignmentMonitorMuonResiduals::event(), recursiveGetId(), MuonMillepedeAlgorithm::run(), and HIPAlignmentAlgorithm::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 110 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 60 of file AlignableNavigator.h.
References theMap.
|
private |
Definition at line 72 of file AlignableNavigator.h.
Referenced by detAndSubdetInMap(), and recursiveGetId().
|
private |
Definition at line 71 of file AlignableNavigator.h.
Referenced by alignableDetOrUnits(), alignableFromDetId(), AlignableNavigator(), recursiveGetId(), and size().