Skip to content
Snippets Groups Projects
Commit 8230b433 authored by Will Leight's avatar Will Leight
Browse files

Fix for MuonGMCheck

In BMG chambers, which have cutouts, it is not possible to simply loop through all MDT tubes from 1 to N_tubes, as the tubes in the cutouts do not exist.
MuonGMCheck was doing this, which creates errors when it tries to access tubes that are not there.
This fix tests to make sure that a tube in a BMG chamber exists before trying to access it.
As MuonGMCheck is not used in reconstruction, no FT0 violation is expected or observed.  Results of RunTier0Tests can be found at /afs/cern.ch/work/w/wleight/public/MuonSW/MuonGeomRTT_21/.


Former-commit-id: bc1e00445b6ce88f1b8651f9750e626d95f0b43a
parent 7ccf1260
No related branches found
No related tags found
No related merge requests found
......@@ -1611,6 +1611,25 @@ void MuonGMCheck::checkreadoutmdtgeo()
if (mdt->hasCutouts()) tubeStep = 1;
for (int tube = 1; tube<mdt->getNtubesperlayer()+1;)
{
if(mdt->hasCutouts()){ //check that the tube exists if there are cutouts
PVConstLink cv = mdt->getMaterialGeom();
int nGrandchildren = cv->getNChildVols();
if(nGrandchildren <= 0) continue;
bool tubefound = false;
for(unsigned int kk=0; kk < cv->getNChildVols(); kk++) {
int tubegeo = cv->getIdOfChildVol(kk) % 100;
int layergeo = ( cv->getIdOfChildVol(kk) - tubegeo ) / 100;
if( tubegeo == tube && layergeo == tl ) {
tubefound=true;
break;
}
if( layergeo > tl ) break;
}
if(!tubefound){
tube+=tubeStep;
continue;
}
}
gotTube = tube;
chid = p_MdtIdHelper->channelID(idp,mdt->getMultilayer(), tl, tube);
fout<<p_MdtIdHelper->show_to_string(chid)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment