]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITStrackerMI.cxx
Fix for copy/paste error
[u/mrichter/AliRoot.git] / ITS / AliITStrackerMI.cxx
index 801db4448d20e184436f1181d333685f45dd33ee..931ba9d9df5c5200f9251b25fbb6653ff3dcb53c 100644 (file)
@@ -237,7 +237,8 @@ fPlaneEff(0) {
   for(Int_t i=0;i<2;i++) {fxOverX0Shield[i]=-1.;fxTimesRhoShield[i]=-1.;}
   for(Int_t i=0;i<6;i++) {fxOverX0Layer[i]=-1.;fxTimesRhoLayer[i]=-1.;}
   
-  fDebugStreamer = new TTreeSRedirector("ITSdebug.root");
+  if (AliITSReconstructor::GetRecoParam()->GetESDV0Params()->StreamLevel()>0)
+    fDebugStreamer = new TTreeSRedirector("ITSdebug.root");
 
   // only for plane efficiency evaluation
   if (AliITSReconstructor::GetRecoParam()->GetComputePlaneEff() &&
@@ -2259,7 +2260,9 @@ Bool_t AliITStrackerMI::RefitAt(Double_t xx,AliITStrackMI *track,
   }
 
   // special for cosmics and TPC prolonged tracks: 
-  // check which the innermost layer crossed by the track
+  // propagate to the innermost of:
+  // - innermost layer crossed by the track
+  // - innermost layer where a cluster was associated to the track
   static AliITSRecoParam *repa = NULL;
   if(!repa){
     repa = (AliITSRecoParam*) AliITSReconstructor::GetRecoParam();
@@ -2269,14 +2272,17 @@ Bool_t AliITStrackerMI::RefitAt(Double_t xx,AliITStrackMI *track,
     }
   }
   Int_t evsp=repa->GetEventSpecie();
-
+  ULong_t trStatus=0;
+  if(track->GetESDtrack()) trStatus=track->GetStatus();
   Int_t innermostlayer=0;
-  if((evsp&AliRecoParam::kCosmic) || (track->GetStatus()&AliESDtrack::kTPCin))  {
+  if((evsp&AliRecoParam::kCosmic) || (trStatus&AliESDtrack::kTPCin))  {
     innermostlayer=5;
     Double_t drphi = TMath::Abs(track->GetD(0.,0.));
     for(innermostlayer=0; innermostlayer<AliITSgeomTGeo::GetNLayers(); innermostlayer++) {
-      if(drphi < (fgLayers[innermostlayer].GetR()+1.)) break;
+      if( (drphi < (fgLayers[innermostlayer].GetR()+1.)) ||
+         index[innermostlayer] >= 0 ) break;
     }
+
     AliDebug(2,Form(" drphi  %f  innermost %d",drphi,innermostlayer));
   }
 
@@ -4827,3 +4833,4 @@ void AliITStrackerMI::UseTrackForPlaneEff(const AliITStrackMI* track, Int_t ilay
   }
 return;
 }
+