]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/AliHMPIDTracker.cxx
This class is obsolete
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDTracker.cxx
index 0907bfd60c1c6c60b53ff0d2ac10d502532984ee..3ce6008763872b4cab67d33ab9281fb66592831f 100644 (file)
@@ -106,8 +106,14 @@ Int_t AliHMPIDTracker::Recon(AliESDEvent *pEsd,TObjArray *pClus,TObjArray *pNmea
     }
     pTrk->SetHMPIDtrk(xRa,yRa,theta,phi);                                                        //store initial infos
     Double_t nmean=((TF1*)pNmean->At(3*cham))->Eval(pEsd->GetTimeStamp());                       //C6F14 Nmean for this chamber
-    Int_t hvsec = AliHMPIDParam::InHVSector(xPc,yPc);
-    Double_t qthre=((TF1*)pQthre->At(6*cham+hvsec))->Eval(pEsd->GetTimeStamp());
+    Double_t qthre = 0; 
+    if(pQthre->GetEntriesFast()==AliHMPIDParam::kMaxCh+1)                                        // just for backward compatibility
+      qthre=((TF1*)pQthre->At(cham))->Eval(pEsd->GetTimeStamp());                                //
+    else {                                                                                       // in the past just 1 qthre
+      Int_t hvsec = AliHMPIDParam::InHVSector(yPc);                                              //  per chamber
+      if (hvsec>=0)
+       qthre=((TF1*)pQthre->At(6*cham+hvsec))->Eval(pEsd->GetTimeStamp());                        //
+    }                                                                                            //
     recon.SetImpPC(xPc,yPc);                                                                     //store track impact to PC
     recon.CkovAngle(pTrk,(TClonesArray *)pClus->At(cham),nmean,qthre);                           //search for Cerenkov angle of this track
 //    Printf("AliHMPIDTracker::Recon: nmean %f, qthre %f",nmean,qthre);
@@ -122,7 +128,10 @@ Int_t AliHMPIDTracker::ReconHiddenTrk(Int_t iCh,Int_t iHVsec,AliESDtrack *pTrk,T
 //   Returns: error code, 0 if no errors
   AliHMPIDReconHTA reconHTA;                                                                          //instance of reconstruction class, nothing important in ctor
   Double_t nmean=((TF1*)pNmean->At(3*iCh))->Eval(0);                                            //C6F14 Nmean for this chamber
-  Double_t qthre=((TF1*)pQthre->At(iCh+iHVsec))->Eval(0);                                             //C6F14 Nmean for this chamber
+  Double_t qthre = 0;
+  if(pQthre->GetEntriesFast()==AliHMPIDParam::kMaxCh+1)                                         //
+    qthre=((TF1*)pQthre->At(iCh))->Eval(0);                                                     //just for backward compatibi
+  else  qthre=((TF1*)pQthre->At(6*iCh+iHVsec))->Eval(0);                                        //
   if(pCluLst->GetEntriesFast()<4) return 1;                                                     //min 4 clusters (3 + 1 mip) to find a ring! 
   if(reconHTA.CkovHiddenTrk(pTrk,pCluLst,nmean,qthre)) return 0;                                   //search for track parameters and Cerenkov angle of this track
   else return 1;                                                                                // error code: 0=no error,1=fit not performed;