25 edm::LogWarning(
"Alignment") <<
"@SUB=AlignableNavigator" <<
"Created with map of size " 26 <<
theMap.size() <<
", but found also " << numNonDets
27 <<
" Alignables that have DetId!=0,\nbeing neither " 28 <<
"AlignableDet nor AlignableDetUnit. This will " 29 <<
"lead to an exception in case alignableFromDetId(..) " 30 <<
"is called for one of these DetIds.\n" 31 <<
"If there is no exception, you can ignore this message.";
33 edm::LogInfo(
"Alignment") <<
"@SUB=AlignableNavigator" <<
"Created with map of size " 52 edm::LogWarning(
"Alignment") <<
"@SUB=AlignableNavigator" <<
"Created with map of size " 53 <<
theMap.size() <<
", but found also " << numNonDets
54 <<
" Alignables that have DetId!=0,\nbeing neither " 55 <<
"AlignableDet nor AlignableDetUnit. This will " 56 <<
"lead to an exception in case alignableFromDetId(..) " 57 <<
"is called for one of these DetIds.\n" 58 <<
"If there is no exception, you can ignore this message.";
60 edm::LogInfo(
"Alignment") <<
"@SUB=AlignableNavigator" <<
"Created with map of size " 70 unsigned int numNonDets = 0;
71 for (
const auto& it: alignables) {
75 edm::LogWarning(
"Alignment") <<
"@SUB=AlignableNavigator" <<
"Created with map of size " 76 <<
theMap.size() <<
", but found also " << numNonDets
77 <<
" Alignables that have DetId!=0,\nbeing neither " 78 <<
"AlignableDet nor AlignableDetUnit. This will " 79 <<
"lead to an exception in case alignableFromDetId(..) " 80 <<
"is called for one of these DetIds.\n" 81 <<
"If there is no exception, you can ignore this message.";
83 edm::LogInfo(
"Alignment") <<
"@SUB=AlignableNavigator" <<
"created with map of size " 98 if ( position !=
theMap.end() ) {
99 return position->second;
103 <<
"[AlignableNavigator::alignableDetFromDetId] DetId " << detid.
rawId() <<
" not found";
116 if (!alignable)
return 0;
118 unsigned int nProblem = 0;
126 if ((aliDet = dynamic_cast<AlignableDet*>(alignable))) {
130 }
else if ((aliDetUnit = dynamic_cast<AlignableDetUnit*>(alignable))) {
134 }
else if ((aliBeamSpot = dynamic_cast<AlignableBeamSpot*>(alignable))) {
148 theDetAndSubdet.push_back(std::pair<int, int>( detId.det(), detId.subdetId() ));
153 ||
comp.size() > 1 ) {
154 for (
const auto& it:
comp) {
162 std::vector<AlignableDetOrUnitPtr>
165 std::vector<AlignableDetOrUnitPtr>
result;
166 result.reserve(hitvec.size());
168 for(std::vector<const TransientTrackingRecHit*>::const_iterator ih
169 = hitvec.begin(), iEnd = hitvec.end(); ih != iEnd; ++ih) {
177 std::vector<AlignableDetOrUnitPtr>
182 std::vector<AlignableDetOrUnitPtr>
result;
183 result.reserve(hitVec.size());
185 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator it
186 = hitVec.begin(), iEnd = hitVec.end(); it != iEnd; ++it) {
196 std::vector<AlignableDetOrUnitPtr>
result;
197 result.reserve(
theMap.size());
199 for (MapType::const_iterator iIdAli =
theMap.begin(); iIdAli !=
theMap.end(); ++iIdAli) {
200 result.push_back(iIdAli->second);
209 int det = detid.
det();
212 if (det ==
i->first && subdet ==
i->second)
return true;
AlignableDetOrUnitPtr alignableFromGeomDet(const GeomDet *geomDet)
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
virtual const Alignables & components() const =0
Return vector of all direct components.
uint32_t rawId() const
get the raw id
unsigned int recursiveGetId(Alignable *alignable)
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
DetId geographicalId() const
The label of this GeomDet.
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< ConstRecHitPointer > ConstRecHitContainer
std::vector< AlignableDetOrUnitPtr > alignableDetOrUnits()
return all AlignableDetOrUnitPtrs
AlignableNavigator(Alignable *tracker, Alignable *muon=0)
Constructor from one or two Alignables.
std::vector< Alignable * > Alignables
std::vector< AlignableDetOrUnitPtr > alignablesFromHits(const std::vector< const TransientTrackingRecHit * > &hitvec)
Returns vector AlignableDetOrUnitPtr for given vector of Hits.
static int position[264][3]
std::vector< std::pair< int, int > > theDetAndSubdet
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...
Detector det() const
get the detector field from this detid
AlignableDetOrUnitPtr alignableFromDetId(const DetId &detid)
Returns AlignableDetOrUnitPtr corresponding to given DetId.
const DetId & geomDetId() const
MapType::value_type PairType