]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/hfe/AliHFEextraCuts.h
Corrections for Coverity warnings
[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//
75d81601 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,
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);
3a72645a 68 inline void SetMinHFEImpactParamR();
69 inline void SetMinHFEImpactParamNsigmaR();
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;}
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
124 UInt_t fMinNClustersTPC; // Minimum TPC clusters cut
125 Float_t fClusterRatioTPC; // Ratio of findable vs. found clusters in TPC
126 UChar_t fMinTrackletsTRD; // Min. Number of Tracklets inside TRD
127 UChar_t fPixelITS; // Cut on ITS Pixels
128 Bool_t fTOFpid; // TOF pid
129 UChar_t fTPCclusterDef; // TPC cluster definition Bitmap
130 UChar_t fTPCclusterRatioDef; // TPC cluster ratio definition Bitmap
75d81601 131
132 Bool_t fCheck; // check
809a4336 133 TList *fQAlist; //! Directory for QA histograms
70da6c5a 134 Int_t fDebugLevel; // Debug Level
dbe3abbe 135
809a4336 136 ClassDef(AliHFEextraCuts, 1) // Additional cuts implemented by the ALICE HFE group
137};
138
139//__________________________________________________________
e3ae862b 140void AliHFEextraCuts::SetClusterRatioTPC(Double_t ratio, ETPCclrDef_t def) {
809a4336 141 SETBIT(fRequirements, kClusterRatioTPC);
e3ae862b 142 SETBIT(fTPCclusterRatioDef, def);
809a4336 143 fClusterRatioTPC = ratio;
144}
145
146//__________________________________________________________
147void AliHFEextraCuts::SetRequireITSpixel(ITSPixel_t pixel) {
148 SETBIT(fRequirements, kPixelITS);
149 fPixelITS = pixel;
150}
151
152//__________________________________________________________
153void AliHFEextraCuts::SetMinImpactParamR(Double_t impactParam){
154 SETBIT(fRequirements, kMinImpactParamR);
155 fImpactParamCut[0] = impactParam;
156}
157
158//__________________________________________________________
159void AliHFEextraCuts::SetMaxImpactParamR(Double_t impactParam){
160 SETBIT(fRequirements, kMaxImpactParamR);
75d81601 161 fImpactParamCut[2] = impactParam;
809a4336 162}
163
164//__________________________________________________________
165void AliHFEextraCuts::SetMinImpactParamZ(Double_t impactParam){
166 SETBIT(fRequirements, kMinImpactParamZ);
75d81601 167 fImpactParamCut[1] = impactParam;
809a4336 168}
169
170//__________________________________________________________
171void AliHFEextraCuts::SetMaxImpactParamZ(Double_t impactParam){
172 SETBIT(fRequirements, kMaxImpactParamZ);
173 fImpactParamCut[3] = impactParam;
174}
175
3a72645a 176//__________________________________________________________
177void AliHFEextraCuts::SetMinHFEImpactParamR(){
178 SETBIT(fRequirements, kMinHFEImpactParamR);
179}
180
181//__________________________________________________________
182void AliHFEextraCuts::SetMinHFEImpactParamNsigmaR(){
183 SETBIT(fRequirements, kMinHFEImpactParamNsigmaR);
184}
185
809a4336 186//__________________________________________________________
187void AliHFEextraCuts::SetMinTrackletsTRD(Int_t minTracklets){
188 SETBIT(fRequirements, kMinTrackletsTRD);
189 fMinTrackletsTRD = minTracklets;
190}
3a72645a 191
192//__________________________________________________________
e3ae862b 193void AliHFEextraCuts::SetMinNClustersTPC(Int_t minClusters, ETPCclusterDef_t tpcdef){
3a72645a 194 SETBIT(fRequirements, kMinNClustersTPC);
e3ae862b 195 SETBIT(fTPCclusterDef, tpcdef);
3a72645a 196 fMinNClustersTPC = minClusters;
197}
809a4336 198#endif