Incrementing class version.
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliHFCorrelator.h
CommitLineData
c683985a 1#ifndef AliHFCorrelator_H
2#define AliHFCorrelator_H
3
4/**************************************************************************
5 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
6 * *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
9 * *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
18
19//
20// Base class for Heavy Flavour Correlations Analysis
21// Single Event and Mixed Event Analysis are implemented
22//-----------------------------------------------------------------------
23//
24//
25// Author S.Bjelogrlic
26// Utrecht University
27// sandro.bjelogrlic@cern.ch
28//
29//-----------------------------------------------------------------------
30
1b8b4a2c 31/* $Id: AliHFCorrelator.h 63605 2013-07-19 13:08:41Z arossi $ */
c683985a 32
33#include "AliHFAssociatedTrackCuts.h"
34#include "AliEventPoolManager.h"
35#include "AliVParticle.h"
36#include "AliReducedParticle.h"
37#include "AliVertexingHFUtils.h"
1b8b4a2c 38#include "AliRDHFCuts.h"
c683985a 39
40
41class AliHFCorrelator : public TNamed
42{
43
44 public:
45
46 AliHFCorrelator();
1b8b4a2c
EB
47 AliHFCorrelator(const Char_t* name, AliHFAssociatedTrackCuts *cuts, Bool_t useCentrality);
48 AliHFCorrelator(const Char_t* name, AliHFAssociatedTrackCuts *cuts, Bool_t useCentrality, AliRDHFCuts *cutObject);
c683985a 49 virtual ~AliHFCorrelator();
50
51 // enum for setting which associated particle type to work with
52 enum{
53 kUndefined=0,
54 kHadron=1,
55 kKaon,
56 kKZero,
57 kElectron
58 };
59
60 //setters
61 void SetDeltaPhiInterval (Double_t min, Double_t max){
62 fPhiMin = min; fPhiMax = max;
63 if(TMath::Abs(fPhiMin-fPhiMax) != 2*TMath::Pi()) AliInfo("AliHFCorrelator::Warning: the delta phi interval is not set to 2 Pi");
64 }
1b8b4a2c
EB
65 void SetDMesonCutObject(AliRDHFCuts* cutObject){
66 if(fDMesonCutObject) delete fDMesonCutObject;
67
68 fDMesonCutObject = cutObject;
69 if(!fDMesonCutObject) printf("AliHFCorrelator::warning! D meson object not implemented correctly!");
70 }
c683985a 71 void SetEventMixing(Bool_t mixON){fmixing=mixON;}
72 void SetTriggerParticleProperties(Double_t ptTrig, Double_t phiTrig, Double_t etaTrig)
73 {fPtTrigger = ptTrig; fPhiTrigger = phiTrig; fEtaTrigger = etaTrig;}
74 void SetTriggerParticleDaughterCharge(Short_t charge) {fDCharge=charge;}
75
76
77 void SetAssociatedParticleType(Int_t type){fselect = type;}
78 void SetAODEvent(AliAODEvent* inputevent){fAODEvent = inputevent;}
79 void SetMCArray(TClonesArray* mcArray){fmcArray = mcArray;}
80 void SetUseMC(Bool_t useMC){fmontecarlo = useMC;}
81 void SetApplyDisplacementCut(Int_t applycut){fUseImpactParameter = applycut;}
82 void SetPIDmode(Int_t mode){fPIDmode = mode;}
83
84 void SetD0Properties(AliAODRecoDecayHF2Prong* d, Int_t D0hyp)
85 {fD0cand = d; fhypD0 = D0hyp;}
86
87 void SetUseReco(Bool_t useReco) {fUseReco = useReco;}
88
89
90
91 Bool_t DefineEventPool(); // Definition of the Event pool parameters
92 Bool_t Initialize(); // function that initlize everything for the analysis
93 Bool_t ProcessEventPool(); // processes the event pool
94 Bool_t ProcessAssociatedTracks(Int_t EventLoopIndex, const TObjArray* associatedTracks=NULL); //
95 Bool_t Correlate(Int_t loopindex); // function that computes the correlations between the trigger particle and the track n. loopindex
96 Bool_t PoolUpdate(const TObjArray* associatedTracks=NULL);// updates the event pool
97 Double_t SetCorrectPhiRange(Double_t phi); // sets all the angles in the correct range
98 void SetPidAssociated() {fhadcuts->SetPidAssociated();}
99
100 //getters
101 AliEventPool* GetPool() {return fPool;}
102 TObjArray * GetTrackArray(){return fAssociatedTracks;}
103 AliHFAssociatedTrackCuts* GetSelectionCuts() {return fhadcuts;}
104 AliReducedParticle* GetAssociatedParticle() {return fReducedPart;}
1b8b4a2c
EB
105
106 AliRDHFCuts* GetDMesonCutObject(){return fDMesonCutObject;}
c683985a 107
108 Int_t GetNofTracks(){return fNofTracks;}
109 Int_t GetNofEventsInPool(){return fPoolContent;}
110
111 Double_t GetDeltaPhi(){return fDeltaPhi;} // Delta Phi, needs to be called after the method correlate
112 Double_t GetDeltaEta(){return fDeltaEta;} // Delta Eta
1b8b4a2c 113 Double_t GetCentrality(){return fMultCentr;} // centrality or multiplicity
c683985a 114
115 Double_t GetAssociatedKZeroInvariantmass(){return fk0InvMass;}
116
117
118
119 // methods to reduce the tracks to correlate with track selection cuts applied here
120 TObjArray* AcceptAndReduceTracks(AliAODEvent* inputEvent); // selecting hadrons and kaons
121 TObjArray* AcceptAndReduceKZero(AliAODEvent* inputEvent); // selecting kzeros
122
123
124 private:
125
126 AliHFCorrelator(const AliHFCorrelator& vtxr);
127 AliHFCorrelator& operator=(const AliHFCorrelator& vtxr );
128
129 AliEventPoolManager* fPoolMgr; //! event pool manager
130 AliEventPool * fPool; //! Pool for event mixing
131 AliHFAssociatedTrackCuts* fhadcuts;//! hadron cuts
132 AliAODEvent * fAODEvent;//! AOD Event
1b8b4a2c 133 AliRDHFCuts * fDMesonCutObject; //! D meson cut object
c683985a 134 TObjArray* fAssociatedTracks; // Array of associated tracks
135 TClonesArray* fmcArray; //mcarray
136 AliReducedParticle * fReducedPart; // reduced AOD particle;
137 AliAODRecoDecayHF2Prong* fD0cand; //D0 candidate
138 Int_t fhypD0; //hypothesis necessary for
139 Int_t fDCharge; // charge of a daughter of the D meson
140
141 Bool_t fmixing;// switch for event mixing
142 Bool_t fmontecarlo; // switch for MonteCarlo
1b8b4a2c 143 Bool_t fUseCentrality; // select between multiplicity (kFALSE) or centrality (kTRUE)
c683985a 144 Bool_t fUseReco; // switch to use reconstruction (kTRUE) or MC truth (kFALSE)
145
146 Int_t fselect; // 1 for hadrons, 2 for kaons, 3 for KZeros
147 Int_t fUseImpactParameter; // switch to use the impact parameter cut
148 Int_t fPIDmode; // set the PID mode for Kaon identification
149
150 Int_t fNofTracks; // number of tracks in track array
151 Int_t fPoolContent; // n of events in pool
152
153 Double_t fPhiMin; // min for phi
154 Double_t fPhiMax; // max for phi
1b8b4a2c
EB
155
156 Double_t fMultCentr; // multiplicty/centrality for the event
c683985a 157
158 Double_t fPtTrigger; // pt of the trigger D meson
159 Double_t fPhiTrigger; // phi of the trigger D meson
160 Double_t fEtaTrigger; // Eta of the trigger D meson
161
162
163 Double_t fDeltaPhi; // delta phi between D meson and associated track
164 Double_t fDeltaEta; // delta eta between D meson and associated track
165
166 Double_t fk0InvMass; // KZero invariant mass
167
168
1b8b4a2c 169 ClassDef(AliHFCorrelator,4); // class for HF correlations
c683985a 170};
171
172
173
174
175
176#endif