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