Primary track quality selection for kink mothers.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Jul 2008 16:27:52 +0000 (16:27 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Jul 2008 16:27:52 +0000 (16:27 +0000)
ANALYSIS/AliAnalysisTaskESDfilter.cxx

index 94342d2..cb5124a 100644 (file)
@@ -635,10 +635,13 @@ void AliAnalysisTaskESDfilter::ConvertESDtoAOD() {
                        continue;
                    }
                    
-                   // Add the mother track
+                   // Add the mother track if it passed primary track selection cuts
                    
                    AliAODTrack * mother = NULL;
                    
+                   UInt_t selectInfo = fTrackFilter->IsSelected(esd->GetTrack(imother));
+                   if (!selectInfo) continue;
+                   
                    if (!usedTrack[imother]) {
                        
                        usedTrack[imother] = kTRUE;
@@ -648,7 +651,7 @@ void AliAnalysisTaskESDfilter::ConvertESDtoAOD() {
                        esdTrackM->GetXYZ(pos);
                        esdTrackM->GetCovarianceXYZPxPyPz(covTr);
                        esdTrackM->GetESDpid(pid);
-                       UInt_t selectInfo = fTrackFilter->IsSelected(esdTrackM);
+                       
                        mother = 
                            new(tracks[jTracks++]) AliAODTrack(esdTrackM->GetID(),
                                                               esdTrackM->GetLabel(),