]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCseed.cxx
Revert of a harmful change (A.Goel)
[u/mrichter/AliRoot.git] / TPC / AliTPCseed.cxx
index 7aeddd1c19436bace5c96dc63c253e03a9315bb2..f2ae14b588994c8ff04135a08d1ea7540bf8ae43 100644 (file)
@@ -1154,6 +1154,9 @@ Float_t  AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I
   //
   AliTPCTransform * trans = AliTPCcalibDB::Instance()->GetTransform();
   const AliTPCRecoParam * recoParam = AliTPCcalibDB::Instance()->GetTransform()->GetCurrentRecoParam();
+  //
+  if (recoParam->GetNeighborRowsDedx() == 0) rowThres = 0;
+  //
   if (trans) {
       runNumber = trans->GetCurrentRunNumber();
       //AliTPCcalibDB::Instance()->SetRun(runNumber);
@@ -1180,7 +1183,7 @@ Float_t  AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I
   //
   for (Int_t irow=i1; irow<i2; irow++){
     AliTPCclusterMI* cluster = GetClusterPointer(irow);
-    if (!cluster) {
+    if (!cluster && irow > 1 && irow < 157) {
       Bool_t isClBefore = kFALSE;
       Bool_t isClAfter  = kFALSE;
       for(Int_t ithres = 1; ithres <= rowThres; ithres++) {
@@ -1190,8 +1193,8 @@ Float_t  AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I
        if (clusterAfter) isClAfter = kTRUE;
       }
       if (isClBefore && isClAfter) nclBelowThr++;
-      continue;
     }
+    if (!cluster) continue;
     //
     //
     if (TMath::Abs(cluster->GetY())>cluster->GetX()*ktany-kedgey) continue; // edge cluster
@@ -1299,6 +1302,7 @@ Float_t  AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I
     suma2+=ampWithBelow[icl]*ampWithBelow[icl];
     sumn++;
   }
+  delete [] ampWithBelow;
   Float_t mean =suma/sumn;
   Float_t rms  =TMath::Sqrt(TMath::Abs(suma2/sumn-mean*mean));
   //