25 <<
"Created with map of size " <<
theMap.size() <<
", but found also " << numNonDets
26 <<
" Alignables that have DetId!=0,\nbeing neither " 27 <<
"AlignableDet nor AlignableDetUnit. This will " 28 <<
"lead to an exception in case alignableFromDetId(..) " 29 <<
"is called for one of these DetIds.\n" 30 <<
"If there is no exception, you can ignore this message.";
33 <<
"Created with map of size " <<
theMap.size() <<
".";
51 <<
"Created with map of size " <<
theMap.size() <<
", but found also " << numNonDets
52 <<
" Alignables that have DetId!=0,\nbeing neither " 53 <<
"AlignableDet nor AlignableDetUnit. This will " 54 <<
"lead to an exception in case alignableFromDetId(..) " 55 <<
"is called for one of these DetIds.\n" 56 <<
"If there is no exception, you can ignore this message.";
59 <<
"Created with map of size " <<
theMap.size() <<
".";
67 unsigned int numNonDets = 0;
68 for (
const auto& it : alignables) {
73 <<
"Created with map of size " <<
theMap.size() <<
", but found also " << numNonDets
74 <<
" Alignables that have DetId!=0,\nbeing neither " 75 <<
"AlignableDet nor AlignableDetUnit. This will " 76 <<
"lead to an exception in case alignableFromDetId(..) " 77 <<
"is called for one of these DetIds.\n" 78 <<
"If there is no exception, you can ignore this message.";
81 <<
"created with map of size " <<
theMap.size() <<
".";
97 throw cms::Exception(
"BadLogic") <<
"[AlignableNavigator::alignableDetFromDetId] DetId " << detid.
rawId()
113 unsigned int nProblem = 0;
120 if ((aliDet = dynamic_cast<AlignableDet*>(alignable))) {
123 }
else if ((aliDetUnit = dynamic_cast<AlignableDetUnit*>(alignable))) {
126 }
else if ((aliBeamSpot = dynamic_cast<AlignableBeamSpot*>(alignable))) {
144 for (
const auto& it :
comp) {
153 const std::vector<const TransientTrackingRecHit*>& hitvec) {
154 std::vector<AlignableDetOrUnitPtr>
result;
155 result.reserve(hitvec.size());
157 for (std::vector<const TransientTrackingRecHit*>::const_iterator ih = hitvec.begin(), iEnd = hitvec.end(); ih != iEnd;
168 std::vector<AlignableDetOrUnitPtr>
result;
169 result.reserve(hitVec.size());
171 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator it = hitVec.begin(), iEnd = hitVec.end();
182 std::vector<AlignableDetOrUnitPtr>
result;
185 for (MapType::const_iterator iIdAli =
theMap.begin(); iIdAli !=
theMap.end(); ++iIdAli) {
186 result.push_back(iIdAli->second);
194 int det = detid.
det();
197 if (det ==
i->first && subdet ==
i->second)
AlignableDetOrUnitPtr alignableFromGeomDet(const GeomDet *geomDet)
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
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...
constexpr Detector det() const
get the detector field from this detid
AlignableNavigator(Alignable *tracker, Alignable *muon=nullptr)
Constructor from one or two Alignables.
unsigned int recursiveGetId(Alignable *alignable)
std::vector< std::pair< int, int > > theDetAndSubdet
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
virtual const Alignables & components() const =0
Return vector of all direct components.
DetId geographicalId() const
The label of this GeomDet.
std::vector< ConstRecHitPointer > ConstRecHitContainer
Log< level::Info, false > LogInfo
std::vector< AlignableDetOrUnitPtr > alignableDetOrUnits()
return all AlignableDetOrUnitPtrs
const DetId & geomDetId() const
constexpr uint32_t rawId() const
get the raw id
std::vector< Alignable * > Alignables
static int position[264][3]
std::vector< AlignableDetOrUnitPtr > alignablesFromHits(const std::vector< const TransientTrackingRecHit *> &hitvec)
Returns vector AlignableDetOrUnitPtr for given vector of Hits.
Log< level::Warning, false > LogWarning
AlignableDetOrUnitPtr alignableFromDetId(const DetId &detid)
Returns AlignableDetOrUnitPtr corresponding to given DetId.
MapType::value_type PairType