]>
Commit | Line | Data |
---|---|---|
809a4336 | 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 | **************************************************************************/ | |
50685501 | 15 | // |
16 | // Task for Heavy Flavour Electron Analysis | |
17 | // Fills a single-inclusive electron pt-spectrum | |
18 | // For further information see implementation file | |
19 | // | |
c2690925 | 20 | #ifndef ALIANALYSISTASKHFE_H |
21 | #define ALIANALYSISTASKHFE_H | |
22 | ||
d2af20c5 | 23 | #ifndef ALIANALYSISTASKSE_H |
24 | #include "AliAnalysisTaskSE.h" | |
dbe3abbe | 25 | #endif |
26 | ||
c2690925 | 27 | #ifndef ROOT_TString |
28 | #include <TString.h> | |
29 | #endif | |
30 | ||
3a72645a | 31 | class AliHFEcontainer; |
32 | class AliHFEcollection; | |
809a4336 | 33 | class AliHFEcuts; |
8c1c76e9 | 34 | class AliHFEextraCuts; |
3a72645a | 35 | class AliHFEelecbackground; |
259c3296 | 36 | class AliHFEmcQA; |
3a72645a | 37 | class AliHFEpid; |
38 | class AliHFEpidQAmanager; | |
259c3296 | 39 | class AliHFEsecVtx; |
3a72645a | 40 | class AliHFEsignalCuts; |
41 | class AliHFEvarManager; | |
42 | class AliHFEtaggedTrackAnalysis; | |
809a4336 | 43 | class AliCFManager; |
809a4336 | 44 | class AliMCEvent; |
8c1c76e9 | 45 | class AliOADBContainer; |
46 | class AliVEvent; | |
722347d8 | 47 | class AliVParticle; |
69ac0e6f | 48 | class AliTriggerAnalysis; |
809a4336 | 49 | class TH1I; |
50 | class TList; | |
51 | ||
d2af20c5 | 52 | class AliAnalysisTaskHFE : public AliAnalysisTaskSE{ |
dbe3abbe | 53 | public: |
9bcfd1ab | 54 | enum{ |
55 | kPIDqa = 0, | |
56 | kMCqa =1 | |
57 | }; | |
58 | enum{ | |
59 | kPriVtx = 0, | |
60 | kSecVtx = 1, | |
61 | kIsElecBackGround = 2, | |
3a72645a | 62 | kPostProcess = 3, |
63 | kDEstep = 4, | |
64 | kTaggedTrackAnalysis = 5 | |
9bcfd1ab | 65 | }; |
faee3b18 | 66 | enum CreationProcess_t{ |
67 | kSignalCharm = 0, | |
68 | kSignalBeauty = 1, | |
69 | kGammaConv = 2, | |
70 | kOther = 3 | |
71 | }; | |
fd6b8522 | 72 | enum{ |
73 | kBgPtBins = 44, | |
8c1c76e9 | 74 | kElecBgSpecies = 6, |
75 | kCentBins = 11, | |
76 | kBgLevels = 3 | |
fd6b8522 | 77 | }; |
78 | ||
dbe3abbe | 79 | AliAnalysisTaskHFE(); |
0792aa82 | 80 | AliAnalysisTaskHFE(const char * name); |
dbe3abbe | 81 | AliAnalysisTaskHFE(const AliAnalysisTaskHFE &ref); |
82 | AliAnalysisTaskHFE& operator=(const AliAnalysisTaskHFE &ref); | |
faee3b18 | 83 | virtual void Copy(TObject &o) const; |
75d81601 | 84 | virtual ~AliAnalysisTaskHFE(); |
809a4336 | 85 | |
d2af20c5 | 86 | virtual void UserCreateOutputObjects(); |
87 | virtual void UserExec(Option_t *); | |
dbe3abbe | 88 | virtual void Terminate(Option_t *); |
809a4336 | 89 | |
faee3b18 | 90 | virtual Bool_t IsEventInBinZero(); |
91 | ||
75d81601 | 92 | Bool_t IsQAOn(Int_t qaLevel) const { return TESTBIT(fQAlevel, qaLevel); }; |
9bcfd1ab | 93 | Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); }; |
94 | Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); }; | |
722347d8 | 95 | Bool_t HasMCData() const { return TestBit(kHasMCdata); } |
c2690925 | 96 | Bool_t IsPbPb() const { return TestBit(kBeamType); } |
9bcfd1ab | 97 | Bool_t GetPlugin(Int_t plug) const { return TESTBIT(fPlugins, plug); }; |
3a72645a | 98 | |
99 | // Get Components for configuration | |
100 | AliHFEvarManager *GetVarManager() const { return fVarManager; } | |
bf892a6a | 101 | AliHFEpidQAmanager *GetPIDQAManager() const { return fPIDqa; } |
3a72645a | 102 | AliHFEpid *GetPID() const { return fPID; } |
103 | ||
722347d8 | 104 | void SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; }; |
3a72645a | 105 | void SetTaggedTrackCuts(AliHFEcuts * const cuts) { fTaggedTrackCuts = cuts; } |
6555e2ad | 106 | void SetCleanTaggedTrack(Bool_t clean) { fCleanTaggedTrack = clean; }; |
e3ae862b | 107 | void SetVariablesTRDTaggedTrack(Bool_t variablesTRD) { fVariablesTRDTaggedTrack = variablesTRD; }; |
e3fc062d | 108 | void SetHFECutsPreselect(AliHFEcuts * const cuts) { fCutspreselect = cuts; }; |
70da6c5a | 109 | void SetHFEElecBackGround(AliHFEelecbackground * const elecBackGround) { fElecBackGround = elecBackGround; }; |
75d81601 | 110 | void SetQAOn(Int_t qaLevel) { SETBIT(fQAlevel, qaLevel); }; |
9bcfd1ab | 111 | void SwitchOnPlugin(Int_t plug); |
722347d8 | 112 | void SetHasMCData(Bool_t hasMC = kTRUE) { SetBit(kHasMCdata, hasMC); }; |
3a72645a | 113 | void SetFillSignalOnly(Bool_t signalOnly) { fFillSignalOnly = signalOnly; } |
8c1c76e9 | 114 | |
e156c3bb | 115 | void SetFillNoCuts(Bool_t fillNoCuts) { fFillNoCuts = fillNoCuts; } |
11ff28c5 | 116 | void SetUseFlagAOD(Bool_t useFlagAOD) { fUseFlagAOD = useFlagAOD; } |
117 | void SetApplyCutAOD(Bool_t applyCutAOD) { fApplyCutAOD = applyCutAOD; } | |
118 | void SetFlags(ULong_t flags) { fFlags = flags; } | |
3a72645a | 119 | void SetRemovePileUp(Bool_t removePileUp) { fRemovePileUp = removePileUp; } |
e3fc062d | 120 | void SetPIDPreselect(AliHFEpid * const cuts) { fPIDpreselect = cuts; }; |
9bcfd1ab | 121 | void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); }; |
122 | void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); }; | |
c2690925 | 123 | void SetPbPbAnalysis(Bool_t isPbPb = kFALSE) { SetBit(kBeamType, isPbPb); }; |
11ff28c5 | 124 | void SetPbPbUserCentralityLimit(Bool_t isPbPbUserBinning = kFALSE){fPbPbUserCentralityBinning = isPbPbUserBinning; }; |
125 | void SetPbPbUserCentralityArray(Int_t icentr, Float_t valuecentr) {fCentralityLimits[icentr] = valuecentr;}; | |
8c1c76e9 | 126 | void SetPPMultiBinAnalysis(Bool_t isppMultiBin) { fisppMultiBin = isppMultiBin; }; |
127 | void SetNonHFEsystematics(Bool_t isSystematics) {fisNonHFEsystematics = isSystematics; }; | |
fd6b8522 | 128 | void SetRejectKinkMother(Bool_t rejectKinkMother = kFALSE) { fRejectKinkMother = rejectKinkMother; }; |
8c1c76e9 | 129 | void SetBackGroundFactorsFunction(const TF1 * const backGroundFactorsFunction, Int_t centralitybin=0){ |
130 | fkBackGroundFactorArray[centralitybin]=backGroundFactorsFunction; | |
131 | fBackGroundFactorApply=kTRUE; | |
132 | SetBit(kBackgroundInitialized); | |
133 | }; | |
8c1c76e9 | 134 | void SetBackgroundFactorsFromOADB(AliOADBContainer *cont) { fHadronBackgroundOADB = cont; fBackGroundFactorApply = kTRUE; } |
135 | void SetElecBackGroundFactors(Int_t iPt, Int_t iType, Int_t iCent, Int_t iError, Double_t elecBackGroundFactor) {fElecBackgroundFactor[iError][iCent][iType][iPt] = elecBackGroundFactor; }; | |
fd6b8522 | 136 | void SetBinLimits(Int_t iPt, Double_t momentum){fBinLimit[iPt] = momentum;}; |
50685501 | 137 | void PrintStatus() const; |
c2690925 | 138 | Bool_t ReadCentrality(); |
3a72645a | 139 | void RejectionPileUpVertexRangeEventCut(); |
8c1c76e9 | 140 | void SelectSpecialTrigger(const Char_t *trgclust, Int_t runMin = 0, Int_t runMax = 999999999); |
a8ef1999 | 141 | void SetDebugStreaming() {SetBit(kTreeStream);}; |
8c1c76e9 | 142 | |
dbe3abbe | 143 | private: |
50685501 | 144 | enum{ |
9bcfd1ab | 145 | kHasMCdata = BIT(19), |
c2690925 | 146 | kAODanalysis = BIT(20), |
8c1c76e9 | 147 | kBeamType = BIT(21), |
a8ef1999 | 148 | kBackgroundInitialized = BIT(22), |
149 | kTreeStream = BIT(23) | |
50685501 | 150 | }; |
78ea5ef4 | 151 | |
faee3b18 | 152 | Bool_t FillProductionVertex(const AliVParticle * const track) const; |
809a4336 | 153 | void MakeParticleContainer(); |
70da6c5a | 154 | void MakeEventContainer(); |
3a72645a | 155 | void InitPIDperformanceQA(); |
6555e2ad | 156 | void InitContaminationQA(); |
8c1c76e9 | 157 | void InitHistoITScluster(); |
158 | Bool_t InitializeHadronBackground(Int_t run); | |
159 | const Char_t *GetSpecialTrigger(Int_t run); | |
9bcfd1ab | 160 | void ProcessMC(); |
161 | void ProcessESD(); | |
162 | void ProcessAOD(); | |
e156c3bb | 163 | Int_t GetITSMultiplicity(AliVEvent *ev); |
e3fc062d | 164 | Bool_t PreSelectTrack(AliESDtrack *track) const; |
9bcfd1ab | 165 | Bool_t ProcessMCtrack(AliVParticle *track); |
3a72645a | 166 | Bool_t ProcessCutStep(Int_t cutStep, AliVParticle *track); |
75d81601 | 167 | ULong_t fQAlevel; // QA level |
9bcfd1ab | 168 | UShort_t fPlugins; // Enabled Plugins |
3a72645a | 169 | Bool_t fFillSignalOnly; // Fill container only with MC Signal Tracks |
e156c3bb | 170 | Bool_t fFillNoCuts; // Fill container before any cut |
11ff28c5 | 171 | Bool_t fUseFlagAOD; // Use the preselected AOD track |
172 | Bool_t fApplyCutAOD; // Apply the analysis cut for AOD tracks | |
173 | ULong_t fFlags; // reconstruction AOD status flags | |
8c1c76e9 | 174 | Bool_t fBackGroundFactorApply; // Apply Background Function Subtraction, MF: To be removed when transition to OADB container is finished |
3a72645a | 175 | Bool_t fRemovePileUp; // Remove Pile Up |
176 | Bool_t fIdentifiedAsPileUp; // Identified as pile-up | |
177 | Bool_t fIdentifiedAsOutInz; // Out Of Range in z | |
178 | Bool_t fPassTheEventCut; // Pass The Event Cut | |
fd6b8522 | 179 | Bool_t fRejectKinkMother; // Reject Kink Mother |
8c1c76e9 | 180 | Bool_t fisppMultiBin; // pp Multiplicity Bin analysis |
11ff28c5 | 181 | Bool_t fPbPbUserCentralityBinning; // PbPb user centrality binning |
182 | Bool_t fisNonHFEsystematics; // Non-HFE background systematics analysis | |
8c1c76e9 | 183 | AliOADBContainer *fSpecialTrigger; // Special trigger selection |
11ff28c5 | 184 | Int_t fCentralityF; // Centrality bin |
185 | Float_t fCentralityPercent; // Centrality percentile | |
c2690925 | 186 | Float_t fContributors; // Contributors |
187 | Double_t fWeightBackGround; // weight background function | |
188 | Double_t fVz; // z position of the primary vertex | |
8c1c76e9 | 189 | AliOADBContainer *fHadronBackgroundOADB; // OADB Container for hadron contamination |
190 | const TF1 *fkBackGroundFactorArray[12]; // Array of BackGround factors for each centrality bin, bin0 = min bias | |
191 | Double_t fElecBackgroundFactor[kBgLevels][kCentBins][kElecBgSpecies][kBgPtBins]; // Electron background factors | |
fd6b8522 | 192 | Double_t fBinLimit[kBgPtBins+1]; // Electron pt bin edges |
11ff28c5 | 193 | Float_t fCentralityLimits[12]; // Limits for centrality bins |
3a72645a | 194 | AliHFEcontainer *fContainer; //! The HFE container |
195 | AliHFEvarManager *fVarManager; // The var manager as the backbone of the analysis | |
196 | AliHFEsignalCuts *fSignalCuts; //! MC true signal (electron coming from certain source) | |
dbe3abbe | 197 | AliCFManager *fCFM; //! Correction Framework Manager |
69ac0e6f | 198 | AliTriggerAnalysis *fTriggerAnalysis; //! Trigger Analysis for Normalisation |
3a72645a | 199 | AliHFEpid *fPID; // PID |
bf892a6a | 200 | AliHFEpidQAmanager *fPIDqa; // PID QA |
e3fc062d | 201 | AliHFEpid *fPIDpreselect; // PID oject for pre-selected tracks (without QA) |
722347d8 | 202 | AliHFEcuts *fCuts; // Cut Collection |
3a72645a | 203 | AliHFEcuts *fTaggedTrackCuts; // Cut Collection for V0 tagged tracks |
6555e2ad | 204 | Bool_t fCleanTaggedTrack; // Loose cleaning of the V0 tagged tracks electron |
e3ae862b | 205 | Bool_t fVariablesTRDTaggedTrack; // Take the variables at the TRD for the V0 tagged tracks electron |
e3fc062d | 206 | AliHFEcuts *fCutspreselect; // Cut Collection for pre-selected tracks |
259c3296 | 207 | AliHFEsecVtx *fSecVtx; //! Secondary Vertex Analysis |
9bcfd1ab | 208 | AliHFEelecbackground *fElecBackGround;//! Background analysis |
dbe3abbe | 209 | AliHFEmcQA *fMCQA; //! MC QA |
3a72645a | 210 | AliHFEtaggedTrackAnalysis *fTaggedTrackAnalysis; //!Analyse V0-tagged tracks |
8c1c76e9 | 211 | AliHFEextraCuts *fExtraCuts; //! temporary implementation for IP QA |
3a72645a | 212 | |
213 | //-----------QA and output--------------- | |
dbe3abbe | 214 | TList *fQA; //! QA histos for the cuts |
259c3296 | 215 | TList *fOutput; //! Container for Task Output |
216 | TList *fHistMCQA; //! Output container for MC QA histograms | |
217 | TList *fHistSECVTX; //! Output container for sec. vertexing results | |
9bcfd1ab | 218 | TList *fHistELECBACKGROUND; //! Output container for electron background analysis |
69ac0e6f | 219 | AliHFEcollection *fQACollection; //! Tasks own QA collection |
3a72645a | 220 | //--------------------------------------- |
809a4336 | 221 | |
faee3b18 | 222 | ClassDef(AliAnalysisTaskHFE, 2) // The electron Analysis Task |
809a4336 | 223 | }; |
224 | #endif | |
dbe3abbe | 225 |