]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/AliEventBaseCut.cxx
Pass() renamed to Rejected()
[u/mrichter/AliRoot.git] / ANALYSIS / AliEventBaseCut.cxx
CommitLineData
b4fb427e 1#include "AliEventBaseCut.h"
b26900d0 2//________________________________
3///////////////////////////////////////////////////////////
4//
b4fb427e 5// class AliEventBaseCut
b26900d0 6//
7//
8//
9//
10///////////////////////////////////////////////////////////
11
0d8a4589 12#include <AliAOD.h>
b4fb427e 13ClassImp(AliEventBaseCut)
b26900d0 14
b4fb427e 15AliEventBaseCut::AliEventBaseCut():
b26900d0 16 fMin(0.0),
a94c0b01 17 fMax(0.0),
18 fProperty(kNone)
b26900d0 19{
0d8a4589 20//ctor
b26900d0 21}
22/**********************************************************/
23
a94c0b01 24AliEventBaseCut::AliEventBaseCut(Double_t min, Double_t max, EEventCutProperty prop):
0d8a4589 25 fMin(min),
a94c0b01 26 fMax(max),
27 fProperty(prop)
b26900d0 28{
0d8a4589 29 //ctor
30}
31/**********************************************************/
32
cea0a066 33Bool_t AliEventBaseCut::Rejected(AliAOD* aod) const
0d8a4589 34{
35 if ( (GetValue(aod) < fMin) || (GetValue(aod) > fMax) ) return kTRUE;
b26900d0 36 return kFALSE;
0d8a4589 37}
38/**********************************************************/
39/**********************************************************/
40/**********************************************************/
41ClassImp(AliPrimVertexXCut)
42
43Double_t AliPrimVertexXCut::GetValue(AliAOD* aod) const
b26900d0 44{
0d8a4589 45 //returns x coordinate of the primary vertex
46 Double_t x = 0, y = 0, z = 0;
47 if (aod) aod->GetPrimaryVertex(x,y,z);
48 return x;
49}
50/**********************************************************/
51/**********************************************************/
b26900d0 52/**********************************************************/
0d8a4589 53ClassImp(AliPrimVertexYCut)
54
55Double_t AliPrimVertexYCut::GetValue(AliAOD* aod) const
56{
57 //returns x coordinate of the primary vertex
58 Double_t x = 0, y = 0, z = 0;
59 if (aod) aod->GetPrimaryVertex(x,y,z);
60 return y;
61}
62/**********************************************************/
63/**********************************************************/
64/**********************************************************/
65ClassImp(AliPrimVertexZCut)
66
67Double_t AliPrimVertexZCut::GetValue(AliAOD* aod) const
68{
69 //returns x coordinate of the primary vertex
70 Double_t x = 0, y = 0, z = 0;
71 if (aod) aod->GetPrimaryVertex(x,y,z);
72 return z;
73}
74
75/**********************************************************/
76/**********************************************************/
77/**********************************************************/
78
79ClassImp(AliNChargedCut)
80
81Double_t AliNChargedCut::GetValue(AliAOD* aod) const
82{
83 //returns number of charged particles
84 if (aod)
85 {
86 return aod->GetNumberOfCharged(fEtaMin,fEtaMax);
87 }
88 Error("GetValue","Pointer to AOD is NULL");
89 return 0.0;
90}