]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | // | |
16 | // Extra Cuts from the ALICE HFE Group | |
17 | // Container for cuts which are currently not implemented by | |
18 | // the Correction Framework | |
19 | // | |
20 | #ifndef ALIHFEEXTRACUTS_H | |
21 | #define ALIHFEEXTRACUTS_H | |
22 | ||
23 | // #ifndef ALICFCUTBASE_H | |
24 | #include "AliCFCutBase.h" | |
25 | // #endif | |
26 | ||
27 | class TList; | |
28 | ||
29 | class AliVEvent; | |
30 | class AliVParticle; | |
31 | class AliVTrack; | |
32 | ||
33 | class AliHFEextraCuts : public AliCFCutBase{ | |
34 | public: | |
35 | typedef enum{ | |
36 | kFirst = 0, | |
37 | kSecond = 1, | |
38 | kBoth = 2, | |
39 | kNone = 3, | |
40 | kAny = 4 | |
41 | } ITSPixel_t; | |
42 | typedef enum{ | |
43 | kFound = 0, | |
44 | kFoundIter1 = 1, | |
45 | kCrossedRows = 2 | |
46 | } ETPCclusterDef_t; | |
47 | typedef enum{ | |
48 | kFoundOverFindable = 0, | |
49 | kFoundOverFindableIter1 = 1, | |
50 | kFoundOverCR = 2, | |
51 | kCROverFindable = 3 | |
52 | } ETPCclrDef_t; | |
53 | AliHFEextraCuts(const Char_t *name, const Char_t *title); | |
54 | AliHFEextraCuts(const AliHFEextraCuts &c); | |
55 | AliHFEextraCuts &operator=(const AliHFEextraCuts &c); | |
56 | virtual ~AliHFEextraCuts(); | |
57 | ||
58 | virtual Bool_t IsSelected(TObject *o); | |
59 | virtual Bool_t IsSelected(TList *) { return kTRUE; }; | |
60 | virtual void SetRecEventInfo(const TObject *event); | |
61 | ||
62 | inline void SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def); | |
63 | inline void SetRequireITSpixel(ITSPixel_t pixel); | |
64 | inline void SetMinImpactParamR(Double_t impactParam); | |
65 | inline void SetMaxImpactParamR(Double_t impactParam); | |
66 | inline void SetMinImpactParamZ(Double_t impactParam); | |
67 | inline void SetMaxImpactParamZ(Double_t impactParam); | |
68 | inline void SetMinHFEImpactParamR(); | |
69 | inline void SetMinHFEImpactParamNsigmaR(); | |
70 | inline void SetMinTrackletsTRD(Int_t minTracklets); | |
71 | inline void SetMinNClustersTPC(Int_t minclusters, ETPCclusterDef_t def); | |
72 | void SetTOFPID(Bool_t tofPid) { fTOFpid = tofPid;} | |
73 | ||
74 | void SetCheckITSstatus(Bool_t check) { fCheck = check; }; | |
75 | Bool_t GetCheckITSstatus() const { return fCheck; }; | |
76 | ||
77 | void SetDebugLevel(Int_t level) { fDebugLevel = level; }; | |
78 | Int_t GetDebugLevel() const { return fDebugLevel; }; | |
79 | ||
80 | protected: | |
81 | virtual void AddQAHistograms(TList *qaList); | |
82 | Bool_t CheckRecCuts(AliVTrack *track); | |
83 | Bool_t CheckMCCuts(AliVParticle * /*track*/) const; | |
84 | Bool_t CheckITSstatus(Int_t itsStatus) const; | |
85 | void FillQAhistosRec(AliVTrack *track, UInt_t when); | |
86 | // void FillQAhistosMC(AliMCParticle *track, UInt_t when); | |
87 | void FillCutCorrelation(ULong64_t survivedCut); | |
88 | void PrintBitMap(Int_t bitmap); | |
89 | ||
90 | // Getter Functions for ESD/AOD compatible mode | |
91 | Int_t GetTRDnTrackletsPID(AliVTrack *track); | |
92 | Int_t GetITSstatus(AliVTrack *track, Int_t layer); | |
93 | UInt_t GetTPCncls(AliVTrack *track); | |
94 | Double_t GetTPCclusterRatio(AliVTrack *track); | |
95 | void GetImpactParameters(AliVTrack *track, Float_t &radial, Float_t &z); | |
96 | void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy); | |
97 | void GetHFEImpactParameterCuts(AliVTrack *track, Double_t &hfeimpactRcut, Double_t &hfeimpactnsigmaRcut); | |
98 | ||
99 | private: | |
100 | typedef enum{ | |
101 | kMinImpactParamR = 0, | |
102 | kMaxImpactParamR = 1, | |
103 | kMinImpactParamZ = 2, | |
104 | kMaxImpactParamZ = 3, | |
105 | kClusterRatioTPC = 4, | |
106 | kMinTrackletsTRD = 5, | |
107 | kPixelITS = 6, | |
108 | kMinHFEImpactParamR = 7, | |
109 | kMinHFEImpactParamNsigmaR = 8, | |
110 | kMinNClustersTPC = 9, | |
111 | kNcuts = 10 | |
112 | } Cut_t; | |
113 | enum{ | |
114 | // | |
115 | // Common Constants | |
116 | // | |
117 | kBeforeCuts =0, | |
118 | kAfterCuts = 1 | |
119 | }; | |
120 | AliVEvent *fEvent; //! working event | |
121 | ULong64_t fCutCorrelation; // Cut Correlation | |
122 | ULong64_t fRequirements; // Cut Requirements | |
123 | Float_t fImpactParamCut[4]; // Impact Parmameter Cut | |
124 | UInt_t fMinNClustersTPC; // Minimum TPC clusters cut | |
125 | Float_t fClusterRatioTPC; // Ratio of findable vs. found clusters in TPC | |
126 | UChar_t fMinTrackletsTRD; // Min. Number of Tracklets inside TRD | |
127 | UChar_t fPixelITS; // Cut on ITS Pixels | |
128 | Bool_t fTOFpid; // TOF pid | |
129 | UChar_t fTPCclusterDef; // TPC cluster definition Bitmap | |
130 | UChar_t fTPCclusterRatioDef; // TPC cluster ratio definition Bitmap | |
131 | ||
132 | Bool_t fCheck; // check | |
133 | TList *fQAlist; //! Directory for QA histograms | |
134 | Int_t fDebugLevel; // Debug Level | |
135 | ||
136 | ClassDef(AliHFEextraCuts, 1) // Additional cuts implemented by the ALICE HFE group | |
137 | }; | |
138 | ||
139 | //__________________________________________________________ | |
140 | void AliHFEextraCuts::SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def) { | |
141 | SETBIT(fRequirements, kClusterRatioTPC); | |
142 | SETBIT(fTPCclusterRatioDef, def); | |
143 | fClusterRatioTPC = ratio; | |
144 | } | |
145 | ||
146 | //__________________________________________________________ | |
147 | void AliHFEextraCuts::SetRequireITSpixel(ITSPixel_t pixel) { | |
148 | SETBIT(fRequirements, kPixelITS); | |
149 | fPixelITS = pixel; | |
150 | } | |
151 | ||
152 | //__________________________________________________________ | |
153 | void AliHFEextraCuts::SetMinImpactParamR(Double_t impactParam){ | |
154 | SETBIT(fRequirements, kMinImpactParamR); | |
155 | fImpactParamCut[0] = impactParam; | |
156 | } | |
157 | ||
158 | //__________________________________________________________ | |
159 | void AliHFEextraCuts::SetMaxImpactParamR(Double_t impactParam){ | |
160 | SETBIT(fRequirements, kMaxImpactParamR); | |
161 | fImpactParamCut[2] = impactParam; | |
162 | } | |
163 | ||
164 | //__________________________________________________________ | |
165 | void AliHFEextraCuts::SetMinImpactParamZ(Double_t impactParam){ | |
166 | SETBIT(fRequirements, kMinImpactParamZ); | |
167 | fImpactParamCut[1] = impactParam; | |
168 | } | |
169 | ||
170 | //__________________________________________________________ | |
171 | void AliHFEextraCuts::SetMaxImpactParamZ(Double_t impactParam){ | |
172 | SETBIT(fRequirements, kMaxImpactParamZ); | |
173 | fImpactParamCut[3] = impactParam; | |
174 | } | |
175 | ||
176 | //__________________________________________________________ | |
177 | void AliHFEextraCuts::SetMinHFEImpactParamR(){ | |
178 | SETBIT(fRequirements, kMinHFEImpactParamR); | |
179 | } | |
180 | ||
181 | //__________________________________________________________ | |
182 | void AliHFEextraCuts::SetMinHFEImpactParamNsigmaR(){ | |
183 | SETBIT(fRequirements, kMinHFEImpactParamNsigmaR); | |
184 | } | |
185 | ||
186 | //__________________________________________________________ | |
187 | void AliHFEextraCuts::SetMinTrackletsTRD(Int_t minTracklets){ | |
188 | SETBIT(fRequirements, kMinTrackletsTRD); | |
189 | fMinTrackletsTRD = minTracklets; | |
190 | } | |
191 | ||
192 | //__________________________________________________________ | |
193 | void AliHFEextraCuts::SetMinNClustersTPC(Int_t minClusters, ETPCclusterDef_t tpcdef){ | |
194 | SETBIT(fRequirements, kMinNClustersTPC); | |
195 | SETBIT(fTPCclusterDef, tpcdef); | |
196 | fMinNClustersTPC = minClusters; | |
197 | } | |
198 | #endif |