]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/Base/AliTPCcalibDB.cxx
o Fix HV problem in 2010 data
[u/mrichter/AliRoot.git] / TPC / Base / AliTPCcalibDB.cxx
index 15379a131480caa7c296f4077458404de9dbfe67..e2eb63b194131bc7bac0bc059727a2936c4c0641 100644 (file)
@@ -1768,6 +1768,13 @@ void AliTPCcalibDB::UpdateChamberHighVoltageData()
       }
 
       fChamberHVgoodFraction[iROC]=Float_t(ngood)/Float_t(nPointsSampled);
+    } else if (!gr && !sensor->GetFit() ){
+      // This is an exception handling.
+      // It was observed that for some rund in the 2010 data taking no HV info is available
+      //    for some sectors. However they were active. So take care about this
+      fChamberHVmedian[iROC]       = fParam->GetNominalVoltage(iROC);
+      fChamberHVgoodFraction[iROC] = 1.;
+      AliWarning(Form("ROC %d detected without HV Splines and HV graph. Will set median HV to nominal voltage",iROC));
     } else {
       AliError(Form("No Graph or too few points found for HV sensor of ROC %d",iROC));
     }
@@ -2533,9 +2540,10 @@ Double_t AliTPCcalibDB::GetGainCorrectionHVandPT(Int_t timeStamp, Int_t run, Int
   //  deltaCache - maximal time differnce above which the cache is recaclulated
   //  mode       - mode==0 by default return combined correction 
   //                       actual HV and Pt correction has to be present in the run calibration otherwise it is ignored.
-  //                      
+  //                       (retrun value differnt than 1 only in case calibration present in the OCDB entry CalibTimeGain
   //               mode==1 return combined correction ( important for calibration pass)
-  //
+  //                       (in case thereis  no calibration in  CalibTimeGain, default value from the AliTPCParam (Parameters) is used
+  //                       this mode is used in the CPass0
   //               mode==2 return HV correction
   //               mode==3 return P/T correction
   //  Usage in the simulation/reconstruction
@@ -2545,7 +2553,7 @@ Double_t AliTPCcalibDB::GetGainCorrectionHVandPT(Int_t timeStamp, Int_t run, Int
   static Float_t gGainCorrection[72];
   static Float_t gGainCorrectionPT[72];
   static Float_t gGainCorrectionHV[72];
-  static Int_t    gTimeStamp=0;
+  static Int_t    gTimeStamp=-99999999;
   static Bool_t   hasTimeDependent=kFALSE; 
   if ( TMath::Abs(timeStamp-gTimeStamp)> deltaCache){    
     //