+inline void AliITStrackV2::SetModuleIndexInfo(Int_t ilayer,Int_t idet,Int_t status,
+ Float_t xloc,Float_t zloc) {
+ //----------------------------------------------------------------------
+ // This function encodes in the module number also the status of cluster association
+ // "status" can have the following values:
+ // 1 "found" (cluster is associated),
+ // 2 "dead" (module is dead from OCDB),
+ // 3 "skipped" (module or layer forced to be skipped),
+ // 4 "outinz" (track out of z acceptance),
+ // 5 "nocls" (no clusters in the road),
+ // 6 "norefit" (cluster rejected during refit)
+ // 7 "deadzspd" (holes in z in SPD)
+ // WARNING: THIS METHOD HAS TO BE SYNCHRONIZED WITH AliESDtrack::GetITSModuleIndexInfo()!
+ //----------------------------------------------------------------------
+
+ if(idet<0) {
+ idet=0;
+ } else {
+ // same detector numbering as in AliITSCalib classes
+ if(ilayer==1) idet+=AliITSgeomTGeo::GetNLadders(1)*AliITSgeomTGeo::GetNDetectors(1);
+ if(ilayer==3) idet+=AliITSgeomTGeo::GetNLadders(3)*AliITSgeomTGeo::GetNDetectors(3);
+ if(ilayer==5) idet+=AliITSgeomTGeo::GetNLadders(5)*AliITSgeomTGeo::GetNDetectors(5);
+ }
+
+ Int_t xInt = Int_t(xloc*10.);
+ Int_t zInt = Int_t(zloc*10.);
+
+ if(TMath::Abs(xloc*10.-(Float_t)xInt)>0.5)
+ if(zloc>0) { xInt++; } else { xInt--; }
+ if(TMath::Abs(zloc*10.-(Float_t)zInt)>0.5)
+ if(zloc>0) { zInt++; } else { zInt--; }
+
+ Int_t signs=0;
+ if(xInt>=0 && zInt>=0) signs=10000;
+ if(xInt>=0 && zInt<0) signs=20000;
+ if(xInt<0 && zInt>=0) signs=30000;
+ if(xInt<0 && zInt<0) signs=40000;
+
+ Int_t modindex = signs;
+
+ modindex += TMath::Abs(zInt);
+ modindex += TMath::Abs(xInt)*100;