1 /*************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: A.Abrahantes, E.Lopez, S.Vallero *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15 //#include <TBranch.h>
16 //#include <TCanvas.h>
23 //#include <TLorentzVector.h>
25 #include <TObjArray.h>
27 //#include <TProfile.h>
28 //#include <TRandom.h>
29 //#include <TSystem.h>
33 #include "AliAnalyseLeadingTrackUE.h"
34 //#include "AliAnalysisTask.h"
36 //#include "AliAnalysisHelperJetTasks.h"
37 //#include "AliAnalysisManager.h"
38 #include "AliAODEvent.h"
39 //#include "AliAODHandler.h"
40 //#include "AliAODJet.h"
41 #include "AliAODMCParticle.h"
42 #include "AliAODTrack.h"
43 #include "AliESDEvent.h"
44 #include "AliESDtrack.h"
45 #include "AliESDtrackCuts.h"
46 //#include "AliGenPythiaEventHeader.h"
47 #include "AliInputEventHandler.h"
48 //#include "AliKFVertex.h"
50 #include "AliMCEvent.h"
51 #include "AliVParticle.h"
53 #include "AliAnalysisManager.h"
54 #include "AliMCEventHandler.h"
58 ////////////////////////////////////////////////
59 //---------------------------------------------
60 // Class for transverse regions analysis
61 //---------------------------------------------
62 ////////////////////////////////////////////////
67 ClassImp(AliAnalyseLeadingTrackUE)
69 //-------------------------------------------------------------------
70 AliAnalyseLeadingTrackUE::AliAnalyseLeadingTrackUE() :
78 fEsdTrackCutsSPD(0x0),
85 //-------------------------------------------------------------------
86 AliAnalyseLeadingTrackUE & AliAnalyseLeadingTrackUE::operator = (const AliAnalyseLeadingTrackUE & /*source*/)
88 // assignment operator
93 //-------------------------------------------------------------------
94 AliAnalyseLeadingTrackUE::~AliAnalyseLeadingTrackUE()
102 //____________________________________________________________________
103 Bool_t AliAnalyseLeadingTrackUE::ApplyCuts(TObject* track)
106 // select track according to set of cuts
107 if (!fEsdTrackCuts->IsSelected(track) )return kFALSE;
108 if (fEsdTrackCutsSPD && fEsdTrackCutsSDD && !fEsdTrackCutsSPD->IsSelected(track) && fEsdTrackCutsSDD->IsSelected(track)) return kFALSE;
114 //____________________________________________________________________
115 void AliAnalyseLeadingTrackUE::DefineESDCuts(Int_t /*filterbit*/){
117 // Reproduces the cuts of the corresponding bit in the ESD->AOD filtering
118 // (see $ALICE_ROOT/ANALYSIS/macros/AddTaskESDFilter.C)
120 if (fFilterBit == 128)
122 fEsdTrackCuts = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
123 fEsdTrackCuts->SetMinNClustersTPC(70);
127 fEsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010();
128 fEsdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kNone);
130 // Add SPD requirement
131 fEsdTrackCutsSPD = new AliESDtrackCuts("SPD", "Require 1 cluster in SPD");
132 fEsdTrackCutsSPD->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
134 // Add SDD requirement
135 fEsdTrackCutsSDD = new AliESDtrackCuts("SDD", "Require 1 cluster in first layer SDD");
136 fEsdTrackCutsSDD->SetClusterRequirementITS(AliESDtrackCuts::kSDD,AliESDtrackCuts::kFirst);
140 //____________________________________________________________________
141 TObjArray* AliAnalyseLeadingTrackUE::FindLeadingObjects(TObject *obj)
144 // Returns an array of charged particles (or jets) ordered according to their pT.
146 Int_t nTracks = NParticles(obj);
149 if( !nTracks ) return 0;
151 // Define array of AliVParticle objects
152 TObjArray* tracks = new TObjArray(nTracks);
154 // Loop over tracks or jets
155 for (Int_t ipart=0; ipart<nTracks; ++ipart) {
156 AliVParticle* part = ParticleWithCuts( obj, ipart );
158 // Accept leading-tracks in a limited pseudo-rapidity range
159 if( TMath::Abs(part->Eta()) > fTrackEtaCut ) continue;
160 tracks->AddLast( part );
162 // Order tracks by pT
163 QSortTracks( *tracks, 0, tracks->GetEntriesFast() );
165 nTracks = tracks->GetEntriesFast();
166 if( !nTracks ) return 0;
172 //-------------------------------------------------------------------
173 TObjArray* AliAnalyseLeadingTrackUE::GetAcceptedParticles(TObject* obj, TObject* arrayMC, Bool_t onlyprimaries, Int_t particleSpecies, Bool_t useEtaPtCuts)
175 // Returns an array of particles that pass the cuts, if arrayMC is given each reconstructed particle is replaced by its corresponding MC particles, depending on the parameter onlyprimaries only for primaries
176 // particleSpecies: -1 all particles are returned
177 // 0 (pions) 1 (kaons) 2 (protons) 3 (others) particles
179 Int_t nTracks = NParticles(obj);
180 TObjArray* tracks = new TObjArray;
182 // for TPC only tracks
183 Bool_t hasOwnership = kFALSE;
184 if (fFilterBit == 128 && obj->InheritsFrom("AliESDEvent"))
185 hasOwnership = kTRUE;
188 tracks->SetOwner(hasOwnership);
190 // Loop over tracks or jets
191 for (Int_t ipart=0; ipart<nTracks; ++ipart) {
192 AliVParticle* part = ParticleWithCuts( obj, ipart, onlyprimaries, particleSpecies );
196 if (TMath::Abs(part->Eta()) > fTrackEtaCut || part->Pt() < fTrackPtMin)
200 Int_t label = part->GetLabel();
203 // re-define part as the matched MC particle
204 part = ParticleWithCuts(arrayMC, TMath::Abs(label),onlyprimaries, particleSpecies);
214 //-------------------------------------------------------------------
215 TObjArray* AliAnalyseLeadingTrackUE::GetMinMaxRegion(TList *transv1, TList *transv2)
218 // Returns two lists of particles, one for MIN and one for MAX region
219 Double_t sumpT1 = 0.;
220 Double_t sumpT2 = 0.;
222 Int_t particles1 = transv1->GetEntries();
223 Int_t particles2 = transv2->GetEntries();
225 // Loop on transverse region 1
226 for (Int_t i=0; i<particles1; i++){
227 AliVParticle *part = (AliVParticle*)transv1->At(i);
228 sumpT1 += part->Pt();
231 // Loop on transverse region 2
232 for (Int_t i=0; i<particles2; i++){
233 AliVParticle *part = (AliVParticle*)transv2->At(i);
234 sumpT2 += part->Pt();
237 TObjArray *regionParticles = new TObjArray;
238 if ( sumpT2 >= sumpT1 ){
239 regionParticles->AddLast(transv1); // MIN
240 regionParticles->AddLast(transv2); // MAX
242 regionParticles->AddLast(transv2); // MIN
243 regionParticles->AddLast(transv1); // MAX
246 return regionParticles;
249 //-------------------------------------------------------------------
250 Int_t AliAnalyseLeadingTrackUE::NParticles(TObject* obj)
253 //Returns the number of particles in AliAODMCParticle array or AliAODTracks or AliESDTracks
257 if (obj->InheritsFrom("TClonesArray")){ // MC particles
258 TClonesArray *arrayMC = static_cast<TClonesArray*>(obj);
259 nTracks = arrayMC->GetEntriesFast();
260 }else if (obj->InheritsFrom("TObjArray")){ // list of AliVParticle
261 TObjArray *array = static_cast<TObjArray*>(obj);
262 nTracks = array->GetEntriesFast();
263 }else if (obj->InheritsFrom("AliAODEvent")){ // RECO AOD tracks
264 AliAODEvent *aodEvent = static_cast<AliAODEvent*>(obj);
265 nTracks = aodEvent->GetNTracks();
266 }else if (obj->InheritsFrom("AliESDEvent")){ // RECO ESD tracks
267 AliESDEvent *esdEvent = static_cast<AliESDEvent*>(obj);
268 nTracks = esdEvent->GetNumberOfTracks();
269 }else if (obj->InheritsFrom("AliMCEvent")){ // RECO ESD tracks
270 AliMCEvent *mcEvent = static_cast<AliMCEvent*>(obj);
271 nTracks = mcEvent->GetNumberOfTracks();
273 if (fDebug > 1) AliFatal(" Analysis type not defined !!! ");
281 //-------------------------------------------------------------------
282 AliVParticle* AliAnalyseLeadingTrackUE::ParticleWithCuts(TObject* obj, Int_t ipart, Bool_t onlyprimaries, Int_t particleSpecies)
284 // Returns track or MC particle at position "ipart" if passes selection criteria
285 // particleSpecies: -1 all particles are returned
286 // 0 (pions) 1 (kaons) 2 (protons) 3 (others) particles
287 AliVParticle *part=0;
289 if (obj->InheritsFrom("TClonesArray")){ // AOD-MC PARTICLE
290 TClonesArray *arrayMC = static_cast<TClonesArray*>(obj);
291 part = (AliVParticle*)arrayMC->At( ipart );
293 // eventually only primaries
294 if (onlyprimaries && !( ((AliAODMCParticle*)part)->IsPhysicalPrimary()) )return 0;
295 // eventually only hadrons
297 Int_t pdgCode = ((AliAODMCParticle*)part)->GetPdgCode();
298 Bool_t isHadron = TMath::Abs(pdgCode)==211 || // Pion
299 TMath::Abs(pdgCode)==2212 || // Proton
300 TMath::Abs(pdgCode)==321; // Kaon
301 if (!isHadron) return 0;
303 if (particleSpecies != -1) {
304 // find the primary mother
305 AliVParticle* mother = part;
306 while (!((AliAODMCParticle*)mother)->IsPhysicalPrimary())
308 if (((AliAODMCParticle*)mother)->GetMother() < 0)
314 mother = (AliVParticle*) arrayMC->At(((AliAODMCParticle*)mother)->GetMother());
321 Int_t pdgCode = ((AliAODMCParticle*)mother)->GetPdgCode();
322 if (particleSpecies == 0 && TMath::Abs(pdgCode)!=211)
324 if (particleSpecies == 1 && TMath::Abs(pdgCode)!=321)
326 if (particleSpecies == 2 && TMath::Abs(pdgCode)!=2212)
328 if (particleSpecies == 3 && (TMath::Abs(pdgCode)==211 || TMath::Abs(pdgCode)==321 || TMath::Abs(pdgCode)==2212))
333 // if mother not found, accept particle only in case of particleSpecies == 3. To include it in all or no sample is no solution
334 Printf("WARNING: No mother found for particle %d:", part->GetLabel());
338 // this code prints the details of the mother that is missing in the AOD
339 AliMCEventHandler* fMcHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
341 AliMCEvent* fMcEvent = fMcHandler->MCEvent();
343 fMcEvent->Stack()->Particle(fMcEvent->Stack()->Particle(part->GetLabel())->GetMother(0))->Print();
344 fMcEvent->Stack()->Particle(fMcEvent->Stack()->Particle(fMcEvent->Stack()->Particle(part->GetLabel())->GetMother(0))->GetMother(0))->Print();
345 Printf("eta = %f", fMcEvent->Stack()->Particle(fMcEvent->Stack()->Particle(fMcEvent->Stack()->Particle(part->GetLabel())->GetMother(0))->GetMother(0))->Eta());
348 if (particleSpecies != 3)
353 }else if (obj->InheritsFrom("TObjArray")){ // list of AliVParticle
354 TObjArray *array = static_cast<TObjArray*>(obj);
355 part = (AliVParticle*)array->At( ipart );
357 }else if (obj->InheritsFrom("AliMCEvent")){ // MC PARTICLE
358 AliMCEvent* mcEvent = static_cast<AliMCEvent*>(obj);
359 part = mcEvent->GetTrack( ipart );
361 // eventually only primaries
362 if (onlyprimaries && !( mcEvent->IsPhysicalPrimary(ipart)) )return 0;
363 // eventually only hadrons
366 Int_t pdgCode = part->GetPdgCode();
367 Bool_t isHadron = TMath::Abs(pdgCode)==211 || // Pion
368 TMath::Abs(pdgCode)==2212 || // Proton
369 TMath::Abs(pdgCode)==321; // Kaon
370 if (!isHadron) return 0;
373 if (particleSpecies != -1) {
374 // find the primary mother
375 AliMCParticle* mother = (AliMCParticle*) part;
377 while (!mcEvent->IsPhysicalPrimary(mother->GetLabel()))
379 // Printf("pdg = %d; mother = %d", mother->PdgCode(), mother->GetMother());
380 if (mother->GetMother() < 0)
386 mother = (AliMCParticle*) mcEvent->GetTrack(mother->GetMother());
393 Int_t pdgCode = mother->PdgCode();
394 if (particleSpecies == 0 && TMath::Abs(pdgCode)!=211)
396 if (particleSpecies == 1 && TMath::Abs(pdgCode)!=321)
398 if (particleSpecies == 2 && TMath::Abs(pdgCode)!=2212)
400 if (particleSpecies == 3 && (TMath::Abs(pdgCode)==211 || TMath::Abs(pdgCode)==321 || TMath::Abs(pdgCode)==2212))
405 // if mother not found, accept particle only in case of particleSpecies == 3. To include it in all or no sample is no solution
406 Printf("WARNING: No mother found for particle %d:", part->GetLabel());
411 // this code prints the details of the mother that is missing in the AOD
412 AliMCEventHandler* fMcHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
414 AliMCEvent* fMcEvent = fMcHandler->MCEvent();
416 fMcEvent->Stack()->Particle(fMcEvent->Stack()->Particle(part->GetLabel())->GetMother(0))->Print();
417 fMcEvent->Stack()->Particle(fMcEvent->Stack()->Particle(fMcEvent->Stack()->Particle(part->GetLabel())->GetMother(0))->GetMother(0))->Print();
418 Printf("eta = %f", fMcEvent->Stack()->Particle(fMcEvent->Stack()->Particle(fMcEvent->Stack()->Particle(part->GetLabel())->GetMother(0))->GetMother(0))->Eta());
421 if (particleSpecies != 3)
425 }else if (obj->InheritsFrom("AliAODEvent")){ // RECO AOD TRACKS
426 AliAODEvent *aodEvent = static_cast<AliAODEvent*>(obj);
427 part = aodEvent->GetTrack(ipart);
428 // track selection cuts
429 if ( !(((AliAODTrack*)part)->TestFilterBit(fFilterBit)) ) return 0;
430 //if ( !(((AliAODTrack*)part)->TestFilterBit(fFilterBit)) && !(((AliAODTrack*)part)->TestFilterBit(32)) ) return 0;
431 // only primary candidates
432 //if ( ((AliAODTrack*)part)->IsPrimaryCandidate() )return 0;
433 // eventually only hadrons
435 Bool_t isHadron = ((AliAODTrack*)part)->GetMostProbablePID()==AliAODTrack::kPion ||
436 ((AliAODTrack*)part)->GetMostProbablePID()==AliAODTrack::kKaon ||
437 ((AliAODTrack*)part)->GetMostProbablePID()==AliAODTrack::kProton;
438 if (!isHadron) return 0;
441 }else if (obj->InheritsFrom("AliESDEvent")){ // RECO ESD TRACKS
442 AliESDEvent *esdEvent = static_cast<AliESDEvent*>(obj);
443 part = esdEvent->GetTrack(ipart);
445 // track selection cuts
447 if (!( ApplyCuts(part)) )
450 if (fFilterBit == 128)
452 // create TPC only tracks constrained to the SPD vertex
454 const AliESDVertex *vtxSPD = esdEvent->GetPrimaryVertexSPD();
456 AliESDtrack* track = AliESDtrackCuts::GetTPCOnlyTrack(esdEvent, ipart);
459 // laser warm up tracks
460 if (track->GetTPCsignal() < 10.)
467 // only constrain tracks above threshold
468 AliExternalTrackParam exParam;
469 // take the B-feild from the ESD, no 3D fieldMap available at this point
470 Bool_t relate = kFALSE;
471 relate = track->RelateToVertex(vtxSPD,esdEvent->GetMagneticField(),kVeryBig,&exParam);
474 // Printf("relating failed");
478 track->Set(exParam.GetX(),exParam.GetAlpha(),exParam.GetParameter(),exParam.GetCovariance());
484 // eventually only hadrons
487 Bool_t isHadron = ((AliAODTrack*)part)->GetMostProbablePID()==AliAODTrack::kPion ||
488 ((AliAODTrack*)part)->GetMostProbablePID()==AliAODTrack::kKaon ||
489 ((AliAODTrack*)part)->GetMostProbablePID()==AliAODTrack::kProton;
490 if (!isHadron) return 0;
494 if (fDebug > 1) AliFatal(" Analysis type not defined !!! ");
499 if (!part->Charge())return 0;
505 //-------------------------------------------------------------------
506 void AliAnalyseLeadingTrackUE::QSortTracks(TObjArray &a, Int_t first, Int_t last)
508 // Sort array of TObjArray of tracks by Pt using a quicksort algorithm.
511 static int i; // "static" to save stack space
514 while (last - first > 1) {
518 while (++i < last && ((AliVParticle*)a[i])->Pt() > ((AliVParticle*)a[first])->Pt() )
520 while (--j > first && ((AliVParticle*)a[j])->Pt() < ((AliVParticle*)a[first])->Pt() )
536 if (j - first < last - (j + 1)) {
537 QSortTracks(a, first, j);
538 first = j + 1; // QSortTracks(j + 1, last);
540 QSortTracks(a, j + 1, last);
541 last = j; // QSortTracks(first, j);
546 //____________________________________________________________________
547 TObjArray* AliAnalyseLeadingTrackUE::SortRegions(const AliVParticle* leading, TObject* obj, TObject* arrayMC, Bool_t onlyprimaries)
550 // Assign particles to towards, away or transverse regions.
551 // Returns a lists of particles for each region.
553 static const Double_t k60rad = 60.*TMath::Pi()/180.;
554 static const Double_t k120rad = 120.*TMath::Pi()/180.;
556 // Define output lists of particles
557 TList *toward = new TList();
558 TList *away = new TList();
559 // Two transverse regions, for the moment those are not yet MIN and MAX!!!
560 // MIN and MAX can be sorted in GetMinMaxRegion function
561 TList *transverse1 = new TList();
562 TList *transverse2 = new TList();
564 TObjArray *regionParticles = new TObjArray;
565 regionParticles->SetOwner(kTRUE);
567 regionParticles->AddLast(toward);
568 regionParticles->AddLast(away);
569 regionParticles->AddLast(transverse1);
570 regionParticles->AddLast(transverse2);
573 return regionParticles;
575 // Switch to vector for leading particle
576 TVector3 leadVect(leading->Px(),leading->Py(),leading->Pz());
578 Int_t nTracks = NParticles(obj);
579 if( !nTracks ) return 0;
581 for (Int_t ipart=0; ipart<nTracks; ++ipart) {
582 AliVParticle* part = ParticleWithCuts(obj, ipart);
584 //Switch to vectors for particles
585 TVector3 partVect(part->Px(), part->Py(), part->Pz());
588 if( TMath::Abs(partVect.Eta()) > fTrackEtaCut ) continue;
589 // transverse regions
590 if (leadVect.DeltaPhi(partVect) < -k60rad && leadVect.DeltaPhi(partVect) > -k120rad )region = -1; //left
591 if (leadVect.DeltaPhi(partVect) > k60rad && leadVect.DeltaPhi(partVect) < k120rad ) region = 1; //right
593 if (TMath::Abs(leadVect.DeltaPhi(partVect)) < k60rad ) region = 2; //forward
594 if (TMath::Abs(leadVect.DeltaPhi(partVect)) > k120rad ) region = -2; //backward
596 // skip leading particle
600 if (!region)continue;
601 if (arrayMC && arrayMC->InheritsFrom("TClonesArray") && obj->InheritsFrom("AliAODEvent")){
602 Int_t label = ((AliAODTrack*)part)->GetLabel();
603 // re-define part as the matched MC particle
604 part = (AliAODMCParticle*)ParticleWithCuts(arrayMC, TMath::Abs(label),onlyprimaries);
606 // skip leading particle
610 if (arrayMC && arrayMC->InheritsFrom("AliMCEvent") && obj->InheritsFrom("AliESDEvent")){
611 Int_t label = ((AliESDtrack*)part)->GetLabel();
612 // look for the matched MC particle (but do not re-define part)
613 if (!ParticleWithCuts(arrayMC, TMath::Abs(label),onlyprimaries)) continue;
616 if ( region == 1 ) transverse1->Add(part);
617 if ( region == -1 ) transverse2->Add(part);
618 if ( region == 2 ) toward->Add(part);
619 if ( region == -2 ) away->Add(part);
621 }//end loop on tracks
623 return regionParticles;
628 //____________________________________________________________________
629 Bool_t AliAnalyseLeadingTrackUE::TriggerSelection(const TObject* obj)
634 // Use AliPhysicsSelection to select good events, works for ESD and AOD
635 if (!(((AliInputEventHandler*)obj)->IsEventSelected()&(AliVEvent::kMB|AliVEvent::kUserDefined)))
641 //____________________________________________________________________
642 Bool_t AliAnalyseLeadingTrackUE::VertexSelection(const TObject* obj, Int_t ntracks, Double_t zed)
645 //Require 1 vertex (no TPC stand-alone) with a minimum number of tracks and z-coordinate in a limited range
647 if (obj->InheritsFrom("AliAODEvent")){
648 Int_t nVertex = ((AliAODEvent*)obj)->GetNumberOfVertices();
650 AliAODVertex* vertex = (AliAODVertex*)((AliAODEvent*)obj)->GetPrimaryVertex();
651 Int_t nTracksPrim = vertex->GetNContributors();
652 Double_t zVertex = vertex->GetZ();
653 if (fDebug > 1)AliInfo(Form(" Vertex in = %f with %d particles by %s data ...",zVertex,nTracksPrim,vertex->GetName()));
654 // Reject TPC only vertex
655 TString name(vertex->GetName());
656 if (name.CompareTo("PrimaryVertex") && name.CompareTo("SPDVertex"))return kFALSE;
658 // Select a quality vertex by number of tracks?
659 if( nTracksPrim < ntracks || TMath::Abs(zVertex) > zed ) {
660 if (fDebug > 1) AliInfo(" Primary-vertex Selection: event REJECTED ...");
663 // TODO remove vertexer Z events with dispersion > 0.02: Doesn't work for AOD at present
664 //if (strcmp(vertex->GetTitle(), "AliVertexerZ") == 0 && vertex->GetDispersion() > 0.02)
666 if (fDebug > 1) AliInfo(" Primary-vertex Selection: event ACCEPTED...");
668 if (fDebug > 1) AliInfo(" Primary-vertex Selection: event REJECTED ...");
673 if (obj->InheritsFrom("AliMCEvent"))
675 if (TMath::Abs(((AliMCEvent*) obj)->GetPrimaryVertex()->GetZ()) > zed)
677 if (fDebug > 1) AliInfo(" Primary-vertex Selection: event (based on MC) REJECTED ...");
682 // ESD case for DCA studies
683 if (obj->InheritsFrom("AliESDEvent")){
684 AliESDVertex* vertex = (AliESDVertex*)((AliESDEvent*)obj)->GetPrimaryVertex();
686 Int_t nTracksPrim = vertex->GetNContributors();
687 Double_t zVertex = vertex->GetZ();
688 if (fDebug > 1)AliInfo(Form(" Vertex in = %f with %d particles by %s data ...",zVertex,nTracksPrim,vertex->GetName()));
689 // Reject SPD or TPC only vertex
690 TString name(vertex->GetName());
691 if (name.CompareTo("PrimaryVertex") && name.CompareTo("SPDVertex"))return kFALSE;
693 // Select a quality vertex by number of tracks?
694 if( nTracksPrim < ntracks || TMath::Abs(zVertex) > zed ) {
695 if (fDebug > 1) AliInfo(" Primary-vertex Selection: event REJECTED ...");
698 // TODO remove vertexer Z events with dispersion > 0.02: Doesn't work for AOD at present
699 //if (strcmp(vertex->GetTitle(), "AliVertexerZ") == 0 && vertex->GetDispersion() > 0.02)
701 if (fDebug > 1) AliInfo(" Primary-vertex Selection: event ACCEPTED...");
703 if (fDebug > 1) AliInfo(" Primary-vertex Selection: event REJECTED ...");