]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventCutEstimators.h
Merge branch 'master_patch'
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemto / AliFemtoEventCutEstimators.h
1 ////////////////////////////////////////////////////////////////////////////////
2 //                                                                            //
3 // AliFemtoEventCutEstimators - the basic cut for events.                          //
4 // Only cuts on event multiplicity and z-vertex position                      //
5 //                                                                            //
6 ////////////////////////////////////////////////////////////////////////////////
7
8 #ifndef ALIFEMTOEVENTCUTESTIMATORS_H
9 #define ALIFEMTOEVENTCUTESTIMATORS_H
10
11 // do I need these lines ?
12 //#ifndef StMaker_H
13 //#include "StMaker.h"
14 //#endif
15
16 #include "AliFemtoEventCut.h"
17 #include "AliFemtoEventReaderESDChain.h"
18
19 class AliFemtoEventCutEstimators : public AliFemtoEventCut {
20
21 public:
22
23   AliFemtoEventCutEstimators();
24   AliFemtoEventCutEstimators(AliFemtoEventCutEstimators& c);
25   virtual ~AliFemtoEventCutEstimators();
26   AliFemtoEventCutEstimators& operator=(AliFemtoEventCutEstimators& c);
27
28   void SetMultEst1Range(const unsigned short &lo, const unsigned short &hi);
29   void SetMultEst2Range(const unsigned short &lo, const unsigned short &hi);
30   void SetMultEst3Range(const unsigned short &lo, const unsigned short &hi);
31   
32   void SetCentEst1Range(const float &lo, const float &hi);
33   void SetCentEst2Range(const float &lo, const float &hi);
34   void SetCentEst3Range(const float &lo, const float &hi);
35   void SetCentEst4Range(const float &lo, const float &hi);
36
37   void SetVertZPos(const float& lo, const float& hi);
38   int NEventsPassed() const;
39   int NEventsFailed() const;
40
41   virtual AliFemtoString Report();
42   virtual bool Pass(const AliFemtoEvent* event);
43
44   AliFemtoEventCutEstimators* Clone();
45
46 private:   // here are the quantities I want to cut on...
47
48   unsigned short fEventMultEst1[2];      // range of multiplicity
49   unsigned short fEventMultEst2[2];      // range of multiplicity
50   unsigned short fEventMultEst3[2];      // range of multiplicity
51   unsigned char fUseMultEst1;  // if 1 cut on Mult Est 1
52   unsigned char fUseMultEst2;  // if 1 cut on Mult Est 2
53   unsigned char fUseMultEst3;  // if 1 cut on Mult Est 3
54   
55   float fEventCentEst1[2];      // range of multiplicity
56   float fEventCentEst2[2];      // range of multiplicity
57   float fEventCentEst3[2];      // range of multiplicity
58   float fEventCentEst4[2];      // range of multiplicity
59   unsigned char fUseCentEst1;  // if 1 cut on Mult Est 1
60   unsigned char fUseCentEst2;  // if 1 cut on Mult Est 2
61   unsigned char fUseCentEst3;  // if 1 cut on Mult Est 3
62   unsigned char fUseCentEst4;  // if 1 cut on Mult Est 4
63
64   float fVertZPos[2];     // range of z-position of vertex
65   long fNEventsPassed;    // Number of events checked by this cut that passed
66   long fNEventsFailed;    // Number of events checked by this cut that failed
67
68 #ifdef __ROOT__
69   ClassDef(AliFemtoEventCutEstimators, 1)
70 #endif
71
72 };
73
74 inline void AliFemtoEventCutEstimators::SetMultEst1Range(const unsigned short& lo, const unsigned short& hi){fEventMultEst1[0]=lo; fEventMultEst1[1]=hi; fUseMultEst1=1;}
75 inline void AliFemtoEventCutEstimators::SetMultEst2Range(const unsigned short& lo, const unsigned short& hi){fEventMultEst2[0]=lo; fEventMultEst2[1]=hi; fUseMultEst2=1;}
76 inline void AliFemtoEventCutEstimators::SetMultEst3Range(const unsigned short& lo, const unsigned short& hi){fEventMultEst3[0]=lo; fEventMultEst3[1]=hi; fUseMultEst3=1;}
77 inline void AliFemtoEventCutEstimators::SetCentEst1Range(const float& lo, const float& hi){fEventCentEst1[0]=lo; fEventCentEst1[1]=hi; fUseCentEst1=1;}
78 inline void AliFemtoEventCutEstimators::SetCentEst2Range(const float& lo, const float& hi){fEventCentEst2[0]=lo; fEventCentEst2[1]=hi; fUseCentEst2=1;}
79 inline void AliFemtoEventCutEstimators::SetCentEst3Range(const float& lo, const float& hi){fEventCentEst3[0]=lo; fEventCentEst3[1]=hi; fUseCentEst3=1;}
80 inline void AliFemtoEventCutEstimators::SetCentEst4Range(const float& lo, const float& hi){fEventCentEst4[0]=lo; fEventCentEst4[1]=hi; fUseCentEst4=1;}
81 inline void AliFemtoEventCutEstimators::SetVertZPos(const float& lo, const float& hi){fVertZPos[0]=lo; fVertZPos[1]=hi;}
82 inline int  AliFemtoEventCutEstimators::NEventsPassed() const {return fNEventsPassed;}
83 inline int  AliFemtoEventCutEstimators::NEventsFailed() const {return fNEventsFailed;}
84 inline AliFemtoEventCutEstimators* AliFemtoEventCutEstimators::Clone() { AliFemtoEventCutEstimators* c = new AliFemtoEventCutEstimators(*this); return c;}
85 inline AliFemtoEventCutEstimators::AliFemtoEventCutEstimators(AliFemtoEventCutEstimators& c) : 
86   AliFemtoEventCut(c), 
87   fUseMultEst1(0), fUseMultEst2(0), fUseMultEst3(0), 
88   fUseCentEst1(0), fUseCentEst2(0), fUseCentEst3(0), fUseCentEst4(0),
89   fNEventsPassed(0), fNEventsFailed(0) {
90   fEventMultEst1[0] = c.fEventMultEst1[0];  fEventMultEst1[1] = c.fEventMultEst1[1];
91   fEventMultEst2[0] = c.fEventMultEst2[0];  fEventMultEst2[1] = c.fEventMultEst2[1];
92   fEventMultEst3[0] = c.fEventMultEst3[0];  fEventMultEst3[1] = c.fEventMultEst3[1];
93   fEventCentEst1[0] = c.fEventCentEst1[0];  fEventCentEst1[1] = c.fEventCentEst1[1];
94   fEventCentEst2[0] = c.fEventCentEst2[0];  fEventCentEst2[1] = c.fEventCentEst2[1];
95   fEventCentEst3[0] = c.fEventCentEst3[0];  fEventCentEst3[1] = c.fEventCentEst3[1];
96   fEventCentEst4[0] = c.fEventCentEst4[0];  fEventCentEst4[1] = c.fEventCentEst4[1];
97   fVertZPos[0] = c.fVertZPos[0];
98   fVertZPos[1] = c.fVertZPos[1];
99 }
100
101
102 #endif