]>
Commit | Line | Data |
---|---|---|
c683985a | 1 | #ifndef ALIANALYSISTASKFLAVOURJETCORRELATIONS_H |
2 | #define ALIANALYSISTASKFLAVOURJETCORRELATIONS_H | |
3 | /************************************************************************** | |
b2705b43 | 4 | * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. * |
5 | * * | |
6 | * Author: The ALICE Off-line Project. * | |
7 | * Contributors are mentioned in the code where appropriate. * | |
8 | * * | |
9 | * Permission to use, copy, modify and distribute this software and its * | |
10 | * documentation strictly for non-commercial purposes is hereby granted * | |
11 | * without fee, provided that the above copyright notice appears in all * | |
12 | * copies and that both the copyright notice and this permission notice * | |
13 | * appear in the supporting documentation. The authors make no claims * | |
14 | * about the suitability of this software for any purpose. It is * | |
15 | * provided "as is" without express or implied warranty. * | |
16 | **************************************************************************/ | |
c683985a | 17 | |
18 | //----------------------------------------------------------------------- | |
19 | // Author : A. Grelli, Utrecht University | |
20 | // C. Bianchin, Utrecht University | |
21 | // X. Zhang, LBNL | |
22 | //----------------------------------------------------------------------- | |
23 | ||
24 | ||
25 | #include <TH2F.h> | |
26 | #include "AliAODEvent.h" | |
27 | #include "AliPicoTrack.h" | |
28 | #include "AliAnalysisTaskEmcalJet.h" | |
60e4f65e | 29 | #include "AliRhoParameter.h" |
c683985a | 30 | |
31 | class TH3F; | |
32 | class TParticle ; | |
33 | class TClonesArray ; | |
0b7f0a99 | 34 | class THnSparse; |
c683985a | 35 | class AliMCParticle; |
36 | class AliAODMCParticle; | |
37 | class AliRDHFCuts; | |
38 | class AliEmcalJet; | |
39 | class AliAODRecoDecayHF; | |
40 | class AliAODRecoCascadeHF; | |
41 | class AliAODEvent; | |
cc5dbb3b | 42 | class AliParticleContainer; |
43 | class AliClusterContainer; | |
44 | class AliJetContainer; | |
c683985a | 45 | |
46 | class AliAnalysisTaskFlavourJetCorrelations : public AliAnalysisTaskEmcalJet | |
47 | { | |
b2705b43 | 48 | |
49 | public: | |
50 | ||
51 | enum ECandidateType{ kD0toKpi, kDstartoKpipi }; | |
52 | ||
53 | AliAnalysisTaskFlavourJetCorrelations(); | |
54 | AliAnalysisTaskFlavourJetCorrelations(const Char_t* name,AliRDHFCuts* cuts, ECandidateType candtype, Bool_t jetOnly=kFALSE); | |
55 | virtual ~AliAnalysisTaskFlavourJetCorrelations(); | |
56 | ||
57 | virtual void UserCreateOutputObjects(); | |
58 | virtual Bool_t Run(); | |
59 | virtual void Terminate(Option_t *); | |
60 | virtual void Init(); | |
61 | virtual void LocalInit() {Init();} | |
62 | ||
63 | // inizializations | |
64 | Bool_t DefineHistoForAnalysis(); | |
65 | ||
66 | // set MC usage | |
67 | void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;} | |
68 | Bool_t GetMC() const {return fUseMCInfo;} | |
69 | // set usage of reconstructed tracks | |
70 | void SetUseReco(Bool_t reco) {fUseReco=reco;} | |
71 | Bool_t GetUseReco() const {return fUseReco;} | |
72 | //no setter because needed in the constructor | |
73 | Bool_t GetJetOnlyMode() const {return fJetOnlyMode;} | |
74 | void SetTypeDJetSelection(Int_t type) {fTypeDInJet=type;} //see IsDInJet for possibilities | |
75 | Int_t GetTypeDJetSelection() const {return fTypeDInJet;} | |
76 | ||
77 | void SetMassLimits(Double_t range, Int_t pdg); | |
78 | void SetMassLimits(Double_t lowlimit, Double_t uplimit); | |
79 | ||
cc5dbb3b | 80 | //jet and track arrays |
81 | void SetJetArrayName(TString jetArrName) {fJetArrName=jetArrName;} | |
82 | TString GetJetArrayName() const {return fJetArrName;} | |
83 | void SetTrackArrayName(TString trackArrName) {fTrackArrName=trackArrName;} | |
84 | TString GetTrackArrayName() const {return fTrackArrName;} | |
b2705b43 | 85 | |
86 | // trigger on jet events | |
87 | void SetTriggerOnLeadingJet(Bool_t triggerOnLeadingJet) {fLeadingJetOnly=triggerOnLeadingJet;}; | |
88 | Bool_t GetTriggerOnLeadingJet() const {return fLeadingJetOnly;} | |
89 | ||
cc5dbb3b | 90 | // resolution parameter used in this task |
91 | void SetRadius(Double_t r){fJetRadius=r;} | |
92 | Double_t GetRadius() const {return fJetRadius;} | |
b2705b43 | 93 | |
94 | // Array of D0 width for the Dstar | |
95 | Bool_t SetD0WidthForDStar(Int_t nptbins,Float_t* width); | |
96 | ||
97 | //Bool_t FillMCDJetInfo(AliPicoTrack *jetTrk,AliEmcalJet* jet, TClonesArray *mcArray,Double_t ptjet); | |
98 | void FillHistogramsRecoJetCorr(AliVParticle* candidate, AliEmcalJet *jet, AliAODEvent* aodEvent); | |
ad6abcae | 99 | void FillHistogramsD0JetCorr(AliAODRecoDecayHF* candidate, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj, Bool_t bDInEMCalAcc, Bool_t bJetInEMCalAcc, AliAODEvent* aodEvent); |
b2705b43 | 100 | |
ad6abcae | 101 | void FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj, Bool_t bDInEMCalAcc, Bool_t bJetInEMCalAcc); |
102 | void FillHistogramsMCGenDJetCorr(Double_t dPhi, Double_t z,Double_t ptD,Double_t ptjet, Bool_t bDInEMCalAcc, Bool_t bJetInEMCalAcc); | |
b2705b43 | 103 | void SideBandBackground(AliAODRecoCascadeHF *candDstar, AliEmcalJet *jet); |
a1a0a01b | 104 | void MCBackground(AliAODRecoDecayHF *candbg, AliEmcalJet *jet); |
b2705b43 | 105 | void FillMassHistograms(Double_t mass,Double_t ptD); |
106 | void FlagFlavour(AliEmcalJet* jet); | |
107 | Int_t IsDzeroSideBand(AliAODRecoCascadeHF *candDstar); | |
ce11164d | 108 | Bool_t InEMCalAcceptance(AliVParticle *vpart); |
ad6abcae | 109 | |
110 | void LightTHnSparse(){ | |
111 | fSwitchOnSB=0; | |
112 | fSwitchOnPhiAxis=0; | |
113 | fSwitchOnOutOfConeAxis=0; | |
114 | } | |
115 | void HeavyTHnSparse(){ | |
116 | fSwitchOnSB=1; | |
117 | fSwitchOnPhiAxis=1; | |
118 | fSwitchOnOutOfConeAxis=1; | |
119 | } | |
120 | ||
121 | void TurnOffTHnSparse() {fSwitchOnSparses=kFALSE;} | |
122 | ||
123 | /* | |
124 | void SwitchOnSB(){fSwitchOnSB=1;}; | |
125 | void SwitchOffSB(){fSwitchOnSB=0;}; | |
126 | void SwitchOnPhiAxis(){fSwitchOnPhiAxis=1;} | |
127 | void SwitchOffPhiAxis(){fSwitchOffPhiAxis=0;} | |
128 | void SwitchOnOutOfConeAxis(){fSwitchOnOutOfConeAxis=1;} | |
129 | void SwitchOffOutOfConeAxis(){fSwitchOnOutOfConeAxis=0;} | |
130 | */ | |
131 | ||
b2705b43 | 132 | private: |
133 | ||
134 | AliAnalysisTaskFlavourJetCorrelations(const AliAnalysisTaskFlavourJetCorrelations &source); | |
135 | AliAnalysisTaskFlavourJetCorrelations& operator=(const AliAnalysisTaskFlavourJetCorrelations& source); | |
136 | ||
09fce7b3 | 137 | Double_t Z(AliVParticle* part,AliEmcalJet* jet, Bool_t transverse=kFALSE) const; |
138 | Double_t Z(Double_t* p, Double_t *pj) const; | |
139 | Double_t ZT(Double_t* p, Double_t *pj) const; | |
d8324fea | 140 | Float_t DeltaR(AliEmcalJet *p1, AliVParticle *p2) const; |
b2705b43 | 141 | Bool_t AreDaughtersInJet(AliEmcalJet *thejet, AliAODRecoDecayHF* charm, Int_t*& daughOutOfJet, AliAODTrack**& dtrks, Bool_t fillH); |
142 | Bool_t IsDInJet(AliEmcalJet *thejet, AliAODRecoDecayHF* charm, Bool_t fillH=kFALSE); | |
143 | void RecalculateMomentum(Double_t* pj, const Double_t* pmissing) const; | |
144 | ||
145 | ||
146 | Bool_t fUseMCInfo; // Use MC info | |
147 | Bool_t fUseReco; // use reconstructed tracks when running on MC | |
148 | Int_t fCandidateType; // Dstar or D0 | |
149 | Int_t fPDGmother; // PDG code of D meson | |
150 | Int_t fNProngs; // number of prong of the decay channel | |
151 | Int_t fPDGdaughters[4]; // PDG codes of daughters | |
152 | Float_t fSigmaD0[30]; // | |
153 | TString fBranchName; // AOD branch name | |
154 | AliRDHFCuts *fCuts; // Cuts | |
155 | ||
156 | Double_t fMinMass; // mass lower limit histogram | |
157 | Double_t fMaxMass; // mass upper limit histogram | |
158 | ||
159 | TString fJetArrName; // name of the jet array, taken from the task running the jet finder | |
cc5dbb3b | 160 | TString fTrackArrName; // name of the array of tracks, default "PicoTracks" |
b2705b43 | 161 | TString fCandArrName; // string which correspond to the candidate type |
162 | Bool_t fLeadingJetOnly; // use only the leading jet in the event to make the correlations | |
163 | Double_t fJetRadius; // jet radius (filled from the JetContainer) | |
164 | TClonesArray *fCandidateArray; //! contains candidates selected by AliRDHFCuts | |
165 | TClonesArray *fSideBandArray; //! contains candidates selected by AliRDHFCuts::IsSelected(kTracks), to be used for side bands (DStar case only!!) | |
166 | Bool_t fJetOnlyMode; //switch to simple version which analyses jets only | |
167 | Double_t fPmissing[3]; // jet missing momentum due to D mesons out of cone | |
168 | Double_t fPtJet; // pt jet, if requeted corrected with the missing pt | |
169 | Bool_t fIsDInJet; // flag D meson in jet | |
170 | Int_t fTypeDInJet; // way of selecting D in jets (see IsDInJet in cxx) | |
171 | TClonesArray *fTrackArr; //array of the tracks used in the jet finder | |
ad6abcae | 172 | Bool_t fSwitchOnSB; // flag to switch off/on the SB analysis (default is off) |
173 | Bool_t fSwitchOnPhiAxis; // flag to switch off/on the DeltaPhi axis in THnSparse (to be used in combination with switch OutOfCone) | |
174 | Bool_t fSwitchOnOutOfConeAxis; //flag to switch off/on the out of cone axis in THnSparse (to be switch on if DeltaPhi is on) | |
175 | Bool_t fSwitchOnSparses; // turn on/off all THnSparse | |
176 | ||
177 | Int_t fNAxesBigSparse; // number of axis | |
cc5dbb3b | 178 | AliJetContainer *fJetCont; //! jets attachedto the task |
179 | AliParticleContainer *fTrackCont; //! tracks attached to the jet container | |
180 | AliClusterContainer *fClusterCont; //! Clusters attached to the jet container | |
181 | ||
ad6abcae | 182 | |
0b7f0a99 | 183 | // Histograms |
cc5dbb3b | 184 | TH1I* fhstat; //! |
0b7f0a99 | 185 | //generic jet and jet track distributions |
cc5dbb3b | 186 | TH1F* fhPtJetTrks; //! |
187 | TH1F* fhPhiJetTrks; //! | |
188 | TH1F* fhEtaJetTrks; //! | |
189 | TH1F* fhEjetTrks; //! | |
190 | TH1F* fhPtJet; //! | |
191 | TH1F* fhPhiJet; //! | |
192 | TH1F* fhEtaJet; //! | |
193 | TH1F* fhEjet; //! | |
194 | TH1F* fhNtrArr; //! | |
195 | TH1F* fhNJetPerEv; //! | |
196 | TH1F* fhdeltaRJetTracks; //! | |
0b7f0a99 | 197 | THnSparse* fhsJet; //available in jet only mode |
cc5dbb3b | 198 | // event characteristics; |
199 | TH1F* fhNDPerEvNoJet; //! | |
200 | TH1F* fhptDPerEvNoJet; //! | |
201 | TH1F* fhNJetPerEvNoD; //! | |
202 | TH1F* fhPtJetPerEvNoD; //! | |
203 | //D mesons | |
204 | THnSparse* fhsDstandalone; //! | |
205 | TH2F* fhInvMassptD; //! | |
206 | TH2F* fhDiffSideBand; //! | |
207 | TH2F* fhInvMassptDbg; //! | |
208 | TH1F* fhPtPion; //! | |
209 | //! | |
210 | //histograms for checks | |
211 | TH1F* fhztracksinjet; //! | |
212 | TH1F* fhDiffPtTrPtJzNok; //! | |
213 | TH1F* fhDiffPtTrPtJzok; //! | |
214 | TH1F* fhDiffPzTrPtJzok; //! | |
215 | TH1F* fhDiffPzTrPtJzNok; //! | |
216 | TH1I* fhNtrkjzNok; //! | |
217 | TH1F* fhztracksinjetT; //! | |
218 | TH1I* fhControlDInJ; //! | |
219 | TH1I* fhIDddaugh ; //! | |
220 | TH1I* fhIDddaughOut; //! | |
221 | TH1I* fhIDjetTracks; //! | |
222 | TH1F* fhDRdaughOut ; //! | |
223 | TH1F* fhzDinjet; //! | |
224 | TH1F* fhmissingp; //! | |
225 | TH1F**fhMissPi; //! | |
226 | TH1F* fhDeltaPtJet; //! | |
227 | TH1F* fhRelDeltaPtJet; //! | |
228 | // D-jet correlation histograms | |
229 | TH1F* fhzDT; //! | |
230 | TH1F* fhDeltaRD; //! | |
231 | TH3F* fhDeltaRptDptj; //! | |
232 | TH3F* fhDeltaRptDptjB; //! | |
233 | //main histograms | |
234 | THnSparse* fhsDphiz; //! | |
0b7f0a99 | 235 | |
236 | ||
cc5dbb3b | 237 | ClassDef(AliAnalysisTaskFlavourJetCorrelations,7); // class for charm-jet CorrelationsExch |
c683985a | 238 | }; |
239 | ||
240 | #endif |