]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.h
Migration of PWG2/FEMTOSCOPY to PWGCF/FEMTOSCOPY
[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   void SetAcceptOnlyPhysics(bool b);
31   int NEventsPassed() const;
32   int NEventsFailed() const;
33   bool GetAcceptBadVertex();
34   bool GetAcceptOnlyPhysics();
35   void SetTriggerSelection(int trig);
36
37   virtual AliFemtoString Report();
38   virtual bool Pass(const AliFemtoEvent* event);
39
40   AliFemtoBasicEventCut* Clone();
41
42 private:   // here are the quantities I want to cut on...
43
44   int fEventMult[2];      // range of multiplicity
45   float fVertZPos[2];     // range of z-position of vertex
46   bool fAcceptBadVertex;  // Set to true to accept events with bad vertex
47   long fNEventsPassed;    // Number of events checked by this cut that passed
48   long fNEventsFailed;    // Number of events checked by this cut that failed
49   bool fAcceptOnlyPhysics;// Accept only physics events
50   int  fSelectTrigger;    // If set, only given trigger will be selected
51
52 #ifdef __ROOT__
53   ClassDef(AliFemtoBasicEventCut, 1)
54 #endif
55
56 };
57
58 inline void AliFemtoBasicEventCut::SetEventMult(const int& lo, const int& hi){fEventMult[0]=lo; fEventMult[1]=hi;}
59 inline void AliFemtoBasicEventCut::SetVertZPos(const float& lo, const float& hi){fVertZPos[0]=lo; fVertZPos[1]=hi;}
60 inline int  AliFemtoBasicEventCut::NEventsPassed() const {return fNEventsPassed;}
61 inline int  AliFemtoBasicEventCut::NEventsFailed() const {return fNEventsFailed;}
62 inline void AliFemtoBasicEventCut::SetTriggerSelection(int trig) { fSelectTrigger = trig; }
63 inline AliFemtoBasicEventCut* AliFemtoBasicEventCut::Clone() { AliFemtoBasicEventCut* c = new AliFemtoBasicEventCut(*this); return c;}
64 inline AliFemtoBasicEventCut::AliFemtoBasicEventCut(AliFemtoBasicEventCut& c) : AliFemtoEventCut(c), fAcceptBadVertex(false), fNEventsPassed(0), fNEventsFailed(0), fAcceptOnlyPhysics(false), fSelectTrigger(0) {
65   fEventMult[0] = c.fEventMult[0];
66   fEventMult[1] = c.fEventMult[1];
67   fVertZPos[0] = c.fVertZPos[0];
68   fVertZPos[1] = c.fVertZPos[1];
69 }
70
71 inline AliFemtoBasicEventCut& AliFemtoBasicEventCut::operator=(AliFemtoBasicEventCut& c) {   
72   if (this != &c) {
73     AliFemtoEventCut::operator=(c);
74     fEventMult[0] = c.fEventMult[0];
75     fEventMult[1] = c.fEventMult[1];
76     fVertZPos[0] = c.fVertZPos[0];
77     fVertZPos[1] = c.fVertZPos[1];
78   }
79
80   return *this;
81 }
82
83
84 #endif