]> git.uio.no Git - u/mrichter/AliRoot.git/blame - CORRFW/AliCFTrackKineCuts.h
Minor fix for compatibility with MacOS
[u/mrichter/AliRoot.git] / CORRFW / AliCFTrackKineCuts.h
CommitLineData
563113d0 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
16// The class AliCFTrackKineCuts is designed to select both generated
17// and reconstructed tracks of a given range in momentum space,
18// electric charge and azimuthal emission angle phi
19// and to provide corresponding QA histograms.
20// This class inherits from the Analysis' Framework abstract base class
21// AliAnalysisCuts and is a part of the Correction Framework.
22// This class acts on single, generated and reconstructed tracks, it is
23// applicable on ESD and AOD data.
24// It mainly consists of a IsSelected function that returns a boolean.
25// This function checks whether the considered track passes a set of cuts:
26// - total momentum
27// - pt
28// - px
29// - py
30// - pz
31// - eta
32// - rapidity
33// - phi
34// - charge
35// - is charged
36//
37// The cut values for these cuts are set with the corresponding set functions.
38// All cut classes provided by the correction framework are supposed to be
39// added in the Analysis Framwork's class AliAnalysisFilter and applied by
40// the filter via a loop.
41//
42// author: I. Kraus (Ingrid.Kraus@cern.ch)
43// idea taken form
44// AliESDtrackCuts writte by Jan Fiete Grosse-Oetringhaus and
45// AliRsnDaughterCut class written by A. Pulvirenti.
46
47#ifndef ALICFTRACKKINECUTS_H
48#define ALICFTRACKKINECUTS_H
49
50#include "AliCFCutBase.h"
51
dac9070e 52class TH2 ;
563113d0 53class TBits;
54class AliVParticle;
55
56class AliCFTrackKineCuts : public AliCFCutBase
57{
58 public :
59 AliCFTrackKineCuts() ;
60 AliCFTrackKineCuts(Char_t* name, Char_t* title) ;
61 AliCFTrackKineCuts(const AliCFTrackKineCuts& c) ;
62 AliCFTrackKineCuts& operator=(const AliCFTrackKineCuts& c) ;
63 ~AliCFTrackKineCuts();
64 void Copy(TObject &c) const;
65
66 void GetBitMap(TObject* obj, TBits *bitmap);
67 Bool_t IsSelected(TObject* obj);
68 void Init();
69
70 // cut value setter
71 void SetMomentumRange(Double_t momentumMin=0., Double_t momentumMax=1e99) {fMomentumMin=momentumMin; fMomentumMax=momentumMax;}
72 void SetPtRange(Double_t ptMin=0., Double_t ptMax=1e99) {fPtMin=ptMin; fPtMax=ptMax;}
73 void SetPxRange(Double_t pxMin=-1e99, Double_t pxMax=1e99) {fPxMin=pxMin; fPxMax=pxMax;}
74 void SetPyRange(Double_t pyMin=-1e99, Double_t pyMax=1e99) {fPyMin=pyMin; fPyMax=pyMax;}
75 void SetPzRange(Double_t pzMin=-1e99, Double_t pzMax=1e99) {fPzMin=pzMin; fPzMax=pzMax;}
76 void SetEtaRange(Double_t etaMin=-1e99, Double_t etaMax=1e99) {fEtaMin=etaMin; fEtaMax=etaMax;}
77 void SetRapidityRange(Double_t rapMin=-1e99, Double_t rapMax=1e99) {fRapidityMin=rapMin; fRapidityMax=rapMax;}
78 void SetPhiRange(Double_t phiMin=-10., Double_t phiMax=10.) {fPhiMin=phiMin; fPhiMax=phiMax;}
79 void SetChargeRec(Double_t charge=10.) {fCharge=charge;}
80 void SetChargeMC(Double_t charge=10.) {fCharge=charge*3.;}
81 void SetRequireIsCharged(Bool_t b=kFALSE) {fRequireIsCharged=b;}
82
83 // QA histograms
84 void FillHistogramsBeforeCuts(TObject* obj) {return FillHistograms(obj,kFALSE);}
85 void FillHistogramsAfterCuts(TObject* obj) {return FillHistograms(obj,kTRUE);}
86 void DrawHistograms(Bool_t drawLogScale=kTRUE);
87 void SaveHistograms(const Char_t* dir = 0);
88 void AddQAHistograms(TList *qaList) const;
89 // QA histogram setter
90 // please use indices from the enumeration below
91 void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins);
92 void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax);
93
94 // indeces/counters for single selections
95 enum {
96 kCutP=0, // momentum
97 kCutPt, // pt
98 kCutPx, // px
99 kCutPy, // py
100 kCutPz, // pz
101 kCutRapidity,// raptidity
102 kCutEta, // eta
103 kCutPhi, // phi
104 kCutCharge, // charge
105 kNCuts=10, // number of single selections
106 kNStepQA=2, // number of QA steps (before/after the cuts)
107 kNHist=9 // number of QA histograms
108 };
109
563113d0 110 private:
111 TBits* SelectionBitMap(TObject* obj);
112 void DefineHistograms(); // books histograms and TList
113 void Initialise(); // sets everything to 0
114 void FillHistograms(TObject* obj, Bool_t b);
115 // Fills histograms before and after cuts
116 Double_t fMomentumMin ; // lower limit of accepted total momentum range
117 Double_t fMomentumMax ; // upper limit of accepted total momentum range
118 Double_t fPtMin ; // lower limit of accepted transverse momentum range
119 Double_t fPtMax ; // upper limit of accepted transverse momentum range
120 Double_t fPxMin ; // lower limit of accepted px range
121 Double_t fPxMax ; // upper limit of accepted px range
122 Double_t fPyMin ; // lower limit of accepted py range
123 Double_t fPyMax ; // upper limit of accepted py range
124 Double_t fPzMin ; // lower limit of accepted pz range
125 Double_t fPzMax ; // upper limit of accepted pz range
126 Double_t fEtaMin ; // lower limit of accepted pseudo-rapidity range
127 Double_t fEtaMax ; // upper limit of accepted pseudo-rapidity range
128 Double_t fRapidityMin ; // lower limit of accepted rapidity range
129 Double_t fRapidityMax ; // upper limit of accepted rapidity range
130 Double_t fPhiMin ; // lower limit of accepted phi range
131 Double_t fPhiMax ; // upper limit of accepted phi range
132 Double_t fCharge ; // electric charge
133 Bool_t fRequireIsCharged; // accept charged particles only
134
dac9070e 135 TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive
136 TH2F* fhCutCorrelation; // Histogram: 2d statistics plot
563113d0 137
138 TH1F* fhQA[kNHist][kNStepQA]; // QA Histograms
dac9070e 139 TBits *fBitmap ; // stores single selection decisions
563113d0 140
141 // QA histogram setters
db6722a5 142 Int_t fhNBinsMomentum; // number of bins+1: momentum
143 Int_t fhNBinsPt; // number of bins+1: pt
144 Int_t fhNBinsPx; // number of bins+1: px
145 Int_t fhNBinsPy; // number of bins+1: py
146 Int_t fhNBinsPz; // number of bins+1: pz
147 Int_t fhNBinsEta; // number of bins+1: eta
148 Int_t fhNBinsRapidity; // number of bins+1: rapidity
149 Int_t fhNBinsPhi; // number of bins+1: phi
150 Int_t fhNBinsCharge; // number of bins+1: charge
563113d0 151
dac9070e 152 Double_t *fhBinLimMomentum; //[fhNBinsMomentum] bin limits: momentum
153 Double_t *fhBinLimPt; //[fhNBinsPt] bin limits: pt
154 Double_t *fhBinLimPx; //[fhNBinsPx] bin limits: px
155 Double_t *fhBinLimPy; //[fhNBinsPy] bin limits: py
156 Double_t *fhBinLimPz; //[fhNBinsPz] bin limits: pz
157 Double_t *fhBinLimEta; //[fhNBinsEta] bin limits: eta
158 Double_t *fhBinLimRapidity; //[fhNBinsRapidity] bin limits: rapidity
159 Double_t *fhBinLimPhi; //[fhNBinsPhi] bin limits: phi
160 Double_t *fhBinLimCharge; //[fhNBinsCharge] bin limits: charge
161
162 ClassDef(AliCFTrackKineCuts,2);
563113d0 163};
164
165#endif