]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnCutESD2010.h
Removed old ME classes, since the nex event mixing has been introduced and is integra...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutESD2010.h
CommitLineData
2dab9030 1//
32992791 2// *** Class AliRsnCutESD2010 ***
2dab9030 3//
32992791 4// This class implements all cuts which have to be used for the 2010 runs
5// for phi and generic resonance analysis.
6// It contains an AliESDtrackCuts object for track quality selection
7// and some criteria for particle identification with ITS, TPC and TOF.
2dab9030 8//
9// authors: Martin Vala (martin.vala@cern.ch)
10// Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
11//
12
13#ifndef ALIRSNCUTESD2010_H
14#define ALIRSNCUTESD2010_H
15
a5ccc095 16#include "AliPID.h"
32992791 17#include "AliESDtrack.h"
2dab9030 18#include "AliESDtrackCuts.h"
5faf5a07 19#include "AliESDpid.h"
2dab9030 20#include "AliRsnCut.h"
21
22class AliESDpid;
23class AliTOFT0maker;
24class AliTOFcalib;
25
2a1c7696 26class AliRsnCutESD2010 : public AliRsnCut {
27public:
28
29 AliRsnCutESD2010(const char *name = "cutESD2010", Bool_t isMC = kFALSE);
30 AliRsnCutESD2010(const AliRsnCutESD2010& copy);
31 AliRsnCutESD2010& operator=(const AliRsnCutESD2010& copy);
32 virtual ~AliRsnCutESD2010() {;};
33
34 AliESDpid* GetESDpid() {return &fESDpid;}
35 AliESDtrackCuts* GetCutsTPC() {return &fESDtrackCutsTPC;}
36 AliESDtrackCuts* GetCutsITS() {return &fESDtrackCutsITS;}
37 void CopyCutsTPC(const AliESDtrackCuts *cuts) {fESDtrackCutsTPC = (*cuts);}
38 void CopyCutsITS(const AliESDtrackCuts *cuts) {fESDtrackCutsITS = (*cuts);}
39 void CopyCutsTPC(AliESDtrackCuts cuts) {fESDtrackCutsTPC = cuts;}
40 void CopyCutsITS(AliESDtrackCuts cuts) {fESDtrackCutsITS = cuts;}
41 virtual Bool_t IsSelected(TObject *object);
42 virtual void Print(const Option_t *option = "") const;
43
44 void SetMC(Bool_t yn = kTRUE);
45 void SetCheckITS(Bool_t yn = kTRUE) {fCheckITS = yn;}
46 void SetCheckTPC(Bool_t yn = kTRUE) {fCheckTPC = yn;}
47 void SetCheckTOF(Bool_t yn = kTRUE) {fCheckTOF = yn;}
48 void SetUseITSTPC(Bool_t yn = kTRUE) {fUseITSTPC = yn;}
49 void SetUseITSSA(Bool_t yn = kTRUE) {fUseITSSA = yn;}
50 void SetPID(AliPID::EParticleType t) {fPID = t;}
51
52 void SetMaxITSPIDmom(Double_t v) {fMaxITSPIDmom = v;}
53 void SetITSband(Double_t v) {fMaxITSband = v;}
54
55 void SetTPCpLimit(Double_t v) {fTPCpLimit = v;}
56 void SetTPCrange(Double_t min, Double_t max) {fMinTPCband = min; fMaxTPCband = max;}
57 void SetTPCpar(Double_t p0, Double_t p1, Double_t p2, Double_t p3, Double_t p4)
58 {fTPCpar[0] = p0; fTPCpar[1] = p1; fTPCpar[2] = p2; fTPCpar[3] = p3; fTPCpar[4] = p4;}
59
60 void SetTOFrange(Double_t v1, Double_t v2) {fMinTOF = v1; fMaxTOF = v2;}
61 void SetOCDBDefaultStorage(TString s = "raw://") { fOCDBDefaultStorage = s;}
62
63 virtual void ProcessEvent(AliESDEvent *esd);
64
65 //static void SetTOFcalibrateESD(Bool_t yn) {fgTOFcalibrateESD = yn;}
66 static void SetTOFcorrectTExp(Bool_t yn) {fgTOFcorrectTExp = yn;}
67 static void SetTOFuseT0(Bool_t yn) {fgTOFuseT0 = yn;}
68 static void SetTOFtuneMC(Bool_t yn) {fgTOFtuneMC = yn;}
69 static void SetTOFresolution(Double_t r) {fgTOFresolution = r;}
70
71protected:
72
73 Bool_t OkQuality(AliESDtrack *d); // check track quality parameters and DCA
74 Bool_t OkITSPID(AliESDtrack *d); // check ITS PID
75 Bool_t OkTPCPID(AliESDtrack *d); // check TPC PID
76 Bool_t OkTOFPID(AliESDtrack *d); // check TOF PID
77 Bool_t IsITSTPC(AliESDtrack *d); // check that the track is TPC+ITS
78 Bool_t IsITSSA(AliESDtrack *d); // check that the track is ITS standalone
79 Bool_t MatchTOF(AliESDtrack *d); // check that the track matches the TOF
80
81 Bool_t fIsMC; // switch for MC analysis
82 Bool_t fCheckITS; // switch for ITS dE/dx check
83 Bool_t fCheckTPC; // switch for TPC dE/dx check
84 Bool_t fCheckTOF; // switch for TOF time check
85 Bool_t fUseITSTPC; // switch to use TPC global tracks
86 Bool_t fUseITSSA; // switch to use ITS standalone tracks
87 AliPID::EParticleType fPID; // PID reference type used for checks
88
89 Double_t fMaxITSPIDmom; // maximum momentum where ITS PID is used for TPC+ITS tracks
90 Double_t fMaxITSband; // range for ITS de/dx band
91
92 Double_t fTPCpLimit; // limit to choose what band to apply
93 Double_t fTPCpar[5]; // parameters for TPC bethe-Bloch
94 Double_t fMinTPCband; // range for TPC de/dx band - min
95 Double_t fMaxTPCband; // range for TPC de/dx band - max
96
97 AliESDpid fESDpid; // ESD PID object
98 AliESDtrackCuts fESDtrackCutsTPC; // ESD standard defined track cuts for TPC tracks
99 AliESDtrackCuts fESDtrackCutsITS; // ESD standard defined track cuts for ITS-SA tracks
100 Double_t fMinTOF; // range for TOF PID (min)
101 Double_t fMaxTOF; // range for TOF PID (max)
102
103 TString fOCDBDefaultStorage;// default storage for OCDB (raw://)
104
105 //static Bool_t fgTOFcalibrateESD; //! TOF settings
106 static Bool_t fgTOFcorrectTExp; //! TOF settings
107 static Bool_t fgTOFuseT0; //! TOF settings
108 static Bool_t fgTOFtuneMC; //! TOF settings
109 static Double_t fgTOFresolution; //! TOF settings
110 static AliTOFT0maker *fgTOFmaker; //! TOF time0 computator
111 static AliTOFcalib *fgTOFcalib; //! TOF calibration
112 static Int_t fgLastRun; //! last run number
113 static Int_t fgLastEventID; //! ID of last event processed
114
115 ClassDef(AliRsnCutESD2010, 1)
2dab9030 116};
117
32992791 118inline Bool_t AliRsnCutESD2010::IsITSTPC(AliESDtrack *vtrack)
119{
120//
121// Checks if the track has the status flags required for a global track
122//
123
2a1c7696 124 if (!vtrack) {
125 AliWarning("NULL argument: impossible to check status");
126 return kFALSE;
127 }
128
129 return vtrack->IsOn(AliESDtrack::kTPCin);
130
131 return kTRUE;
32992791 132}
133
134inline Bool_t AliRsnCutESD2010::IsITSSA(AliESDtrack *vtrack)
135{
136//
137// Checks if the track has the status flags required for an ITS standalone track
138//
139
2a1c7696 140 if (!vtrack) {
141 AliWarning("NULL argument: impossible to check status");
142 return kFALSE;
143 }
144
145 Bool_t isTPCin = vtrack->IsOn(AliESDtrack::kTPCin);
146 Bool_t isITSrefit = vtrack->IsOn(AliESDtrack::kITSrefit);
147 Bool_t isITSpureSA = vtrack->IsOn(AliESDtrack::kITSpureSA);
148 Bool_t isITSpid = vtrack->IsOn(AliESDtrack::kITSpid);
149
150 return ((!isTPCin) && isITSrefit && (!isITSpureSA) && isITSpid);
151
152 return kTRUE;
32992791 153}
154
155
156inline Bool_t AliRsnCutESD2010::MatchTOF(AliESDtrack *vtrack)
157{
158//
159// Checks if the track has matched the TOF detector
160//
161
2a1c7696 162 if (!vtrack) {
163 AliWarning("NULL argument: impossible to check status");
164 return kFALSE;
165 }
166
167 // require a minimum length to have meaningful match
168 if (vtrack->GetIntegratedLength() < 350.) return kFALSE;
169
170 Bool_t isTOFout = vtrack->IsOn(AliESDtrack::kTOFout);
171 Bool_t isTIME = vtrack->IsOn(AliESDtrack::kTIME);
172
173 return (isTOFout && isTIME);
174
175 return kTRUE;
32992791 176}
177
2dab9030 178#endif