]>
Commit | Line | Data |
---|---|---|
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 | 13 | ClassImp(AliEventBaseCut) |
b26900d0 | 14 | |
b4fb427e | 15 | AliEventBaseCut::AliEventBaseCut(): |
b26900d0 | 16 | fMin(0.0), |
a94c0b01 | 17 | fMax(0.0), |
18 | fProperty(kNone) | |
b26900d0 | 19 | { |
0d8a4589 | 20 | //ctor |
b26900d0 | 21 | } |
22 | /**********************************************************/ | |
23 | ||
a94c0b01 | 24 | AliEventBaseCut::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 | 33 | Bool_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 | /**********************************************************/ | |
41 | ClassImp(AliPrimVertexXCut) | |
42 | ||
43 | Double_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 | 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 | } |