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;}
58 void SetAssociatedParticleType(Int_t type){fselect = type;}
59 void SetAODEvent(AliAODEvent* inputevent){fAODEvent = inputevent;}
60 void SetMCArray(TClonesArray* mcArray){fmcArray = mcArray;}
61 void SetUseMC(Bool_t useMC){fmontecarlo = useMC;}
62 void SetApplyDisplacementCut(Int_t applycut){fUseImpactParameter = applycut;}
63 void SetPIDmode(Int_t mode){fPIDmode = mode;}
65 void SetD0Properties(AliAODRecoDecayHF2Prong* d, Int_t D0hyp)
66 {fD0cand = d; fhypD0 = D0hyp;}
70 Bool_t DefineEventPool(); // Definition of the Event pool parameters
71 Bool_t Initialize(); // function that initlize everything for the analysis
72 Bool_t ProcessEventPool(); // processes the event pool
73 Bool_t ProcessAssociatedTracks(Int_t EventLoopIndex); //
74 Bool_t Correlate(Int_t loopindex); // function that computes the correlations between the trigger particle and the track n. loopindex
75 Bool_t PoolUpdate();// updates the event pool
76 Double_t SetCorrectPhiRange(Double_t phi); // sets all the angles in the correct range
79 AliEventPool* GetPool() {return fPool;}
80 TObjArray * GetTrackArray(){return fAssociatedTracks;}
81 AliHFAssociatedTrackCuts* GetSelectionCuts() {return fhadcuts;}
82 AliReducedParticle* GetAssociatedParticle() {return fReducedPart;}
84 Int_t GetNofTracks(){return fNofTracks;}
85 Int_t GetNofEventsInPool(){return fPoolContent;}
87 /*Double_t GetAssociatedTrackPt() {return fPtAssoc;} // pt of the associated track
88 Double_t GetAssociatedTrackPhi() {return fPhiAssoc;} // phi of the associated track
89 Double_t GetAssociatedTrackEta() {return fEtaAssoc;} // Eta of the associated track
90 Int_t GetAssociatedTrackLabel() {return fTrackLabel;} // tracklabel associated track
91 Int_t GetAssociatedTrackID() {return fTrackID;} // trackID associated track
92 Double_t GetAssociatedTrackImpPar() {return fTrackImpPar;} // impact parameter of the track
93 Bool_t GetAssociatedTrackSoftPiCompatibility() {return fIsSoftPiCand;}
95 Double_t GetDeltaPhi(){return fDeltaPhi;} // Delta Phi, needs to be called after the method correlate
96 Double_t GetDeltaEta(){return fDeltaEta;} // Delta Eta
98 Double_t GetAssociatedKZeroInvariantmass(){return fk0InvMass;}
102 // methods to reduce the tracks to correlate with track selection cuts applied here
103 TObjArray* AcceptAndReduceTracks(AliAODEvent* inputEvent); // selecting hadrons and kaons
104 TObjArray* AcceptAndReduceKZero(AliAODEvent* inputEvent); // selecting kzeros
109 AliHFCorrelator(const AliHFCorrelator& vtxr);
110 AliHFCorrelator& operator=(const AliHFCorrelator& vtxr );
112 AliEventPoolManager* fPoolMgr; //! event pool manager
113 AliEventPool * fPool; //! Pool for event mixing
114 AliHFAssociatedTrackCuts* fhadcuts;//! hadron cuts
115 AliAODEvent * fAODEvent;//! AOD Event
116 TObjArray* fAssociatedTracks; // Array of associated tracks
117 TClonesArray* fmcArray; //mcarray
118 AliReducedParticle * fReducedPart; // reduced AOD particle;
119 AliAODRecoDecayHF2Prong* fD0cand; //D0 candidate
120 Int_t fhypD0; //hypothesis necessary for
122 Bool_t fmixing;// switch for event mixing
123 Bool_t fmontecarlo; // switch for MonteCarlo
124 Bool_t fsystem; // select pp (kFALSE) or PbPb (kTRUE)
125 Int_t fselect; // 1 for hadrons, 2 for kaons, 3 for KZeros
126 Int_t fUseImpactParameter; // switch to use the impact parameter cut
127 Int_t fPIDmode; // set the PID mode for Kaon identification
129 Int_t fNofTracks; // number of tracks in track array
130 Int_t fPoolContent; // n of events in pool
132 Double_t fPhiMin; // min for phi
133 Double_t fPhiMax; // max for phi
135 Double_t fPtTrigger; // pt of the trigger D meson
136 Double_t fPhiTrigger; // phi of the trigger D meson
137 Double_t fEtaTrigger; // Eta of the trigger D meson
139 // Double_t fPtAssoc; // pt of the trigger D meson
140 // Double_t fPhiAssoc; // phi of the trigger D meson
141 // Double_t fEtaAssoc; // Eta of the trigger D meson
142 // Int_t fTrackLabel; // tracklabel
143 // Int_t fTrackID; // trackID
144 // Double_t fTrackImpPar; // Impact parameter of the track in respect to the vertex
145 // Bool_t fIsSoftPiCand; // is kTRUE if the track is compatible with a soft pion hypothesis (necessary for D0 analysis)
147 Double_t fDeltaPhi; // delta phi between D meson and associated track
148 Double_t fDeltaEta; // delta eta between D meson and associated track
150 Double_t fk0InvMass; // KZero invariant mass
153 ClassDef(AliHFCorrelator,1); // class for HF correlations