GeoModelXML does not provide correct AlignableTransforms to GmxInterface
While debugging (mis-)alignment of the ITk with @xilin, I noticed that the pointers for AlignableTransforms
we receive here:
void GmxInterface::addAlignable(int level, map<std::string, int> &index, GeoVFullPhysVol *fpv,
GeoAlignableTransform * transform) {
std::stringstream idString;
// debug message
msglog << MSG::DEBUG
<< "GmxInterface::addAlignable called for a physvol. Logvol name "
<< fpv->getLogVol()->getName() << ". Level = " << level << ". Indices: ";
for (map<string, int>::iterator i = index.begin(); i != index.end(); ++i) {
msglog << i->second << " ";
if(i!=index.begin()) idString <<"_";
idString << i->first <<"_"<<i->second;
}
msglog << endmsg;
//--------------
if(!fpv) msglog << MSG::WARNING << "Could not find a FullPhysVol when adding alignable"<<endmsg;
if(!transform) msglog << MSG::WARNING << "Could not find an alignable transform when adding alignable"<<endmsg;
//publish
if (m_publisher) m_publisher->publishNode<GeoAlignableTransform *,std::string>(transform,idString.str());
}
do not seem to be correct. They seem to be in many case the same AlignableTransform
pointer for many GeoFullPhysVol
pointers. As a consequence, when trying to mis-align elements of the ITk in Athena, we overwrite the same AlignableTransform
multiple times with many different deltas, rather than setting the deltas for the "correct" AlignableTransform
for the GeoFullPhysVol
we are considering.
My suspicion is that either we are picking the wrong pointer out of the node list when dealing with multicopies, or perhaps when creating multicopies of FullPhysVols
we do not correctly create an AlignableTransform
for each of them. To be investigated...