]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/hfe/AliAnalysisTaskHFE.h
committing on behalf of Silvia... new macros for HFE analysis on the train (Markus
[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//
809a4336 20#ifndef ALIANALYSISTASKHFE_H
21#define ALIANALYSISTASKHFE_H
22
d2af20c5 23#ifndef ALIANALYSISTASKSE_H
24#include "AliAnalysisTaskSE.h"
dbe3abbe 25#endif
26
3a72645a 27class AliHFEcontainer;
28class AliHFEcollection;
809a4336 29class AliHFEcuts;
3a72645a 30class AliHFEelecbackground;
259c3296 31class AliHFEmcQA;
3a72645a 32class AliHFEpid;
33class AliHFEpidQAmanager;
259c3296 34class AliHFEsecVtx;
3a72645a 35class AliHFEsignalCuts;
36class AliHFEvarManager;
37class AliHFEtaggedTrackAnalysis;
809a4336 38class AliCFManager;
9bcfd1ab 39class AliVEvent;
809a4336 40class AliMCEvent;
722347d8 41class AliVParticle;
69ac0e6f 42class AliTriggerAnalysis;
809a4336 43class TH1I;
44class TList;
45
d2af20c5 46class AliAnalysisTaskHFE : public AliAnalysisTaskSE{
dbe3abbe 47 public:
9bcfd1ab 48 enum{
49 kPIDqa = 0,
50 kMCqa =1
51 };
52 enum{
53 kPriVtx = 0,
54 kSecVtx = 1,
55 kIsElecBackGround = 2,
3a72645a 56 kPostProcess = 3,
57 kDEstep = 4,
58 kTaggedTrackAnalysis = 5
9bcfd1ab 59 };
faee3b18 60 enum CreationProcess_t{
61 kSignalCharm = 0,
62 kSignalBeauty = 1,
63 kGammaConv = 2,
64 kOther = 3
65 };
dbe3abbe 66 AliAnalysisTaskHFE();
0792aa82 67 AliAnalysisTaskHFE(const char * name);
dbe3abbe 68 AliAnalysisTaskHFE(const AliAnalysisTaskHFE &ref);
69 AliAnalysisTaskHFE& operator=(const AliAnalysisTaskHFE &ref);
faee3b18 70 virtual void Copy(TObject &o) const;
75d81601 71 virtual ~AliAnalysisTaskHFE();
809a4336 72
d2af20c5 73 virtual void UserCreateOutputObjects();
74 virtual void UserExec(Option_t *);
dbe3abbe 75 virtual void Terminate(Option_t *);
809a4336 76
faee3b18 77 virtual Bool_t IsEventInBinZero();
78
75d81601 79 Bool_t IsQAOn(Int_t qaLevel) const { return TESTBIT(fQAlevel, qaLevel); };
9bcfd1ab 80 Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); };
81 Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); };
722347d8 82 Bool_t HasMCData() const { return TestBit(kHasMCdata); }
9bcfd1ab 83 Bool_t GetPlugin(Int_t plug) const { return TESTBIT(fPlugins, plug); };
3a72645a 84
85 // Get Components for configuration
86 AliHFEvarManager *GetVarManager() const { return fVarManager; }
87 AliHFEpid *GetPID() const { return fPID; }
88
722347d8 89 void SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; };
3a72645a 90 void SetTaggedTrackCuts(AliHFEcuts * const cuts) { fTaggedTrackCuts = cuts; }
6555e2ad 91 void SetCleanTaggedTrack(Bool_t clean) { fCleanTaggedTrack = clean; };
e3fc062d 92 void SetHFECutsPreselect(AliHFEcuts * const cuts) { fCutspreselect = cuts; };
70da6c5a 93 void SetHFEElecBackGround(AliHFEelecbackground * const elecBackGround) { fElecBackGround = elecBackGround; };
75d81601 94 void SetQAOn(Int_t qaLevel) { SETBIT(fQAlevel, qaLevel); };
9bcfd1ab 95 void SwitchOnPlugin(Int_t plug);
722347d8 96 void SetHasMCData(Bool_t hasMC = kTRUE) { SetBit(kHasMCdata, hasMC); };
3a72645a 97 void SetFillSignalOnly(Bool_t signalOnly) { fFillSignalOnly = signalOnly; }
98 void SetRemovePileUp(Bool_t removePileUp) { fRemovePileUp = removePileUp; }
e3fc062d 99 void SetPIDPreselect(AliHFEpid * const cuts) { fPIDpreselect = cuts; };
9bcfd1ab 100 void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); };
101 void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); };
e3fc062d 102 void SetBackGroundFactorsFunction(TF1 * const backGroundFactorsFunction) { fBackGroundFactorsFunction = backGroundFactorsFunction; };
50685501 103 void PrintStatus() const;
3a72645a 104 void ReadCentrality();
105 void RejectionPileUpVertexRangeEventCut();
dbe3abbe 106
dbe3abbe 107 private:
50685501 108 enum{
9bcfd1ab 109 kHasMCdata = BIT(19),
110 kAODanalysis = BIT(20)
50685501 111 };
78ea5ef4 112
faee3b18 113 Bool_t FillProductionVertex(const AliVParticle * const track) const;
809a4336 114 void MakeParticleContainer();
70da6c5a 115 void MakeEventContainer();
3a72645a 116 void InitPIDperformanceQA();
6555e2ad 117 void InitContaminationQA();
9bcfd1ab 118 void ProcessMC();
119 void ProcessESD();
120 void ProcessAOD();
e3fc062d 121 Bool_t PreSelectTrack(AliESDtrack *track) const;
9bcfd1ab 122 Bool_t ProcessMCtrack(AliVParticle *track);
3a72645a 123 Bool_t ProcessCutStep(Int_t cutStep, AliVParticle *track);
75d81601 124 ULong_t fQAlevel; // QA level
9bcfd1ab 125 UShort_t fPlugins; // Enabled Plugins
3a72645a 126 Bool_t fFillSignalOnly; // Fill container only with MC Signal Tracks
127 Bool_t fRemovePileUp; // Remove Pile Up
128 Bool_t fIdentifiedAsPileUp; // Identified as pile-up
129 Bool_t fIdentifiedAsOutInz; // Out Of Range in z
130 Bool_t fPassTheEventCut; // Pass The Event Cut
131 Float_t fCentralityF; // Centrality
e3fc062d 132 TF1 *fBackGroundFactorsFunction; // BackGround factors
3a72645a 133 AliHFEcontainer *fContainer; //! The HFE container
134 AliHFEvarManager *fVarManager; // The var manager as the backbone of the analysis
135 AliHFEsignalCuts *fSignalCuts; //! MC true signal (electron coming from certain source)
dbe3abbe 136 AliCFManager *fCFM; //! Correction Framework Manager
69ac0e6f 137 AliTriggerAnalysis *fTriggerAnalysis; //! Trigger Analysis for Normalisation
3a72645a 138 AliHFEpid *fPID; // PID
139 AliHFEpidQAmanager *fPIDqa; //! PID QA
e3fc062d 140 AliHFEpid *fPIDpreselect; // PID oject for pre-selected tracks (without QA)
722347d8 141 AliHFEcuts *fCuts; // Cut Collection
3a72645a 142 AliHFEcuts *fTaggedTrackCuts; // Cut Collection for V0 tagged tracks
6555e2ad 143 Bool_t fCleanTaggedTrack; // Loose cleaning of the V0 tagged tracks electron
e3fc062d 144 AliHFEcuts *fCutspreselect; // Cut Collection for pre-selected tracks
259c3296 145 AliHFEsecVtx *fSecVtx; //! Secondary Vertex Analysis
9bcfd1ab 146 AliHFEelecbackground *fElecBackGround;//! Background analysis
dbe3abbe 147 AliHFEmcQA *fMCQA; //! MC QA
3a72645a 148 AliHFEtaggedTrackAnalysis *fTaggedTrackAnalysis; //!Analyse V0-tagged tracks
149
150 //-----------QA and output---------------
dbe3abbe 151 TList *fQA; //! QA histos for the cuts
259c3296 152 TList *fOutput; //! Container for Task Output
153 TList *fHistMCQA; //! Output container for MC QA histograms
154 TList *fHistSECVTX; //! Output container for sec. vertexing results
9bcfd1ab 155 TList *fHistELECBACKGROUND; //! Output container for electron background analysis
69ac0e6f 156 AliHFEcollection *fQACollection; //! Tasks own QA collection
3a72645a 157 //---------------------------------------
809a4336 158
faee3b18 159 ClassDef(AliAnalysisTaskHFE, 2) // The electron Analysis Task
809a4336 160};
161#endif
dbe3abbe 162