Standarized naming schema for cuts
[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),
0d8a4589 17 fMax(0.0)
b26900d0 18{
0d8a4589 19//ctor
b26900d0 20}
21/**********************************************************/
22
b4fb427e 23AliEventBaseCut::AliEventBaseCut(Double_t min, Double_t max):
0d8a4589 24 fMin(min),
25 fMax(max)
b26900d0 26{
0d8a4589 27 //ctor
28}
29/**********************************************************/
30
b4fb427e 31Bool_t AliEventBaseCut::Pass(AliAOD* aod) const
0d8a4589 32{
33 if ( (GetValue(aod) < fMin) || (GetValue(aod) > fMax) ) return kTRUE;
b26900d0 34 return kFALSE;
0d8a4589 35}
36/**********************************************************/
37/**********************************************************/
38/**********************************************************/
39ClassImp(AliPrimVertexXCut)
40
41Double_t AliPrimVertexXCut::GetValue(AliAOD* aod) const
b26900d0 42{
0d8a4589 43 //returns x coordinate of the primary vertex
44 Double_t x = 0, y = 0, z = 0;
45 if (aod) aod->GetPrimaryVertex(x,y,z);
46 return x;
47}
48/**********************************************************/
49/**********************************************************/
b26900d0 50/**********************************************************/
0d8a4589 51ClassImp(AliPrimVertexYCut)
52
53Double_t AliPrimVertexYCut::GetValue(AliAOD* aod) const
54{
55 //returns x coordinate of the primary vertex
56 Double_t x = 0, y = 0, z = 0;
57 if (aod) aod->GetPrimaryVertex(x,y,z);
58 return y;
59}
60/**********************************************************/
61/**********************************************************/
62/**********************************************************/
63ClassImp(AliPrimVertexZCut)
64
65Double_t AliPrimVertexZCut::GetValue(AliAOD* aod) const
66{
67 //returns x coordinate of the primary vertex
68 Double_t x = 0, y = 0, z = 0;
69 if (aod) aod->GetPrimaryVertex(x,y,z);
70 return z;
71}
72
73/**********************************************************/
74/**********************************************************/
75/**********************************************************/
76
77ClassImp(AliNChargedCut)
78
79Double_t AliNChargedCut::GetValue(AliAOD* aod) const
80{
81 //returns number of charged particles
82 if (aod)
83 {
84 return aod->GetNumberOfCharged(fEtaMin,fEtaMax);
85 }
86 Error("GetValue","Pointer to AOD is NULL");
87 return 0.0;
88}