]>
Commit | Line | Data |
---|---|---|
76d0b522 | 1 | |
809a4336 | 2 | /************************************************************************** |
3 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * * | |
5 | * Author: The ALICE Off-line Project. * | |
6 | * Contributors are mentioned in the code where appropriate. * | |
7 | * * | |
8 | * Permission to use, copy, modify and distribute this software and its * | |
9 | * documentation strictly for non-commercial purposes is hereby granted * | |
10 | * without fee, provided that the above copyright notice appears in all * | |
11 | * copies and that both the copyright notice and this permission notice * | |
12 | * appear in the supporting documentation. The authors make no claims * | |
13 | * about the suitability of this software for any purpose. It is * | |
14 | * provided "as is" without express or implied warranty. * | |
15 | **************************************************************************/ | |
50685501 | 16 | // |
17 | // Extra Cuts from the ALICE HFE Group | |
18 | // Container for cuts which are currently not implemented by | |
19 | // the Correction Framework | |
20 | // | |
c2690925 | 21 | #ifndef ALIHFEEXTRACUTS_H |
22 | #define ALIHFEEXTRACUTS_H | |
809a4336 | 23 | |
24 | // #ifndef ALICFCUTBASE_H | |
25 | #include "AliCFCutBase.h" | |
26 | // #endif | |
27 | ||
28 | class TList; | |
29 | ||
3a72645a | 30 | class AliVEvent; |
31 | class AliVParticle; | |
32 | class AliVTrack; | |
959ea9d8 | 33 | class AliVVertex; |
34 | class AliAODVertex; | |
35 | class AliAODEvent; | |
36 | class AliESDEvent; | |
809a4336 | 37 | |
e17c1f86 | 38 | class AliHFEextraCuts: public AliCFCutBase{ |
809a4336 | 39 | public: |
40 | typedef enum{ | |
41 | kFirst = 0, | |
42 | kSecond = 1, | |
43 | kBoth = 2, | |
44 | kNone = 3, | |
e156c3bb | 45 | kAny = 4, |
46 | kExclusiveSecond = 5 | |
809a4336 | 47 | } ITSPixel_t; |
5cd679b7 | 48 | typedef enum{ |
49 | kFirstD = 0 | |
50 | } ITSDrift_t; | |
e3ae862b | 51 | typedef enum{ |
52 | kFound = 0, | |
53 | kFoundIter1 = 1, | |
76d0b522 | 54 | kCrossedRows = 2, |
55 | kFoundAll = 3 | |
e3ae862b | 56 | } ETPCclusterDef_t; |
57 | typedef enum{ | |
58 | kFoundOverFindable = 0, | |
59 | kFoundOverFindableIter1 = 1, | |
60 | kFoundOverCR = 2, | |
76d0b522 | 61 | kCROverFindable = 3, |
62 | kFoundAllOverFindable = 4, | |
e3ae862b | 63 | } ETPCclrDef_t; |
809a4336 | 64 | AliHFEextraCuts(const Char_t *name, const Char_t *title); |
65 | AliHFEextraCuts(const AliHFEextraCuts &c); | |
66 | AliHFEextraCuts &operator=(const AliHFEextraCuts &c); | |
75d81601 | 67 | virtual ~AliHFEextraCuts(); |
809a4336 | 68 | |
9eeae5d5 | 69 | virtual Bool_t IsSelected(TObject *o); |
70 | virtual Bool_t IsSelected(TList *) { return kTRUE; }; | |
3a72645a | 71 | virtual void SetRecEventInfo(const TObject *event); |
809a4336 | 72 | |
e3ae862b | 73 | inline void SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def); |
809a4336 | 74 | inline void SetRequireITSpixel(ITSPixel_t pixel); |
5cd679b7 | 75 | inline void SetRequireITSdrift(ITSDrift_t drift); |
809a4336 | 76 | inline void SetMinImpactParamR(Double_t impactParam); |
77 | inline void SetMaxImpactParamR(Double_t impactParam); | |
78 | inline void SetMinImpactParamZ(Double_t impactParam); | |
79 | inline void SetMaxImpactParamZ(Double_t impactParam); | |
63bdf450 | 80 | inline void SetMinHFEImpactParamR(Float_t ipcutParam[4], Bool_t issigmacut, Bool_t isipcharge, Bool_t isopp); |
aa1417ee | 81 | inline void SetMinTrackletsTRD(Int_t minTracklets, Bool_t exact = kFALSE); |
cedf0381 | 82 | inline void SetMaxChi2TRD(Float_t maxchi2); |
e3ae862b | 83 | inline void SetMinNClustersTPC(Int_t minclusters, ETPCclusterDef_t def); |
e17c1f86 | 84 | void SetMinNClustersTPCPID(Int_t minclusters) { SETBIT(fRequirements, kMinNClustersTPCPID); fMinNClustersTPCPID = minclusters; } |
8c1c76e9 | 85 | void SetTOFPID(Bool_t tofPid) { tofPid ? SETBIT(fRequirements, kTOFPID) : CLRBIT(fRequirements, kTOFPID); } |
86 | void SetTOFMISMATCH(Bool_t tofMismatch) { tofMismatch ? SETBIT(fRequirements, kTOFmismatch) : CLRBIT(fRequirements, kTOFmismatch); } | |
87 | void SetTPCPIDCleanUp(Bool_t tpcPIDCleanUp) { tpcPIDCleanUp ? SETBIT(fRequirements, kTPCPIDCleanUp) : CLRBIT(fRequirements, kTPCPIDCleanUp); } | |
88 | void SetMaxImpactParameterRpar(Bool_t maxImpactParameterRpar) { maxImpactParameterRpar ? SETBIT(fRequirements, kMaxImpactParameterRpar) : CLRBIT(fRequirements, kMaxImpactParameterRpar); } | |
89 | void SetFractionOfTPCSharedClusters(Double_t fractionShared) { fFractionTPCShared= fractionShared; SETBIT(fRequirements, kTPCfractionShared); } | |
11ff28c5 | 90 | void SetMinNbITScls(UChar_t minNbITScls) { fMinNbITScls = minNbITScls; SETBIT(fRequirements, kMinNbITScls); } |
1c051dd4 | 91 | void SetTOFsignalDxz(Double_t tofsignalDx,Double_t tofsignalDz) { fTOFsignalDx=tofsignalDx; fTOFsignalDz=tofsignalDz; SETBIT(fRequirements, kTOFsignalDxy); } |
11ff28c5 | 92 | void SetRejectKinkDaughter() { SETBIT(fRequirements, kRejectKinkDaughter);}; |
93 | void SetRejectKinkMother() { SETBIT(fRequirements, kRejectKinkMother);}; | |
96167a04 | 94 | void SetAODFilterBit(Int_t bit) {fAODFilterBit = bit; SETBIT(fRequirements, kAODFilterBit);}; |
75d81601 | 95 | void SetCheckITSstatus(Bool_t check) { fCheck = check; }; |
cedf0381 | 96 | void SetITSpatternCut() { SETBIT(fRequirements, kITSpattern); } |
dbe3abbe | 97 | void SetDebugLevel(Int_t level) { fDebugLevel = level; }; |
8c1c76e9 | 98 | |
99 | Bool_t GetCheckITSstatus() const { return fCheck; }; | |
dbe3abbe | 100 | Int_t GetDebugLevel() const { return fDebugLevel; }; |
63bdf450 | 101 | void GetHFEImpactParameters(const AliVTrack * const track, Double_t &dcaxy, Double_t &dcansigmaxy); // temporary moved from protected to publich for IP QA |
102 | void GetHFEImpactParameters(const AliVTrack * const track, Double_t dcaD[2], Double_t covD[3]); | |
76d0b522 | 103 | void GetImpactParameters(AliVTrack *track, Float_t &radial, Float_t &z); |
63bdf450 | 104 | const AliVVertex* RemoveDaughtersFromPrimaryVtx(const AliESDEvent * const esdevent, const AliVTrack * const track); |
105 | AliAODVertex* RemoveDaughtersFromPrimaryVtx(const AliAODEvent * const aod, const AliVTrack * const track); | |
cedf0381 | 106 | Int_t GetITSstatus(const AliVTrack * const track, Int_t layer) const; |
a8ef1999 | 107 | Bool_t CheckITSstatus(Int_t itsStatus) const; |
cedf0381 | 108 | Bool_t CheckITSpattern(const AliVTrack *const track) const; |
76d0b522 | 109 | Bool_t IsKinkDaughter(AliVTrack *track); |
4437a0d2 | 110 | Bool_t IsKinkMother(AliVTrack *track); |
111 | ||
11ff28c5 | 112 | |
113 | void UnSetRejectKinkDaughter() { CLRBIT(fRequirements, kRejectKinkDaughter);}; | |
114 | void UnSetRejectKinkMother() { CLRBIT(fRequirements, kRejectKinkMother);}; | |
115 | ||
809a4336 | 116 | |
117 | protected: | |
118 | virtual void AddQAHistograms(TList *qaList); | |
3a72645a | 119 | Bool_t CheckRecCuts(AliVTrack *track); |
120 | Bool_t CheckMCCuts(AliVParticle * /*track*/) const; | |
3a72645a | 121 | void FillQAhistosRec(AliVTrack *track, UInt_t when); |
11ff28c5 | 122 | //void FillQAhistosMC(AliMCParticle *track, UInt_t when); |
809a4336 | 123 | void FillCutCorrelation(ULong64_t survivedCut); |
dbe3abbe | 124 | void PrintBitMap(Int_t bitmap); |
809a4336 | 125 | |
3a72645a | 126 | // Getter Functions for ESD/AOD compatible mode |
e3ae862b | 127 | UInt_t GetTPCncls(AliVTrack *track); |
8c1c76e9 | 128 | Bool_t GetTPCCountSharedMapBitsAboveThreshold(AliVTrack *track); |
76d0b522 | 129 | Double_t GetTPCclusterRatio(AliVTrack *track); |
8c1c76e9 | 130 | //void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy); |
63bdf450 | 131 | void GetHFEImpactParameterCuts(const AliVTrack * const track, Double_t &hfeimpactRcut, Double_t &hfeimpactnsigmaRcut); |
132 | void GetMaxImpactParameterCutR(const AliVTrack * const track, Double_t &maximpactRcut); | |
133 | void GetTOFsignalDxDz(const AliVTrack * const track, Double_t &tofsignalDx, Double_t &tofsignalDz); | |
9250ffbf | 134 | Float_t GetTPCsharedClustersRatio(AliVTrack *track); |
cedf0381 | 135 | Float_t GetTRDchi(AliVTrack *track); |
11ff28c5 | 136 | Int_t GetITSNbOfcls(AliVTrack *track); |
3a72645a | 137 | |
809a4336 | 138 | private: |
139 | typedef enum{ | |
140 | kMinImpactParamR = 0, | |
141 | kMaxImpactParamR = 1, | |
142 | kMinImpactParamZ = 2, | |
143 | kMaxImpactParamZ = 3, | |
144 | kClusterRatioTPC = 4, | |
145 | kMinTrackletsTRD = 5, | |
146 | kPixelITS = 6, | |
3a72645a | 147 | kMinHFEImpactParamR = 7, |
148 | kMinHFEImpactParamNsigmaR = 8, | |
149 | kMinNClustersTPC = 9, | |
e17c1f86 | 150 | kMinNClustersTPCPID = 10, |
151 | kTPCfractionShared = 11, | |
152 | kTOFPID = 12, | |
153 | kTOFmismatch = 13, | |
154 | kTPCPIDCleanUp = 14, | |
155 | kEMCALmatch = 15, | |
156 | kMaxImpactParameterRpar = 16, | |
11ff28c5 | 157 | kMinNbITScls = 17, |
158 | kRejectKinkDaughter = 18, | |
159 | kRejectKinkMother = 19, | |
5cd679b7 | 160 | kDriftITS = 20, |
1c051dd4 | 161 | kTOFsignalDxy = 21, |
cedf0381 | 162 | kMaxTRDChi2 = 22, |
163 | kITSpattern = 23, | |
63bdf450 | 164 | kMinHFEImpactParamRcharge = 24, |
96167a04 | 165 | kAODFilterBit=25, |
166 | kNcuts = 26 | |
809a4336 | 167 | } Cut_t; |
168 | enum{ | |
169 | // | |
170 | // Common Constants | |
171 | // | |
172 | kBeforeCuts =0, | |
173 | kAfterCuts = 1 | |
174 | }; | |
11ff28c5 | 175 | static const Int_t fgkNQAhistos; // Number of QA histos |
e3ae862b | 176 | AliVEvent *fEvent; //! working event |
11ff28c5 | 177 | ULong64_t fCutCorrelation; // Cut Correlation |
178 | ULong64_t fRequirements; // Cut Requirements | |
179 | Float_t fImpactParamCut[4]; // Impact Parmameter Cut | |
180 | Float_t fIPcutParam[4]; // Parmameter of impact parameter cut parametrization | |
e3ae862b | 181 | UInt_t fMinNClustersTPC; // Minimum TPC clusters cut |
e17c1f86 | 182 | UInt_t fMinNClustersTPCPID; // Minimum TPC PID clusters cut |
11ff28c5 | 183 | Float_t fClusterRatioTPC; // Ratio of findable vs. found clusters in TPC |
184 | UChar_t fMinTrackletsTRD; // Min. Number of Tracklets inside TRD | |
cedf0381 | 185 | Float_t fMaxChi2TRD; // Max chi2 TRD |
11ff28c5 | 186 | UChar_t fMinNbITScls; // Min. Number of ITS clusters |
aa1417ee | 187 | Bool_t fTRDtrackletsExact; // Require exact number of tracklets |
e3ae862b | 188 | UChar_t fPixelITS; // Cut on ITS Pixels |
5cd679b7 | 189 | UChar_t fDriftITS; // Cut on ITS Drift |
e3ae862b | 190 | UChar_t fTPCclusterDef; // TPC cluster definition Bitmap |
191 | UChar_t fTPCclusterRatioDef; // TPC cluster ratio definition Bitmap | |
8c1c76e9 | 192 | Double_t fFractionTPCShared; // Cut on fraction of shared clusters |
63bdf450 | 193 | Bool_t fOppSideIPcut; // flag to use conversion peak side of ip*charge cut |
1c051dd4 | 194 | Double_t fTOFsignalDx; // TOF signal dx |
195 | Double_t fTOFsignalDz; // TOF signal dz | |
63bdf450 | 196 | Double_t fMagField; // Magnetic field |
96167a04 | 197 | Int_t fAODFilterBit; // Require AOD filter bit |
75d81601 | 198 | |
199 | Bool_t fCheck; // check | |
809a4336 | 200 | TList *fQAlist; //! Directory for QA histograms |
70da6c5a | 201 | Int_t fDebugLevel; // Debug Level |
dbe3abbe | 202 | |
1c051dd4 | 203 | ClassDef(AliHFEextraCuts, 5) // Additional cuts implemented by the ALICE HFE group |
809a4336 | 204 | }; |
205 | ||
206 | //__________________________________________________________ | |
e3ae862b | 207 | void AliHFEextraCuts::SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def) { |
809a4336 | 208 | SETBIT(fRequirements, kClusterRatioTPC); |
e3ae862b | 209 | SETBIT(fTPCclusterRatioDef, def); |
809a4336 | 210 | fClusterRatioTPC = ratio; |
211 | } | |
212 | ||
213 | //__________________________________________________________ | |
214 | void AliHFEextraCuts::SetRequireITSpixel(ITSPixel_t pixel) { | |
215 | SETBIT(fRequirements, kPixelITS); | |
216 | fPixelITS = pixel; | |
217 | } | |
218 | ||
5cd679b7 | 219 | //__________________________________________________________ |
220 | void AliHFEextraCuts::SetRequireITSdrift(ITSDrift_t drift) { | |
221 | SETBIT(fRequirements, kDriftITS); | |
222 | fDriftITS = drift; | |
223 | } | |
224 | ||
809a4336 | 225 | //__________________________________________________________ |
226 | void AliHFEextraCuts::SetMinImpactParamR(Double_t impactParam){ | |
227 | SETBIT(fRequirements, kMinImpactParamR); | |
228 | fImpactParamCut[0] = impactParam; | |
229 | } | |
230 | ||
231 | //__________________________________________________________ | |
232 | void AliHFEextraCuts::SetMaxImpactParamR(Double_t impactParam){ | |
233 | SETBIT(fRequirements, kMaxImpactParamR); | |
75d81601 | 234 | fImpactParamCut[2] = impactParam; |
809a4336 | 235 | } |
236 | ||
237 | //__________________________________________________________ | |
238 | void AliHFEextraCuts::SetMinImpactParamZ(Double_t impactParam){ | |
239 | SETBIT(fRequirements, kMinImpactParamZ); | |
75d81601 | 240 | fImpactParamCut[1] = impactParam; |
809a4336 | 241 | } |
242 | ||
243 | //__________________________________________________________ | |
244 | void AliHFEextraCuts::SetMaxImpactParamZ(Double_t impactParam){ | |
245 | SETBIT(fRequirements, kMaxImpactParamZ); | |
246 | fImpactParamCut[3] = impactParam; | |
247 | } | |
248 | ||
3a72645a | 249 | //__________________________________________________________ |
63bdf450 | 250 | void AliHFEextraCuts::SetMinHFEImpactParamR(Float_t ipcutParam[4], Bool_t isSigmacut, Bool_t isIPcharge, Bool_t isopp){ |
251 | if(isSigmacut){ SETBIT(fRequirements, kMinHFEImpactParamNsigmaR);} | |
252 | else{ | |
253 | if(isIPcharge){ SETBIT(fRequirements, kMinHFEImpactParamRcharge);} | |
254 | else {SETBIT(fRequirements, kMinHFEImpactParamR);} | |
255 | fIPcutParam[0]=ipcutParam[0]; | |
256 | fIPcutParam[1]=ipcutParam[1]; | |
257 | fIPcutParam[2]=ipcutParam[2]; | |
258 | fIPcutParam[3]=ipcutParam[3]; | |
259 | fOppSideIPcut = isopp; | |
260 | } | |
3a72645a | 261 | } |
262 | ||
809a4336 | 263 | //__________________________________________________________ |
aa1417ee | 264 | void AliHFEextraCuts::SetMinTrackletsTRD(Int_t minTracklets, Bool_t exact){ |
809a4336 | 265 | SETBIT(fRequirements, kMinTrackletsTRD); |
266 | fMinTrackletsTRD = minTracklets; | |
aa1417ee | 267 | fTRDtrackletsExact = exact; |
809a4336 | 268 | } |
3a72645a | 269 | |
cedf0381 | 270 | //__________________________________________________________ |
271 | void AliHFEextraCuts::SetMaxChi2TRD(Float_t maxchi2){ | |
272 | SETBIT(fRequirements, kMaxTRDChi2); | |
273 | fMaxChi2TRD = maxchi2; | |
274 | } | |
275 | ||
276 | ||
3a72645a | 277 | //__________________________________________________________ |
e3ae862b | 278 | void AliHFEextraCuts::SetMinNClustersTPC(Int_t minClusters, ETPCclusterDef_t tpcdef){ |
3a72645a | 279 | SETBIT(fRequirements, kMinNClustersTPC); |
e3ae862b | 280 | SETBIT(fTPCclusterDef, tpcdef); |
3a72645a | 281 | fMinNClustersTPC = minClusters; |
282 | } | |
809a4336 | 283 | #endif |