]>
Commit | Line | Data |
---|---|---|
809a4336 | 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 | **************************************************************************/ | |
50685501 | 15 | // |
16 | // Extra Cuts from the ALICE HFE Group | |
17 | // Container for cuts which are currently not implemented by | |
18 | // the Correction Framework | |
19 | // | |
c2690925 | 20 | #ifndef ALIHFEEXTRACUTS_H |
21 | #define ALIHFEEXTRACUTS_H | |
809a4336 | 22 | |
23 | // #ifndef ALICFCUTBASE_H | |
24 | #include "AliCFCutBase.h" | |
25 | // #endif | |
26 | ||
27 | class TList; | |
28 | ||
3a72645a | 29 | class AliVEvent; |
30 | class AliVParticle; | |
31 | class AliVTrack; | |
809a4336 | 32 | |
e17c1f86 | 33 | class AliHFEextraCuts: public AliCFCutBase{ |
809a4336 | 34 | public: |
35 | typedef enum{ | |
36 | kFirst = 0, | |
37 | kSecond = 1, | |
38 | kBoth = 2, | |
39 | kNone = 3, | |
e156c3bb | 40 | kAny = 4, |
41 | kExclusiveSecond = 5 | |
809a4336 | 42 | } ITSPixel_t; |
e3ae862b | 43 | typedef enum{ |
44 | kFound = 0, | |
45 | kFoundIter1 = 1, | |
46 | kCrossedRows = 2 | |
47 | } ETPCclusterDef_t; | |
48 | typedef enum{ | |
49 | kFoundOverFindable = 0, | |
50 | kFoundOverFindableIter1 = 1, | |
51 | kFoundOverCR = 2, | |
52 | kCROverFindable = 3 | |
53 | } ETPCclrDef_t; | |
809a4336 | 54 | AliHFEextraCuts(const Char_t *name, const Char_t *title); |
55 | AliHFEextraCuts(const AliHFEextraCuts &c); | |
56 | AliHFEextraCuts &operator=(const AliHFEextraCuts &c); | |
75d81601 | 57 | virtual ~AliHFEextraCuts(); |
809a4336 | 58 | |
9eeae5d5 | 59 | virtual Bool_t IsSelected(TObject *o); |
60 | virtual Bool_t IsSelected(TList *) { return kTRUE; }; | |
3a72645a | 61 | virtual void SetRecEventInfo(const TObject *event); |
809a4336 | 62 | |
e3ae862b | 63 | inline void SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def); |
809a4336 | 64 | inline void SetRequireITSpixel(ITSPixel_t pixel); |
65 | inline void SetMinImpactParamR(Double_t impactParam); | |
66 | inline void SetMaxImpactParamR(Double_t impactParam); | |
67 | inline void SetMinImpactParamZ(Double_t impactParam); | |
68 | inline void SetMaxImpactParamZ(Double_t impactParam); | |
c2690925 | 69 | inline void SetMinHFEImpactParamR(Float_t ipcutParam[4], Bool_t issigmacut); |
aa1417ee | 70 | inline void SetMinTrackletsTRD(Int_t minTracklets, Bool_t exact = kFALSE); |
e3ae862b | 71 | inline void SetMinNClustersTPC(Int_t minclusters, ETPCclusterDef_t def); |
e17c1f86 | 72 | void SetMinNClustersTPCPID(Int_t minclusters) { SETBIT(fRequirements, kMinNClustersTPCPID); fMinNClustersTPCPID = minclusters; } |
8c1c76e9 | 73 | void SetTOFPID(Bool_t tofPid) { tofPid ? SETBIT(fRequirements, kTOFPID) : CLRBIT(fRequirements, kTOFPID); } |
74 | void SetTOFMISMATCH(Bool_t tofMismatch) { tofMismatch ? SETBIT(fRequirements, kTOFmismatch) : CLRBIT(fRequirements, kTOFmismatch); } | |
75 | void SetTPCPIDCleanUp(Bool_t tpcPIDCleanUp) { tpcPIDCleanUp ? SETBIT(fRequirements, kTPCPIDCleanUp) : CLRBIT(fRequirements, kTPCPIDCleanUp); } | |
76 | void SetMaxImpactParameterRpar(Bool_t maxImpactParameterRpar) { maxImpactParameterRpar ? SETBIT(fRequirements, kMaxImpactParameterRpar) : CLRBIT(fRequirements, kMaxImpactParameterRpar); } | |
77 | void SetFractionOfTPCSharedClusters(Double_t fractionShared) { fFractionTPCShared= fractionShared; SETBIT(fRequirements, kTPCfractionShared); } | |
dbe3abbe | 78 | |
75d81601 | 79 | void SetCheckITSstatus(Bool_t check) { fCheck = check; }; |
dbe3abbe | 80 | void SetDebugLevel(Int_t level) { fDebugLevel = level; }; |
8c1c76e9 | 81 | |
82 | Bool_t GetCheckITSstatus() const { return fCheck; }; | |
dbe3abbe | 83 | Int_t GetDebugLevel() const { return fDebugLevel; }; |
8c1c76e9 | 84 | void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy); // temporary moved from protected to publich for IP QA |
a8ef1999 | 85 | Int_t GetITSstatus(AliVTrack *track, Int_t layer); |
86 | Bool_t CheckITSstatus(Int_t itsStatus) const; | |
809a4336 | 87 | |
88 | protected: | |
89 | virtual void AddQAHistograms(TList *qaList); | |
3a72645a | 90 | Bool_t CheckRecCuts(AliVTrack *track); |
91 | Bool_t CheckMCCuts(AliVParticle * /*track*/) const; | |
3a72645a | 92 | void FillQAhistosRec(AliVTrack *track, UInt_t when); |
809a4336 | 93 | // void FillQAhistosMC(AliMCParticle *track, UInt_t when); |
94 | void FillCutCorrelation(ULong64_t survivedCut); | |
dbe3abbe | 95 | void PrintBitMap(Int_t bitmap); |
809a4336 | 96 | |
3a72645a | 97 | // Getter Functions for ESD/AOD compatible mode |
e3ae862b | 98 | UInt_t GetTPCncls(AliVTrack *track); |
8c1c76e9 | 99 | UInt_t GetTPCnclusdEdx(AliVTrack *track); |
100 | Bool_t GetTPCCountSharedMapBitsAboveThreshold(AliVTrack *track); | |
e3ae862b | 101 | Double_t GetTPCclusterRatio(AliVTrack *track); |
3a72645a | 102 | void GetImpactParameters(AliVTrack *track, Float_t &radial, Float_t &z); |
8c1c76e9 | 103 | //void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy); |
3a72645a | 104 | void GetHFEImpactParameterCuts(AliVTrack *track, Double_t &hfeimpactRcut, Double_t &hfeimpactnsigmaRcut); |
9250ffbf | 105 | void GetMaxImpactParameterCutR(AliVTrack *track, Double_t &maximpactRcut); |
106 | Float_t GetTPCsharedClustersRatio(AliVTrack *track); | |
3a72645a | 107 | |
809a4336 | 108 | private: |
109 | typedef enum{ | |
110 | kMinImpactParamR = 0, | |
111 | kMaxImpactParamR = 1, | |
112 | kMinImpactParamZ = 2, | |
113 | kMaxImpactParamZ = 3, | |
114 | kClusterRatioTPC = 4, | |
115 | kMinTrackletsTRD = 5, | |
116 | kPixelITS = 6, | |
3a72645a | 117 | kMinHFEImpactParamR = 7, |
118 | kMinHFEImpactParamNsigmaR = 8, | |
119 | kMinNClustersTPC = 9, | |
e17c1f86 | 120 | kMinNClustersTPCPID = 10, |
121 | kTPCfractionShared = 11, | |
122 | kTOFPID = 12, | |
123 | kTOFmismatch = 13, | |
124 | kTPCPIDCleanUp = 14, | |
125 | kEMCALmatch = 15, | |
126 | kMaxImpactParameterRpar = 16, | |
127 | kNcuts = 17 | |
809a4336 | 128 | } Cut_t; |
129 | enum{ | |
130 | // | |
131 | // Common Constants | |
132 | // | |
133 | kBeforeCuts =0, | |
134 | kAfterCuts = 1 | |
135 | }; | |
8c1c76e9 | 136 | static const Int_t fgkNQAhistos; // Number of QA histos |
e3ae862b | 137 | AliVEvent *fEvent; //! working event |
138 | ULong64_t fCutCorrelation; // Cut Correlation | |
139 | ULong64_t fRequirements; // Cut Requirements | |
140 | Float_t fImpactParamCut[4]; // Impact Parmameter Cut | |
c2690925 | 141 | Float_t fIPcutParam[4]; // Parmameter of impact parameter cut parametrization |
e3ae862b | 142 | UInt_t fMinNClustersTPC; // Minimum TPC clusters cut |
e17c1f86 | 143 | UInt_t fMinNClustersTPCPID; // Minimum TPC PID clusters cut |
e3ae862b | 144 | Float_t fClusterRatioTPC; // Ratio of findable vs. found clusters in TPC |
145 | UChar_t fMinTrackletsTRD; // Min. Number of Tracklets inside TRD | |
aa1417ee | 146 | Bool_t fTRDtrackletsExact; // Require exact number of tracklets |
e3ae862b | 147 | UChar_t fPixelITS; // Cut on ITS Pixels |
e3ae862b | 148 | UChar_t fTPCclusterDef; // TPC cluster definition Bitmap |
149 | UChar_t fTPCclusterRatioDef; // TPC cluster ratio definition Bitmap | |
8c1c76e9 | 150 | Double_t fFractionTPCShared; // Cut on fraction of shared clusters |
75d81601 | 151 | |
152 | Bool_t fCheck; // check | |
809a4336 | 153 | TList *fQAlist; //! Directory for QA histograms |
70da6c5a | 154 | Int_t fDebugLevel; // Debug Level |
dbe3abbe | 155 | |
809a4336 | 156 | ClassDef(AliHFEextraCuts, 1) // Additional cuts implemented by the ALICE HFE group |
157 | }; | |
158 | ||
159 | //__________________________________________________________ | |
e3ae862b | 160 | void AliHFEextraCuts::SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def) { |
809a4336 | 161 | SETBIT(fRequirements, kClusterRatioTPC); |
e3ae862b | 162 | SETBIT(fTPCclusterRatioDef, def); |
809a4336 | 163 | fClusterRatioTPC = ratio; |
164 | } | |
165 | ||
166 | //__________________________________________________________ | |
167 | void AliHFEextraCuts::SetRequireITSpixel(ITSPixel_t pixel) { | |
168 | SETBIT(fRequirements, kPixelITS); | |
169 | fPixelITS = pixel; | |
170 | } | |
171 | ||
172 | //__________________________________________________________ | |
173 | void AliHFEextraCuts::SetMinImpactParamR(Double_t impactParam){ | |
174 | SETBIT(fRequirements, kMinImpactParamR); | |
175 | fImpactParamCut[0] = impactParam; | |
176 | } | |
177 | ||
178 | //__________________________________________________________ | |
179 | void AliHFEextraCuts::SetMaxImpactParamR(Double_t impactParam){ | |
180 | SETBIT(fRequirements, kMaxImpactParamR); | |
75d81601 | 181 | fImpactParamCut[2] = impactParam; |
809a4336 | 182 | } |
183 | ||
184 | //__________________________________________________________ | |
185 | void AliHFEextraCuts::SetMinImpactParamZ(Double_t impactParam){ | |
186 | SETBIT(fRequirements, kMinImpactParamZ); | |
75d81601 | 187 | fImpactParamCut[1] = impactParam; |
809a4336 | 188 | } |
189 | ||
190 | //__________________________________________________________ | |
191 | void AliHFEextraCuts::SetMaxImpactParamZ(Double_t impactParam){ | |
192 | SETBIT(fRequirements, kMaxImpactParamZ); | |
193 | fImpactParamCut[3] = impactParam; | |
194 | } | |
195 | ||
3a72645a | 196 | //__________________________________________________________ |
c2690925 | 197 | void AliHFEextraCuts::SetMinHFEImpactParamR(Float_t ipcutParam[4], Bool_t isSigmacut){ |
198 | if(isSigmacut) SETBIT(fRequirements, kMinHFEImpactParamNsigmaR); | |
199 | else SETBIT(fRequirements, kMinHFEImpactParamR); | |
200 | fIPcutParam[0]=ipcutParam[0]; | |
201 | fIPcutParam[1]=ipcutParam[1]; | |
202 | fIPcutParam[2]=ipcutParam[2]; | |
203 | fIPcutParam[3]=ipcutParam[3]; | |
3a72645a | 204 | } |
205 | ||
809a4336 | 206 | //__________________________________________________________ |
aa1417ee | 207 | void AliHFEextraCuts::SetMinTrackletsTRD(Int_t minTracklets, Bool_t exact){ |
809a4336 | 208 | SETBIT(fRequirements, kMinTrackletsTRD); |
209 | fMinTrackletsTRD = minTracklets; | |
aa1417ee | 210 | fTRDtrackletsExact = exact; |
809a4336 | 211 | } |
3a72645a | 212 | |
213 | //__________________________________________________________ | |
e3ae862b | 214 | void AliHFEextraCuts::SetMinNClustersTPC(Int_t minClusters, ETPCclusterDef_t tpcdef){ |
3a72645a | 215 | SETBIT(fRequirements, kMinNClustersTPC); |
e3ae862b | 216 | SETBIT(fTPCclusterDef, tpcdef); |
3a72645a | 217 | fMinNClustersTPC = minClusters; |
218 | } | |
809a4336 | 219 | #endif |