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 "
47 for ( std::vector<Alignable*>::iterator it = allExtras.begin(); it != allExtras.end(); ++it ) {
53 edm::LogWarning(
"Alignment") <<
"@SUB=AlignableNavigator" <<
"Created with map of size "
54 <<
theMap.size() <<
", but found also " << numNonDets
55 <<
" Alignables that have DetId!=0,\nbeing neither "
56 <<
"AlignableDet nor AlignableDetUnit. This will "
57 <<
"lead to an exception in case alignableFromDetId(..) "
58 <<
"is called for one of these DetIds.\n"
59 <<
"If there is no exception, you can ignore this message.";
61 edm::LogInfo(
"Alignment") <<
"@SUB=AlignableNavigator" <<
"Created with map of size "
71 unsigned int numNonDets = 0;
72 for ( std::vector<Alignable*>::iterator it = alignables.begin(); it != alignables.end(); ++it ) {
76 edm::LogWarning(
"Alignment") <<
"@SUB=AlignableNavigator" <<
"Created with map of size "
77 <<
theMap.size() <<
", but found also " << numNonDets
78 <<
" Alignables that have DetId!=0,\nbeing neither "
79 <<
"AlignableDet nor AlignableDetUnit. This will "
80 <<
"lead to an exception in case alignableFromDetId(..) "
81 <<
"is called for one of these DetIds.\n"
82 <<
"If there is no exception, you can ignore this message.";
84 edm::LogInfo(
"Alignment") <<
"@SUB=AlignableNavigator" <<
"created with map of size "
99 if ( position !=
theMap.end() ) {
100 return position->second;
104 <<
"[AlignableNavigator::alignableDetFromDetId] DetId " << detid.
rawId() <<
" not found";
117 if (!alignable)
return 0;
119 unsigned int nProblem = 0;
127 if ((aliDet = dynamic_cast<AlignableDet*>(alignable))) {
131 }
else if ((aliDetUnit = dynamic_cast<AlignableDetUnit*>(alignable))) {
135 }
else if ((aliBeamSpot = dynamic_cast<AlignableBeamSpot*>(alignable))) {
149 theDetAndSubdet.push_back(std::pair<int, int>( detId.det(), detId.subdetId() ));
154 || comp.size() > 1 ) {
155 for ( std::vector<Alignable*>::iterator it = comp.begin(); it != comp.end(); ++it ) {
163 std::vector<AlignableDetOrUnitPtr>
166 std::vector<AlignableDetOrUnitPtr>
result;
167 result.reserve(hitvec.size());
169 for(std::vector<const TransientTrackingRecHit*>::const_iterator ih
170 = hitvec.begin(), iEnd = hitvec.end(); ih != iEnd; ++ih) {
178 std::vector<AlignableDetOrUnitPtr>
183 std::vector<AlignableDetOrUnitPtr>
result;
184 result.reserve(hitVec.size());
186 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator it
187 = hitVec.begin(), iEnd = hitVec.end(); it != iEnd; ++it) {
188 result.push_back(this->alignableFromDetId((*it)->geographicalId()));
197 std::vector<AlignableDetOrUnitPtr>
result;
198 result.reserve(
theMap.size());
200 for (MapType::const_iterator iIdAli =
theMap.begin(); iIdAli !=
theMap.end(); ++iIdAli) {
201 result.push_back(iIdAli->second);
210 int det = detid.
det();
213 if (det ==
i->first && subdet ==
i->second)
return true;
AlignableDetOrUnitPtr alignableFromGeomDet(const GeomDet *geomDet)
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
virtual Alignables components() const =0
Return vector of all direct components.
static int position[TOTALCHAMBERS][3]
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.
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