]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGDQ/dielectron/AliDielectronPID.h
including add task macro and link/builder changes for libPWGGAEMCALTask
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / AliDielectronPID.h
CommitLineData
8df8e382 1#ifndef ALIDIELECTRONPID_H
2#define ALIDIELECTRONPID_H
3
4/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//#############################################################
8//# #
9//# Class AliDielectronPID #
10//# #
11//# Authors: #
12//# Anton Andronic, GSI / A.Andronic@gsi.de #
13//# Ionut C. Arsene, GSI / I.C.Arsene@gsi.de #
14//# Julian Book, Uni Ffm / Julian.Book@cern.ch #
15//# Frederick Kramer, Uni Ffm, / Frederick.Kramer@cern.ch #
16//# Magnus Mager, CERN / Magnus.Mager@cern.ch #
17//# WooJin J. Park, GSI / W.J.Park@gsi.de #
18//# Jens Wiechula, Uni HD / Jens.Wiechula@cern.ch #
19//# #
20//#############################################################
21
22#include <AliPID.h>
8df8e382 23#include <AliAODTrack.h>
24#include <AliAODPid.h>
25
26#include <AliAnalysisCuts.h>
27
28class TF1;
8df8e382 29class TList;
164bfb53 30class AliVTrack;
48609e3d 31class TGraph;
2a14a7b1 32class AliESDpid;
33class AliAODpidUtil;
8df8e382 34
35class AliDielectronPID : public AliAnalysisCuts {
36public:
37 enum DetType {kITS, kTPC, kTRD, kTOF};
61d106d3 38 enum PIDbitTupe {kIgnore=0, kRequire, kIfAvailable};
8df8e382 39
40 AliDielectronPID();
41 AliDielectronPID(const char*name, const char* title);
42
43 virtual ~AliDielectronPID();
44
45 void AddCut(DetType det, AliPID::EParticleType type, Double_t nSigmaLow, Double_t nSigmaUp=-99999.,
61d106d3 46 Double_t pMin=0, Double_t pMax=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire);
8df8e382 47
48 void AddCut(DetType det, AliPID::EParticleType type, Double_t nSigmaLow, TF1 * const funUp,
61d106d3 49 Double_t pMin=0, Double_t pMax=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire);
8df8e382 50
51 void AddCut(DetType det, AliPID::EParticleType type, TF1 * const funLow, Double_t nSigmaUp,
61d106d3 52 Double_t pMin=0, Double_t pMax=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire);
8df8e382 53
54 void AddCut(DetType det, AliPID::EParticleType type, TF1 * const funLow, TF1 * const funUp,
61d106d3 55 Double_t pMin=0, Double_t pMax=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire);
8df8e382 56
57 void SetDefaults(Int_t def);
58
8df8e382 59 //
60 //Analysis cuts interface
61 //const
62 virtual Bool_t IsSelected(TObject* track);
63 virtual Bool_t IsSelected(TList* /* list */ ) {return kFALSE;}
48609e3d 64
65 static void SetCorrGraph(TGraph * const gr) { fgFitCorr=gr; }
66 static void SetCorrVal(Double_t run);
67 static Double_t GetCorrVal() { return fgCorr; }
68 static TGraph *GetCorrGraph() { return fgFitCorr; }
8df8e382 69
70private:
71 enum {kNmaxPID=10};
72
73 DetType fDetType[kNmaxPID]; //detector type of nsigma cut
74 AliPID::EParticleType fPartType[kNmaxPID]; //particle type
75 Float_t fNsigmaLow[kNmaxPID]; //lower nsigma bound
76 Float_t fNsigmaUp[kNmaxPID]; //upper nsigma bound
77 Double_t fPmin[kNmaxPID]; //lower momentum
78 Double_t fPmax[kNmaxPID]; //upper momentum
79 Bool_t fExclude[kNmaxPID]; //use as exclusion band
80 TF1 *fFunUpperCut[kNmaxPID];//use function as upper cut
81 TF1 *fFunLowerCut[kNmaxPID];//use function as lower cut
82 UChar_t fNcuts; //number of cuts
61d106d3 83 UChar_t fRequirePIDbit[kNmaxPID]; //How to make use of the pid bit (see)
8df8e382 84
85 AliESDpid *fESDpid; //! esd pid object
2a14a7b1 86 AliAODpidUtil *fAODpidUtil; //! AOD pid object
87
48609e3d 88 static TGraph *fgFitCorr; //spline fit object to correct the nsigma deviation in the TPC electron band
89 static Double_t fgCorr; //!correction value for current run. Set if fgFitCorr is set and SetCorrVal(run)
90 // was called
8df8e382 91
ffbede40 92 Bool_t IsSelectedITS(AliVTrack * const part, Int_t icut);
93 Bool_t IsSelectedTPC(AliVTrack * const part, Int_t icut);
94 Bool_t IsSelectedTRD(AliVTrack * const part, Int_t icut);
95 Bool_t IsSelectedTOF(AliVTrack * const part, Int_t icut);
8df8e382 96
8df8e382 97 AliDielectronPID(const AliDielectronPID &c);
98 AliDielectronPID &operator=(const AliDielectronPID &c);
99
48609e3d 100 ClassDef(AliDielectronPID,3) // Dielectron PID
8df8e382 101};
102
8df8e382 103#endif