]>
Commit | Line | Data |
---|---|---|
5eabea87 | 1 | #ifndef ALIANALYSISMUMU_H |
2 | #define ALIANALYSISMUMU_H | |
3 | ||
4 | // | |
5 | // AliAnalysisMuMu : base class for mu pairs analysis | |
6 | // Contains common things for ESD-based and AOD-based analysis | |
7 | // | |
8 | // author: L. Aphecetche (Subatech) | |
9 | // | |
10 | ||
11 | #ifndef ALIANALYSISTASKSE_H | |
12 | # include "AliAnalysisTaskSE.h" | |
13 | #endif | |
14 | ||
15 | #include <set> | |
16 | #include <vector> | |
17 | ||
18 | class TList; | |
19 | class AliHistogramCollection; | |
20 | class TObjArray; | |
21 | class AliCounterCollection; | |
22 | ||
23 | class AliAnalysisMuMu : public AliAnalysisTaskSE | |
24 | { | |
25 | public: | |
26 | ||
27 | enum ETrackCut | |
28 | { | |
29 | kAll=1<<0, | |
30 | kPt=1<<1, | |
31 | kRabs=1<<2, | |
32 | kMatched=1<<3, | |
33 | kMatchedLow=1<<4, | |
34 | kMatchedHigh=1<<5, | |
35 | kEta=1<<6, | |
36 | kChi2=1<<7, | |
37 | kDCA=1<<8, | |
38 | kPairRapidity=1<<9, | |
39 | kBelowPt=1<<10 | |
40 | }; | |
41 | ||
42 | ||
43 | AliAnalysisMuMu(); | |
44 | AliAnalysisMuMu(Bool_t fromESD, TList* triggerClassesToConsider); | |
45 | AliAnalysisMuMu(Bool_t fromESD, Bool_t aa); | |
46 | virtual ~AliAnalysisMuMu(); | |
47 | ||
48 | static AliAnalysisMuMu* Create(const char* inputDataType, TList* triggerClassesToConsider); | |
49 | ||
50 | static AliAnalysisMuMu* Create(const char* inputDataType, Bool_t aa); | |
51 | ||
52 | void UserCreateOutputObjects(); | |
53 | ||
54 | virtual void Terminate(Option_t *); | |
55 | ||
56 | virtual void FinishTaskOutput(); | |
57 | ||
58 | virtual void NotifyRun(); | |
59 | ||
60 | virtual void Print(Option_t* opt="") const; | |
61 | ||
62 | virtual void AddPairCut(const char* cutName, UInt_t maskForOneOrBothTrack, UInt_t maskForTrackPair=0); | |
63 | ||
64 | virtual void AddSingleCut(const char* cutName, UInt_t mask); | |
65 | ||
66 | virtual void AddGlobalEventSelection(const char* name); | |
67 | ||
68 | virtual void UserExec(Option_t* opt); | |
69 | ||
70 | void AddTriggerClasses(const char* triggerlist); | |
71 | ||
72 | protected: | |
73 | ||
74 | virtual void MuUserExec(Option_t* opt) = 0; | |
75 | ||
76 | void AssertHistogramCollection(const char* physics, const char* triggerClassName); | |
77 | ||
78 | void BeautifyHistos(); | |
79 | ||
80 | UInt_t CodePairCutMask(UInt_t maskForOneOrBothTrack, UInt_t maskForTrackPair) const; | |
81 | ||
82 | void CreateHisto(TObjArray* array, | |
83 | const char* physics, | |
84 | const char* triggerClassName, | |
85 | const char* hname, const char* htitle, | |
86 | Int_t nbinsx, Double_t xmin, Double_t xmax, | |
87 | Int_t nbinsy, Double_t ymin, Double_t ymax) const; | |
88 | ||
89 | void CreateEventHisto(const char* physics, | |
90 | const char* triggerClassName, | |
91 | const char* hname, const char* htitle, | |
92 | Int_t nbinsx, Double_t xmin, Double_t xmax, | |
93 | Int_t nbinsy=0, Double_t ymin=0.0, Double_t ymax=0.0) const; | |
94 | ||
95 | void CreateSingleHisto(const char* physics, | |
96 | const char* triggerClassName, | |
97 | const char* hname, const char* htitle, | |
98 | Int_t nbinsx, Double_t xmin, Double_t xmax, | |
99 | Int_t nbinsy=0, Double_t ymin=0.0, Double_t ymax=0.0) const; | |
100 | ||
101 | void CreatePairHisto(const char* physics, | |
102 | const char* triggerClassName, | |
103 | const char* hname, const char* htitle, | |
104 | Int_t nbinsx, Double_t xmin, Double_t xmax, | |
105 | Int_t nbinsy=0, Double_t ymin=0.0, Double_t ymax=0.0) const; | |
106 | ||
107 | void DecodePairCutMask(UInt_t code, UInt_t& maskForOneOrBothTrack, UInt_t& maskForTrackPair) const; | |
108 | ||
109 | void DefineCentralityClasses(); | |
110 | ||
111 | void FillHistogramCollection(const char* physics, const char* triggerClassName); | |
112 | ||
113 | TH1* Histo(const char* physics, const char* histoname); | |
114 | ||
115 | TH1* Histo(const char* physics, const char* triggerClassName, const char* histoname); | |
116 | ||
117 | TH1* Histo(const char* physics, const char* triggerClassName, const char* what, const char* histoname); | |
118 | ||
119 | TH1* Histo(const char* physics, const char* triggerClassName, const char* cent, const char* what, const char* histoname); | |
120 | ||
121 | Double_t MuonMass2() const; | |
122 | ||
123 | const char* DefaultCentralityName() const; | |
124 | ||
125 | const char* CentralityName(Double_t centrality) const; | |
126 | ||
127 | Double_t Deg2() const { return 2.0*TMath::DegToRad(); } | |
128 | Double_t Deg3() const { return 3.0*TMath::DegToRad(); } | |
129 | Double_t Deg10() const { return 10.2*TMath::DegToRad(); } | |
130 | ||
131 | Double_t AbsZEnd() const { return 505.0; /* cm */ } | |
132 | ||
133 | Bool_t IsDynamicTriggerClasses() const { return fIsDynamicTriggerClasses; } | |
134 | ||
135 | protected: | |
136 | AliHistogramCollection* fHistogramCollection; //! collection of histograms | |
137 | TList* fOutput; //! list of output objects | |
138 | TList* fTriggerClasses; // trigger classes to consider | |
139 | AliCounterCollection* fEventCounters; //! event counters | |
140 | Bool_t fIsFromESD; // whether we read from ESD or AOD | |
141 | TObjArray* fSingleTrackCutNames; // cut on single tracks (array of TObjString) | |
142 | TObjArray* fPairTrackCutNames; // cut on track pairs (array of TObjString) | |
143 | std::vector<double> fCentralityLimits; // centrality limits | |
144 | TObjArray* fCentralityNames; // names to create histograms | |
145 | TObjArray* fGlobalEventSelectionNames; // names of global event selections | |
146 | Bool_t fAA; // not proton-proton | |
147 | Bool_t fIsDynamicTriggerClasses; // whether or not to update considered triggers on the fly | |
148 | ||
149 | private: | |
150 | AliAnalysisMuMu(const AliAnalysisMuMu&); // not implemented (on purpose) | |
151 | AliAnalysisMuMu& operator=(const AliAnalysisMuMu&); // not implemented (on purpose) | |
152 | ||
153 | ||
154 | ClassDef(AliAnalysisMuMu,8) | |
155 | }; | |
156 | ||
157 | #endif | |
158 |