]>
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, | |
40 | kAny = 4 | |
41 | } ITSPixel_t; | |
e3ae862b | 42 | typedef enum{ |
43 | kFound = 0, | |
44 | kFoundIter1 = 1, | |
45 | kCrossedRows = 2 | |
46 | } ETPCclusterDef_t; | |
47 | typedef enum{ | |
48 | kFoundOverFindable = 0, | |
49 | kFoundOverFindableIter1 = 1, | |
50 | kFoundOverCR = 2, | |
51 | kCROverFindable = 3 | |
52 | } ETPCclrDef_t; | |
809a4336 | 53 | AliHFEextraCuts(const Char_t *name, const Char_t *title); |
54 | AliHFEextraCuts(const AliHFEextraCuts &c); | |
55 | AliHFEextraCuts &operator=(const AliHFEextraCuts &c); | |
75d81601 | 56 | virtual ~AliHFEextraCuts(); |
809a4336 | 57 | |
9eeae5d5 | 58 | virtual Bool_t IsSelected(TObject *o); |
59 | virtual Bool_t IsSelected(TList *) { return kTRUE; }; | |
3a72645a | 60 | virtual void SetRecEventInfo(const TObject *event); |
809a4336 | 61 | |
e3ae862b | 62 | inline void SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def); |
809a4336 | 63 | inline void SetRequireITSpixel(ITSPixel_t pixel); |
64 | inline void SetMinImpactParamR(Double_t impactParam); | |
65 | inline void SetMaxImpactParamR(Double_t impactParam); | |
66 | inline void SetMinImpactParamZ(Double_t impactParam); | |
67 | inline void SetMaxImpactParamZ(Double_t impactParam); | |
c2690925 | 68 | inline void SetMinHFEImpactParamR(Float_t ipcutParam[4], Bool_t issigmacut); |
809a4336 | 69 | inline void SetMinTrackletsTRD(Int_t minTracklets); |
e3ae862b | 70 | inline void SetMinNClustersTPC(Int_t minclusters, ETPCclusterDef_t def); |
71 | void SetTOFPID(Bool_t tofPid) { fTOFpid = tofPid;} | |
c2690925 | 72 | void SetTOFMISMATCH(Bool_t tofMismatch) { fTOFmismatch = tofMismatch;} |
dbe3abbe | 73 | |
75d81601 | 74 | void SetCheckITSstatus(Bool_t check) { fCheck = check; }; |
75 | Bool_t GetCheckITSstatus() const { return fCheck; }; | |
76 | ||
dbe3abbe | 77 | void SetDebugLevel(Int_t level) { fDebugLevel = level; }; |
78 | Int_t GetDebugLevel() const { return fDebugLevel; }; | |
809a4336 | 79 | |
80 | protected: | |
81 | virtual void AddQAHistograms(TList *qaList); | |
3a72645a | 82 | Bool_t CheckRecCuts(AliVTrack *track); |
83 | Bool_t CheckMCCuts(AliVParticle * /*track*/) const; | |
75d81601 | 84 | Bool_t CheckITSstatus(Int_t itsStatus) const; |
3a72645a | 85 | void FillQAhistosRec(AliVTrack *track, UInt_t when); |
809a4336 | 86 | // void FillQAhistosMC(AliMCParticle *track, UInt_t when); |
87 | void FillCutCorrelation(ULong64_t survivedCut); | |
dbe3abbe | 88 | void PrintBitMap(Int_t bitmap); |
809a4336 | 89 | |
3a72645a | 90 | // Getter Functions for ESD/AOD compatible mode |
91 | Int_t GetTRDnTrackletsPID(AliVTrack *track); | |
92 | Int_t GetITSstatus(AliVTrack *track, Int_t layer); | |
e3ae862b | 93 | UInt_t GetTPCncls(AliVTrack *track); |
94 | Double_t GetTPCclusterRatio(AliVTrack *track); | |
3a72645a | 95 | void GetImpactParameters(AliVTrack *track, Float_t &radial, Float_t &z); |
96 | void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy); | |
97 | void GetHFEImpactParameterCuts(AliVTrack *track, Double_t &hfeimpactRcut, Double_t &hfeimpactnsigmaRcut); | |
98 | ||
809a4336 | 99 | private: |
100 | typedef enum{ | |
101 | kMinImpactParamR = 0, | |
102 | kMaxImpactParamR = 1, | |
103 | kMinImpactParamZ = 2, | |
104 | kMaxImpactParamZ = 3, | |
105 | kClusterRatioTPC = 4, | |
106 | kMinTrackletsTRD = 5, | |
107 | kPixelITS = 6, | |
3a72645a | 108 | kMinHFEImpactParamR = 7, |
109 | kMinHFEImpactParamNsigmaR = 8, | |
110 | kMinNClustersTPC = 9, | |
111 | kNcuts = 10 | |
809a4336 | 112 | } Cut_t; |
113 | enum{ | |
114 | // | |
115 | // Common Constants | |
116 | // | |
117 | kBeforeCuts =0, | |
118 | kAfterCuts = 1 | |
119 | }; | |
e3ae862b | 120 | AliVEvent *fEvent; //! working event |
121 | ULong64_t fCutCorrelation; // Cut Correlation | |
122 | ULong64_t fRequirements; // Cut Requirements | |
123 | Float_t fImpactParamCut[4]; // Impact Parmameter Cut | |
c2690925 | 124 | Float_t fIPcutParam[4]; // Parmameter of impact parameter cut parametrization |
e3ae862b | 125 | UInt_t fMinNClustersTPC; // Minimum TPC clusters cut |
126 | Float_t fClusterRatioTPC; // Ratio of findable vs. found clusters in TPC | |
127 | UChar_t fMinTrackletsTRD; // Min. Number of Tracklets inside TRD | |
128 | UChar_t fPixelITS; // Cut on ITS Pixels | |
129 | Bool_t fTOFpid; // TOF pid | |
c2690925 | 130 | Bool_t fTOFmismatch; // TOF mismatch |
e3ae862b | 131 | UChar_t fTPCclusterDef; // TPC cluster definition Bitmap |
132 | UChar_t fTPCclusterRatioDef; // TPC cluster ratio definition Bitmap | |
75d81601 | 133 | |
134 | Bool_t fCheck; // check | |
809a4336 | 135 | TList *fQAlist; //! Directory for QA histograms |
70da6c5a | 136 | Int_t fDebugLevel; // Debug Level |
dbe3abbe | 137 | |
809a4336 | 138 | ClassDef(AliHFEextraCuts, 1) // Additional cuts implemented by the ALICE HFE group |
139 | }; | |
140 | ||
141 | //__________________________________________________________ | |
e3ae862b | 142 | void AliHFEextraCuts::SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def) { |
809a4336 | 143 | SETBIT(fRequirements, kClusterRatioTPC); |
e3ae862b | 144 | SETBIT(fTPCclusterRatioDef, def); |
809a4336 | 145 | fClusterRatioTPC = ratio; |
146 | } | |
147 | ||
148 | //__________________________________________________________ | |
149 | void AliHFEextraCuts::SetRequireITSpixel(ITSPixel_t pixel) { | |
150 | SETBIT(fRequirements, kPixelITS); | |
151 | fPixelITS = pixel; | |
152 | } | |
153 | ||
154 | //__________________________________________________________ | |
155 | void AliHFEextraCuts::SetMinImpactParamR(Double_t impactParam){ | |
156 | SETBIT(fRequirements, kMinImpactParamR); | |
157 | fImpactParamCut[0] = impactParam; | |
158 | } | |
159 | ||
160 | //__________________________________________________________ | |
161 | void AliHFEextraCuts::SetMaxImpactParamR(Double_t impactParam){ | |
162 | SETBIT(fRequirements, kMaxImpactParamR); | |
75d81601 | 163 | fImpactParamCut[2] = impactParam; |
809a4336 | 164 | } |
165 | ||
166 | //__________________________________________________________ | |
167 | void AliHFEextraCuts::SetMinImpactParamZ(Double_t impactParam){ | |
168 | SETBIT(fRequirements, kMinImpactParamZ); | |
75d81601 | 169 | fImpactParamCut[1] = impactParam; |
809a4336 | 170 | } |
171 | ||
172 | //__________________________________________________________ | |
173 | void AliHFEextraCuts::SetMaxImpactParamZ(Double_t impactParam){ | |
174 | SETBIT(fRequirements, kMaxImpactParamZ); | |
175 | fImpactParamCut[3] = impactParam; | |
176 | } | |
177 | ||
3a72645a | 178 | //__________________________________________________________ |
c2690925 | 179 | void AliHFEextraCuts::SetMinHFEImpactParamR(Float_t ipcutParam[4], Bool_t isSigmacut){ |
180 | if(isSigmacut) SETBIT(fRequirements, kMinHFEImpactParamNsigmaR); | |
181 | else SETBIT(fRequirements, kMinHFEImpactParamR); | |
182 | fIPcutParam[0]=ipcutParam[0]; | |
183 | fIPcutParam[1]=ipcutParam[1]; | |
184 | fIPcutParam[2]=ipcutParam[2]; | |
185 | fIPcutParam[3]=ipcutParam[3]; | |
3a72645a | 186 | } |
187 | ||
809a4336 | 188 | //__________________________________________________________ |
189 | void AliHFEextraCuts::SetMinTrackletsTRD(Int_t minTracklets){ | |
190 | SETBIT(fRequirements, kMinTrackletsTRD); | |
191 | fMinTrackletsTRD = minTracklets; | |
192 | } | |
3a72645a | 193 | |
194 | //__________________________________________________________ | |
e3ae862b | 195 | void AliHFEextraCuts::SetMinNClustersTPC(Int_t minClusters, ETPCclusterDef_t tpcdef){ |
3a72645a | 196 | SETBIT(fRequirements, kMinNClustersTPC); |
e3ae862b | 197 | SETBIT(fTPCclusterDef, tpcdef); |
3a72645a | 198 | fMinNClustersTPC = minClusters; |
199 | } | |
809a4336 | 200 | #endif |