]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/hfe/AliAnalysisTaskHFE.h
correct compilation warning
[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**************************************************************************/
15#ifndef ALIANALYSISTASKHFE_H
16#define ALIANALYSISTASKHFE_H
17
dbe3abbe 18#ifndef ALIANALYSISTASK_H
809a4336 19#include "AliAnalysisTask.h"
dbe3abbe 20#endif
21
22#ifndef ROOT_THnSparse
23#include <THnSparse.h>
24#endif
809a4336 25
26class AliHFEpid;
27class AliHFEcuts;
259c3296 28class AliHFEmcQA;
29class AliHFEsecVtx;
809a4336 30class AliCFManager;
31class AliESDEvent;
32class AliESDtrackCuts;
33class AliMCEvent;
722347d8 34class AliVParticle;
809a4336 35class TH1I;
36class TList;
37
38class AliAnalysisTaskHFE : public AliAnalysisTask{
39 enum{
75d81601 40 kIsSecVtxOn = BIT(19),
6ad05e72 41 kIsPriVtxOn = BIT(20),
722347d8 42 kIsRunningPostProcess = BIT(21),
43 kHasMCdata = BIT(22)
809a4336 44 };
dbe3abbe 45 public:
75d81601 46 enum{
47 kPIDqa = 0,
722347d8 48 kMCqa =1
75d81601 49 };
dbe3abbe 50 AliAnalysisTaskHFE();
51 AliAnalysisTaskHFE(const AliAnalysisTaskHFE &ref);
52 AliAnalysisTaskHFE& operator=(const AliAnalysisTaskHFE &ref);
75d81601 53 virtual ~AliAnalysisTaskHFE();
809a4336 54
dbe3abbe 55 virtual void ConnectInputData(Option_t *);
56 virtual void CreateOutputObjects();
57 virtual void Exec(Option_t *);
58 virtual void Terminate(Option_t *);
809a4336 59
75d81601 60 Bool_t IsQAOn(Int_t qaLevel) const { return TESTBIT(fQAlevel, qaLevel); };
259c3296 61 Bool_t IsSecVtxOn() const { return TestBit(kIsSecVtxOn); };
dbe3abbe 62 Bool_t IsPriVtxOn() const { return TestBit(kIsPriVtxOn); };
6ad05e72 63 Bool_t IsRunningPostProcess() const { return TestBit(kIsRunningPostProcess); };
722347d8 64 Bool_t HasMCData() const { return TestBit(kHasMCdata); }
65 Int_t IsSignalElectron(AliVParticle *fTrack) const;
6ad05e72 66 void Load(TString filename = "HFEtask.root");
67 void PostProcess();
722347d8 68 void SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; };
75d81601 69 void SetQAOn(Int_t qaLevel) { SETBIT(fQAlevel, qaLevel); };
722347d8 70 void SetHasMCData(Bool_t hasMC = kTRUE) { SetBit(kHasMCdata, hasMC); };
6ad05e72 71 void SetPriVtxOn(Bool_t option = kTRUE) { SetBit(kIsPriVtxOn, option); };
72 void SetSecVtxOn(Bool_t option = kTRUE) { SetBit(kIsSecVtxOn, option); };
73 void SetRunPostProcess(Bool_t option = kTRUE) { SetBit(kIsRunningPostProcess, option); };
75d81601 74 void SetPIDdetectors(Char_t *detectors){ fPIDdetectors = detectors; }
75 void AddPIDdetector(Char_t *detector);
76 void PrintStatus();
722347d8 77 Float_t GetRapidity(TParticle *part);
dbe3abbe 78
dbe3abbe 79 private:
78ea5ef4 80 class LabelContainer{
81 public:
82 LabelContainer(Int_t capacity);
83 ~LabelContainer() {delete[] fContainer; };
84
85 Bool_t Append(Int_t label);
86 Bool_t Find(Int_t Label);
87 Int_t Next();
88 void ResetIterator(){ fCurrent = fBegin; }
89
90 private:
91 LabelContainer(const LabelContainer &);
92 LabelContainer &operator=(const LabelContainer &);
93 Int_t *fContainer; // the Container for the labels
94 Int_t *fBegin; // Pointer to the first entry
95 Int_t *fEnd; // Pointer to the end of the container
96 Int_t *fLast; // Pointer to the last entry
97 Int_t *fCurrent; // Current entry to mimic an iterator
98 };
809a4336 99 void MakeParticleContainer();
75d81601 100
101 ULong_t fQAlevel; // QA level
102 TString fPIDdetectors; // Detectors for Particle Identification
dbe3abbe 103 AliESDEvent *fESD; //! The ESD Event
104 AliMCEvent *fMC; //! The MC Event
105 AliCFManager *fCFM; //! Correction Framework Manager
78ea5ef4 106 TList *fCorrelation; //! response matrix for unfolding
107 THnSparseF *fPIDperformance; //! info on contamination and yield of electron spectra
dbe3abbe 108 AliHFEpid *fPID; //! PID
722347d8 109 AliHFEcuts *fCuts; // Cut Collection
259c3296 110 AliHFEsecVtx *fSecVtx; //! Secondary Vertex Analysis
dbe3abbe 111 AliHFEmcQA *fMCQA; //! MC QA
112 TH1I *fNEvents; //! counter for the number of Events
75d81601 113 TH1I *fNElectronTracksEvent; //! Number of Electron candidates after PID decision per Event
dbe3abbe 114 TList *fQA; //! QA histos for the cuts
259c3296 115 TList *fOutput; //! Container for Task Output
116 TList *fHistMCQA; //! Output container for MC QA histograms
117 TList *fHistSECVTX; //! Output container for sec. vertexing results
809a4336 118
dbe3abbe 119 ClassDef(AliAnalysisTaskHFE, 1) // The electron Analysis Task
809a4336 120};
121#endif
dbe3abbe 122