]>
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 | |
33 | class AliHFEextraCuts : public AliCFCutBase{ | |
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); |
809a4336 | 70 | inline void SetMinTrackletsTRD(Int_t minTracklets); |
e3ae862b | 71 | inline void SetMinNClustersTPC(Int_t minclusters, ETPCclusterDef_t def); |
8c1c76e9 | 72 | void SetTOFPID(Bool_t tofPid) { tofPid ? SETBIT(fRequirements, kTOFPID) : CLRBIT(fRequirements, kTOFPID); } |
73 | void SetTOFMISMATCH(Bool_t tofMismatch) { tofMismatch ? SETBIT(fRequirements, kTOFmismatch) : CLRBIT(fRequirements, kTOFmismatch); } | |
74 | void SetTPCPIDCleanUp(Bool_t tpcPIDCleanUp) { tpcPIDCleanUp ? SETBIT(fRequirements, kTPCPIDCleanUp) : CLRBIT(fRequirements, kTPCPIDCleanUp); } | |
75 | void SetMaxImpactParameterRpar(Bool_t maxImpactParameterRpar) { maxImpactParameterRpar ? SETBIT(fRequirements, kMaxImpactParameterRpar) : CLRBIT(fRequirements, kMaxImpactParameterRpar); } | |
76 | void SetFractionOfTPCSharedClusters(Double_t fractionShared) { fFractionTPCShared= fractionShared; SETBIT(fRequirements, kTPCfractionShared); } | |
dbe3abbe | 77 | |
75d81601 | 78 | void SetCheckITSstatus(Bool_t check) { fCheck = check; }; |
dbe3abbe | 79 | void SetDebugLevel(Int_t level) { fDebugLevel = level; }; |
8c1c76e9 | 80 | |
81 | Bool_t GetCheckITSstatus() const { return fCheck; }; | |
dbe3abbe | 82 | Int_t GetDebugLevel() const { return fDebugLevel; }; |
8c1c76e9 | 83 | void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy); // temporary moved from protected to publich for IP QA |
809a4336 | 84 | |
85 | protected: | |
86 | virtual void AddQAHistograms(TList *qaList); | |
3a72645a | 87 | Bool_t CheckRecCuts(AliVTrack *track); |
88 | Bool_t CheckMCCuts(AliVParticle * /*track*/) const; | |
75d81601 | 89 | Bool_t CheckITSstatus(Int_t itsStatus) const; |
3a72645a | 90 | void FillQAhistosRec(AliVTrack *track, UInt_t when); |
809a4336 | 91 | // void FillQAhistosMC(AliMCParticle *track, UInt_t when); |
92 | void FillCutCorrelation(ULong64_t survivedCut); | |
dbe3abbe | 93 | void PrintBitMap(Int_t bitmap); |
809a4336 | 94 | |
3a72645a | 95 | // Getter Functions for ESD/AOD compatible mode |
3a72645a | 96 | Int_t GetITSstatus(AliVTrack *track, Int_t layer); |
e3ae862b | 97 | UInt_t GetTPCncls(AliVTrack *track); |
8c1c76e9 | 98 | UInt_t GetTPCnclusdEdx(AliVTrack *track); |
99 | Bool_t GetTPCCountSharedMapBitsAboveThreshold(AliVTrack *track); | |
e3ae862b | 100 | Double_t GetTPCclusterRatio(AliVTrack *track); |
3a72645a | 101 | void GetImpactParameters(AliVTrack *track, Float_t &radial, Float_t &z); |
8c1c76e9 | 102 | //void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy); |
3a72645a | 103 | void GetHFEImpactParameterCuts(AliVTrack *track, Double_t &hfeimpactRcut, Double_t &hfeimpactnsigmaRcut); |
9250ffbf | 104 | void GetMaxImpactParameterCutR(AliVTrack *track, Double_t &maximpactRcut); |
105 | Float_t GetTPCsharedClustersRatio(AliVTrack *track); | |
3a72645a | 106 | |
809a4336 | 107 | private: |
108 | typedef enum{ | |
109 | kMinImpactParamR = 0, | |
110 | kMaxImpactParamR = 1, | |
111 | kMinImpactParamZ = 2, | |
112 | kMaxImpactParamZ = 3, | |
113 | kClusterRatioTPC = 4, | |
114 | kMinTrackletsTRD = 5, | |
115 | kPixelITS = 6, | |
3a72645a | 116 | kMinHFEImpactParamR = 7, |
117 | kMinHFEImpactParamNsigmaR = 8, | |
118 | kMinNClustersTPC = 9, | |
8c1c76e9 | 119 | kTPCfractionShared = 10, |
120 | kTOFPID = 11, | |
121 | kTOFmismatch = 12, | |
122 | kTPCPIDCleanUp = 13, | |
123 | kEMCALmatch = 14, | |
124 | kMaxImpactParameterRpar = 15, | |
125 | kNcuts = 16 | |
809a4336 | 126 | } Cut_t; |
127 | enum{ | |
128 | // | |
129 | // Common Constants | |
130 | // | |
131 | kBeforeCuts =0, | |
132 | kAfterCuts = 1 | |
133 | }; | |
8c1c76e9 | 134 | static const Int_t fgkNQAhistos; // Number of QA histos |
e3ae862b | 135 | AliVEvent *fEvent; //! working event |
136 | ULong64_t fCutCorrelation; // Cut Correlation | |
137 | ULong64_t fRequirements; // Cut Requirements | |
138 | Float_t fImpactParamCut[4]; // Impact Parmameter Cut | |
c2690925 | 139 | Float_t fIPcutParam[4]; // Parmameter of impact parameter cut parametrization |
e3ae862b | 140 | UInt_t fMinNClustersTPC; // Minimum TPC clusters cut |
141 | Float_t fClusterRatioTPC; // Ratio of findable vs. found clusters in TPC | |
142 | UChar_t fMinTrackletsTRD; // Min. Number of Tracklets inside TRD | |
143 | UChar_t fPixelITS; // Cut on ITS Pixels | |
e3ae862b | 144 | UChar_t fTPCclusterDef; // TPC cluster definition Bitmap |
145 | UChar_t fTPCclusterRatioDef; // TPC cluster ratio definition Bitmap | |
8c1c76e9 | 146 | Double_t fFractionTPCShared; // Cut on fraction of shared clusters |
75d81601 | 147 | |
148 | Bool_t fCheck; // check | |
809a4336 | 149 | TList *fQAlist; //! Directory for QA histograms |
70da6c5a | 150 | Int_t fDebugLevel; // Debug Level |
dbe3abbe | 151 | |
809a4336 | 152 | ClassDef(AliHFEextraCuts, 1) // Additional cuts implemented by the ALICE HFE group |
153 | }; | |
154 | ||
155 | //__________________________________________________________ | |
e3ae862b | 156 | void AliHFEextraCuts::SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def) { |
809a4336 | 157 | SETBIT(fRequirements, kClusterRatioTPC); |
e3ae862b | 158 | SETBIT(fTPCclusterRatioDef, def); |
809a4336 | 159 | fClusterRatioTPC = ratio; |
160 | } | |
161 | ||
162 | //__________________________________________________________ | |
163 | void AliHFEextraCuts::SetRequireITSpixel(ITSPixel_t pixel) { | |
164 | SETBIT(fRequirements, kPixelITS); | |
165 | fPixelITS = pixel; | |
166 | } | |
167 | ||
168 | //__________________________________________________________ | |
169 | void AliHFEextraCuts::SetMinImpactParamR(Double_t impactParam){ | |
170 | SETBIT(fRequirements, kMinImpactParamR); | |
171 | fImpactParamCut[0] = impactParam; | |
172 | } | |
173 | ||
174 | //__________________________________________________________ | |
175 | void AliHFEextraCuts::SetMaxImpactParamR(Double_t impactParam){ | |
176 | SETBIT(fRequirements, kMaxImpactParamR); | |
75d81601 | 177 | fImpactParamCut[2] = impactParam; |
809a4336 | 178 | } |
179 | ||
180 | //__________________________________________________________ | |
181 | void AliHFEextraCuts::SetMinImpactParamZ(Double_t impactParam){ | |
182 | SETBIT(fRequirements, kMinImpactParamZ); | |
75d81601 | 183 | fImpactParamCut[1] = impactParam; |
809a4336 | 184 | } |
185 | ||
186 | //__________________________________________________________ | |
187 | void AliHFEextraCuts::SetMaxImpactParamZ(Double_t impactParam){ | |
188 | SETBIT(fRequirements, kMaxImpactParamZ); | |
189 | fImpactParamCut[3] = impactParam; | |
190 | } | |
191 | ||
3a72645a | 192 | //__________________________________________________________ |
c2690925 | 193 | void AliHFEextraCuts::SetMinHFEImpactParamR(Float_t ipcutParam[4], Bool_t isSigmacut){ |
194 | if(isSigmacut) SETBIT(fRequirements, kMinHFEImpactParamNsigmaR); | |
195 | else SETBIT(fRequirements, kMinHFEImpactParamR); | |
196 | fIPcutParam[0]=ipcutParam[0]; | |
197 | fIPcutParam[1]=ipcutParam[1]; | |
198 | fIPcutParam[2]=ipcutParam[2]; | |
199 | fIPcutParam[3]=ipcutParam[3]; | |
3a72645a | 200 | } |
201 | ||
809a4336 | 202 | //__________________________________________________________ |
203 | void AliHFEextraCuts::SetMinTrackletsTRD(Int_t minTracklets){ | |
204 | SETBIT(fRequirements, kMinTrackletsTRD); | |
205 | fMinTrackletsTRD = minTracklets; | |
206 | } | |
3a72645a | 207 | |
208 | //__________________________________________________________ | |
e3ae862b | 209 | void AliHFEextraCuts::SetMinNClustersTPC(Int_t minClusters, ETPCclusterDef_t tpcdef){ |
3a72645a | 210 | SETBIT(fRequirements, kMinNClustersTPC); |
e3ae862b | 211 | SETBIT(fTPCclusterDef, tpcdef); |
3a72645a | 212 | fMinNClustersTPC = minClusters; |
213 | } | |
809a4336 | 214 | #endif |