skip clusters when the roc voltage is funny
authormkrzewic <mkrzewic@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Nov 2013 15:02:15 +0000 (15:02 +0000)
committermkrzewic <mkrzewic@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Nov 2013 15:02:15 +0000 (15:02 +0000)
TPC/Base/AliTPCcalibDB.cxx
TPC/Base/AliTPCcalibDB.h
TPC/Rec/AliTPCtracker.cxx

index 332ed2c51e381a5586e1ede76a6cde2f6256635b..15379a131480caa7c296f4077458404de9dbfe67 100644 (file)
@@ -602,7 +602,7 @@ void AliTPCcalibDB::UpdateNonRec(){
 
 }
 
-void AliTPCcalibDB::GetTailcancelationGraphs(Int_t sector, TGraphErrors ** graphRes, Float_t * indexAmpGraphs){
+Bool_t AliTPCcalibDB::GetTailcancelationGraphs(Int_t sector, TGraphErrors ** graphRes, Float_t * indexAmpGraphs){
  
 // 
 //   Read OCDB entry object of Iontail (TObjArray of TGraphErrors of TRFs)
@@ -615,6 +615,13 @@ void AliTPCcalibDB::GetTailcancelationGraphs(Int_t sector, TGraphErrors ** graph
 //   Float_t rocVoltage=GetChamberHighVoltageMedian(sector);                      // Get the voltage from OCDB, new function from Jens
  
   Int_t nominalVoltage = (sector<36) ? 1240 : 1470 ;     // nominal voltage of 2012 when the TRF functions were produced
+
+  if ( rocVoltage < nominalVoltage/2. || rocVoltage > nominalVoltage*2. )
+  {
+    AliInfo(Form("rocVoltage out of range: roc: %.2f, nominal: %i", rocVoltage, nominalVoltage));
+    return kFALSE;
+  }
+
   Int_t tempVoltage = 0;                                 
   Int_t trackAngle  = 4;                                 // (1=first, 2=second, 3=third, 4=first+second, 5=all tracks) note: 3rd is distorted by low freq
   TString rocType   = (sector<36) ? "iroc" : "oroc";     
@@ -704,6 +711,7 @@ void AliTPCcalibDB::GetTailcancelationGraphs(Int_t sector, TGraphErrors ** graph
     }
   delete objArr1;
   }
+  return kTRUE;
 }
 
 void AliTPCcalibDB::CreateObjectList(const Char_t *filename, TObjArray *calibObjects)
index 32572a5dcf8defecf03264fe160ef50f5f48e790..537d2a9be13664bef79d3da40bfddfd66c03761f 100644 (file)
@@ -53,7 +53,7 @@ class AliTPCcalibDB : public TObject
   void   Update();  //update entries
   void   UpdateRunInformations(Int_t run, Bool_t force=kFALSE);
   void   UpdateNonRec();
-  void   GetTailcancelationGraphs(Int_t sector, TGraphErrors ** graphRes, Float_t * indexAmpGraphs);
+  Bool_t   GetTailcancelationGraphs(Int_t sector, TGraphErrors ** graphRes, Float_t * indexAmpGraphs);
   //
   Long64_t GetRun() const {return fRun;}
   //
index b600137da70956b3899278813d61d7c338ee513d..a0c4826a892f008473e6b58ff75ba5899dd4bf68 100644 (file)
@@ -1517,7 +1517,10 @@ void  AliTPCtracker::ApplyTailCancellation(){
           indexAmpGraphs[icache] = 0;
         }
         /////////////////////////////  --> position fo sie loop
-        AliTPCcalibDB::Instance()->GetTailcancelationGraphs(sec+36*secType+18*iside,graphRes,indexAmpGraphs);
+        if (!AliTPCcalibDB::Instance()->GetTailcancelationGraphs(sec+36*secType+18*iside,graphRes,indexAmpGraphs))
+        {
+          continue;
+        }
         
         AliTPCtrackerSector &sector= (secType==0)?fInnerSec[sec]:fOuterSec[sec];  
         Int_t nrows     = sector.GetNRows();                                       // number of rows