]>
Commit | Line | Data |
---|---|---|
1cb2a06e | 1 | #ifndef ALIANALYSISTASKEFFCONTBF_cxx |
2 | #define ALIANALYSISTASKEFFCONTBF_cxx | |
3 | ||
4 | // --------------------------------------------------------------------- | |
5 | // | |
6 | // Task for calculating the efficiency and contamination of the Balance | |
7 | // Function for single particles and pairs | |
8 | // | |
9 | // --------------------------------------------------------------------- | |
10 | ||
11 | class TList; | |
12 | class TH1F; | |
13 | class TH3D; | |
14 | class TH2F; | |
15 | class TString; | |
16 | class AliAODEvent; | |
17 | class AliAODInputHandler; | |
18 | class TH2D; | |
19 | ||
eb1b5eda | 20 | #include "AliPIDResponse.h" |
1cb2a06e | 21 | #include "AliAnalysisTaskSE.h" |
22 | ||
23 | class AliAnalysisTaskEffContBF : public AliAnalysisTaskSE { | |
24 | public: | |
25 | AliAnalysisTaskEffContBF() : AliAnalysisTaskSE(), | |
26 | fAOD(0), | |
1cb2a06e | 27 | fArrayMC(0), |
28 | fQAList(0), | |
29 | fOutputList(0), | |
30 | fHistEventStats(0), | |
31 | fHistCentrality(0), | |
32 | fHistNMult(0), | |
33 | fHistVz(0), | |
eb1b5eda | 34 | fHistNSigmaTPCvsPtbeforePID(0), |
35 | fHistNSigmaTPCvsPtafterPID(0), | |
27c60726 | 36 | fHistContaminationSecondariesPlus(0), |
37 | fHistContaminationSecondariesMinus(0), | |
38 | fHistContaminationPrimariesPlus(0), | |
39 | fHistContaminationPrimariesMinus(0), | |
1cb2a06e | 40 | fHistGeneratedEtaPtPhiPlus(0), |
41 | fHistSurvivedEtaPtPhiPlus(0), | |
42 | fHistGeneratedEtaPtPhiMinus(0), | |
43 | fHistSurvivedEtaPtPhiMinus(0), | |
44 | fHistGeneratedEtaPtPlusControl(0), | |
45 | fHistSurvivedEtaPtPlusControl(0), | |
46 | fHistGeneratedEtaPtMinusControl(0), | |
47 | fHistSurvivedEtaPtMinusControl(0), | |
48 | fHistGeneratedEtaPtPlusPlus(0), | |
49 | fHistSurvivedEtaPtPlusPlus(0), | |
50 | fHistGeneratedEtaPtMinusMinus(0), | |
51 | fHistSurvivedEtaPtMinusMinus(0), | |
52 | fHistGeneratedEtaPtPlusMinus(0), | |
53 | fHistSurvivedEtaPtPlusMinus(0), | |
54 | fHistGeneratedPhiEtaPlusPlus(0), | |
55 | fHistSurvivedPhiEtaPlusPlus(0), | |
56 | fHistGeneratedPhiEtaMinusMinus(0), | |
57 | fHistSurvivedPhiEtaMinusMinus(0), | |
58 | fHistGeneratedPhiEtaPlusMinus(0), | |
59 | fHistSurvivedPhiEtaPlusMinus(0), | |
f70e6273 | 60 | fUseCentrality(kFALSE), |
1cb2a06e | 61 | fCentralityEstimator("V0M"), |
62 | fCentralityPercentileMin(0.0), | |
63 | fCentralityPercentileMax(5.0), | |
731ae973 | 64 | fInjectedSignals(kFALSE), |
eb1b5eda | 65 | fPIDResponse(0), |
66 | fElectronRejection(kFALSE), | |
67 | fElectronOnlyRejection(kFALSE), | |
68 | fElectronRejectionNSigma(-1.), | |
69 | fElectronRejectionMinPt(0.), | |
70 | fElectronRejectionMaxPt(1000.), | |
1cb2a06e | 71 | fVxMax(3.0), |
72 | fVyMax(3.0), | |
73 | fVzMax(10.), | |
6d6eb2df | 74 | fAODTrackCutBit(128), |
1cb2a06e | 75 | fMinNumberOfTPCClusters(80), |
76 | fMaxChi2PerTPCCluster(4.0), | |
77 | fMaxDCAxy(3.0), | |
78 | fMaxDCAz(3.0), | |
79 | fMinPt(0.0), | |
80 | fMaxPt(20.0), | |
81 | fMinEta(-0.8), | |
82 | fMaxEta(0.8), | |
83 | fEtaRangeMin(0.0), | |
84 | fEtaRangeMax(1.6), | |
85 | fPtRangeMin(0.0), | |
86 | fPtRangeMax(20.0), | |
1cb2a06e | 87 | fEtaBin(100), |
88 | fdEtaBin(64), | |
89 | fPtBin(100), | |
1cb2a06e | 90 | fHistSurvived4EtaPtPhiPlus(0), |
91 | fHistSurvived8EtaPtPhiPlus(0){} | |
92 | AliAnalysisTaskEffContBF(const char *name); | |
93 | virtual ~AliAnalysisTaskEffContBF() {} | |
94 | ||
95 | virtual void UserCreateOutputObjects(); | |
96 | virtual void UserExec(Option_t *option); | |
97 | virtual void Terminate(Option_t *); | |
98 | ||
99 | Bool_t IsLabelUsed(TArrayI array, Int_t label); | |
100 | ||
101 | void SetAODtrackCutBit(Int_t bit){ | |
102 | fAODTrackCutBit = bit; | |
103 | } | |
104 | void SetVertexDiamond(Double_t vx, Double_t vy, Double_t vz) { | |
105 | fVxMax = vx; | |
106 | fVyMax = vy; | |
107 | fVzMax = vz; | |
108 | } | |
109 | ||
110 | //Centrality | |
f70e6273 | 111 | void UseCentrality() { fUseCentrality = kTRUE;} |
1cb2a06e | 112 | void SetCentralityEstimator(const char* centralityEstimator) { |
113 | fCentralityEstimator = centralityEstimator;} | |
114 | void SetCentralityPercentileRange(Float_t min, Float_t max) { | |
115 | fCentralityPercentileMin=min; | |
116 | fCentralityPercentileMax=max; | |
117 | } | |
118 | ||
731ae973 MW |
119 | //Injected signals |
120 | void SetRejectInjectedSignals() {fInjectedSignals = kTRUE;} | |
121 | ||
eb1b5eda | 122 | // electron rejection |
123 | void SetElectronRejection(Double_t gMaxNSigma){ | |
124 | fElectronRejection = kTRUE; | |
125 | fElectronRejectionNSigma = gMaxNSigma; | |
126 | } | |
127 | ||
128 | void SetElectronOnlyRejection(Double_t gMaxNSigma){ | |
129 | fElectronRejection = kTRUE; | |
130 | fElectronOnlyRejection = kTRUE; | |
131 | fElectronRejectionNSigma = gMaxNSigma; | |
132 | } | |
133 | ||
134 | void SetElectronRejectionPt(Double_t minPt,Double_t maxPt){ | |
135 | fElectronRejectionMinPt = minPt; | |
136 | fElectronRejectionMaxPt = maxPt; | |
137 | } | |
138 | ||
1cb2a06e | 139 | //Track cuts |
140 | void SetMinNumberOfTPCClusters(Double_t min) { | |
141 | fMinNumberOfTPCClusters = min;} | |
142 | void SetMaxChi2PerTPCCluster(Double_t max) { | |
143 | fMaxChi2PerTPCCluster = max;} | |
144 | void SetMaxDCAxy(Double_t max) { | |
145 | fMaxDCAxy = max;} | |
146 | void SetMaxDCAz(Double_t max) { | |
147 | fMaxDCAz = max;} | |
148 | void SetMinPt(Double_t minPt) { | |
149 | fMinPt = minPt;} | |
150 | void SetMaxPt(Double_t maxPt) { | |
151 | fMaxPt = maxPt;} | |
152 | ||
153 | void SetEtaRange(Double_t minEta, Double_t maxEta, Int_t binEta, Double_t minRangeEta, Double_t maxRangeEta, Int_t bindEta){ | |
154 | fMinEta = minEta; | |
155 | fMaxEta = maxEta; | |
156 | fEtaBin = binEta; | |
157 | fEtaRangeMax = maxRangeEta; | |
158 | fEtaRangeMin = minRangeEta; | |
159 | fdEtaBin = bindEta; | |
160 | } | |
161 | void SetPtRange(Double_t minRangePt, Double_t maxRangePt,Int_t binPt){ | |
162 | fPtRangeMin = minRangePt; | |
163 | fPtRangeMax = maxRangePt; | |
164 | fPtBin = binPt;} | |
1cb2a06e | 165 | private: |
166 | AliAODEvent* fAOD; //! AOD object | |
1cb2a06e | 167 | TClonesArray *fArrayMC; //! array of MC particles |
168 | TList *fQAList; //! QA list | |
169 | TList *fOutputList; //! Output list | |
170 | ||
171 | // QA histograms | |
172 | TH1F *fHistEventStats; //!event stats | |
173 | TH1F *fHistCentrality; //!centrality | |
174 | TH1F *fHistNMult; //! nmult | |
175 | TH1F *fHistVz;//! | |
eb1b5eda | 176 | TH2F *fHistNSigmaTPCvsPtbeforePID;//TPC nsigma vs pT before PID cuts (QA histogram) |
177 | TH2F *fHistNSigmaTPCvsPtafterPID;//TPC nsigma vs pT after PID cuts (QA histogram) | |
1cb2a06e | 178 | |
179 | // output histograms | |
27c60726 | 180 | TH3D *fHistContaminationSecondariesPlus;//! |
181 | TH3D *fHistContaminationSecondariesMinus;//! | |
182 | TH3D *fHistContaminationPrimariesPlus;//! | |
183 | TH3D *fHistContaminationPrimariesMinus;//! | |
184 | ||
1cb2a06e | 185 | // output histograms (single particles) |
186 | TH3D *fHistGeneratedEtaPtPhiPlus;//!correction map for positives (generated) | |
187 | TH3D *fHistSurvivedEtaPtPhiPlus;//!correction map positives (survived) | |
188 | ||
189 | TH3D *fHistGeneratedEtaPtPhiMinus;//!correction map for negatives (generated) | |
190 | TH3D *fHistSurvivedEtaPtPhiMinus;//!correction map negatives (survived) | |
191 | ||
192 | TH2F *fHistGeneratedEtaPtPlusControl;//!correction map for positives (generated) | |
193 | TH2F *fHistSurvivedEtaPtPlusControl;//!correction map positives (survived) | |
194 | ||
195 | TH2F *fHistGeneratedEtaPtMinusControl;//!correction map for negatives (generated) | |
196 | TH2F *fHistSurvivedEtaPtMinusControl;//!correction map negatives (survived) | |
197 | ||
198 | // output histograms (pairs) | |
199 | TH2F *fHistGeneratedEtaPtPlusPlus;//!correction map for ++ (generated) | |
200 | TH2F *fHistSurvivedEtaPtPlusPlus;//!correction map ++ (survived) | |
201 | ||
202 | TH2F *fHistGeneratedEtaPtMinusMinus;//!correction map for -- (generated) | |
203 | TH2F *fHistSurvivedEtaPtMinusMinus;//!correction map -- (survived) | |
204 | ||
205 | TH2F *fHistGeneratedEtaPtPlusMinus;//!correction map for +- (generated) | |
206 | TH2F *fHistSurvivedEtaPtPlusMinus;//!correction map +- (survived) | |
207 | ||
208 | TH2F *fHistGeneratedPhiEtaPlusPlus;//!correction map for ++ (generated) | |
209 | TH2F *fHistSurvivedPhiEtaPlusPlus;//!correction map ++ (survived) | |
210 | ||
211 | TH2F *fHistGeneratedPhiEtaMinusMinus;//!correction map for -- (generated) | |
212 | TH2F *fHistSurvivedPhiEtaMinusMinus;//!correction map -- (survived) | |
213 | ||
214 | TH2F *fHistGeneratedPhiEtaPlusMinus;//!correction map for +- (generated) | |
215 | TH2F *fHistSurvivedPhiEtaPlusMinus;//!correction map +- (survived) | |
216 | ||
f70e6273 | 217 | Bool_t fUseCentrality;// Bool_t use centrality or not |
1cb2a06e | 218 | TString fCentralityEstimator;//"V0M","TRK","TKL","ZDC","FMD" |
219 | Float_t fCentralityPercentileMin, fCentralityPercentileMax; //min-max centrality percentile | |
220 | ||
731ae973 MW |
221 | Bool_t fInjectedSignals;//Flag for using the rejection of injected signals |
222 | ||
eb1b5eda | 223 | AliPIDResponse *fPIDResponse; //! PID response object |
224 | Bool_t fElectronRejection;//flag to use electron rejection | |
225 | Bool_t fElectronOnlyRejection;//flag to use electron rejection with exclusive electron PID (no other particle in nsigma range) | |
226 | Double_t fElectronRejectionNSigma;//nsigma cut for electron rejection | |
227 | Double_t fElectronRejectionMinPt;//minimum pt for electron rejection (default = 0.) | |
228 | Double_t fElectronRejectionMaxPt;//maximum pt for electron rejection (default = 1000.) | |
229 | ||
1cb2a06e | 230 | Double_t fVxMax;//vxmax |
231 | Double_t fVyMax;//vymax | |
232 | Double_t fVzMax;//vzmax | |
233 | ||
234 | Int_t fAODTrackCutBit;//track cut bit from track selection (only used for AODs) | |
235 | ||
236 | Double_t fMinNumberOfTPCClusters;//! | |
237 | Double_t fMaxChi2PerTPCCluster;//! | |
238 | Double_t fMaxDCAxy, fMaxDCAz;//! | |
239 | Double_t fMinPt, fMaxPt;//! | |
240 | Double_t fMinEta, fMaxEta;//! | |
241 | Double_t fEtaRangeMin;// acceptance cuts | |
242 | Double_t fEtaRangeMax; // acceptance cuts | |
243 | Double_t fPtRangeMin; //acceptance cuts | |
244 | Double_t fPtRangeMax; //acceptance cuts | |
1cb2a06e | 245 | |
246 | Int_t fEtaBin; //acceptance cuts | |
247 | Int_t fdEtaBin; //acceptance cuts | |
248 | Int_t fPtBin; //acceptance cuts | |
1cb2a06e | 249 | |
250 | TH3F *fHistSurvived4EtaPtPhiPlus;//! | |
251 | TH3F *fHistSurvived8EtaPtPhiPlus;//! | |
252 | ||
253 | AliAnalysisTaskEffContBF(const AliAnalysisTaskEffContBF&); // not implemented | |
254 | AliAnalysisTaskEffContBF& operator=(const AliAnalysisTaskEffContBF&); // not implemented | |
255 | ||
256 | ClassDef(AliAnalysisTaskEffContBF, 1); // example of analysis | |
257 | }; | |
258 | ||
259 | #endif |