1 #ifndef AliHFCorrelator_H
2 #define AliHFCorrelator_H
4 /**************************************************************************
5 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
20 // Base class for Heavy Flavour Correlations Analysis
21 // Single Event and Mixed Event Analysis are implemented
22 //-----------------------------------------------------------------------
25 // Author S.Bjelogrlic
27 // sandro.bjelogrlic@cern.ch
29 //-----------------------------------------------------------------------
33 #include "AliHFAssociatedTrackCuts.h"
34 #include "AliEventPoolManager.h"
35 #include "AliVParticle.h"
36 #include "AliReducedParticle.h"
39 class AliHFCorrelator : public TNamed
45 AliHFCorrelator(const Char_t* name, AliHFAssociatedTrackCuts *cuts, Bool_t ppOrPbPb);
46 virtual ~AliHFCorrelator();
48 // enum for setting which associated particle type to work with
58 void SetDeltaPhiInterval (Double_t min, Double_t max){
59 fPhiMin = min; fPhiMax = max;
60 if(TMath::Abs(fPhiMin-fPhiMax) != 2*TMath::Pi()) AliInfo("AliHFCorrelator::Warning: the delta phi interval is not set to 2 Pi");
62 void SetEventMixing(Bool_t mixON){fmixing=mixON;}
63 void SetTriggerParticleProperties(Double_t ptTrig, Double_t phiTrig, Double_t etaTrig)
64 {fPtTrigger = ptTrig; fPhiTrigger = phiTrig; fEtaTrigger = etaTrig;}
65 void SetTriggerParticleDaughterCharge(Short_t charge) {fDCharge=charge;}
68 void SetAssociatedParticleType(Int_t type){fselect = type;}
69 void SetAODEvent(AliAODEvent* inputevent){fAODEvent = inputevent;}
70 void SetMCArray(TClonesArray* mcArray){fmcArray = mcArray;}
71 void SetUseMC(Bool_t useMC){fmontecarlo = useMC;}
72 void SetApplyDisplacementCut(Int_t applycut){fUseImpactParameter = applycut;}
73 void SetPIDmode(Int_t mode){fPIDmode = mode;}
75 void SetD0Properties(AliAODRecoDecayHF2Prong* d, Int_t D0hyp)
76 {fD0cand = d; fhypD0 = D0hyp;}
78 void SetUseReco(Bool_t useReco) {fUseReco = useReco;}
82 Bool_t DefineEventPool(); // Definition of the Event pool parameters
83 Bool_t Initialize(); // function that initlize everything for the analysis
84 Bool_t ProcessEventPool(); // processes the event pool
85 Bool_t ProcessAssociatedTracks(Int_t EventLoopIndex, const TObjArray* associatedTracks=NULL); //
86 Bool_t Correlate(Int_t loopindex); // function that computes the correlations between the trigger particle and the track n. loopindex
87 Bool_t PoolUpdate(const TObjArray* associatedTracks=NULL);// updates the event pool
88 Double_t SetCorrectPhiRange(Double_t phi); // sets all the angles in the correct range
89 void SetPidAssociated() {fhadcuts->SetPidAssociated();}
92 AliEventPool* GetPool() {return fPool;}
93 TObjArray * GetTrackArray(){return fAssociatedTracks;}
94 AliHFAssociatedTrackCuts* GetSelectionCuts() {return fhadcuts;}
95 AliReducedParticle* GetAssociatedParticle() {return fReducedPart;}
97 Int_t GetNofTracks(){return fNofTracks;}
98 Int_t GetNofEventsInPool(){return fPoolContent;}
100 Double_t GetDeltaPhi(){return fDeltaPhi;} // Delta Phi, needs to be called after the method correlate
101 Double_t GetDeltaEta(){return fDeltaEta;} // Delta Eta
103 Double_t GetAssociatedKZeroInvariantmass(){return fk0InvMass;}
107 // methods to reduce the tracks to correlate with track selection cuts applied here
108 TObjArray* AcceptAndReduceTracks(AliAODEvent* inputEvent); // selecting hadrons and kaons
109 TObjArray* AcceptAndReduceKZero(AliAODEvent* inputEvent); // selecting kzeros
114 AliHFCorrelator(const AliHFCorrelator& vtxr);
115 AliHFCorrelator& operator=(const AliHFCorrelator& vtxr );
117 AliEventPoolManager* fPoolMgr; //! event pool manager
118 AliEventPool * fPool; //! Pool for event mixing
119 AliHFAssociatedTrackCuts* fhadcuts;//! hadron cuts
120 AliAODEvent * fAODEvent;//! AOD Event
121 TObjArray* fAssociatedTracks; // Array of associated tracks
122 TClonesArray* fmcArray; //mcarray
123 AliReducedParticle * fReducedPart; // reduced AOD particle;
124 AliAODRecoDecayHF2Prong* fD0cand; //D0 candidate
125 Int_t fhypD0; //hypothesis necessary for
126 Int_t fDCharge; // charge of a daughter of the D meson
128 Bool_t fmixing;// switch for event mixing
129 Bool_t fmontecarlo; // switch for MonteCarlo
130 Bool_t fsystem; // select pp (kFALSE) or PbPb (kTRUE)
131 Bool_t fUseReco; // switch to use reconstruction (kTRUE) or MC truth (kFALSE)
133 Int_t fselect; // 1 for hadrons, 2 for kaons, 3 for KZeros
134 Int_t fUseImpactParameter; // switch to use the impact parameter cut
135 Int_t fPIDmode; // set the PID mode for Kaon identification
137 Int_t fNofTracks; // number of tracks in track array
138 Int_t fPoolContent; // n of events in pool
140 Double_t fPhiMin; // min for phi
141 Double_t fPhiMax; // max for phi
143 Double_t fPtTrigger; // pt of the trigger D meson
144 Double_t fPhiTrigger; // phi of the trigger D meson
145 Double_t fEtaTrigger; // Eta of the trigger D meson
148 Double_t fDeltaPhi; // delta phi between D meson and associated track
149 Double_t fDeltaEta; // delta eta between D meson and associated track
151 Double_t fk0InvMass; // KZero invariant mass
154 ClassDef(AliHFCorrelator,3); // class for HF correlations