|
|
Go to the documentation of this file.
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()
100 return static_cast<AlignableDet*>(
nullptr);
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))) {
138 theDetAndSubdet.push_back(std::pair<int, int>(detId.det(), detId.subdetId()));
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)
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...
MapType::value_type PairType
AlignableNavigator(Alignable *tracker, Alignable *muon=nullptr)
Constructor from one or two Alignables.
constexpr Detector det() const
get the detector field from this detid
unsigned int recursiveGetId(Alignable *alignable)
Log< level::Info, false > LogInfo
AlignableDetOrUnitPtr alignableFromGeomDet(const GeomDet *geomDet)
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
Log< level::Warning, false > LogWarning
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)
DetId geographicalId() const
The label of this GeomDet.
std::vector< ConstRecHitPointer > ConstRecHitContainer
static int position[264][3]
const DetId & geomDetId() const
std::vector< AlignableDetOrUnitPtr > alignablesFromHits(const std::vector< const TransientTrackingRecHit * > &hitvec)
Returns vector AlignableDetOrUnitPtr for given vector of Hits.
std::vector< std::pair< int, int > > theDetAndSubdet
std::vector< Alignable * > Alignables
constexpr uint32_t rawId() const
get the raw id
AlignableDetOrUnitPtr alignableFromDetId(const DetId &detid)
Returns AlignableDetOrUnitPtr corresponding to given DetId.
std::vector< AlignableDetOrUnitPtr > alignableDetOrUnits()
return all AlignableDetOrUnitPtrs
virtual const Alignables & components() const =0
Return vector of all direct components.