]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGDQ/dielectron/AliDielectronPID.h
Adopted MyLibs
[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; }
67 static void SetCorrVal(Double_t run);
68 static Double_t GetCorrVal() { return fgCorr; }
69 static TGraph *GetCorrGraph() { return fgFitCorr; }
5720c765 70
71 static void SetEtaCorrFunction(TF1 *fun) {fgFunEtaCorr=fun;}
72 static TF1* GetEtaCorrFunction() { return fgFunEtaCorr; }
73
74 static Double_t GetEtaCorr(AliVTrack *track);
75
8df8e382 76private:
77 enum {kNmaxPID=10};
5720c765 78
8df8e382 79 DetType fDetType[kNmaxPID]; //detector type of nsigma cut
80 AliPID::EParticleType fPartType[kNmaxPID]; //particle type
81 Float_t fNsigmaLow[kNmaxPID]; //lower nsigma bound
82 Float_t fNsigmaUp[kNmaxPID]; //upper nsigma bound
5720c765 83 Double_t fmin[kNmaxPID]; //lower cut limit
84 Double_t fmax[kNmaxPID]; //upper cut limit
8df8e382 85 Bool_t fExclude[kNmaxPID]; //use as exclusion band
86 TF1 *fFunUpperCut[kNmaxPID];//use function as upper cut
87 TF1 *fFunLowerCut[kNmaxPID];//use function as lower cut
88 UChar_t fNcuts; //number of cuts
61d106d3 89 UChar_t fRequirePIDbit[kNmaxPID]; //How to make use of the pid bit (see)
5720c765 90 UShort_t fActiveCuts[kNmaxPID]; // list of activated cuts
8df8e382 91
5720c765 92 AliPIDResponse *fPIDResponse; //! pid response object
2a14a7b1 93
48609e3d 94 static TGraph *fgFitCorr; //spline fit object to correct the nsigma deviation in the TPC electron band
95 static Double_t fgCorr; //!correction value for current run. Set if fgFitCorr is set and SetCorrVal(run)
96 // was called
5720c765 97 static TF1 *fgFunEtaCorr; //function for eta correction of electron sigma
8df8e382 98
ffbede40 99 Bool_t IsSelectedITS(AliVTrack * const part, Int_t icut);
100 Bool_t IsSelectedTPC(AliVTrack * const part, Int_t icut);
101 Bool_t IsSelectedTRD(AliVTrack * const part, Int_t icut);
5720c765 102 Bool_t IsSelectedTRDeleEff(AliVTrack * const part, Int_t icut);
ffbede40 103 Bool_t IsSelectedTOF(AliVTrack * const part, Int_t icut);
5720c765 104 Bool_t IsSelectedEMCAL(AliVTrack * const part, Int_t icut);
8df8e382 105
8df8e382 106 AliDielectronPID(const AliDielectronPID &c);
107 AliDielectronPID &operator=(const AliDielectronPID &c);
108
48609e3d 109 ClassDef(AliDielectronPID,3) // Dielectron PID
8df8e382 110};
111
8df8e382 112#endif