Use the time gain correction only of specified in the RecoParam
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 19 Nov 2009 17:52:55 +0000 (17:52 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 19 Nov 2009 17:52:55 +0000 (17:52 +0000)
(Marian)

TPC/AliTPCseed.cxx

index 7a92af6..6154388 100644 (file)
@@ -1079,9 +1079,10 @@ Float_t  AliTPCseed::CookdEdxNorm(Double_t low, Double_t up, Int_t type, Int_t i
   UInt_t runNumber = 1;
   Float_t corrTimeGain = 1;
   AliTPCTransform * trans = AliTPCcalibDB::Instance()->GetTransform();
-  if (trans) {
+  const AliTPCRecoParam * recoParam = AliTPCcalibDB::Instance()->GetTransform()->GetCurrentRecoParam();
+  if (trans && recoParam->GetUseGainCorrectionTime()>0) {
     runNumber = trans->GetCurrentRunNumber();
-               //AliTPCcalibDB::Instance()->SetRun(runNumber);
+    //AliTPCcalibDB::Instance()->SetRun(runNumber);
     TObjArray * timeGainSplines = AliTPCcalibDB::Instance()->GetTimeGainSplinesRun(runNumber);
     if (timeGainSplines) {
       UInt_t time = trans->GetCurrentTimeStamp();
@@ -1239,7 +1240,8 @@ Float_t  AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I
   UInt_t runNumber = 1;
   Float_t corrTimeGain = 1;
   AliTPCTransform * trans = AliTPCcalibDB::Instance()->GetTransform();
-  if (trans) {
+  const AliTPCRecoParam * recoParam = AliTPCcalibDB::Instance()->GetTransform()->GetCurrentRecoParam();
+  if (trans && recoParam->GetUseGainCorrectionTime()>0) {
     runNumber = trans->GetCurrentRunNumber();
     //AliTPCcalibDB::Instance()->SetRun(runNumber);
     TObjArray * timeGainSplines = AliTPCcalibDB::Instance()->GetTimeGainSplinesRun(runNumber);