]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/correlationHF/AliHFCorrelator.h
Real data task modifications for c*tau problem investigation:
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliHFCorrelator.h
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
31 /* $Id$ */
32
33 #include "AliHFAssociatedTrackCuts.h"
34 #include "AliEventPoolManager.h"
35 #include "AliVParticle.h"
36 #include "AliReducedParticle.h"
37
38
39 class AliHFCorrelator : public TNamed
40 {
41         
42  public:
43         
44         AliHFCorrelator();
45         AliHFCorrelator(const Char_t* name, AliHFAssociatedTrackCuts *cuts, Bool_t ppOrPbPb);
46         virtual ~AliHFCorrelator();
47         
48         //setters
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");
52         }
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;}
57         
58         
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;}
65         
66         void SetD0Properties(AliAODRecoDecayHF2Prong* d, Int_t D0hyp)
67         {fD0cand = d; fhypD0 = D0hyp;}
68         
69         void SetUseReco(Bool_t useReco) {fUseReco = useReco;}
70         
71         
72         
73         Bool_t DefineEventPool(); // Definition of the Event pool parameters
74         Bool_t Initialize(); // function that initlize everything for the analysis      
75         Bool_t ProcessEventPool(); // processes the event pool
76         Bool_t ProcessAssociatedTracks(Int_t EventLoopIndex); //
77         Bool_t Correlate(Int_t loopindex); // function that computes the correlations between the trigger particle and the track n. loopindex
78         Bool_t PoolUpdate();// updates the event pool
79         Double_t SetCorrectPhiRange(Double_t phi); // sets all the angles in the correct range
80         void SetPidAssociated() {fhadcuts->SetPidAssociated();}
81
82         //getters
83         AliEventPool* GetPool() {return fPool;}
84         TObjArray * GetTrackArray(){return fAssociatedTracks;}
85         AliHFAssociatedTrackCuts* GetSelectionCuts() {return fhadcuts;}
86         AliReducedParticle* GetAssociatedParticle() {return fReducedPart;}
87         
88         Int_t GetNofTracks(){return fNofTracks;}
89         Int_t GetNofEventsInPool(){return fPoolContent;}
90
91         Double_t GetDeltaPhi(){return fDeltaPhi;} // Delta Phi, needs to be called after the method correlate 
92         Double_t GetDeltaEta(){return fDeltaEta;} // Delta Eta
93         
94         Double_t GetAssociatedKZeroInvariantmass(){return fk0InvMass;}
95         
96         
97         
98         // methods to reduce the tracks to correlate with track selection cuts applied here
99         TObjArray*  AcceptAndReduceTracks(AliAODEvent* inputEvent); // selecting hadrons and kaons
100         TObjArray*  AcceptAndReduceKZero(AliAODEvent* inputEvent); // selecting kzeros
101         
102         
103  private:
104
105         AliHFCorrelator(const AliHFCorrelator& vtxr);
106         AliHFCorrelator& operator=(const AliHFCorrelator& vtxr );
107
108         AliEventPoolManager* fPoolMgr;         //! event pool manager
109         AliEventPool * fPool; //! Pool for event mixing
110         AliHFAssociatedTrackCuts* fhadcuts;//! hadron cuts
111         AliAODEvent * fAODEvent;//! AOD Event
112         TObjArray* fAssociatedTracks; // Array of associated tracks
113         TClonesArray* fmcArray; //mcarray
114         AliReducedParticle * fReducedPart; // reduced AOD particle;
115         AliAODRecoDecayHF2Prong* fD0cand; //D0 candidate
116         Int_t fhypD0; //hypothesis necessary for
117         Int_t fDCharge; // charge of a daughter of the D meson
118         
119         Bool_t fmixing;// switch for event mixing
120         Bool_t fmontecarlo; // switch for MonteCarlo
121         Bool_t fsystem; // select pp (kFALSE) or PbPb (kTRUE)
122         Bool_t fUseReco; // switch to use reconstruction (kTRUE) or MC truth (kFALSE)
123         
124         Int_t fselect; // 1 for hadrons, 2 for kaons, 3 for KZeros
125         Int_t fUseImpactParameter; // switch to use the impact parameter cut
126         Int_t fPIDmode; // set the PID mode for Kaon identification
127         
128         Int_t fNofTracks; // number of tracks in track array
129         Int_t fPoolContent; //  n of events in pool
130         
131         Double_t fPhiMin; // min for phi
132         Double_t fPhiMax; // max for phi
133         
134         Double_t fPtTrigger; // pt of the trigger D meson
135         Double_t fPhiTrigger; // phi of the trigger D meson
136         Double_t fEtaTrigger; // Eta of the trigger D meson
137
138         
139         Double_t fDeltaPhi; // delta phi between D meson and associated track
140         Double_t fDeltaEta; // delta eta between D meson and associated track
141         
142         Double_t fk0InvMass; // KZero invariant mass
143         
144         
145         ClassDef(AliHFCorrelator,3); // class for HF correlations       
146 };
147
148
149
150
151
152 #endif