From 4edaa015d81a605e8f9eb75090a7d9076bb60452 Mon Sep 17 00:00:00 2001 From: agheata Date: Thu, 6 Jan 2011 14:25:27 +0000 Subject: [PATCH] Moved vertex cuts outside the track loop (A.Palaha) --- ANALYSIS/examples/AliAnalysisTaskEx01.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ANALYSIS/examples/AliAnalysisTaskEx01.cxx b/ANALYSIS/examples/AliAnalysisTaskEx01.cxx index a434d13bcdf..e29ae124a0c 100644 --- a/ANALYSIS/examples/AliAnalysisTaskEx01.cxx +++ b/ANALYSIS/examples/AliAnalysisTaskEx01.cxx @@ -199,6 +199,14 @@ void AliAnalysisTaskEx01::UserExec(Option_t *) // // These booleans can then be used to fill different histograms for specific // conditions, or summed to make one cut for all events that fill histos. + + // Do some fast cuts first + // check for good reconstructed vertex + if(!(esd->GetPrimaryVertex()->GetStatus())) return; + // if vertex is from spd vertexZ, require more stringent cut + if (esd->GetPrimaryVertex()->IsFromVertexerZ()) { + if (esd->GetPrimaryVertex()->GetDispersion()>0.02 || esd->GetPrimaryVertex()->GetZRes()>0.25 ) return; // bad vertex from VertexerZ + } // Track loop for reconstructed event Int_t ntracks = esd->GetNumberOfTracks(); @@ -209,13 +217,6 @@ void AliAnalysisTaskEx01::UserExec(Option_t *) continue; } - // Do some fast cuts first - // check for good reconstructed vertex - if(!(esd->GetPrimaryVertex()->GetStatus())) continue; - // if vertex is from spd vertexZ, require more stringent cut - if (esd->GetPrimaryVertex()->IsFromVertexerZ()) { - if (esd->GetPrimaryVertex()->GetDispersion()>0.02 || esd->GetPrimaryVertex()->GetZRes()>0.25 ) continue; // bad vertex from VertexerZ - } // Some MC checks, if MC is used //if(esdtrack->GetLabel() < 0) continue; // get rid of "ghost" tracks -- 2.39.3