Merge branch 'master_patch'
[u/mrichter/AliRoot.git] / ANALYSIS / ESDfilter / AliAnalysisTaskESDfilter.cxx
index 6870a5500211986a10d44805f367e86fbfea19d2..c3633881c124bf835d17464469381fdd31da0377 100644 (file)
@@ -367,7 +367,8 @@ AliAODHeader* AliAnalysisTaskESDfilter::ConvertHeader(const AliESDEvent& esd)
 
   AliCodeTimerAuto("",0);
   
-  AliAODHeader* header = AODEvent()->GetHeader();
+  AliAODHeader* header = dynamic_cast<AliAODHeader*>(AODEvent()->GetHeader());
+  if(!header) AliFatal("Not a standard AOD");
   
   header->SetRunNumber(esd.GetRunNumber());
   header->SetOfflineTrigger(fInputHandler->IsEventSelected()); // propagate the decision of the physics selection
@@ -599,7 +600,7 @@ void AliAnalysisTaskESDfilter::ConvertCascades(const AliESDEvent& esd)
                                                                 vCascade,
                                                                 kTRUE,  // usedForVtxFit = kFALSE ? FIXME
                                                                 vtx->UsesTrack(esdCascadeBach->GetID()),
-                                                                AliAODTrack::kSecondary,
+                                                                AliAODTrack::kFromDecayVtx,
                                                                 selectInfo);
       aodTrack->SetPIDForTracking(esdCascadeBach->GetPIDForTracking());
       aodTrack->SetTPCFitMap(esdCascadeBach->GetTPCFitMap());
@@ -680,7 +681,7 @@ void AliAnalysisTaskESDfilter::ConvertCascades(const AliESDEvent& esd)
                                                                   vV0FromCascade,
                                                                   kTRUE,  // usedForVtxFit = kFALSE ? FIXME
                                                                   vtx->UsesTrack(esdCascadePos->GetID()),
-                                                                  AliAODTrack::kSecondary,
+                                                                  AliAODTrack::kFromDecayVtx,
                                                                   selectInfo);
        aodTrack->SetPIDForTracking(esdCascadePos->GetPIDForTracking());
         aodTrack->SetTPCFitMap(esdCascadePos->GetTPCFitMap());
@@ -732,7 +733,7 @@ void AliAnalysisTaskESDfilter::ConvertCascades(const AliESDEvent& esd)
                                                                   vV0FromCascade,
                                                                   kTRUE,  // usedForVtxFit = kFALSE ? FIXME
                                                                   vtx->UsesTrack(esdCascadeNeg->GetID()),
-                                                                  AliAODTrack::kSecondary,
+                                                                  AliAODTrack::kFromDecayVtx,
                                                                   selectInfo);
        aodTrack->SetPIDForTracking(esdCascadeNeg->GetPIDForTracking());
         aodTrack->SetTPCFitMap(esdCascadeNeg->GetTPCFitMap());
@@ -949,7 +950,7 @@ void AliAnalysisTaskESDfilter::ConvertV0s(const AliESDEvent& esd)
                                                                    vV0,
                                                                    kTRUE,  // check if this is right
                                                                    vtx->UsesTrack(esdV0Pos->GetID()),
-                                                                   AliAODTrack::kSecondary,
+                                                                   AliAODTrack::kFromDecayVtx,
                                                                    selectInfo);
            aodTrack->SetPIDForTracking(esdV0Pos->GetPIDForTracking());
            aodTrack->SetTPCFitMap(esdV0Pos->GetTPCFitMap());
@@ -996,7 +997,7 @@ void AliAnalysisTaskESDfilter::ConvertV0s(const AliESDEvent& esd)
                                                              vV0,
                                                              kTRUE,  // check if this is right
                                                              vtx->UsesTrack(esdV0Neg->GetID()),
-                                                             AliAODTrack::kSecondary,
+                                                             AliAODTrack::kFromDecayVtx,
                                                              selectInfo);
       aodTrack->SetPIDForTracking(esdV0Neg->GetPIDForTracking());
       aodTrack->SetTPCFitMap(esdV0Neg->GetTPCFitMap());
@@ -1780,7 +1781,7 @@ void AliAnalysisTaskESDfilter::ConvertKinks(const AliESDEvent& esd)
                                                                    vkink,
                                                                    kTRUE, // check if this is right
                                                                    vtx->UsesTrack(esdTrack->GetID()),
-                                                                   AliAODTrack::kSecondary,
+                                                                   AliAODTrack::kFromDecayVtx,
                                                                    selectInfo);
            daughter->SetPIDForTracking(esdTrackD->GetPIDForTracking());
             daughter->SetTPCFitMap(esdTrackD->GetTPCFitMap());