]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/hfe/AliHFEextraCuts.h
- Patch for centrality selection applied - signal for reconstructedID added
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEextraCuts.h
CommitLineData
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
27class TList;
28
3a72645a 29class AliVEvent;
30class AliVParticle;
31class AliVTrack;
809a4336 32
e17c1f86 33class 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);
11ff28c5 69 inline void SetMinHFEImpactParamR(Float_t ipcutParam[4], Bool_t issigmacut, Bool_t isabs);
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); }
11ff28c5 78 void SetMinNbITScls(UChar_t minNbITScls) { fMinNbITScls = minNbITScls; SETBIT(fRequirements, kMinNbITScls); }
79 void SetRejectKinkDaughter() { SETBIT(fRequirements, kRejectKinkDaughter);};
80 void SetRejectKinkMother() { SETBIT(fRequirements, kRejectKinkMother);};
75d81601 81 void SetCheckITSstatus(Bool_t check) { fCheck = check; };
dbe3abbe 82 void SetDebugLevel(Int_t level) { fDebugLevel = level; };
8c1c76e9 83
84 Bool_t GetCheckITSstatus() const { return fCheck; };
dbe3abbe 85 Int_t GetDebugLevel() const { return fDebugLevel; };
8c1c76e9 86 void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy); // temporary moved from protected to publich for IP QA
11ff28c5 87 void GetHFEImpactParameters(AliVTrack *track, Double_t dcaD[2], Double_t covD[3]);
a8ef1999 88 Int_t GetITSstatus(AliVTrack *track, Int_t layer);
89 Bool_t CheckITSstatus(Int_t itsStatus) const;
11ff28c5 90
91 void UnSetRejectKinkDaughter() { CLRBIT(fRequirements, kRejectKinkDaughter);};
92 void UnSetRejectKinkMother() { CLRBIT(fRequirements, kRejectKinkMother);};
93
809a4336 94
95 protected:
96 virtual void AddQAHistograms(TList *qaList);
3a72645a 97 Bool_t CheckRecCuts(AliVTrack *track);
98 Bool_t CheckMCCuts(AliVParticle * /*track*/) const;
3a72645a 99 void FillQAhistosRec(AliVTrack *track, UInt_t when);
11ff28c5 100 //void FillQAhistosMC(AliMCParticle *track, UInt_t when);
809a4336 101 void FillCutCorrelation(ULong64_t survivedCut);
dbe3abbe 102 void PrintBitMap(Int_t bitmap);
809a4336 103
3a72645a 104 // Getter Functions for ESD/AOD compatible mode
e3ae862b 105 UInt_t GetTPCncls(AliVTrack *track);
8c1c76e9 106 Bool_t GetTPCCountSharedMapBitsAboveThreshold(AliVTrack *track);
e3ae862b 107 Double_t GetTPCclusterRatio(AliVTrack *track);
3a72645a 108 void GetImpactParameters(AliVTrack *track, Float_t &radial, Float_t &z);
8c1c76e9 109 //void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy);
3a72645a 110 void GetHFEImpactParameterCuts(AliVTrack *track, Double_t &hfeimpactRcut, Double_t &hfeimpactnsigmaRcut);
9250ffbf 111 void GetMaxImpactParameterCutR(AliVTrack *track, Double_t &maximpactRcut);
112 Float_t GetTPCsharedClustersRatio(AliVTrack *track);
11ff28c5 113 Int_t GetITSNbOfcls(AliVTrack *track);
114 Bool_t IsKinkDaughter(AliVTrack *track);
115 Bool_t IsKinkMother(AliVTrack *track);
3a72645a 116
809a4336 117 private:
118 typedef enum{
119 kMinImpactParamR = 0,
120 kMaxImpactParamR = 1,
121 kMinImpactParamZ = 2,
122 kMaxImpactParamZ = 3,
123 kClusterRatioTPC = 4,
124 kMinTrackletsTRD = 5,
125 kPixelITS = 6,
3a72645a 126 kMinHFEImpactParamR = 7,
127 kMinHFEImpactParamNsigmaR = 8,
128 kMinNClustersTPC = 9,
e17c1f86 129 kMinNClustersTPCPID = 10,
130 kTPCfractionShared = 11,
131 kTOFPID = 12,
132 kTOFmismatch = 13,
133 kTPCPIDCleanUp = 14,
134 kEMCALmatch = 15,
135 kMaxImpactParameterRpar = 16,
11ff28c5 136 kMinNbITScls = 17,
137 kRejectKinkDaughter = 18,
138 kRejectKinkMother = 19,
139 kNcuts = 20
809a4336 140 } Cut_t;
141 enum{
142 //
143 // Common Constants
144 //
145 kBeforeCuts =0,
146 kAfterCuts = 1
147 };
11ff28c5 148 static const Int_t fgkNQAhistos; // Number of QA histos
e3ae862b 149 AliVEvent *fEvent; //! working event
11ff28c5 150 ULong64_t fCutCorrelation; // Cut Correlation
151 ULong64_t fRequirements; // Cut Requirements
152 Float_t fImpactParamCut[4]; // Impact Parmameter Cut
153 Float_t fIPcutParam[4]; // Parmameter of impact parameter cut parametrization
e3ae862b 154 UInt_t fMinNClustersTPC; // Minimum TPC clusters cut
e17c1f86 155 UInt_t fMinNClustersTPCPID; // Minimum TPC PID clusters cut
11ff28c5 156 Float_t fClusterRatioTPC; // Ratio of findable vs. found clusters in TPC
157 UChar_t fMinTrackletsTRD; // Min. Number of Tracklets inside TRD
158 UChar_t fMinNbITScls; // Min. Number of ITS clusters
aa1417ee 159 Bool_t fTRDtrackletsExact; // Require exact number of tracklets
e3ae862b 160 UChar_t fPixelITS; // Cut on ITS Pixels
e3ae862b 161 UChar_t fTPCclusterDef; // TPC cluster definition Bitmap
162 UChar_t fTPCclusterRatioDef; // TPC cluster ratio definition Bitmap
8c1c76e9 163 Double_t fFractionTPCShared; // Cut on fraction of shared clusters
11ff28c5 164 Bool_t fAbsHFEImpactParamNsigmaR; // flag to use abs ip cut
75d81601 165
166 Bool_t fCheck; // check
809a4336 167 TList *fQAlist; //! Directory for QA histograms
70da6c5a 168 Int_t fDebugLevel; // Debug Level
dbe3abbe 169
11ff28c5 170 ClassDef(AliHFEextraCuts, 3) // Additional cuts implemented by the ALICE HFE group
809a4336 171};
172
173//__________________________________________________________
e3ae862b 174void AliHFEextraCuts::SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def) {
809a4336 175 SETBIT(fRequirements, kClusterRatioTPC);
e3ae862b 176 SETBIT(fTPCclusterRatioDef, def);
809a4336 177 fClusterRatioTPC = ratio;
178}
179
180//__________________________________________________________
181void AliHFEextraCuts::SetRequireITSpixel(ITSPixel_t pixel) {
182 SETBIT(fRequirements, kPixelITS);
183 fPixelITS = pixel;
184}
185
186//__________________________________________________________
187void AliHFEextraCuts::SetMinImpactParamR(Double_t impactParam){
188 SETBIT(fRequirements, kMinImpactParamR);
189 fImpactParamCut[0] = impactParam;
190}
191
192//__________________________________________________________
193void AliHFEextraCuts::SetMaxImpactParamR(Double_t impactParam){
194 SETBIT(fRequirements, kMaxImpactParamR);
75d81601 195 fImpactParamCut[2] = impactParam;
809a4336 196}
197
198//__________________________________________________________
199void AliHFEextraCuts::SetMinImpactParamZ(Double_t impactParam){
200 SETBIT(fRequirements, kMinImpactParamZ);
75d81601 201 fImpactParamCut[1] = impactParam;
809a4336 202}
203
204//__________________________________________________________
205void AliHFEextraCuts::SetMaxImpactParamZ(Double_t impactParam){
206 SETBIT(fRequirements, kMaxImpactParamZ);
207 fImpactParamCut[3] = impactParam;
208}
209
3a72645a 210//__________________________________________________________
11ff28c5 211void AliHFEextraCuts::SetMinHFEImpactParamR(Float_t ipcutParam[4], Bool_t isSigmacut, Bool_t isabs){
c2690925 212 if(isSigmacut) SETBIT(fRequirements, kMinHFEImpactParamNsigmaR);
213 else SETBIT(fRequirements, kMinHFEImpactParamR);
214 fIPcutParam[0]=ipcutParam[0];
215 fIPcutParam[1]=ipcutParam[1];
216 fIPcutParam[2]=ipcutParam[2];
217 fIPcutParam[3]=ipcutParam[3];
11ff28c5 218 fAbsHFEImpactParamNsigmaR = isabs;
3a72645a 219}
220
809a4336 221//__________________________________________________________
aa1417ee 222void AliHFEextraCuts::SetMinTrackletsTRD(Int_t minTracklets, Bool_t exact){
809a4336 223 SETBIT(fRequirements, kMinTrackletsTRD);
224 fMinTrackletsTRD = minTracklets;
aa1417ee 225 fTRDtrackletsExact = exact;
809a4336 226}
3a72645a 227
228//__________________________________________________________
e3ae862b 229void AliHFEextraCuts::SetMinNClustersTPC(Int_t minClusters, ETPCclusterDef_t tpcdef){
3a72645a 230 SETBIT(fRequirements, kMinNClustersTPC);
e3ae862b 231 SETBIT(fTPCclusterDef, tpcdef);
3a72645a 232 fMinNClustersTPC = minClusters;
233}
809a4336 234#endif