float getCorrectedDelX(TStnMuon* muon){ // Generates corrected delta-x for BMU muons. // There is no radius-based correction here. // It didn't seem large enough to bother about. // James Bellinger 29-July-2008 if(muon==0x0) return -9999.; float base=muon->BmuDelX(); TVector3 vect; muon->GetBmuStubPos(vect); float phi=vect.Phi(); if(phi<0) phi+=2*PI; int side=0; if(vect.Z()>0) side=1; float phit=phi; float correction; if (phit>225.*PI/180.) phit = phit - 2.*PI; int offset; float zoneSlope[5]={.252545, .98351, .713636, .897813, .518677}; float zoneInter[5]={.252016, -2.90807, -1.94013, .38034, -1.61706}; offset=0; if(side==1 && phit<1.5707963268) offset=3; if(side==1 && phit>1.5707963268) offset=4; if(side==0 && phit>3.1415926536) offset=2; if(side==0 && phit>1.5707963268 && phit<3.1415926536) offset=1; correction = zoneSlope[offset]*phit+zoneInter[offset]; return base - correction; }