From: mkrzewic Date: Thu, 14 Nov 2013 15:02:15 +0000 (+0000) Subject: skip clusters when the roc voltage is funny X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=d4559772616a74eedd7b770101932188a430398a skip clusters when the roc voltage is funny --- diff --git a/TPC/Base/AliTPCcalibDB.cxx b/TPC/Base/AliTPCcalibDB.cxx index 332ed2c51e3..15379a13148 100644 --- a/TPC/Base/AliTPCcalibDB.cxx +++ b/TPC/Base/AliTPCcalibDB.cxx @@ -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) diff --git a/TPC/Base/AliTPCcalibDB.h b/TPC/Base/AliTPCcalibDB.h index 32572a5dcf8..537d2a9be13 100644 --- a/TPC/Base/AliTPCcalibDB.h +++ b/TPC/Base/AliTPCcalibDB.h @@ -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;} // diff --git a/TPC/Rec/AliTPCtracker.cxx b/TPC/Rec/AliTPCtracker.cxx index b600137da70..a0c4826a892 100644 --- a/TPC/Rec/AliTPCtracker.cxx +++ b/TPC/Rec/AliTPCtracker.cxx @@ -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 §or= (secType==0)?fInnerSec[sec]:fOuterSec[sec]; Int_t nrows = sector.GetNRows(); // number of rows