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