]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/AliEventBaseCut.cxx
Pass() renamed to Rejected()
[u/mrichter/AliRoot.git] / ANALYSIS / AliEventBaseCut.cxx
1 #include "AliEventBaseCut.h"
2 //________________________________
3 ///////////////////////////////////////////////////////////
4 //
5 // class AliEventBaseCut
6 //
7 //
8 //
9 //
10 ///////////////////////////////////////////////////////////
11
12 #include <AliAOD.h>
13 ClassImp(AliEventBaseCut)
14
15 AliEventBaseCut::AliEventBaseCut():
16  fMin(0.0),
17  fMax(0.0),
18  fProperty(kNone)
19 {
20 //ctor  
21 }
22 /**********************************************************/
23
24 AliEventBaseCut::AliEventBaseCut(Double_t min, Double_t max, EEventCutProperty prop):
25  fMin(min),
26  fMax(max),
27  fProperty(prop)
28 {
29  //ctor
30 }
31 /**********************************************************/
32
33 Bool_t AliEventBaseCut::Rejected(AliAOD* aod) const
34 {
35   if ( (GetValue(aod) < fMin) || (GetValue(aod) > fMax) ) return kTRUE;
36   return kFALSE;
37 }
38 /**********************************************************/
39 /**********************************************************/
40 /**********************************************************/
41 ClassImp(AliPrimVertexXCut)
42
43 Double_t AliPrimVertexXCut::GetValue(AliAOD* aod) const
44 {
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 /**********************************************************/
52 /**********************************************************/
53 ClassImp(AliPrimVertexYCut)
54
55 Double_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 /**********************************************************/
65 ClassImp(AliPrimVertexZCut)
66
67 Double_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
79 ClassImp(AliNChargedCut)
80
81 Double_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 }