]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/AliFemto/AliFemtoPairCut.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemto / AliFemtoPairCut.h
1 ////////////////////////////////////////////////////////////////////////////////
2 /// AliFemtoPairCut - the pure virtual base class for the pair cut           ///
3 /// All pair cuts must inherit from this one                                 ///
4 ////////////////////////////////////////////////////////////////////////////////
5
6 #ifndef AliFemtoPairCut_hh
7 #define AliFemtoPairCut_hh
8
9 #include <string>
10
11 class AliFemtoAnalysis;
12
13 #include "AliFemtoString.h"
14 #include "AliFemtoEvent.h"
15 #include "AliFemtoPair.h"
16 #include "AliFemtoCutMonitorHandler.h"
17 #include <TList.h>
18 #include <TObjString.h>
19
20 class AliFemtoPairCut : public AliFemtoCutMonitorHandler {
21
22   friend class AliFemtoAnalysis;
23
24 public:
25   enum DataType {kESD=0, kAOD=1, kKine=2};
26   typedef enum DataType AliFemtoDataType;
27
28   AliFemtoPairCut();   // default constructor. - Users should write their own
29   AliFemtoPairCut(const AliFemtoPairCut& c); // copy constructor
30   virtual ~AliFemtoPairCut(){/* no-op */};  // destructor
31   AliFemtoPairCut& operator=(const AliFemtoPairCut &aCut);
32
33   virtual bool Pass(const AliFemtoPair* pair) =0;  // true if passes, false if not
34
35   virtual AliFemtoString Report() =0;    // user-written method to return string describing cuts
36   virtual TList *ListSettings() =0;
37   virtual void EventBegin(const AliFemtoEvent* aEvent);
38   virtual void EventEnd(const AliFemtoEvent* aEvent);
39   virtual AliFemtoPairCut* Clone() { return 0;}
40
41   // the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
42   AliFemtoAnalysis* HbtAnalysis(){return fyAnalysis;};
43   void SetAnalysis(AliFemtoAnalysis* aAnalysis);    // Set Back pointer to Analysis
44
45 protected:
46   AliFemtoAnalysis* fyAnalysis; // Link to the base analysis class
47
48 #ifdef __ROOT__
49   ClassDef(AliFemtoPairCut, 0)
50 #endif
51 };
52
53
54 inline AliFemtoPairCut::AliFemtoPairCut(const AliFemtoPairCut& /* c */) :  AliFemtoCutMonitorHandler(), fyAnalysis(0) {  }
55 inline void AliFemtoPairCut::SetAnalysis(AliFemtoAnalysis* analysis) { fyAnalysis = analysis; }
56 inline AliFemtoPairCut::AliFemtoPairCut(): AliFemtoCutMonitorHandler(), fyAnalysis(0) {}   // default constructor. - Users should write their own
57 inline AliFemtoPairCut& AliFemtoPairCut::operator=(const AliFemtoPairCut &aCut) { if (this == &aCut) return *this; fyAnalysis = aCut.fyAnalysis; return *this; }
58
59 inline void AliFemtoPairCut::EventBegin(const AliFemtoEvent* /* aEvent */ ) 
60 { /* no-op */ }
61 inline void AliFemtoPairCut::EventEnd(const AliFemtoEvent* /* aEvent */ ) 
62 { /* no-op */ }
63 #endif