]>
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); |
11ff28c5 | 110 | |
111 | void UnSetRejectKinkDaughter() { CLRBIT(fRequirements, kRejectKinkDaughter);}; | |
112 | void UnSetRejectKinkMother() { CLRBIT(fRequirements, kRejectKinkMother);}; | |
113 | ||
809a4336 | 114 | |
115 | protected: | |
116 | virtual void AddQAHistograms(TList *qaList); | |
3a72645a | 117 | Bool_t CheckRecCuts(AliVTrack *track); |
118 | Bool_t CheckMCCuts(AliVParticle * /*track*/) const; | |
3a72645a | 119 | void FillQAhistosRec(AliVTrack *track, UInt_t when); |
11ff28c5 | 120 | //void FillQAhistosMC(AliMCParticle *track, UInt_t when); |
809a4336 | 121 | void FillCutCorrelation(ULong64_t survivedCut); |
dbe3abbe | 122 | void PrintBitMap(Int_t bitmap); |
809a4336 | 123 | |
3a72645a | 124 | // Getter Functions for ESD/AOD compatible mode |
e3ae862b | 125 | UInt_t GetTPCncls(AliVTrack *track); |
8c1c76e9 | 126 | Bool_t GetTPCCountSharedMapBitsAboveThreshold(AliVTrack *track); |
76d0b522 | 127 | Double_t GetTPCclusterRatio(AliVTrack *track); |
8c1c76e9 | 128 | //void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy); |
63bdf450 | 129 | void GetHFEImpactParameterCuts(const AliVTrack * const track, Double_t &hfeimpactRcut, Double_t &hfeimpactnsigmaRcut); |
130 | void GetMaxImpactParameterCutR(const AliVTrack * const track, Double_t &maximpactRcut); | |
131 | void GetTOFsignalDxDz(const AliVTrack * const track, Double_t &tofsignalDx, Double_t &tofsignalDz); | |
9250ffbf | 132 | Float_t GetTPCsharedClustersRatio(AliVTrack *track); |
cedf0381 | 133 | Float_t GetTRDchi(AliVTrack *track); |
11ff28c5 | 134 | Int_t GetITSNbOfcls(AliVTrack *track); |
11ff28c5 | 135 | Bool_t IsKinkMother(AliVTrack *track); |
3a72645a | 136 | |
809a4336 | 137 | private: |
138 | typedef enum{ | |
139 | kMinImpactParamR = 0, | |
140 | kMaxImpactParamR = 1, | |
141 | kMinImpactParamZ = 2, | |
142 | kMaxImpactParamZ = 3, | |
143 | kClusterRatioTPC = 4, | |
144 | kMinTrackletsTRD = 5, | |
145 | kPixelITS = 6, | |
3a72645a | 146 | kMinHFEImpactParamR = 7, |
147 | kMinHFEImpactParamNsigmaR = 8, | |
148 | kMinNClustersTPC = 9, | |
e17c1f86 | 149 | kMinNClustersTPCPID = 10, |
150 | kTPCfractionShared = 11, | |
151 | kTOFPID = 12, | |
152 | kTOFmismatch = 13, | |
153 | kTPCPIDCleanUp = 14, | |
154 | kEMCALmatch = 15, | |
155 | kMaxImpactParameterRpar = 16, | |
11ff28c5 | 156 | kMinNbITScls = 17, |
157 | kRejectKinkDaughter = 18, | |
158 | kRejectKinkMother = 19, | |
5cd679b7 | 159 | kDriftITS = 20, |
1c051dd4 | 160 | kTOFsignalDxy = 21, |
cedf0381 | 161 | kMaxTRDChi2 = 22, |
162 | kITSpattern = 23, | |
63bdf450 | 163 | kMinHFEImpactParamRcharge = 24, |
96167a04 | 164 | kAODFilterBit=25, |
165 | kNcuts = 26 | |
809a4336 | 166 | } Cut_t; |
167 | enum{ | |
168 | // | |
169 | // Common Constants | |
170 | // | |
171 | kBeforeCuts =0, | |
172 | kAfterCuts = 1 | |
173 | }; | |
11ff28c5 | 174 | static const Int_t fgkNQAhistos; // Number of QA histos |
e3ae862b | 175 | AliVEvent *fEvent; //! working event |
11ff28c5 | 176 | ULong64_t fCutCorrelation; // Cut Correlation |
177 | ULong64_t fRequirements; // Cut Requirements | |
178 | Float_t fImpactParamCut[4]; // Impact Parmameter Cut | |
179 | Float_t fIPcutParam[4]; // Parmameter of impact parameter cut parametrization | |
e3ae862b | 180 | UInt_t fMinNClustersTPC; // Minimum TPC clusters cut |
e17c1f86 | 181 | UInt_t fMinNClustersTPCPID; // Minimum TPC PID clusters cut |
11ff28c5 | 182 | Float_t fClusterRatioTPC; // Ratio of findable vs. found clusters in TPC |
183 | UChar_t fMinTrackletsTRD; // Min. Number of Tracklets inside TRD | |
cedf0381 | 184 | Float_t fMaxChi2TRD; // Max chi2 TRD |
11ff28c5 | 185 | UChar_t fMinNbITScls; // Min. Number of ITS clusters |
aa1417ee | 186 | Bool_t fTRDtrackletsExact; // Require exact number of tracklets |
e3ae862b | 187 | UChar_t fPixelITS; // Cut on ITS Pixels |
5cd679b7 | 188 | UChar_t fDriftITS; // Cut on ITS Drift |
e3ae862b | 189 | UChar_t fTPCclusterDef; // TPC cluster definition Bitmap |
190 | UChar_t fTPCclusterRatioDef; // TPC cluster ratio definition Bitmap | |
8c1c76e9 | 191 | Double_t fFractionTPCShared; // Cut on fraction of shared clusters |
63bdf450 | 192 | Bool_t fOppSideIPcut; // flag to use conversion peak side of ip*charge cut |
1c051dd4 | 193 | Double_t fTOFsignalDx; // TOF signal dx |
194 | Double_t fTOFsignalDz; // TOF signal dz | |
63bdf450 | 195 | Double_t fMagField; // Magnetic field |
96167a04 | 196 | Int_t fAODFilterBit; // Require AOD filter bit |
75d81601 | 197 | |
198 | Bool_t fCheck; // check | |
809a4336 | 199 | TList *fQAlist; //! Directory for QA histograms |
70da6c5a | 200 | Int_t fDebugLevel; // Debug Level |
dbe3abbe | 201 | |
1c051dd4 | 202 | ClassDef(AliHFEextraCuts, 5) // Additional cuts implemented by the ALICE HFE group |
809a4336 | 203 | }; |
204 | ||
205 | //__________________________________________________________ | |
e3ae862b | 206 | void AliHFEextraCuts::SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def) { |
809a4336 | 207 | SETBIT(fRequirements, kClusterRatioTPC); |
e3ae862b | 208 | SETBIT(fTPCclusterRatioDef, def); |
809a4336 | 209 | fClusterRatioTPC = ratio; |
210 | } | |
211 | ||
212 | //__________________________________________________________ | |
213 | void AliHFEextraCuts::SetRequireITSpixel(ITSPixel_t pixel) { | |
214 | SETBIT(fRequirements, kPixelITS); | |
215 | fPixelITS = pixel; | |
216 | } | |
217 | ||
5cd679b7 | 218 | //__________________________________________________________ |
219 | void AliHFEextraCuts::SetRequireITSdrift(ITSDrift_t drift) { | |
220 | SETBIT(fRequirements, kDriftITS); | |
221 | fDriftITS = drift; | |
222 | } | |
223 | ||
809a4336 | 224 | //__________________________________________________________ |
225 | void AliHFEextraCuts::SetMinImpactParamR(Double_t impactParam){ | |
226 | SETBIT(fRequirements, kMinImpactParamR); | |
227 | fImpactParamCut[0] = impactParam; | |
228 | } | |
229 | ||
230 | //__________________________________________________________ | |
231 | void AliHFEextraCuts::SetMaxImpactParamR(Double_t impactParam){ | |
232 | SETBIT(fRequirements, kMaxImpactParamR); | |
75d81601 | 233 | fImpactParamCut[2] = impactParam; |
809a4336 | 234 | } |
235 | ||
236 | //__________________________________________________________ | |
237 | void AliHFEextraCuts::SetMinImpactParamZ(Double_t impactParam){ | |
238 | SETBIT(fRequirements, kMinImpactParamZ); | |
75d81601 | 239 | fImpactParamCut[1] = impactParam; |
809a4336 | 240 | } |
241 | ||
242 | //__________________________________________________________ | |
243 | void AliHFEextraCuts::SetMaxImpactParamZ(Double_t impactParam){ | |
244 | SETBIT(fRequirements, kMaxImpactParamZ); | |
245 | fImpactParamCut[3] = impactParam; | |
246 | } | |
247 | ||
3a72645a | 248 | //__________________________________________________________ |
63bdf450 | 249 | void AliHFEextraCuts::SetMinHFEImpactParamR(Float_t ipcutParam[4], Bool_t isSigmacut, Bool_t isIPcharge, Bool_t isopp){ |
250 | if(isSigmacut){ SETBIT(fRequirements, kMinHFEImpactParamNsigmaR);} | |
251 | else{ | |
252 | if(isIPcharge){ SETBIT(fRequirements, kMinHFEImpactParamRcharge);} | |
253 | else {SETBIT(fRequirements, kMinHFEImpactParamR);} | |
254 | fIPcutParam[0]=ipcutParam[0]; | |
255 | fIPcutParam[1]=ipcutParam[1]; | |
256 | fIPcutParam[2]=ipcutParam[2]; | |
257 | fIPcutParam[3]=ipcutParam[3]; | |
258 | fOppSideIPcut = isopp; | |
259 | } | |
3a72645a | 260 | } |
261 | ||
809a4336 | 262 | //__________________________________________________________ |
aa1417ee | 263 | void AliHFEextraCuts::SetMinTrackletsTRD(Int_t minTracklets, Bool_t exact){ |
809a4336 | 264 | SETBIT(fRequirements, kMinTrackletsTRD); |
265 | fMinTrackletsTRD = minTracklets; | |
aa1417ee | 266 | fTRDtrackletsExact = exact; |
809a4336 | 267 | } |
3a72645a | 268 | |
cedf0381 | 269 | //__________________________________________________________ |
270 | void AliHFEextraCuts::SetMaxChi2TRD(Float_t maxchi2){ | |
271 | SETBIT(fRequirements, kMaxTRDChi2); | |
272 | fMaxChi2TRD = maxchi2; | |
273 | } | |
274 | ||
275 | ||
3a72645a | 276 | //__________________________________________________________ |
e3ae862b | 277 | void AliHFEextraCuts::SetMinNClustersTPC(Int_t minClusters, ETPCclusterDef_t tpcdef){ |
3a72645a | 278 | SETBIT(fRequirements, kMinNClustersTPC); |
e3ae862b | 279 | SETBIT(fTPCclusterDef, tpcdef); |
3a72645a | 280 | fMinNClustersTPC = minClusters; |
281 | } | |
809a4336 | 282 | #endif |