]>
Commit | Line | Data |
---|---|---|
01745870 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | // | |
16 | // Task for Heavy Flavour Electron Analysis | |
17 | // Fills a single-inclusive electron pt-spectrum | |
18 | // For further information see implementation file | |
19 | // | |
20 | #ifndef ALIANALYSISTASKHFE_H | |
21 | #define ALIANALYSISTASKHFE_H | |
22 | ||
23 | #ifndef ALIANALYSISTASKSE_H | |
24 | #include "AliAnalysisTaskSE.h" | |
25 | #endif | |
26 | ||
27 | #ifndef ROOT_TString | |
28 | #include <TString.h> | |
29 | #endif | |
30 | ||
31 | #ifndef ROOT_TBits | |
32 | #include <TBits.h> | |
33 | #endif | |
34 | ||
35 | class AliAnalysisUtils; | |
36 | class AliESDtrackCuts; | |
37 | class AliHFEcontainer; | |
38 | class AliHFEcollection; | |
39 | class AliHFEcuts; | |
40 | class AliHFEextraCuts; | |
41 | class AliHFEelecbackground; | |
42 | class AliHFENonPhotonicElectron; | |
43 | class AliHFEmcQA; | |
44 | class AliHFEpid; | |
45 | class AliHFEpidQAmanager; | |
46 | class AliHFEsecVtx; | |
47 | class AliHFEsignalCuts; | |
48 | class AliHFEvarManager; | |
49 | class AliHFEtaggedTrackAnalysis; | |
7986e54e | 50 | class AliHFEV0taginfo; |
01745870 | 51 | class AliCFManager; |
52 | class AliMCEvent; | |
53 | class AliOADBContainer; | |
54 | class AliAODMCHeader; | |
55 | class AliVEvent; | |
56 | class AliVParticle; | |
57 | class AliTriggerAnalysis; | |
618038b6 | 58 | class AliTRDTriggerAnalysis; |
01745870 | 59 | class TH1I; |
60 | class TList; | |
61 | class TClonesArray; | |
62 | ||
63 | class AliAnalysisTaskHFE : public AliAnalysisTaskSE{ | |
64 | public: | |
65 | enum{ | |
66 | kPIDqa = 0, | |
67 | kMCqa =1 | |
68 | }; | |
69 | enum{ | |
70 | kPriVtx = 0, | |
71 | kSecVtx = 1, | |
72 | kIsElecBackGround = 2, | |
73 | kPostProcess = 3, | |
74 | kDEstep = 4, | |
75 | kTaggedTrackAnalysis = 5, | |
76 | kNonPhotonicElectron = 6 | |
77 | }; | |
78 | enum CreationProcess_t{ | |
79 | kSignalCharm = 0, | |
80 | kSignalBeauty = 1, | |
81 | kGammaConv = 2, | |
82 | kOther = 3 | |
83 | }; | |
84 | enum{ | |
85 | kBgPtBins = 44, | |
86 | kElecBgSpecies = 6, | |
87 | kCentBins = 11, | |
88 | kBgLevels = 3 | |
89 | }; | |
90 | typedef enum{ | |
91 | kpp = 0, | |
92 | kpPb = 1, | |
93 | kPbPb = 2 | |
94 | } ECollisionSystem_t; | |
95 | ||
96 | AliAnalysisTaskHFE(); | |
97 | AliAnalysisTaskHFE(const char * name); | |
98 | AliAnalysisTaskHFE(const AliAnalysisTaskHFE &ref); | |
99 | AliAnalysisTaskHFE& operator=(const AliAnalysisTaskHFE &ref); | |
100 | virtual void Copy(TObject &o) const; | |
101 | virtual ~AliAnalysisTaskHFE(); | |
102 | ||
103 | virtual void UserCreateOutputObjects(); | |
104 | virtual void UserExec(Option_t *); | |
105 | virtual void Terminate(Option_t *); | |
106 | ||
107 | virtual Bool_t IsEventInBinZero(); | |
108 | ||
109 | Bool_t IsQAOn(Int_t qaLevel) const { return TESTBIT(fQAlevel, qaLevel); }; | |
110 | Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); }; | |
111 | Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); }; | |
112 | Bool_t HasMCData() const { return TestBit(kHasMCdata); } | |
113 | Bool_t Ispp() const { return fCollisionSystem.TestBitNumber(kpp); } | |
114 | Bool_t IsPbPb() const { return fCollisionSystem.TestBitNumber(kPbPb); } | |
115 | Bool_t IspPb() const { return fCollisionSystem.TestBitNumber(kpPb); } | |
4437a0d2 | 116 | Bool_t IsHeavyIon() const { return IsPbPb(); } |
01745870 | 117 | Bool_t GetPlugin(Int_t plug) const { return TESTBIT(fPlugins, plug); }; |
118 | ||
119 | // Get Components for configuration | |
120 | AliHFEvarManager *GetVarManager() const { return fVarManager; } | |
121 | AliHFEpidQAmanager *GetPIDQAManager() const { return fPIDqa; } | |
122 | AliHFEpid *GetPID() const { return fPID; } | |
123 | AliHFENonPhotonicElectron *GetHFEBackgroundSubtraction() const { return fBackgroundSubtraction; } | |
124 | ||
125 | void SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; }; | |
126 | void SetTaggedTrackCuts(AliHFEcuts * const cuts) { fTaggedTrackCuts = cuts; } | |
127 | void SetCleanTaggedTrack(Bool_t clean) { fCleanTaggedTrack = clean; }; | |
128 | void SetVariablesTRDTaggedTrack(Bool_t variablesTRD) { fVariablesTRDTaggedTrack = variablesTRD; }; | |
129 | void SetHFECutsPreselect(AliESDtrackCuts * const cuts) { fCutspreselect = cuts; }; | |
130 | void SetHFEElecBackGround(AliHFEelecbackground * const elecBackGround) { fElecBackGround = elecBackGround; }; | |
131 | void SetHFEBackgroundSubtraction(AliHFENonPhotonicElectron * const backgroundSubtraction) { fBackgroundSubtraction = backgroundSubtraction; }; | |
132 | void SetQAOn(Int_t qaLevel) { SETBIT(fQAlevel, qaLevel); }; | |
133 | void SwitchOnPlugin(Int_t plug); | |
134 | void SetHasMCData(Bool_t hasMC = kTRUE) { SetBit(kHasMCdata, hasMC); }; | |
135 | void SetFillSignalOnly(Bool_t signalOnly) { fFillSignalOnly = signalOnly; } | |
136 | ||
137 | void SetFillNoCuts(Bool_t fillNoCuts) { fFillNoCuts = fillNoCuts; } | |
138 | void SetApplyCutAOD(Bool_t applyCutAOD) { fApplyCutAOD = applyCutAOD; } | |
139 | void SetRemovePileUp(Bool_t removePileUp) { fRemovePileUp = removePileUp; } | |
140 | void SetRemoveFirstEventInChunk() {fRemoveFirstEvent = kTRUE;} | |
141 | void SetPIDPreselect(AliHFEpid * const cuts) { fPIDpreselect = cuts; }; | |
142 | void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); }; | |
143 | void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); }; | |
144 | void SetTRDTrigger(Bool_t activateTRDTrigger, Int_t trdtrigger) {fTRDTrigger=activateTRDTrigger; fWhichTRDTrigger=trdtrigger;}; | |
145 | void SetCollisionSystem(ECollisionSystem_t system){ | |
146 | fCollisionSystem.Clear(); | |
147 | fCollisionSystem.SetBitNumber(system, kTRUE); | |
148 | } | |
149 | void SetppAnalysis(){ | |
150 | fCollisionSystem.SetBitNumber(kpPb, kFALSE); | |
151 | fCollisionSystem.SetBitNumber(kPbPb, kFALSE); | |
152 | fCollisionSystem.SetBitNumber(kpp, kTRUE); | |
153 | } | |
154 | void SetpPbAnalysis() { | |
155 | fCollisionSystem.SetBitNumber(kpp, kFALSE); | |
156 | fCollisionSystem.SetBitNumber(kPbPb, kFALSE); | |
157 | fCollisionSystem.SetBitNumber(kpPb, kTRUE); | |
158 | } | |
159 | void SetPbPbAnalysis() { | |
160 | fCollisionSystem.SetBitNumber(kpp, kFALSE); | |
161 | fCollisionSystem.SetBitNumber(kpPb, kFALSE); | |
162 | fCollisionSystem.SetBitNumber(kPbPb, kTRUE); | |
163 | }; | |
164 | void SetCentralityEstimator(const char *estimator) { fCentralityEstimator = estimator; } | |
165 | void SetPbPbUserCentralityLimit(Bool_t isPbPbUserBinning = kFALSE){fPbPbUserCentralityBinning = isPbPbUserBinning; }; | |
166 | void SetPbPbUserCentralityArray(Int_t icentr, Float_t valuecentr) {fCentralityLimits[icentr] = valuecentr;}; | |
167 | void SetPPMultiBinAnalysis(Bool_t isppMultiBin) { fisppMultiBin = isppMultiBin; }; | |
168 | void SetNonHFEsystematics(Bool_t isSystematics) {fisNonHFEsystematics = isSystematics; }; | |
169 | void SetRejectKinkMother(Bool_t rejectKinkMother = kFALSE) { fRejectKinkMother = rejectKinkMother; }; | |
170 | void SetBackGroundFactorsFunction(const TF1 * const backGroundFactorsFunction, Int_t centralitybin=0){ | |
171 | fkBackGroundFactorArray[centralitybin]=backGroundFactorsFunction; | |
172 | fBackGroundFactorApply=kTRUE; | |
173 | SetBit(kBackgroundInitialized); | |
174 | }; | |
175 | void SetElecBackGroundFactors(Int_t iPt, Int_t iType, Int_t iCent, Int_t iError, Double_t elecBackGroundFactor) {fElecBackgroundFactor[iError][iCent][iType][iPt] = elecBackGroundFactor; }; | |
176 | void SetBinLimits(Int_t iPt, Double_t momentum){fBinLimit[iPt] = momentum;}; | |
177 | void PrintStatus() const; | |
178 | Bool_t ReadCentrality(); | |
179 | void RejectionPileUpVertexRangeEventCut(); | |
180 | void SelectSpecialTrigger(const Char_t *trgclust, Int_t runMin = 0, Int_t runMax = 999999999); | |
181 | void SetDebugStreaming() {SetBit(kTreeStream);}; | |
4437a0d2 | 182 | Bool_t CheckTRDTriggerESD(AliESDEvent *ev); |
183 | Bool_t CheckTRDTrigger(AliVEvent *ev); | |
8c07fb0d | 184 | void DrawTRDTrigger(AliESDEvent *ev); |
01745870 | 185 | |
186 | private: | |
187 | enum{ | |
188 | kHasMCdata = BIT(19), | |
189 | kAODanalysis = BIT(20), | |
190 | kBackgroundInitialized = BIT(21), | |
191 | kTreeStream = BIT(22) | |
192 | }; | |
193 | ||
194 | Bool_t FillProductionVertex(const AliVParticle * const track) const; | |
195 | void MakeParticleContainer(); | |
196 | void MakeEventContainer(); | |
197 | void InitHistoITScluster(); | |
198 | void InitContaminationQA(); | |
199 | const Char_t *GetSpecialTrigger(Int_t run); | |
200 | void ProcessMC(); | |
201 | void ProcessESD(); | |
202 | void ProcessAOD(); | |
203 | Int_t GetITSMultiplicity(AliVEvent *ev); | |
204 | Bool_t PreSelectTrack(AliESDtrack *track) const; | |
205 | Bool_t ProcessMCtrack(AliVParticle *track); | |
206 | Bool_t ProcessCutStep(Int_t cutStep, AliVParticle *track); | |
207 | AliAODMCHeader *fAODMCHeader; // ! MC info AOD | |
208 | TClonesArray *fAODArrayMCInfo; // ! MC info particle AOD | |
209 | ULong_t fQAlevel; // QA level | |
210 | UShort_t fPlugins; // Enabled Plugins | |
211 | TBits fCollisionSystem; // Collision System; | |
212 | Bool_t fFillSignalOnly; // Fill container only with MC Signal Tracks | |
213 | Bool_t fFillNoCuts; // Fill container before any cut | |
214 | Bool_t fApplyCutAOD; // Apply the analysis cut for AOD tracks | |
215 | Bool_t fBackGroundFactorApply; // Apply Background Function Subtraction, MF: To be removed when transition to OADB container is finished | |
216 | Bool_t fRemovePileUp; // Remove Pile Up | |
217 | Bool_t fIdentifiedAsPileUp; // Identified as pile-up | |
218 | Bool_t fIdentifiedAsOutInz; // Out Of Range in z | |
219 | Bool_t fPassTheEventCut; // Pass The Event Cut | |
220 | Bool_t fRejectKinkMother; // Reject Kink Mother | |
221 | Bool_t fisppMultiBin; // pp Multiplicity Bin analysis | |
222 | Bool_t fPbPbUserCentralityBinning; // PbPb user centrality binning | |
223 | Bool_t fRemoveFirstEvent; // Remove first event from chunk | |
224 | Bool_t fisNonHFEsystematics; // Non-HFE background systematics analysis | |
225 | AliOADBContainer *fSpecialTrigger; // Special trigger selection | |
226 | Int_t fCentralityF; // Centrality bin | |
227 | Float_t fCentralityPercent; // Centrality percentile | |
228 | TString fCentralityEstimator; // Centrality Estimator | |
229 | Float_t fContributors; // Contributors | |
230 | Double_t fWeightBackGround; // weight background function | |
231 | Double_t fVz; // z position of the primary vertex | |
232 | const TF1 *fkBackGroundFactorArray[12]; // Array of BackGround factors for each centrality bin, bin0 = min bias | |
233 | Double_t fElecBackgroundFactor[kBgLevels][kCentBins][kElecBgSpecies][kBgPtBins]; // Electron background factors | |
234 | Double_t fBinLimit[kBgPtBins+1]; // Electron pt bin edges | |
235 | Float_t fCentralityLimits[12]; // Limits for centrality bins | |
236 | AliHFEcontainer *fContainer; //! The HFE container | |
237 | AliHFEvarManager *fVarManager; // The var manager as the backbone of the analysis | |
238 | AliHFEsignalCuts *fSignalCuts; //! MC true signal (electron coming from certain source) | |
239 | AliCFManager *fCFM; //! Correction Framework Manager | |
240 | AliTriggerAnalysis *fTriggerAnalysis; //! Trigger Analysis for Normalisation | |
241 | AliHFEpid *fPID; // PID | |
242 | AliHFEpidQAmanager *fPIDqa; // PID QA | |
4437a0d2 | 243 | AliTRDTriggerAnalysis *fTRDTriggerAnalysis; //! TRD Trigger Analysis |
01745870 | 244 | AliHFEpid *fPIDpreselect; // PID oject for pre-selected tracks (without QA) |
245 | AliHFEcuts *fCuts; // Cut Collection | |
246 | AliHFEcuts *fTaggedTrackCuts; // Cut Collection for V0 tagged tracks | |
247 | Bool_t fCleanTaggedTrack; // Loose cleaning of the V0 tagged tracks electron | |
248 | Bool_t fVariablesTRDTaggedTrack; // Take the variables at the TRD for the V0 tagged tracks electron | |
249 | AliAnalysisUtils *fAnalysisUtils; // Utility object to remove the first event of a chunk from the analysis | |
250 | AliESDtrackCuts *fCutspreselect; // Cut Collection for pre-selected tracks | |
251 | AliHFEsecVtx *fSecVtx; //! Secondary Vertex Analysis | |
252 | AliHFEelecbackground *fElecBackGround;//! Background analysis | |
253 | AliHFEmcQA *fMCQA; //! MC QA | |
254 | AliHFEtaggedTrackAnalysis *fTaggedTrackAnalysis; //!Analyse V0-tagged tracks | |
255 | AliHFEextraCuts *fExtraCuts; //! temporary implementation for IP QA | |
256 | AliHFENonPhotonicElectron *fBackgroundSubtraction; // Background subtraction | |
257 | Bool_t fTRDTrigger; // Check if event is TRD triggered event | |
258 | Int_t fWhichTRDTrigger; // Select type of TRD trigger | |
7986e54e | 259 | |
260 | AliHFEV0taginfo *fV0Tagger; // Tags v0 tracks per Event | |
261 | ||
01745870 | 262 | //-----------QA and output--------------- |
263 | TList *fQA; //! QA histos for the cuts | |
264 | TList *fOutput; //! Container for Task Output | |
265 | TList *fHistMCQA; //! Output container for MC QA histograms | |
266 | TList *fHistSECVTX; //! Output container for sec. vertexing results | |
267 | TList *fHistELECBACKGROUND; //! Output container for electron background analysis | |
268 | AliHFEcollection *fQACollection; //! Tasks own QA collection | |
269 | //--------------------------------------- | |
270 | ||
271 | ClassDef(AliAnalysisTaskHFE, 2) // The electron Analysis Task | |
272 | }; | |
273 | #endif | |
274 |