]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemto / AliFemtoBasicEventCut.h
1 ////////////////////////////////////////////////////////////////////////////////
2 //                                                                            //
3 // AliFemtoBasicEventCut - the basic cut for events.                          //
4 // Only cuts on event multiplicity and z-vertex position                      //
5 //                                                                            //
6 ////////////////////////////////////////////////////////////////////////////////
7
8 #ifndef ALIFEMTOBASICEVENTCUT_H
9 #define ALIFEMTOBASICEVENTCUT_H
10
11 // do I need these lines ?
12 //#ifndef StMaker_H
13 //#include "StMaker.h"
14 //#endif
15
16 #include "AliFemtoEventCut.h"
17
18 class AliFemtoBasicEventCut : public AliFemtoEventCut {
19
20 public:
21
22   AliFemtoBasicEventCut();
23   AliFemtoBasicEventCut(AliFemtoBasicEventCut& c);
24   virtual ~AliFemtoBasicEventCut();
25   AliFemtoBasicEventCut& operator=(AliFemtoBasicEventCut& c);
26
27   void SetEventMult(const int& lo,const int& hi);
28   void SetVertZPos(const float& lo, const float& hi);
29   void SetAcceptBadVertex(bool b);
30   int NEventsPassed() const;
31   int NEventsFailed() const;
32   bool GetAcceptBadVertex();
33   /* bool GetAcceptOnlyPhysics(); */
34   void SetTriggerSelection(int trig);
35
36   void SetEPVZERO(const float& lo, const float& hi);
37
38   virtual AliFemtoString Report();
39   virtual bool Pass(const AliFemtoEvent* event);
40
41   AliFemtoBasicEventCut* Clone();
42
43 private:   // here are the quantities I want to cut on...
44
45   int fEventMult[2];      // range of multiplicity
46   float fVertZPos[2];     // range of z-position of vertex
47   float fPsiEP[2];     // range of vzero ep angle
48   bool fAcceptBadVertex;  // Set to true to accept events with bad vertex
49   long fNEventsPassed;    // Number of events checked by this cut that passed
50   long fNEventsFailed;    // Number of events checked by this cut that failed
51   bool fAcceptOnlyPhysics;// Accept only physics events
52   int  fSelectTrigger;    // If set, only given trigger will be selected
53
54 #ifdef __ROOT__
55   ClassDef(AliFemtoBasicEventCut, 1)
56 #endif
57
58 };
59
60 inline void AliFemtoBasicEventCut::SetEventMult(const int& lo, const int& hi){fEventMult[0]=lo; fEventMult[1]=hi;}
61 inline void AliFemtoBasicEventCut::SetVertZPos(const float& lo, const float& hi){fVertZPos[0]=lo; fVertZPos[1]=hi;}
62 inline void AliFemtoBasicEventCut::SetEPVZERO(const float& lo, const float& hi){fPsiEP[0]=lo; fPsiEP[1]=hi;}
63 inline int  AliFemtoBasicEventCut::NEventsPassed() const {return fNEventsPassed;}
64 inline int  AliFemtoBasicEventCut::NEventsFailed() const {return fNEventsFailed;}
65 inline void AliFemtoBasicEventCut::SetTriggerSelection(int trig) { fSelectTrigger = trig; }
66 inline AliFemtoBasicEventCut* AliFemtoBasicEventCut::Clone() { AliFemtoBasicEventCut* c = new AliFemtoBasicEventCut(*this); return c;}
67 inline AliFemtoBasicEventCut::AliFemtoBasicEventCut(AliFemtoBasicEventCut& c) : AliFemtoEventCut(c), fAcceptBadVertex(false), fNEventsPassed(0), fNEventsFailed(0), fAcceptOnlyPhysics(false), fSelectTrigger(0) {
68   fEventMult[0] = c.fEventMult[0];
69   fEventMult[1] = c.fEventMult[1];
70   fVertZPos[0] = c.fVertZPos[0];
71   fVertZPos[1] = c.fVertZPos[1];
72   fPsiEP[0] = c.fPsiEP[0];
73   fPsiEP[1] = c.fPsiEP[1];
74 }
75
76 inline AliFemtoBasicEventCut& AliFemtoBasicEventCut::operator=(AliFemtoBasicEventCut& c) {
77   if (this != &c) {
78     AliFemtoEventCut::operator=(c);
79     fEventMult[0] = c.fEventMult[0];
80     fEventMult[1] = c.fEventMult[1];
81     fVertZPos[0] = c.fVertZPos[0];
82     fVertZPos[1] = c.fVertZPos[1];
83     fPsiEP[0] = c.fPsiEP[0];
84     fPsiEP[1] = c.fPsiEP[1];
85   }
86
87   return *this;
88 }
89
90
91 #endif