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,const 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;}
82 Int_t GetNTrackCuts() const {return fNTrackCuts;}
83 Float_t* GetAODTrackCuts() const {return fAODTrackCuts;}
84 TString * GetTrackCutNames() const {return fTrackCutsNames;}
85 Int_t GetNvZeroCuts() const {return fNvZeroCuts;}
86 Float_t * GetAODvZeroCuts() const {return fAODvZeroCuts;}
87 TString * GetvZeroCutNames() const {return fvZeroCutsNames;}
88 Int_t GetFilterBit() const {return fBit;}
89 Short_t GetCharge() const {return fCharge;}
90 TString GetDescription() const {return fDescription;}
94 void AddTrackCuts(const AliESDtrackCuts *cuts) {
96 fESDTrackCuts=new AliESDtrackCuts(*cuts);
100 void AddDescription(TString description){fDescription=description;}
103 //event pool settings
104 void SetMaxNEventsInPool(Int_t events){fPoolMaxNEvents=events;}
105 void SetMinNTracksInPool(Int_t tracks){fPoolMinNTracks=tracks;}
106 void SetMinEventsToMix(Int_t events){fMinEventsToMix=events;}
108 void SetNofPoolBins(Int_t Nzvtxbins, Int_t Ncentbins){
109 fNzVtxBins=Nzvtxbins;
110 fNzVtxBinsDim=Nzvtxbins+1;
112 fNCentBins=Ncentbins;
113 fNCentBinsDim=Ncentbins+1;
116 void SetPoolBins(Double_t *ZvtxBins, Double_t* CentBins){
121 // set MC events to process
123 void SetNofMCEventTypes(Int_t k) {fNofMCEventType=k;}
124 void SetMCEventTypes(Int_t *MCEventTypeArray);
127 void SetAODTrackCuts(Float_t *cutsarray);
128 void SetTrackCutsNames(/*TString *namearray*/);
129 void SetAODvZeroCuts(Float_t *cutsarray);
130 void SetvZeroCutsNames(/*TString *namearray*/);
131 void SetPidHF(AliAODPidHF* pid) {fPidObj = pid; return;}
132 void SetCharge(Short_t charge) {fCharge = charge;}
133 void SetFilterBit(Int_t bit) {fBit = bit;}
134 void SetEfficiencyWeightMap(TH3D *hMap){if(fEffWeights)delete fEffWeights;fEffWeights=(TH3D*)hMap->Clone();}
135 Double_t GetTrackWeight(Double_t pt, Double_t eta,Double_t zvtx);
136 void Print(Option_t *option) const;
137 virtual void PrintAll() const;
138 virtual void PrintPoolParameters() const;
139 virtual void PrintSelectedMCevents() const;
144 void SetNVarsTrack(Int_t nVars){fNTrackCuts=nVars;}
145 void SetNVarsVzero(Int_t nVars){fNvZeroCuts=nVars;}
150 AliESDtrackCuts *fESDTrackCuts; // track cut object
151 AliAODPidHF * fPidObj; /// PID object
152 TH3D *fEffWeights; // weight map (pt,eta,zvtx) to account for single track efficiency
153 Int_t fPoolMaxNEvents; // set maximum number of events in the pool
154 Int_t fPoolMinNTracks; // se minimum number of tracks in the pool
155 Int_t fMinEventsToMix; // set the minimum number of events you wanna mix
157 Int_t fNzVtxBins; // number of z vrtx bins
158 Int_t fNzVtxBinsDim; // number of z vrtx bins +1 : necessary to initialize correctly the array
159 Double_t* fZvtxBins; // [fNzVtxBinsDim]
162 Int_t fNCentBins; //number of centrality bins
163 Int_t fNCentBinsDim; //number of centrality bins bins +1 : necessary to initialize correctly the array
164 Double_t* fCentBins; // [fNCentBinsDim]
166 Int_t fNofMCEventType;// number of event types to be selected in MC simultaneously;
167 Int_t *fMCEventType;//[fNofMCEventType]
169 Int_t fNTrackCuts; // array dimension
170 Float_t* fAODTrackCuts;//[fNTrackCuts]
171 TString * fTrackCutsNames;//[fNTrackCuts]
172 Int_t fNvZeroCuts;// array dimension
173 Float_t *fAODvZeroCuts;//[fNvZeroCuts]
174 TString * fvZeroCutsNames;//[fNvZeroCuts]
175 Int_t fBit; // filterBit
176 Short_t fCharge; // charge (+1 or -1)
177 TString fDescription; // additional description to the cuts
180 ClassDef(AliHFAssociatedTrackCuts,5);