]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/correlationHF/AliHFAssociatedTrackCuts.h
2348e38073cd3c4881764564cc35c8f587a7f81b
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliHFAssociatedTrackCuts.h
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 "AliAODPidHF.h"
31 #include "AliAODEvent.h"
32 #include "AliAODRecoDecayHF2Prong.h"
33 #include <TClonesArray.h>
34
35
36
37 class AliAODTrack;
38 class AliAODEvent;
39
40
41 //
42 class AliHFAssociatedTrackCuts : public AliAnalysisCuts
43 {
44         public: 
45         AliHFAssociatedTrackCuts();
46         AliHFAssociatedTrackCuts(const char* name, const char* title);
47         
48         
49         AliHFAssociatedTrackCuts(const AliHFAssociatedTrackCuts& source);
50         AliHFAssociatedTrackCuts& operator=(const AliHFAssociatedTrackCuts& source);
51         
52         virtual ~AliHFAssociatedTrackCuts(); // destructor
53         Bool_t IsSelected(TList*  list) {if(list) return kTRUE; return kFALSE;};
54         Bool_t IsSelected(TObject*  obj) {if(obj) return kTRUE; return kFALSE;};
55         Bool_t IsInAcceptance();
56         Bool_t IsHadronSelected(AliAODTrack * track);
57         Bool_t CheckHadronKinematic(Double_t pt, Double_t d0); 
58         Bool_t Charge(Short_t charge, AliAODTrack* track);
59         Bool_t CheckKaonCompatibility(AliAODTrack * track, Bool_t useMc, TClonesArray* mcArray, Int_t method=1);
60         Bool_t IsKZeroSelected(AliAODv0 *vzero, AliAODVertex *vtx1);
61         Bool_t *IsMCpartFromHF(Int_t label, TClonesArray*mcArray);
62         Bool_t InvMassDstarRejection(AliAODRecoDecayHF2Prong* d, AliAODTrack *track, Int_t hypD0) const;
63         void SetPidAssociated();        
64         
65         //getters
66         Int_t GetMaxNEventsInPool() {return fPoolMaxNEvents;}
67         Int_t GetMinNTracksInPool() {return fPoolMinNTracks;}
68         Int_t GetMinEventsToMix(){return fMinEventsToMix;}
69         Int_t GetNZvtxPoolBins() {return fNzVtxBins;}
70         Double_t *GetZvtxPoolBins(){return fZvtxBins;}
71         Int_t GetNCentPoolBins() {return fNCentBins;}
72         Double_t *GetCentPoolBins(){return fCentBins;}
73         
74         Int_t GetNofMCEventType(){return fNofMCEventType;}      
75         Int_t *GetMCEventType(){return fMCEventType;}
76         TString GetDescription(){return fDescription;}
77         Int_t GetNVarsTrack(){return fNTrackCuts;}
78         
79         
80         
81         void AddTrackCuts(const AliESDtrackCuts *cuts) {
82                 delete fESDTrackCuts; 
83                 fESDTrackCuts=new AliESDtrackCuts(*cuts); 
84                 return;
85         }
86         
87         void AddDescription(TString description){fDescription=description;}
88         
89         //setters
90         //event pool settings
91         void SetMaxNEventsInPool(Int_t events){fPoolMaxNEvents=events;}
92         void SetMinNTracksInPool(Int_t tracks){fPoolMinNTracks=tracks;}
93         void SetMinEventsToMix(Int_t events){fMinEventsToMix=events;}
94         
95         void SetNofPoolBins(Int_t Nzvtxbins, Int_t Ncentbins){
96                 fNzVtxBins=Nzvtxbins;
97                 fNzVtxBinsDim=Nzvtxbins+1;
98                 
99             fNCentBins=Ncentbins;
100                 fNCentBinsDim=Ncentbins+1;
101         }
102         
103         void SetPoolBins(Double_t *ZvtxBins, Double_t* CentBins){
104                 fZvtxBins=ZvtxBins; 
105                 fCentBins=CentBins;
106         }
107         
108         // set MC events to process
109         
110         void SetNofMCEventTypes(Int_t k) {fNofMCEventType=k;}
111         void SetMCEventTypes(Int_t *MCEventTypeArray);
112         
113         //cut settings
114         void SetAODTrackCuts(Float_t *cutsarray);
115         void SetTrackCutsNames(/*TString *namearray*/);
116         void SetAODvZeroCuts(Float_t *cutsarray);
117         void SetvZeroCutsNames(/*TString *namearray*/);
118         void SetPidHF(AliAODPidHF* pid) {fPidObj = pid; return;}
119         void SetCharge(Short_t charge) {fCharge = charge;}
120         void SetFilterBit(Int_t bit) {fBit = bit;}
121         virtual void PrintAll();
122         virtual void PrintPoolParameters();
123         virtual void PrintSelectedMCevents();
124
125         
126         
127         
128         void SetNVarsTrack(Int_t nVars){fNTrackCuts=nVars;}
129         void SetNVarsVzero(Int_t nVars){fNvZeroCuts=nVars;}
130         
131         
132         
133 private:
134         AliESDtrackCuts *fESDTrackCuts; // track cut object
135         AliAODPidHF * fPidObj;     /// PID object
136         
137         Int_t fPoolMaxNEvents; // set maximum number of events in the pool
138         Int_t fPoolMinNTracks; // se minimum number of tracks in the pool
139         Int_t fMinEventsToMix; // set the minimum number of events you wanna mix
140         
141         Int_t fNzVtxBins; // number of z vrtx bins
142         Int_t fNzVtxBinsDim; // number of z vrtx bins +1 : necessary to initialize correctly the array
143         Double_t* fZvtxBins; // [fNzVtxBinsDim]
144         
145         
146         Int_t fNCentBins; //number of centrality bins
147         Int_t fNCentBinsDim; //number of centrality bins bins +1 : necessary to initialize correctly the array
148         Double_t* fCentBins; // [fNCentBinsDim]
149         
150         Int_t fNofMCEventType;// number of event types to be selected in MC simultaneously;
151         Int_t *fMCEventType;//[fNofMCEventType]
152         
153         Int_t fNTrackCuts;     // array dimension
154         Float_t* fAODTrackCuts;//[fNTrackCuts]
155         TString * fTrackCutsNames;//[fNTrackCuts]
156         Int_t fNvZeroCuts;// array dimension
157         Float_t *fAODvZeroCuts;//[fNvZeroCuts]
158         TString * fvZeroCutsNames;//[fNvZeroCuts]
159         Int_t fBit; // filterBit
160         Short_t fCharge; // charge (+1 or -1)
161         TString fDescription; // additional description to the cuts
162         
163         
164         ClassDef(AliHFAssociatedTrackCuts,4);
165 };
166
167
168 #endif