#include "TH1F.h"
#include "TH2F.h"
#include "AliITSCorrMapSDD.h"
+#include "AliITSsegmentationSDD.h"
const Int_t AliITSCorrMapSDD::fgkNAnodePtsDefault = 1;
const Int_t AliITSCorrMapSDD::fgkNDriftPtsDefault = 72;
if(bina>=nAnodesHybrid) bina-=nAnodesHybrid;
Float_t stept = seg->Dx()*kMicronTocm/(Float_t)fNDriftPts;
fDrLen= seg->Dx()*kMicronTocm-TMath::Abs(x);
+ if(fDrLen<0) fDrLen=0;
Int_t bint = TMath::Abs((Int_t)(fDrLen/stept));
if(bint==fNDriftPts) bint-=1;
if(bint>=fNDriftPts){
Float_t q=fXt1-m*fXm1;
Float_t xcorr=m*fDrLen+q;
// fDrLen is the measured drift distance, xcorr is the corresponding true
- return (xcorr-fDrLen);
+ return GetInversionBit() ? fDrLen-xcorr : xcorr-fDrLen;
}
//______________________________________________________________________
Float_t AliITSCorrMapSDD::GetShiftForSimulation(Float_t z, Float_t x, AliITSsegmentationSDD *seg){
Float_t q=fXm1-m*fXt1;
Float_t xshifted=m*fDrLen+q;
// fDrLen is the true drift distance, xshifted is the one with map shift
- return (fDrLen-xshifted);
+ return GetInversionBit() ? xshifted-fDrLen : fDrLen-xshifted;
}
//______________________________________________________________________
TH2F* AliITSCorrMapSDD::GetMapHisto() const{
}
return hd;
}
+