reverting r45104, it causes wrong assignment to AliESDtrack main parameters
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 6 Nov 2010 12:00:29 +0000 (12:00 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 6 Nov 2010 12:00:29 +0000 (12:00 +0000)
HLT/global/AliHLTGlobalEsdConverterComponent.cxx

index d3206da769b13239abc8e1e75b7563816e7ea2af..9d055d82c19bcbd44b44c02774b55eb937d5f0f6 100644 (file)
@@ -434,7 +434,6 @@ int AliHLTGlobalEsdConverterComponent::ProcessBlocks(TTree* pTree, AliESDEvent*
   }
 
   // 2) convert the TPC tracks to ESD tracks
-  
   for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(kAliHLTDataTypeTrack|kAliHLTDataOriginTPC);
        pBlock!=NULL; pBlock=GetNextInputBlock()) {
     fBenchmark.AddInput(pBlock->fSize);
@@ -510,7 +509,7 @@ int AliHLTGlobalEsdConverterComponent::ProcessBlocks(TTree* pTree, AliESDEvent*
          if( dEdxTPC ) HLTWarning("Wrong number of dEdx TPC labels");
        }
        iotrack.SetLabel(mcLabel);
-       pESD->AddTrack(&iotrack);       
+       pESD->AddTrack(&iotrack);
        if (fVerbosity>0) element->Print();
       }
       HLTInfo("converted %d track(s) to AliESDtrack and added to ESD", tracks.size());
@@ -608,17 +607,10 @@ int AliHLTGlobalEsdConverterComponent::ProcessBlocks(TTree* pTree, AliESDEvent*
   // TODO 2010-07-12 this propagates also the TPC inner param to beamline
   // sounds not very reasonable
   // https://savannah.cern.ch/bugs/index.php?69873
-  for (UInt_t i=0; (int) i<pESD->GetNumberOfTracks(); i++) {
+  for (int i=0; i<pESD->GetNumberOfTracks(); i++) {
     if (!pESD->GetTrack(i) || 
        !pESD->GetTrack(i)->GetTPCInnerParam() ) continue;
-
-    AliESDtrack* tESD=pESD->GetTrack(i);
-    AliHLTGlobalBarrelTrack inner(*tESD->GetTPCInnerParam());
-    inner.SetLabel(tESD->GetLabel());
-
-    tESD->RelateToVertexTPC(pESD->GetPrimaryVertexTracks(), fSolenoidBz, 1000 );
-    // Restore TPC inner parameters!!!
-    tESD->UpdateTrackParams(&inner, AliESDtrack::kTPCin);
+    pESD->GetTrack(i)->RelateToVertexTPC(pESD->GetPrimaryVertexTracks(), fSolenoidBz, 1000 );    
   }
 
   // loop over all tracks and set the TPC refit flag by updating with the