]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/hfe/AliAnalysisTaskHFE.h
Update of the HFE package
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliAnalysisTaskHFE.h
CommitLineData
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 31class AliHFEcontainer;
32class AliHFEcollection;
809a4336 33class AliHFEcuts;
3a72645a 34class AliHFEelecbackground;
259c3296 35class AliHFEmcQA;
3a72645a 36class AliHFEpid;
37class AliHFEpidQAmanager;
259c3296 38class AliHFEsecVtx;
3a72645a 39class AliHFEsignalCuts;
40class AliHFEvarManager;
41class AliHFEtaggedTrackAnalysis;
809a4336 42class AliCFManager;
9bcfd1ab 43class AliVEvent;
809a4336 44class AliMCEvent;
722347d8 45class AliVParticle;
69ac0e6f 46class AliTriggerAnalysis;
809a4336 47class TH1I;
48class TList;
49
d2af20c5 50class AliAnalysisTaskHFE : public AliAnalysisTaskSE{
dbe3abbe 51 public:
9bcfd1ab 52 enum{
53 kPIDqa = 0,
54 kMCqa =1
55 };
56 enum{
57 kPriVtx = 0,
58 kSecVtx = 1,
59 kIsElecBackGround = 2,
3a72645a 60 kPostProcess = 3,
61 kDEstep = 4,
62 kTaggedTrackAnalysis = 5
9bcfd1ab 63 };
faee3b18 64 enum CreationProcess_t{
65 kSignalCharm = 0,
66 kSignalBeauty = 1,
67 kGammaConv = 2,
68 kOther = 3
69 };
fd6b8522 70 enum{
71 kBgPtBins = 44,
72 kElecBgSpecies = 6
73 };
74
dbe3abbe 75 AliAnalysisTaskHFE();
0792aa82 76 AliAnalysisTaskHFE(const char * name);
dbe3abbe 77 AliAnalysisTaskHFE(const AliAnalysisTaskHFE &ref);
78 AliAnalysisTaskHFE& operator=(const AliAnalysisTaskHFE &ref);
faee3b18 79 virtual void Copy(TObject &o) const;
75d81601 80 virtual ~AliAnalysisTaskHFE();
809a4336 81
d2af20c5 82 virtual void UserCreateOutputObjects();
83 virtual void UserExec(Option_t *);
dbe3abbe 84 virtual void Terminate(Option_t *);
809a4336 85
faee3b18 86 virtual Bool_t IsEventInBinZero();
87
75d81601 88 Bool_t IsQAOn(Int_t qaLevel) const { return TESTBIT(fQAlevel, qaLevel); };
9bcfd1ab 89 Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); };
90 Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); };
722347d8 91 Bool_t HasMCData() const { return TestBit(kHasMCdata); }
c2690925 92 Bool_t IsPbPb() const { return TestBit(kBeamType); }
9bcfd1ab 93 Bool_t GetPlugin(Int_t plug) const { return TESTBIT(fPlugins, plug); };
3a72645a 94
95 // Get Components for configuration
96 AliHFEvarManager *GetVarManager() const { return fVarManager; }
bf892a6a 97 AliHFEpidQAmanager *GetPIDQAManager() const { return fPIDqa; }
3a72645a 98 AliHFEpid *GetPID() const { return fPID; }
99
722347d8 100 void SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; };
3a72645a 101 void SetTaggedTrackCuts(AliHFEcuts * const cuts) { fTaggedTrackCuts = cuts; }
6555e2ad 102 void SetCleanTaggedTrack(Bool_t clean) { fCleanTaggedTrack = clean; };
e3ae862b 103 void SetVariablesTRDTaggedTrack(Bool_t variablesTRD) { fVariablesTRDTaggedTrack = variablesTRD; };
e3fc062d 104 void SetHFECutsPreselect(AliHFEcuts * const cuts) { fCutspreselect = cuts; };
70da6c5a 105 void SetHFEElecBackGround(AliHFEelecbackground * const elecBackGround) { fElecBackGround = elecBackGround; };
75d81601 106 void SetQAOn(Int_t qaLevel) { SETBIT(fQAlevel, qaLevel); };
9bcfd1ab 107 void SwitchOnPlugin(Int_t plug);
722347d8 108 void SetHasMCData(Bool_t hasMC = kTRUE) { SetBit(kHasMCdata, hasMC); };
3a72645a 109 void SetFillSignalOnly(Bool_t signalOnly) { fFillSignalOnly = signalOnly; }
e156c3bb 110 void SetFillNoCuts(Bool_t fillNoCuts) { fFillNoCuts = fillNoCuts; }
3a72645a 111 void SetRemovePileUp(Bool_t removePileUp) { fRemovePileUp = removePileUp; }
e3fc062d 112 void SetPIDPreselect(AliHFEpid * const cuts) { fPIDpreselect = cuts; };
9bcfd1ab 113 void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); };
114 void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); };
c2690925 115 void SetPbPbAnalysis(Bool_t isPbPb = kFALSE) { SetBit(kBeamType, isPbPb); };
fd6b8522 116 void SetRejectKinkMother(Bool_t rejectKinkMother = kFALSE) { fRejectKinkMother = rejectKinkMother; };
c2690925 117 void SetBackGroundFactorsFunction(TF1 * const backGroundFactorsFunction, Int_t centralitybin=0)
118 { fBackGroundFactorArray[centralitybin]=backGroundFactorsFunction;
119 fBackGroundFactorApply=kTRUE;};
fd6b8522 120 void SetElecBackGroundFactors(Int_t iPt, Int_t iType, Double_t elecBackGroundFactor) {fElecBackgroundFactor[iType][iPt] = elecBackGroundFactor; };
121 void SetBinLimits(Int_t iPt, Double_t momentum){fBinLimit[iPt] = momentum;};
50685501 122 void PrintStatus() const;
c2690925 123 Bool_t ReadCentrality();
3a72645a 124 void RejectionPileUpVertexRangeEventCut();
c2690925 125 void SelectSpecialTrigger(const Char_t *trgclust){ fHasSpecialTriggerSelection = kTRUE; fSpecialTrigger = trgclust; }
dbe3abbe 126
dbe3abbe 127 private:
50685501 128 enum{
9bcfd1ab 129 kHasMCdata = BIT(19),
c2690925 130 kAODanalysis = BIT(20),
131 kBeamType = BIT(21)
50685501 132 };
78ea5ef4 133
faee3b18 134 Bool_t FillProductionVertex(const AliVParticle * const track) const;
809a4336 135 void MakeParticleContainer();
70da6c5a 136 void MakeEventContainer();
3a72645a 137 void InitPIDperformanceQA();
6555e2ad 138 void InitContaminationQA();
9bcfd1ab 139 void ProcessMC();
140 void ProcessESD();
141 void ProcessAOD();
e156c3bb 142 Int_t GetITSMultiplicity(AliVEvent *ev);
e3fc062d 143 Bool_t PreSelectTrack(AliESDtrack *track) const;
9bcfd1ab 144 Bool_t ProcessMCtrack(AliVParticle *track);
3a72645a 145 Bool_t ProcessCutStep(Int_t cutStep, AliVParticle *track);
75d81601 146 ULong_t fQAlevel; // QA level
9bcfd1ab 147 UShort_t fPlugins; // Enabled Plugins
3a72645a 148 Bool_t fFillSignalOnly; // Fill container only with MC Signal Tracks
e156c3bb 149 Bool_t fFillNoCuts; // Fill container before any cut
c2690925 150 Bool_t fBackGroundFactorApply; // Apply Background Function Subtraction
3a72645a 151 Bool_t fRemovePileUp; // Remove Pile Up
152 Bool_t fIdentifiedAsPileUp; // Identified as pile-up
153 Bool_t fIdentifiedAsOutInz; // Out Of Range in z
154 Bool_t fPassTheEventCut; // Pass The Event Cut
c2690925 155 Bool_t fHasSpecialTriggerSelection; // Select special triggered events
fd6b8522 156 Bool_t fRejectKinkMother; // Reject Kink Mother
c2690925 157 TString fSpecialTrigger; // Special trigger selection
e156c3bb 158 Int_t fCentralityF; // Centrality
c2690925 159 Float_t fContributors; // Contributors
160 Double_t fWeightBackGround; // weight background function
161 Double_t fVz; // z position of the primary vertex
162 TF1 *fBackGroundFactorArray[12]; // Array of BackGround factors for each centrality bin, bin0 = min bias
fd6b8522 163 Double_t fElecBackgroundFactor[kElecBgSpecies][kBgPtBins]; // Electron background factors
164 Double_t fBinLimit[kBgPtBins+1]; // Electron pt bin edges
3a72645a 165 AliHFEcontainer *fContainer; //! The HFE container
166 AliHFEvarManager *fVarManager; // The var manager as the backbone of the analysis
167 AliHFEsignalCuts *fSignalCuts; //! MC true signal (electron coming from certain source)
dbe3abbe 168 AliCFManager *fCFM; //! Correction Framework Manager
69ac0e6f 169 AliTriggerAnalysis *fTriggerAnalysis; //! Trigger Analysis for Normalisation
3a72645a 170 AliHFEpid *fPID; // PID
bf892a6a 171 AliHFEpidQAmanager *fPIDqa; // PID QA
e3fc062d 172 AliHFEpid *fPIDpreselect; // PID oject for pre-selected tracks (without QA)
722347d8 173 AliHFEcuts *fCuts; // Cut Collection
3a72645a 174 AliHFEcuts *fTaggedTrackCuts; // Cut Collection for V0 tagged tracks
6555e2ad 175 Bool_t fCleanTaggedTrack; // Loose cleaning of the V0 tagged tracks electron
e3ae862b 176 Bool_t fVariablesTRDTaggedTrack; // Take the variables at the TRD for the V0 tagged tracks electron
e3fc062d 177 AliHFEcuts *fCutspreselect; // Cut Collection for pre-selected tracks
259c3296 178 AliHFEsecVtx *fSecVtx; //! Secondary Vertex Analysis
9bcfd1ab 179 AliHFEelecbackground *fElecBackGround;//! Background analysis
dbe3abbe 180 AliHFEmcQA *fMCQA; //! MC QA
3a72645a 181 AliHFEtaggedTrackAnalysis *fTaggedTrackAnalysis; //!Analyse V0-tagged tracks
182
183 //-----------QA and output---------------
dbe3abbe 184 TList *fQA; //! QA histos for the cuts
259c3296 185 TList *fOutput; //! Container for Task Output
186 TList *fHistMCQA; //! Output container for MC QA histograms
187 TList *fHistSECVTX; //! Output container for sec. vertexing results
9bcfd1ab 188 TList *fHistELECBACKGROUND; //! Output container for electron background analysis
69ac0e6f 189 AliHFEcollection *fQACollection; //! Tasks own QA collection
3a72645a 190 //---------------------------------------
809a4336 191
faee3b18 192 ClassDef(AliAnalysisTaskHFE, 2) // The electron Analysis Task
809a4336 193};
194#endif
dbe3abbe 195