]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGDQ/dielectron/AliDielectronPID.h
For the THnSparse data members limit the statistic in the merging
[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 <AliAnalysisCuts.h>
24
25class TF1;
8df8e382 26class TList;
164bfb53 27class AliVTrack;
48609e3d 28class TGraph;
5720c765 29class AliPIDResponse;
30class AliDielectronVarManager;
8df8e382 31
32class AliDielectronPID : public AliAnalysisCuts {
33public:
5720c765 34 enum DetType {kITS, kTPC, kTRD, kTRDeleEff, kTOF, kEMCAL};
35 enum PIDbitType {kIgnore=0, kRequire, kIfAvailable};
8df8e382 36
37 AliDielectronPID();
38 AliDielectronPID(const char*name, const char* title);
39
40 virtual ~AliDielectronPID();
41
42 void AddCut(DetType det, AliPID::EParticleType type, Double_t nSigmaLow, Double_t nSigmaUp=-99999.,
5720c765 43 Double_t min=0, Double_t max=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire,
44 Int_t var=-1);
8df8e382 45
46 void AddCut(DetType det, AliPID::EParticleType type, Double_t nSigmaLow, TF1 * const funUp,
5720c765 47 Double_t min=0, Double_t max=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire,
48 Int_t var=-1);
8df8e382 49
50 void AddCut(DetType det, AliPID::EParticleType type, TF1 * const funLow, Double_t nSigmaUp,
5720c765 51 Double_t min=0, Double_t max=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire,
52 Int_t var=-1);
8df8e382 53
54 void AddCut(DetType det, AliPID::EParticleType type, TF1 * const funLow, TF1 * const funUp,
5720c765 55 Double_t min=0, Double_t max=0, Bool_t exclude=kFALSE, UInt_t pidBitType=AliDielectronPID::kRequire,
56 Int_t var=-1);
8df8e382 57
58 void SetDefaults(Int_t def);
59
8df8e382 60 //
61 //Analysis cuts interface
62 //const
63 virtual Bool_t IsSelected(TObject* track);
64 virtual Bool_t IsSelected(TList* /* list */ ) {return kFALSE;}
48609e3d 65
66 static void SetCorrGraph(TGraph * const gr) { fgFitCorr=gr; }
d327d9cd 67 static TGraph *GetCorrGraph() { return fgFitCorr; }
68
48609e3d 69 static void SetCorrVal(Double_t run);
70 static Double_t GetCorrVal() { return fgCorr; }
d327d9cd 71 static Double_t GetCorrValdEdx() { return fgCorrdEdx; }
72
73 static void SetCorrGraphdEdx(TGraph * const gr) { fgdEdxRunCorr=gr; }
74 static TGraph *GetCorrGraphdEdx() { return fgdEdxRunCorr; }
5720c765 75
76 static void SetEtaCorrFunction(TF1 *fun) {fgFunEtaCorr=fun;}
77 static TF1* GetEtaCorrFunction() { return fgFunEtaCorr; }
78
79 static Double_t GetEtaCorr(AliVTrack *track);
80
8df8e382 81private:
82 enum {kNmaxPID=10};
5720c765 83
8df8e382 84 DetType fDetType[kNmaxPID]; //detector type of nsigma cut
85 AliPID::EParticleType fPartType[kNmaxPID]; //particle type
86 Float_t fNsigmaLow[kNmaxPID]; //lower nsigma bound
87 Float_t fNsigmaUp[kNmaxPID]; //upper nsigma bound
5720c765 88 Double_t fmin[kNmaxPID]; //lower cut limit
89 Double_t fmax[kNmaxPID]; //upper cut limit
8df8e382 90 Bool_t fExclude[kNmaxPID]; //use as exclusion band
91 TF1 *fFunUpperCut[kNmaxPID];//use function as upper cut
92 TF1 *fFunLowerCut[kNmaxPID];//use function as lower cut
93 UChar_t fNcuts; //number of cuts
61d106d3 94 UChar_t fRequirePIDbit[kNmaxPID]; //How to make use of the pid bit (see)
5720c765 95 UShort_t fActiveCuts[kNmaxPID]; // list of activated cuts
8df8e382 96
5720c765 97 AliPIDResponse *fPIDResponse; //! pid response object
2a14a7b1 98
48609e3d 99 static TGraph *fgFitCorr; //spline fit object to correct the nsigma deviation in the TPC electron band
100 static Double_t fgCorr; //!correction value for current run. Set if fgFitCorr is set and SetCorrVal(run)
101 // was called
d327d9cd 102 static Double_t fgCorrdEdx; //!dEdx correction value for current run. Set if fgFitCorr is set and SetCorrVal(run)
103 // was called
5720c765 104 static TF1 *fgFunEtaCorr; //function for eta correction of electron sigma
d327d9cd 105 static TGraph *fgdEdxRunCorr; //run by run correction for dEdx
8df8e382 106
ffbede40 107 Bool_t IsSelectedITS(AliVTrack * const part, Int_t icut);
108 Bool_t IsSelectedTPC(AliVTrack * const part, Int_t icut);
109 Bool_t IsSelectedTRD(AliVTrack * const part, Int_t icut);
5720c765 110 Bool_t IsSelectedTRDeleEff(AliVTrack * const part, Int_t icut);
ffbede40 111 Bool_t IsSelectedTOF(AliVTrack * const part, Int_t icut);
5720c765 112 Bool_t IsSelectedEMCAL(AliVTrack * const part, Int_t icut);
8df8e382 113
8df8e382 114 AliDielectronPID(const AliDielectronPID &c);
115 AliDielectronPID &operator=(const AliDielectronPID &c);
116
48609e3d 117 ClassDef(AliDielectronPID,3) // Dielectron PID
8df8e382 118};
119
8df8e382 120#endif