// </ul>
// End_Html
//
-// Begin_Macro(source)
+// Begin_Macro(source)
// {
// gROOT->SetStyle("Plain"); gStyle->SetPalette(1);
-// TCanvas *c2 = new TCanvas("c2","c2",500,450);
+// TCanvas *c2 = new TCanvas("cAliTPCVoltError3D","cAliTPCVoltError3D",500,450);
// AliTPCFCVoltError3D fc;
// fc.SetOmegaTauT1T2(0,1,1);
// fc.SetRotatedClipVoltA(0,40);
#include "AliTPCParam.h"
#include "AliLog.h"
#include "TMatrixD.h"
+#include "TMatrixF.h"
#include "TMath.h"
#include "AliTPCROC.h"
// it represents a sum up of the 4 basic look up tables (created individually)
// see InitFCVoltError3D() function
for ( Int_t k = 0 ; k < kNPhi ; k++ ) {
- fLookUpErOverEz[k] = new TMatrixD(kNR,kNZ);
- fLookUpEphiOverEz[k] = new TMatrixD(kNR,kNZ);
- fLookUpDeltaEz[k] = new TMatrixD(kNR,kNZ);
+ fLookUpErOverEz[k] = new TMatrixF(kNR,kNZ);
+ fLookUpEphiOverEz[k] = new TMatrixF(kNR,kNZ);
+ fLookUpDeltaEz[k] = new TMatrixF(kNR,kNZ);
}
for ( Int_t k = 0 ; k < kPhiSlices ; k++ ) {
//
// Calculates the correction due e.g. residual voltage errors on the TPC boundaries
//
+ const Double_t kEpsilon=Double_t(FLT_MIN);
if (!fInitLookUp) {
AliInfo("Lookup table was not initialized! Perform the inizialisation now ...");
InitFCVoltError3D();
}
+ static Bool_t forceInit=kTRUE; //temporary needed for back compatibility with old OCDB entries
+ if (forceInit &&fLookUpErOverEz[0]){
+ if (TMath::Abs(fLookUpErOverEz[0]->Sum())<kEpsilon){//temporary needed for back compatibility with old OCDB entries
+ ForceInitFCVoltError3D();
+ }
+ forceInit=kFALSE;
+ }
+
+
Int_t order = 1 ; // FIXME: hardcoded? Linear interpolation = 1, Quadratic = 2
// note that the poisson solution was linearly mirroed on this grid!
- Double_t intEr, intEphi, intDeltaEz;
- Double_t r, phi, z ;
+ Float_t intEr, intEphi, intDeltaEz;
+ Float_t r, phi, z ;
Int_t sign;
r = TMath::Sqrt( x[0]*x[0] + x[1]*x[1] ) ;
for ( Int_t k = 0 ; k < kNPhi ; k++ ) {
phi = fgkPhiList[k] ;
- TMatrixD &erOverEz = *fLookUpErOverEz[k] ;
- TMatrixD &ephiOverEz = *fLookUpEphiOverEz[k];
- TMatrixD &deltaEz = *fLookUpDeltaEz[k] ;
+ TMatrixF &erOverEz = *fLookUpErOverEz[k] ;
+ TMatrixF &ephiOverEz = *fLookUpEphiOverEz[k];
+ TMatrixF &deltaEz = *fLookUpDeltaEz[k] ;
for ( Int_t i = 0 ; i < kNZ ; i++ ) {
z = TMath::Abs(fgkZList[i]) ; // Symmetric solution in Z that depends only on ABS(Z)