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