]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fix a problem with wrong cast: was TGraphErrors, should be TF1
authorMikolaj Krzewicki <mikolaj.krzewicki@cern.ch>
Wed, 11 Dec 2013 22:38:43 +0000 (23:38 +0100)
committerMikolaj Krzewicki <mikolaj.krzewicki@cern.ch>
Wed, 11 Dec 2013 22:38:43 +0000 (23:38 +0100)
TPC/Rec/AliTPCseed.cxx

index 39843643ed737281e059455954c06110c5196592..1ebcc6064e546d9437a1c3a5de7f68309043dd56 100644 (file)
@@ -1211,7 +1211,7 @@ Float_t  AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I
   TGraphErrors * grPadEqual = 0x0;
   TGraphErrors*  grChamberGain[3]={0x0,0x0,0x0};
   TGraphErrors*  grDipAngle[3]={0x0,0x0,0x0};
-  TGraphErrors*  funDipAngle[3]={0x0,0x0,0x0};
+  TF1*  funDipAngle[3]={0x0,0x0,0x0};
   //
   //
   if (recoParam->GetNeighborRowsDedx() == 0) rowThres = 0;     
@@ -1238,8 +1238,8 @@ Float_t  AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I
           grChamberGain[iPadRegion]=(TGraphErrors*)timeGainSplines->FindObject(Form("TGRAPHERRORS_MEAN_CHAMBERGAIN_%s_BEAM_ALL",names[iPadRegion]));
          if (type==1) grDipAngle[iPadRegion]=(TGraphErrors*)timeGainSplines->FindObject(Form("TGRAPHERRORS_QMAX_DIPANGLE_%s_BEAM_ALL",names[iPadRegion]));
          if (type==0) grDipAngle[iPadRegion]=(TGraphErrors*)timeGainSplines->FindObject(Form("TGRAPHERRORS_QTOT_DIPANGLE_%s_BEAM_ALL",names[iPadRegion]));
-         if (type==1) funDipAngle[iPadRegion]=(TGraphErrors*)timeGainSplines->FindObject(Form("TF1_QMAX_DIPANGLE_%s_BEAM_ALL",names[iPadRegion]));
-         if (type==0) funDipAngle[iPadRegion]=(TGraphErrors*)timeGainSplines->FindObject(Form("TF1_QTOT_DIPANGLE_%s_BEAM_ALL",names[iPadRegion]));
+         if (type==1) funDipAngle[iPadRegion]=(TF1*)timeGainSplines->FindObject(Form("TF1_QMAX_DIPANGLE_%s_BEAM_ALL",names[iPadRegion]));
+         if (type==0) funDipAngle[iPadRegion]=(TF1*)timeGainSplines->FindObject(Form("TF1_QTOT_DIPANGLE_%s_BEAM_ALL",names[iPadRegion]));
        }
       }
   }
@@ -1349,7 +1349,8 @@ Float_t  AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I
     //
     Float_t corrDipAngle = 1;
     //    if (grDipAngle[ipad]) corrDipAngle = grDipAngle[ipad]->Eval(GetTgl());
-    if (funDipAngle[ipad]) corrDipAngle = funDipAngle[ipad]->Eval(GetTgl());
+    Double_t tgl=GetTgl();
+    if (funDipAngle[ipad]) corrDipAngle = funDipAngle[ipad]->Eval(tgl);
     //
     // pressure temperature and high voltage correction
     //