]>
Commit | Line | Data |
---|---|---|
c683985a | 1 | #ifndef AliHFAssociatedTrackCuts_H |
2 | #define AliHFAssociatedTrackCuts_H | |
3 | /************************************************************************** | |
4 | * Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. * | |
5 | * * | |
6 | * Author: The ALICE Off-line Project. * | |
7 | * Contributors are mentioned in the code where appropriate. * | |
8 | * * | |
9 | * Permission to use, copy, modify and distribute this software and its * | |
10 | * documentation strictly for non-commercial purposes is hereby granted * | |
11 | * without fee, provided that the above copyright notice appears in all * | |
12 | * copies and that both the copyright notice and this permission notice * | |
13 | * appear in the supporting documentation. The authors make no claims * | |
14 | * about the suitability of this software for any purpose. It is * | |
15 | * provided "as is" without express or implied warranty. * | |
16 | **************************************************************************/ | |
17 | ||
18 | /* $Id$ */ | |
19 | ||
20 | //////////////////////////////////////////////////////////////////////// | |
21 | // | |
22 | // Base class for cuts on Associated tracks for HF Correlation analysis | |
23 | // | |
24 | // Author: S.Bjelogrlic (Utrecht) sandro.bjelogrlic@cern.ch | |
25 | //////////////////////////////////////////////////////////////////////// | |
26 | ||
27 | #include <TString.h> | |
28 | #include "AliAnalysisCuts.h" | |
29 | #include "AliESDtrackCuts.h" | |
30 | #include "AliESDVertex.h" | |
31 | #include "AliAODPidHF.h" | |
32 | #include "AliAODEvent.h" | |
33 | #include "AliAODRecoDecayHF2Prong.h" | |
34 | #include <TClonesArray.h> | |
35 | #include <TH3D.h> | |
36 | ||
37 | ||
38 | class AliAODTrack; | |
39 | class AliAODEvent; | |
40 | ||
41 | ||
42 | // | |
43 | class AliHFAssociatedTrackCuts : public AliAnalysisCuts | |
44 | { | |
45 | public: | |
46 | AliHFAssociatedTrackCuts(); | |
47 | AliHFAssociatedTrackCuts(const char* name, const char* title); | |
48 | ||
49 | ||
50 | AliHFAssociatedTrackCuts(const AliHFAssociatedTrackCuts& source); | |
51 | AliHFAssociatedTrackCuts& operator=(const AliHFAssociatedTrackCuts& source); | |
52 | ||
53 | virtual ~AliHFAssociatedTrackCuts(); // destructor | |
54 | Bool_t IsSelected(TList* list) {if(list) return kTRUE; return kFALSE;}; | |
55 | Bool_t IsSelected(TObject* obj) {if(obj) return kTRUE; return kFALSE;}; | |
56 | Bool_t IsInAcceptance(); | |
57 | Bool_t IsHadronSelected(AliAODTrack * track,const AliESDVertex *primary=0x0, Double_t magfield=0); | |
58 | Bool_t CheckHadronKinematic(Double_t pt, Double_t d0); | |
59 | Bool_t Charge(Short_t charge, AliAODTrack* track); | |
60 | Bool_t CheckKaonCompatibility(AliAODTrack * track, Bool_t useMc, TClonesArray* mcArray, Int_t method=1); | |
61 | Bool_t IsKZeroSelected(AliAODv0 *vzero, AliAODVertex *vtx1); | |
62 | Bool_t *IsMCpartFromHF(Int_t label, TClonesArray*mcArray); | |
63 | Bool_t InvMassDstarRejection(AliAODRecoDecayHF2Prong* d, AliAODTrack *track, Int_t hypD0) const; | |
64 | void SetPidAssociated(); | |
65 | ||
66 | // getters | |
67 | AliESDtrackCuts * GetESDTrackCuts() const {return fESDTrackCuts;} | |
68 | AliAODPidHF * GetPIDObject() const {return fPidObj;} | |
69 | TH3D * GetEfficiencyWeight() const {return fEffWeights;} | |
70 | ||
71 | Int_t GetMaxNEventsInPool() const {return fPoolMaxNEvents;} | |
72 | Int_t GetMinNTracksInPool() const {return fPoolMinNTracks;} | |
73 | Int_t GetMinEventsToMix() const {return fMinEventsToMix;} | |
74 | Int_t GetNZvtxPoolBins() const {return fNzVtxBins;} | |
75 | Double_t *GetZvtxPoolBins() const {return fZvtxBins;} | |
76 | Int_t GetNCentPoolBins() const {return fNCentBins;} | |
77 | Double_t *GetCentPoolBins() const {return fCentBins;} | |
78 | ||
79 | Int_t GetNofMCEventType() const {return fNofMCEventType;} | |
80 | Int_t *GetMCEventType() const {return fMCEventType;} | |
81 | Int_t GetPoolBin(Double_t multorcent, Double_t zVtx) const; | |
82 | ||
83 | Int_t GetNTrackCuts() const {return fNTrackCuts;} | |
84 | Float_t* GetAODTrackCuts() const {return fAODTrackCuts;} | |
85 | TString * GetTrackCutNames() const {return fTrackCutsNames;} | |
86 | Int_t GetNvZeroCuts() const {return fNvZeroCuts;} | |
87 | Float_t * GetAODvZeroCuts() const {return fAODvZeroCuts;} | |
88 | TString * GetvZeroCutNames() const {return fvZeroCutsNames;} | |
89 | Int_t GetFilterBit() const {return fBit;} | |
90 | Short_t GetCharge() const {return fCharge;} | |
91 | TString GetDescription() const {return fDescription;} | |
92 | ||
93 | ||
94 | ||
95 | ||
96 | ||
97 | void AddTrackCuts(const AliESDtrackCuts *cuts) { | |
98 | delete fESDTrackCuts; | |
99 | fESDTrackCuts=new AliESDtrackCuts(*cuts); | |
100 | return; | |
101 | } | |
102 | ||
103 | void AddDescription(TString description){fDescription=description;} | |
104 | ||
105 | //setters | |
106 | //event pool settings | |
107 | void SetMaxNEventsInPool(Int_t events){fPoolMaxNEvents=events;} | |
108 | void SetMinNTracksInPool(Int_t tracks){fPoolMinNTracks=tracks;} | |
109 | void SetMinEventsToMix(Int_t events){fMinEventsToMix=events;} | |
110 | ||
111 | void SetNofPoolBins(Int_t Nzvtxbins, Int_t Ncentbins){ | |
112 | fNzVtxBins=Nzvtxbins; | |
113 | fNzVtxBinsDim=Nzvtxbins+1; | |
114 | ||
115 | fNCentBins=Ncentbins; | |
116 | fNCentBinsDim=Ncentbins+1; | |
117 | } | |
118 | ||
119 | void SetPoolBins(Double_t *ZvtxBins, Double_t* CentBins){ | |
120 | fZvtxBins=ZvtxBins; | |
121 | fCentBins=CentBins; | |
122 | } | |
123 | ||
124 | // set MC events to process | |
125 | ||
126 | void SetNofMCEventTypes(Int_t k) {fNofMCEventType=k;} | |
127 | void SetMCEventTypes(Int_t *MCEventTypeArray); | |
128 | ||
129 | //cut settings | |
130 | void SetAODTrackCuts(Float_t *cutsarray); | |
131 | void SetTrackCutsNames(/*TString *namearray*/); | |
132 | void SetAODvZeroCuts(Float_t *cutsarray); | |
133 | void SetvZeroCutsNames(/*TString *namearray*/); | |
134 | void SetPidHF(AliAODPidHF* pid) {fPidObj = pid; return;} | |
135 | void SetCharge(Short_t charge) {fCharge = charge;} | |
136 | void SetFilterBit(Int_t bit) {fBit = bit;} | |
137 | void SetEfficiencyWeightMap(TH3D *hMap){if(fEffWeights)delete fEffWeights;fEffWeights=(TH3D*)hMap->Clone();} | |
138 | ||
139 | void SetTriggerEffWeightMapvspt(TH1D* hTrigMap) {if(fTrigEffWeightsvspt) delete fTrigEffWeightsvspt; fTrigEffWeightsvspt=(TH1D*)hTrigMap->Clone();} | |
140 | void SetTriggerEffWeightMapvsptB(TH1D* hTrigMapB) {if(fTrigEffWeightsvsptB) delete fTrigEffWeightsvsptB; fTrigEffWeightsvsptB=(TH1D*)hTrigMapB->Clone();} | |
141 | ||
142 | void SetTriggerEffWeightMap(TH2D* hTrigMap) {if(fTrigEffWeights) delete fTrigEffWeights; fTrigEffWeights=(TH2D*)hTrigMap->Clone();} | |
143 | void SetTriggerEffWeightMapB(TH2D* hTrigMapB) {if(fTrigEffWeightsB) delete fTrigEffWeightsB; fTrigEffWeightsB=(TH2D*)hTrigMapB->Clone();} | |
144 | ||
145 | ||
146 | Double_t GetTrackWeight(Double_t pt, Double_t eta,Double_t zvtx); | |
147 | Double_t GetTrigWeight(Double_t pt, Double_t mult=0); | |
148 | Double_t GetTrigWeightB(Double_t pt, Double_t mult=0); | |
149 | ||
150 | Bool_t IsTrackEffMap(){if(fEffWeights) return kTRUE; else return kFALSE;} | |
151 | Bool_t IsTrigEffMap1D(){ if(fTrigEffWeightsvspt) return kTRUE; else return kFALSE;} | |
152 | Bool_t IsTrigEffMap1DB(){ if(fTrigEffWeightsvsptB) return kTRUE; else return kFALSE;} | |
153 | Bool_t IsTrigEffMap2D(){ if(fTrigEffWeights) return kTRUE; else return kFALSE;} | |
154 | Bool_t IsTrigEffMap2DB(){ if(fTrigEffWeightsB) return kTRUE; else return kFALSE;} | |
155 | ||
156 | ||
157 | void Print(Option_t *option) const; | |
158 | virtual void PrintAll() const; | |
159 | virtual void PrintPoolParameters() const; | |
160 | virtual void PrintSelectedMCevents() const; | |
161 | ||
162 | ||
163 | ||
164 | ||
165 | void SetNVarsTrack(Int_t nVars){fNTrackCuts=nVars;} | |
166 | void SetNVarsVzero(Int_t nVars){fNvZeroCuts=nVars;} | |
167 | ||
168 | ||
169 | ||
170 | private: | |
171 | AliESDtrackCuts *fESDTrackCuts; // track cut object | |
172 | AliAODPidHF * fPidObj; /// PID object | |
173 | TH3D *fEffWeights; // weight map (pt,eta,zvtx) to account for single track efficiency | |
174 | TH1D *fTrigEffWeightsvspt; // weight map (pt,mult) to account for trigger efficiency (on data, from c) | |
175 | TH1D *fTrigEffWeightsvsptB; // weight map (pt,mult) to account for trigger efficiency (from b) | |
176 | TH2D *fTrigEffWeights; // weight map (pt,mult) to account for trigger efficiency (on data, from c) | |
177 | TH2D *fTrigEffWeightsB; // weight map (pt,mult) to account for trigger efficiency (from b) | |
178 | Int_t fPoolMaxNEvents; // set maximum number of events in the pool | |
179 | Int_t fPoolMinNTracks; // se minimum number of tracks in the pool | |
180 | Int_t fMinEventsToMix; // set the minimum number of events you wanna mix | |
181 | ||
182 | Int_t fNzVtxBins; // number of z vrtx bins | |
183 | Int_t fNzVtxBinsDim; // number of z vrtx bins +1 : necessary to initialize correctly the array | |
184 | Double_t* fZvtxBins; // [fNzVtxBinsDim] | |
185 | ||
186 | ||
187 | Int_t fNCentBins; //number of centrality bins | |
188 | Int_t fNCentBinsDim; //number of centrality bins bins +1 : necessary to initialize correctly the array | |
189 | Double_t* fCentBins; // [fNCentBinsDim] | |
190 | ||
191 | Int_t fNofMCEventType;// number of event types to be selected in MC simultaneously; | |
192 | Int_t *fMCEventType;//[fNofMCEventType] | |
193 | ||
194 | Int_t fNTrackCuts; // array dimension | |
195 | Float_t* fAODTrackCuts;//[fNTrackCuts] | |
196 | TString * fTrackCutsNames;//[fNTrackCuts] | |
197 | Int_t fNvZeroCuts;// array dimension | |
198 | Float_t *fAODvZeroCuts;//[fNvZeroCuts] | |
199 | TString * fvZeroCutsNames;//[fNvZeroCuts] | |
200 | Int_t fBit; // filterBit | |
201 | Short_t fCharge; // charge (+1 or -1) | |
202 | TString fDescription; // additional description to the cuts | |
203 | ||
204 | ||
205 | ClassDef(AliHFAssociatedTrackCuts,6); | |
206 | }; | |
207 | ||
208 | ||
209 | #endif |