1 #ifndef AliHFAssociatedTrackCuts_H
2 #define AliHFAssociatedTrackCuts_H
3 /**************************************************************************
4 * Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
20 ////////////////////////////////////////////////////////////////////////
22 // Base class for cuts on Associated tracks for HF Correlation analysis
24 // Author: S.Bjelogrlic (Utrecht) sandro.bjelogrlic@cern.ch
25 ////////////////////////////////////////////////////////////////////////
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>
43 class AliHFAssociatedTrackCuts : public AliAnalysisCuts
46 AliHFAssociatedTrackCuts();
47 AliHFAssociatedTrackCuts(const char* name, const char* title);
50 AliHFAssociatedTrackCuts(const AliHFAssociatedTrackCuts& source);
51 AliHFAssociatedTrackCuts& operator=(const AliHFAssociatedTrackCuts& source);
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();
67 AliESDtrackCuts * GetESDTrackCuts() const {return fESDTrackCuts;}
68 AliAODPidHF * GetPIDObject() const {return fPidObj;}
69 TH3D * GetEfficiencyWeight() const {return fEffWeights;}
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;}
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;
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;}
97 void AddTrackCuts(const AliESDtrackCuts *cuts) {
99 fESDTrackCuts=new AliESDtrackCuts(*cuts);
103 void AddDescription(TString description){fDescription=description;}
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;}
111 void SetNofPoolBins(Int_t Nzvtxbins, Int_t Ncentbins){
112 fNzVtxBins=Nzvtxbins;
113 fNzVtxBinsDim=Nzvtxbins+1;
115 fNCentBins=Ncentbins;
116 fNCentBinsDim=Ncentbins+1;
119 void SetPoolBins(Double_t *ZvtxBins, Double_t* CentBins){
124 // set MC events to process
126 void SetNofMCEventTypes(Int_t k) {fNofMCEventType=k;}
127 void SetMCEventTypes(Int_t *MCEventTypeArray);
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();}
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();}
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();}
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);
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;}
157 void Print(Option_t *option) const;
158 virtual void PrintAll() const;
159 virtual void PrintPoolParameters() const;
160 virtual void PrintSelectedMCevents() const;
165 void SetNVarsTrack(Int_t nVars){fNTrackCuts=nVars;}
166 void SetNVarsVzero(Int_t nVars){fNvZeroCuts=nVars;}
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
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]
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]
191 Int_t fNofMCEventType;// number of event types to be selected in MC simultaneously;
192 Int_t *fMCEventType;//[fNofMCEventType]
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
205 ClassDef(AliHFAssociatedTrackCuts,6);