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