1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 #ifndef ALIANALYSISTASKHFE_H
16 #define ALIANALYSISTASKHFE_H
18 #ifndef ALIANALYSISTASK_H
19 #include "AliAnalysisTask.h"
22 #ifndef ROOT_THnSparse
23 #include <THnSparse.h>
32 class AliESDtrackCuts;
37 class AliAnalysisTaskHFE : public AliAnalysisTask{
39 kIsSecVtxOn = BIT(19),
49 AliAnalysisTaskHFE(const AliAnalysisTaskHFE &ref);
50 AliAnalysisTaskHFE& operator=(const AliAnalysisTaskHFE &ref);
51 virtual ~AliAnalysisTaskHFE();
53 virtual void ConnectInputData(Option_t *);
54 virtual void CreateOutputObjects();
55 virtual void Exec(Option_t *);
56 virtual void Terminate(Option_t *);
58 Bool_t IsQAOn(Int_t qaLevel) const { return TESTBIT(fQAlevel, qaLevel); };
59 Bool_t IsSecVtxOn() const { return TestBit(kIsSecVtxOn); };
60 Bool_t IsPriVtxOn() const { return TestBit(kIsPriVtxOn); };
61 Int_t IsSignalElectron(AliESDtrack *) const;
62 void SetQAOn(Int_t qaLevel) { SETBIT(fQAlevel, qaLevel); };
63 void SetPriVtxOn() { SetBit(kIsPriVtxOn, kTRUE); };
64 void SetSecVtxOn() { SetBit(kIsSecVtxOn, kTRUE); };
65 void SetPIDdetectors(Char_t *detectors){ fPIDdetectors = detectors; }
66 void AddPIDdetector(Char_t *detector);
72 LabelContainer(Int_t capacity);
73 ~LabelContainer() {delete[] fContainer; };
75 Bool_t Append(Int_t label);
76 Bool_t Find(Int_t Label);
78 void ResetIterator(){ fCurrent = fBegin; }
81 LabelContainer(const LabelContainer &);
82 LabelContainer &operator=(const LabelContainer &);
83 Int_t *fContainer; // the Container for the labels
84 Int_t *fBegin; // Pointer to the first entry
85 Int_t *fEnd; // Pointer to the end of the container
86 Int_t *fLast; // Pointer to the last entry
87 Int_t *fCurrent; // Current entry to mimic an iterator
89 void MakeParticleContainer();
91 ULong_t fQAlevel; // QA level
92 TString fPIDdetectors; // Detectors for Particle Identification
93 AliESDEvent *fESD; //! The ESD Event
94 AliMCEvent *fMC; //! The MC Event
95 AliCFManager *fCFM; //! Correction Framework Manager
96 TList *fCorrelation; //! response matrix for unfolding
97 THnSparseF *fPIDperformance; //! info on contamination and yield of electron spectra
98 AliHFEpid *fPID; //! PID
99 AliHFEcuts *fCuts; //! Cut Collection
100 AliHFEsecVtx *fSecVtx; //! Secondary Vertex Analysis
101 AliHFEmcQA *fMCQA; //! MC QA
102 TH1I *fNEvents; //! counter for the number of Events
103 TH1I *fNElectronTracksEvent; //! Number of Electron candidates after PID decision per Event
104 TList *fQA; //! QA histos for the cuts
105 TList *fOutput; //! Container for Task Output
106 TList *fHistMCQA; //! Output container for MC QA histograms
107 TList *fHistSECVTX; //! Output container for sec. vertexing results
109 ClassDef(AliAnalysisTaskHFE, 1) // The electron Analysis Task