Fix for #90359: fix cached values in ESD (Marta)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Jan 2012 13:32:56 +0000 (13:32 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Jan 2012 13:32:56 +0000 (13:32 +0000)
STEER/ESD/AliESDtrack.cxx

index f6c75e51d25167adfe7a9fd9515b641a2471eb17..9575e49c75fea63748eaab07e21f7339dfbcf245 100644 (file)
@@ -744,6 +744,12 @@ AliESDtrack::~AliESDtrack(){
   fFriendTrack=NULL;
   if(fTRDnSlices)
     delete[] fTRDslices;
+
+  //Reset cached values - needed for TClonesArray in AliESDInputHandler
+  fCacheNCrossedRows = -10.;
+  fCacheChi2TPCConstrainedVsGlobal = -10.;
+  if(fCacheChi2TPCConstrainedVsGlobalVertex) fCacheChi2TPCConstrainedVsGlobalVertex = 0;
+
 }
 
 AliESDtrack &AliESDtrack::operator=(const AliESDtrack &source){
@@ -946,6 +952,11 @@ AliESDtrack &AliESDtrack::operator=(const AliESDtrack &source){
   fTRDncls0  = source.fTRDncls0;      
   fTRDntracklets  = source.fTRDntracklets; 
   fVertexID = source.fVertexID;
+
+  fCacheNCrossedRows = source.fCacheNCrossedRows;
+  fCacheChi2TPCConstrainedVsGlobal = source.fCacheChi2TPCConstrainedVsGlobal;
+  fCacheChi2TPCConstrainedVsGlobalVertex = source.fCacheChi2TPCConstrainedVsGlobalVertex;
+
   return *this;
 }