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();
49 void SetDeltaPhiInterval (Double_t min, Double_t max){
50 fPhiMin = min; fPhiMax = max;
51 if(TMath::Abs(fPhiMin-fPhiMax) != 2*TMath::Pi()) AliInfo("AliHFCorrelator::Warning: the delta phi interval is not set to 2 Pi");
53 void SetEventMixing(Bool_t mixON){fmixing=mixON;}
54 void SetTriggerParticleProperties(Double_t ptTrig, Double_t phiTrig, Double_t etaTrig)
55 {fPtTrigger = ptTrig; fPhiTrigger = phiTrig; fEtaTrigger = etaTrig;}
56 void SetTriggerParticleDaughterCharge(Short_t charge) {fDCharge=charge;}
59 void SetAssociatedParticleType(Int_t type){fselect = type;}
60 void SetAODEvent(AliAODEvent* inputevent){fAODEvent = inputevent;}
61 void SetMCArray(TClonesArray* mcArray){fmcArray = mcArray;}
62 void SetUseMC(Bool_t useMC){fmontecarlo = useMC;}
63 void SetApplyDisplacementCut(Int_t applycut){fUseImpactParameter = applycut;}
64 void SetPIDmode(Int_t mode){fPIDmode = mode;}
66 void SetD0Properties(AliAODRecoDecayHF2Prong* d, Int_t D0hyp)
67 {fD0cand = d; fhypD0 = D0hyp;}
71 Bool_t DefineEventPool(); // Definition of the Event pool parameters
72 Bool_t Initialize(); // function that initlize everything for the analysis
73 Bool_t ProcessEventPool(); // processes the event pool
74 Bool_t ProcessAssociatedTracks(Int_t EventLoopIndex); //
75 Bool_t Correlate(Int_t loopindex); // function that computes the correlations between the trigger particle and the track n. loopindex
76 Bool_t PoolUpdate();// updates the event pool
77 Double_t SetCorrectPhiRange(Double_t phi); // sets all the angles in the correct range
80 AliEventPool* GetPool() {return fPool;}
81 TObjArray * GetTrackArray(){return fAssociatedTracks;}
82 AliHFAssociatedTrackCuts* GetSelectionCuts() {return fhadcuts;}
83 AliReducedParticle* GetAssociatedParticle() {return fReducedPart;}
85 Int_t GetNofTracks(){return fNofTracks;}
86 Int_t GetNofEventsInPool(){return fPoolContent;}
88 Double_t GetDeltaPhi(){return fDeltaPhi;} // Delta Phi, needs to be called after the method correlate
89 Double_t GetDeltaEta(){return fDeltaEta;} // Delta Eta
91 Double_t GetAssociatedKZeroInvariantmass(){return fk0InvMass;}
95 // methods to reduce the tracks to correlate with track selection cuts applied here
96 TObjArray* AcceptAndReduceTracks(AliAODEvent* inputEvent); // selecting hadrons and kaons
97 TObjArray* AcceptAndReduceKZero(AliAODEvent* inputEvent); // selecting kzeros
102 AliHFCorrelator(const AliHFCorrelator& vtxr);
103 AliHFCorrelator& operator=(const AliHFCorrelator& vtxr );
105 AliEventPoolManager* fPoolMgr; //! event pool manager
106 AliEventPool * fPool; //! Pool for event mixing
107 AliHFAssociatedTrackCuts* fhadcuts;//! hadron cuts
108 AliAODEvent * fAODEvent;//! AOD Event
109 TObjArray* fAssociatedTracks; // Array of associated tracks
110 TClonesArray* fmcArray; //mcarray
111 AliReducedParticle * fReducedPart; // reduced AOD particle;
112 AliAODRecoDecayHF2Prong* fD0cand; //D0 candidate
113 Int_t fhypD0; //hypothesis necessary for
114 Int_t fDCharge; // charge of a daughter of the D meson
116 Bool_t fmixing;// switch for event mixing
117 Bool_t fmontecarlo; // switch for MonteCarlo
118 Bool_t fsystem; // select pp (kFALSE) or PbPb (kTRUE)
119 Int_t fselect; // 1 for hadrons, 2 for kaons, 3 for KZeros
120 Int_t fUseImpactParameter; // switch to use the impact parameter cut
121 Int_t fPIDmode; // set the PID mode for Kaon identification
123 Int_t fNofTracks; // number of tracks in track array
124 Int_t fPoolContent; // n of events in pool
126 Double_t fPhiMin; // min for phi
127 Double_t fPhiMax; // max for phi
129 Double_t fPtTrigger; // pt of the trigger D meson
130 Double_t fPhiTrigger; // phi of the trigger D meson
131 Double_t fEtaTrigger; // Eta of the trigger D meson
134 Double_t fDeltaPhi; // delta phi between D meson and associated track
135 Double_t fDeltaEta; // delta eta between D meson and associated track
137 Double_t fk0InvMass; // KZero invariant mass
140 ClassDef(AliHFCorrelator,2); // class for HF correlations