]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnCutPrimaryVertex.h
Updated macros for Sigma* analysis (M.Venaruzzo)
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutPrimaryVertex.h
CommitLineData
96ab9736 1//
ceaa78d3 2// Class AliRsnCutPrimaryVertex
96ab9736 3//
ceaa78d3 4// This cut implementation checks the quality of event primary vertex.
5// It currently works only with ESD events (not AOD).
96ab9736 6//
7// authors: Martin Vala (martin.vala@cern.ch)
8// Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
9//
10
11#ifndef ALIRSNCUTPRIMARYVERTEX_H
12#define ALIRSNCUTPRIMARYVERTEX_H
13
96ab9736 14#include "AliRsnCut.h"
4fbb2459 15
f34f960b 16class AliVVertex;
4fbb2459 17
2a1c7696 18class AliRsnCutPrimaryVertex : public AliRsnCut {
19public:
96ab9736 20
2a1c7696 21 AliRsnCutPrimaryVertex(const char *name = "cutPrimVert", Double_t maxVz = 10.0, Int_t minContributors = 1, Bool_t acceptTPC = kFALSE);
22 virtual ~AliRsnCutPrimaryVertex() {;};
96ab9736 23
2a1c7696 24 void SetCheckPileUp(Bool_t doit = kTRUE) {fCheckPileUp = doit;}
25 virtual Bool_t IsSelected(TObject *object);
26 virtual void Print(const Option_t *option = "") const;
96ab9736 27
2a1c7696 28protected:
96ab9736 29
f34f960b 30 Bool_t CheckVertex(AliVVertex *vert);
31
2a1c7696 32 Bool_t fAcceptTPC; // if kTRUE, the TPC primary vertexes are accepted
33 Bool_t fCheckPileUp; // check and reject pileupped events (pp)
ceaa78d3 34
2a1c7696 35 ClassDef(AliRsnCutPrimaryVertex, 1)
96ab9736 36};
37
f34f960b 38//__________________________________________________________________________________________________
39inline Bool_t AliRsnCutPrimaryVertex::CheckVertex(AliVVertex *vertex)
40{
41//
42// Checks if a candidate primary vertex is good,
43// which is true if it is not null and has at
44// least one contributor
45//
46
61f275d1 47 if (!vertex) return kFALSE;
f34f960b 48 if (vertex->GetNContributors() < 1) return kFALSE;
f34f960b 49 return kTRUE;
50}
51
96ab9736 52#endif