]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEextraCuts.h
correct compilation warning
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEextraCuts.h
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 **************************************************************************/
15 #ifndef ALIHFEEXTRACUTS_H
16 #define ALIHFEEXTRACUTS_H
17
18 // #ifndef ALICFCUTBASE_H
19 #include "AliCFCutBase.h"
20 // #endif
21
22 class TList;
23
24 class AliESDtrack;
25 class AliMCParticle;
26
27 class AliHFEextraCuts : public AliCFCutBase{
28   public:
29     typedef enum{
30       kFirst = 0,
31       kSecond = 1,
32       kBoth = 2,
33       kNone = 3,
34       kAny = 4
35     } ITSPixel_t;
36     AliHFEextraCuts(const Char_t *name, const Char_t *title);
37     AliHFEextraCuts(const AliHFEextraCuts &c);
38     AliHFEextraCuts &operator=(const AliHFEextraCuts &c);
39     virtual ~AliHFEextraCuts();
40     
41     virtual Bool_t IsSelected(TObject *o);
42     virtual Bool_t IsSelected(TList *) { return kTRUE; };
43
44     inline void SetClusterRatioTPC(Double_t ratio);
45     inline void SetRequireITSpixel(ITSPixel_t pixel);
46     inline void SetMinImpactParamR(Double_t impactParam);
47     inline void SetMaxImpactParamR(Double_t impactParam);
48     inline void SetMinImpactParamZ(Double_t impactParam);
49     inline void SetMaxImpactParamZ(Double_t impactParam);
50     inline void SetMinTrackletsTRD(Int_t minTracklets);
51
52     void SetCheckITSstatus(Bool_t check) { fCheck = check; };
53     Bool_t GetCheckITSstatus() const { return fCheck; };
54
55     void SetDebugLevel(Int_t level) { fDebugLevel = level; };
56     Int_t GetDebugLevel() const { return fDebugLevel; };
57     
58   protected:
59     virtual void AddQAHistograms(TList *qaList);
60     Bool_t CheckESDCuts(AliESDtrack *track);
61     Bool_t CheckMCCuts(AliMCParticle * /*track*/) const;
62     Bool_t CheckITSstatus(Int_t itsStatus) const;
63     void FillQAhistosESD(AliESDtrack *track, UInt_t when);
64 //     void FillQAhistosMC(AliMCParticle *track, UInt_t when);
65     void FillCutCorrelation(ULong64_t survivedCut);
66     void PrintBitMap(Int_t bitmap);
67     
68   private:
69     typedef enum{
70       kMinImpactParamR = 0,
71       kMaxImpactParamR = 1,
72       kMinImpactParamZ = 2,
73       kMaxImpactParamZ = 3,
74       kClusterRatioTPC = 4,
75       kMinTrackletsTRD = 5,
76       kPixelITS = 6,
77       kNcuts = 7
78     } Cut_t;
79     enum{
80       //
81       // Common Constants
82       //
83       kBeforeCuts =0,
84       kAfterCuts = 1
85     };
86     ULong64_t fCutCorrelation;          // Cut Correlation
87     ULong64_t fRequirements;            // Cut Requirements
88     Float_t fImpactParamCut[4];         // Impact Parmameter Cut
89     Float_t fClusterRatioTPC;           // Ratio of findable vs. found clusters in TPC
90     UChar_t fMinTrackletsTRD;           // Min. Number of Tracklets inside TRD
91     UChar_t fPixelITS;                  // Cut on ITS Pixels
92
93     Bool_t  fCheck;                     // check
94     
95     TList *fQAlist;                     //! Directory for QA histograms
96   
97     Int_t fDebugLevel;    // Debug Level
98   
99   ClassDef(AliHFEextraCuts, 1)      // Additional cuts implemented by the ALICE HFE group
100 };
101
102 //__________________________________________________________
103 void AliHFEextraCuts::SetClusterRatioTPC(Double_t ratio) {
104   SETBIT(fRequirements, kClusterRatioTPC);
105   fClusterRatioTPC = ratio; 
106 }
107
108 //__________________________________________________________
109 void AliHFEextraCuts::SetRequireITSpixel(ITSPixel_t pixel) {
110   SETBIT(fRequirements, kPixelITS);
111   fPixelITS = pixel; 
112 }
113
114 //__________________________________________________________
115 void AliHFEextraCuts::SetMinImpactParamR(Double_t impactParam){
116   SETBIT(fRequirements, kMinImpactParamR);
117   fImpactParamCut[0] = impactParam;
118 }
119
120 //__________________________________________________________
121 void AliHFEextraCuts::SetMaxImpactParamR(Double_t impactParam){
122   SETBIT(fRequirements, kMaxImpactParamR);
123   fImpactParamCut[2] = impactParam;
124 }
125
126 //__________________________________________________________
127 void AliHFEextraCuts::SetMinImpactParamZ(Double_t impactParam){
128   SETBIT(fRequirements, kMinImpactParamZ);
129   fImpactParamCut[1] = impactParam;
130 }
131
132 //__________________________________________________________
133 void AliHFEextraCuts::SetMaxImpactParamZ(Double_t impactParam){
134   SETBIT(fRequirements, kMaxImpactParamZ);
135   fImpactParamCut[3] = impactParam;
136 }
137
138 //__________________________________________________________
139 void AliHFEextraCuts::SetMinTrackletsTRD(Int_t minTracklets){
140   SETBIT(fRequirements, kMinTrackletsTRD);
141   fMinTrackletsTRD = minTracklets;
142 }
143 #endif