AliAODEvent::GetHeader now return AliVHeader
[u/mrichter/AliRoot.git] / PWG / muon / AliAnalysisMuMuCutRegistry.h
1 #ifndef ALIANALYSISMUMUCUTREGISTRY_H
2 #define ALIANALYSISMUMUCUTREGISTRY_H
3
4 /**
5  *
6  * \class AliAnalysisMuMuCutRegistry
7  *
8  * \brief Container of AliAnalysisMuMuCutElement and AliAnalysisMuMuCutCombination objects.
9  *
10  * \author L. Aphecetche (Subatech)
11  *
12  */
13
14 #include "TObject.h"
15 #include "TString.h"
16 #include "TMethodCall.h"
17 #include "AliAnalysisMuMuCutElement.h"
18
19 class AliVEvent;
20 class AliAnalysisMuMuCutCombination;
21 class AliVParticle;
22 class AliVEventHandler;
23
24 class AliAnalysisMuMuCutRegistry : public TObject
25 {
26 public:
27   AliAnalysisMuMuCutRegistry();
28   virtual ~AliAnalysisMuMuCutRegistry();
29
30   AliAnalysisMuMuCutElement* AddEventCut(TObject& cutClass,
31                                          const char* cutMethodName,
32                                          const char* cutMethodPrototype,
33                                          const char* defaultParameters);
34   
35   AliAnalysisMuMuCutElement* AddTrackCut(TObject& cutClass,
36                                          const char* cutMethodName,
37                                          const char* cutMethodPrototype,
38                                          const char* defaultParameters);
39   
40   AliAnalysisMuMuCutElement* AddTrackPairCut(TObject& cutClass,
41                                              const char* cutMethodName,
42                                              const char* cutMethodPrototype,
43                                              const char* defaultParameters);
44   
45   AliAnalysisMuMuCutElement* AddTriggerClassCut(TObject& cutClass,
46                                                 const char* cutMethodName,
47                                                 const char* cutMethodPrototype,
48                                                 const char* defaultParameters);
49   
50   AliAnalysisMuMuCutElement* Not(const AliAnalysisMuMuCutElement& cutElement);
51
52   AliAnalysisMuMuCutElement* AddCutElement(AliAnalysisMuMuCutElement* ce);
53
54   Int_t AddCutCombination(const TObjArray& cutElements);
55   
56   Int_t AddCutCombination(AliAnalysisMuMuCutElement* ce1);
57   Int_t AddCutCombination(AliAnalysisMuMuCutElement* ce1, AliAnalysisMuMuCutElement* ce2);
58   Int_t AddCutCombination(AliAnalysisMuMuCutElement* ce1, AliAnalysisMuMuCutElement* ce2,
59                           AliAnalysisMuMuCutElement* ce3);
60   Int_t AddCutCombination(AliAnalysisMuMuCutElement* ce1, AliAnalysisMuMuCutElement* ce2,
61                           AliAnalysisMuMuCutElement* ce3, AliAnalysisMuMuCutElement* ce4);
62   Int_t AddCutCombination(AliAnalysisMuMuCutElement* ce1, AliAnalysisMuMuCutElement* ce2,
63                           AliAnalysisMuMuCutElement* ce3, AliAnalysisMuMuCutElement* ce4,
64                           AliAnalysisMuMuCutElement* ce5);
65   Int_t AddCutCombination(AliAnalysisMuMuCutElement* ce1, AliAnalysisMuMuCutElement* ce2,
66                           AliAnalysisMuMuCutElement* ce3, AliAnalysisMuMuCutElement* ce4,
67                           AliAnalysisMuMuCutElement* ce5, AliAnalysisMuMuCutElement* ce6);
68
69   const TObjArray* GetCutCombinations(AliAnalysisMuMuCutElement::ECutType type) const;
70   TObjArray* GetCutCombinations(AliAnalysisMuMuCutElement::ECutType type);
71
72   const TObjArray* GetCutElements(AliAnalysisMuMuCutElement::ECutType type) const;
73   TObjArray* GetCutElements(AliAnalysisMuMuCutElement::ECutType type);
74
75   virtual void Print(Option_t* opt="") const;
76   
77   Bool_t AlwaysTrue(const AliVEvent& /*event*/) const { return kTRUE; }
78   void NameOfAlwaysTrue(TString& name) const { name="ALL"; }
79   Bool_t AlwaysTrue(const AliVEventHandler& /*eventHandler*/) const { return kTRUE; }
80   Bool_t AlwaysTrue(const AliVParticle& /*part*/) const { return kTRUE; }
81   Bool_t AlwaysTrue(const AliVParticle& /*p1*/, const AliVParticle& /*p2*/) const { return kTRUE; }
82   
83 private:
84   
85   /// not implemented on purpose
86   AliAnalysisMuMuCutRegistry(const AliAnalysisMuMuCutRegistry& rhs);
87   /// not implemented on purpose
88   AliAnalysisMuMuCutRegistry& operator=(const AliAnalysisMuMuCutRegistry& rhs);
89   
90   AliAnalysisMuMuCutElement* CreateCutElement(AliAnalysisMuMuCutElement::ECutType expectedType,
91                                               TObject& cutClass,
92                                               const char* cutMethodName,
93                                               const char* cutMethodPrototype,
94                                               const char* defaultParameters);
95   
96 private:
97   
98   mutable TObjArray* fCutElements; // cut elements
99   mutable TObjArray* fCutCombinations; // cut combinations
100   
101   ClassDef(AliAnalysisMuMuCutRegistry,1) // storage for cut pointers
102 };
103
104 #endif