Bug fix in AliITStrackerMI::CookLabel. Now the track label is assigned correctly...
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Mar 2010 13:17:22 +0000 (13:17 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Mar 2010 13:17:22 +0000 (13:17 +0000)
ITS/AliITStrackV2.cxx
ITS/AliITStrackV2.h
ITS/AliITStrackerMI.cxx

index f62e7c63a9aa8b3b062357fc71e6d010b77a1b94..cf2a7f0521e16770168416a0025838e169f8949a 100644 (file)
@@ -24,7 +24,6 @@
 #include <TMath.h>
 
 #include "AliCluster.h"
-#include "AliESDtrack.h"
 #include "AliESDVertex.h"
 #include "AliITSReconstructor.h"
 #include "AliITStrackV2.h"
index b9923bf98f440dbacbc91ac21ad01fc9521eb286..7840c10fafea9d0d9d4a8a8b90a49ccc81e6ca0d 100644 (file)
 #include <AliKalmanTrack.h>
 #include "AliITSRecoParam.h"
 #include "AliITSgeomTGeo.h"
+#include "AliESDtrack.h"
 
 /* $Id$ */
 
-class AliESDtrack;
 class AliESDVertex;
 class AliTracker;
 
@@ -60,6 +60,9 @@ public:
   void UpdateESDtrack(ULong_t flags) const;
   
   AliESDtrack *GetESDtrack() const {return fESDtrack;}
+  virtual ULong_t  GetStatus() const {
+    if(fESDtrack){return fESDtrack->GetStatus();} 
+    else { AliWarning("null ESD track pointer - status 0"); return 0;} }
 
   Int_t GetDetectorIndex() const {return GetLabel();}
   Double_t GetdEdx() const {return fdEdx;}
index e3d8edd9177db1e51aa38ec710c4cd90e6649268..38a162b7957f104220004b3a745e890ad5a34078 100644 (file)
@@ -3650,8 +3650,11 @@ void AliITStrackerMI::CookLabel(AliITStrackMI *track,Float_t wrong) const {
   //--------------------------------------------------------------------
   Int_t tpcLabel=-1; 
      
-  if (track->GetESDtrack())   tpcLabel = track->GetESDtrack()->GetTPCLabel();
-
+  if (track->GetESDtrack()){
+    tpcLabel = track->GetESDtrack()->GetTPCLabel();
+    ULong_t trStatus=track->GetESDtrack()->GetStatus();
+    if(!(trStatus&AliESDtrack::kTPCin)) tpcLabel=track->GetLabel(); // for ITSsa tracks
+  }
    track->SetChi2MIP(9,0);
    Int_t nwrong=0;
    for (Int_t i=0;i<track->GetNumberOfClusters();i++){