]>
Commit | Line | Data |
---|---|---|
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 | 52 | class TH2 ; |
563113d0 | 53 | class TBits; |
54 | class AliVParticle; | |
55 | ||
56 | class 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 | ||
563113d0 | 66 | Bool_t IsSelected(TObject* obj); |
264ebaac | 67 | Bool_t IsSelected(TList* /*list*/) {return kTRUE;} |
68 | ||
563113d0 | 69 | // cut value setter |
70 | void SetMomentumRange(Double_t momentumMin=0., Double_t momentumMax=1e99) {fMomentumMin=momentumMin; fMomentumMax=momentumMax;} | |
71 | void SetPtRange(Double_t ptMin=0., Double_t ptMax=1e99) {fPtMin=ptMin; fPtMax=ptMax;} | |
72 | void SetPxRange(Double_t pxMin=-1e99, Double_t pxMax=1e99) {fPxMin=pxMin; fPxMax=pxMax;} | |
73 | void SetPyRange(Double_t pyMin=-1e99, Double_t pyMax=1e99) {fPyMin=pyMin; fPyMax=pyMax;} | |
74 | void SetPzRange(Double_t pzMin=-1e99, Double_t pzMax=1e99) {fPzMin=pzMin; fPzMax=pzMax;} | |
75 | void SetEtaRange(Double_t etaMin=-1e99, Double_t etaMax=1e99) {fEtaMin=etaMin; fEtaMax=etaMax;} | |
76 | void SetRapidityRange(Double_t rapMin=-1e99, Double_t rapMax=1e99) {fRapidityMin=rapMin; fRapidityMax=rapMax;} | |
77 | void SetPhiRange(Double_t phiMin=-10., Double_t phiMax=10.) {fPhiMin=phiMin; fPhiMax=phiMax;} | |
78 | void SetChargeRec(Double_t charge=10.) {fCharge=charge;} | |
79 | void SetChargeMC(Double_t charge=10.) {fCharge=charge*3.;} | |
80 | void SetRequireIsCharged(Bool_t b=kFALSE) {fRequireIsCharged=b;} | |
81 | ||
82 | // QA histograms | |
563113d0 | 83 | void DrawHistograms(Bool_t drawLogScale=kTRUE); |
84 | void SaveHistograms(const Char_t* dir = 0); | |
107a3100 | 85 | void AddQAHistograms(TList *qaList); |
563113d0 | 86 | // QA histogram setter |
87 | // please use indices from the enumeration below | |
88 | void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins); | |
89 | void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax); | |
90 | ||
91 | // indeces/counters for single selections | |
92 | enum { | |
93 | kCutP=0, // momentum | |
94 | kCutPt, // pt | |
95 | kCutPx, // px | |
96 | kCutPy, // py | |
97 | kCutPz, // pz | |
98 | kCutRapidity,// raptidity | |
99 | kCutEta, // eta | |
100 | kCutPhi, // phi | |
101 | kCutCharge, // charge | |
102 | kNCuts=10, // number of single selections | |
103 | kNStepQA=2, // number of QA steps (before/after the cuts) | |
104 | kNHist=9 // number of QA histograms | |
105 | }; | |
106 | ||
563113d0 | 107 | private: |
107a3100 | 108 | void SelectionBitMap(TObject* obj); |
563113d0 | 109 | void DefineHistograms(); // books histograms and TList |
110 | void Initialise(); // sets everything to 0 | |
111 | void FillHistograms(TObject* obj, Bool_t b); | |
112 | // Fills histograms before and after cuts | |
113 | Double_t fMomentumMin ; // lower limit of accepted total momentum range | |
114 | Double_t fMomentumMax ; // upper limit of accepted total momentum range | |
115 | Double_t fPtMin ; // lower limit of accepted transverse momentum range | |
116 | Double_t fPtMax ; // upper limit of accepted transverse momentum range | |
117 | Double_t fPxMin ; // lower limit of accepted px range | |
118 | Double_t fPxMax ; // upper limit of accepted px range | |
119 | Double_t fPyMin ; // lower limit of accepted py range | |
120 | Double_t fPyMax ; // upper limit of accepted py range | |
121 | Double_t fPzMin ; // lower limit of accepted pz range | |
122 | Double_t fPzMax ; // upper limit of accepted pz range | |
123 | Double_t fEtaMin ; // lower limit of accepted pseudo-rapidity range | |
124 | Double_t fEtaMax ; // upper limit of accepted pseudo-rapidity range | |
125 | Double_t fRapidityMin ; // lower limit of accepted rapidity range | |
126 | Double_t fRapidityMax ; // upper limit of accepted rapidity range | |
127 | Double_t fPhiMin ; // lower limit of accepted phi range | |
128 | Double_t fPhiMax ; // upper limit of accepted phi range | |
129 | Double_t fCharge ; // electric charge | |
130 | Bool_t fRequireIsCharged; // accept charged particles only | |
131 | ||
dac9070e | 132 | TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive |
133 | TH2F* fhCutCorrelation; // Histogram: 2d statistics plot | |
563113d0 | 134 | |
135 | TH1F* fhQA[kNHist][kNStepQA]; // QA Histograms | |
dac9070e | 136 | TBits *fBitmap ; // stores single selection decisions |
563113d0 | 137 | |
138 | // QA histogram setters | |
db6722a5 | 139 | Int_t fhNBinsMomentum; // number of bins+1: momentum |
140 | Int_t fhNBinsPt; // number of bins+1: pt | |
141 | Int_t fhNBinsPx; // number of bins+1: px | |
142 | Int_t fhNBinsPy; // number of bins+1: py | |
143 | Int_t fhNBinsPz; // number of bins+1: pz | |
144 | Int_t fhNBinsEta; // number of bins+1: eta | |
145 | Int_t fhNBinsRapidity; // number of bins+1: rapidity | |
146 | Int_t fhNBinsPhi; // number of bins+1: phi | |
147 | Int_t fhNBinsCharge; // number of bins+1: charge | |
563113d0 | 148 | |
dac9070e | 149 | Double_t *fhBinLimMomentum; //[fhNBinsMomentum] bin limits: momentum |
150 | Double_t *fhBinLimPt; //[fhNBinsPt] bin limits: pt | |
151 | Double_t *fhBinLimPx; //[fhNBinsPx] bin limits: px | |
152 | Double_t *fhBinLimPy; //[fhNBinsPy] bin limits: py | |
153 | Double_t *fhBinLimPz; //[fhNBinsPz] bin limits: pz | |
154 | Double_t *fhBinLimEta; //[fhNBinsEta] bin limits: eta | |
155 | Double_t *fhBinLimRapidity; //[fhNBinsRapidity] bin limits: rapidity | |
156 | Double_t *fhBinLimPhi; //[fhNBinsPhi] bin limits: phi | |
157 | Double_t *fhBinLimCharge; //[fhNBinsCharge] bin limits: charge | |
158 | ||
159 | ClassDef(AliCFTrackKineCuts,2); | |
563113d0 | 160 | }; |
161 | ||
162 | #endif |