1 #ifndef ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
\r
2 #define ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
\r
3 /**************************************************************************
\r
4 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
\r
6 * Author: The ALICE Off-line Project. *
\r
7 * Contributors are mentioned in the code where appropriate. *
\r
9 * Permission to use, copy, modify and distribute this software and its *
\r
10 * documentation strictly for non-commercial purposes is hereby granted *
\r
11 * without fee, provided that the above copyright notice appears in all *
\r
12 * copies and that both the copyright notice and this permission notice *
\r
13 * appear in the supporting documentation. The authors make no claims *
\r
14 * about the suitability of this software for any purpose. It is *
\r
15 * provided "as is" without express or implied warranty. *
\r
16 **************************************************************************/
\r
18 //-----------------------------------------------------------------------
\r
19 // Author : A. Grelli, Utrecht University
\r
20 // C. Bianchin, Utrecht University
\r
22 //-----------------------------------------------------------------------
\r
26 #include "AliAODEvent.h"
\r
27 #include "AliPicoTrack.h"
\r
28 #include "AliAnalysisTaskEmcalJet.h"
\r
32 class TClonesArray ;
\r
33 class AliMCParticle;
\r
34 class AliAODMCParticle;
\r
37 class AliAODRecoDecayHF;
\r
38 class AliAODRecoCascadeHF;
\r
41 class AliAnalysisTaskFlavourJetCorrelations : public AliAnalysisTaskEmcalJet
\r
46 enum ECandidateType{ kD0toKpi, kDstartoKpipi };
\r
48 AliAnalysisTaskFlavourJetCorrelations();
\r
49 AliAnalysisTaskFlavourJetCorrelations(const Char_t* name,AliRDHFCuts* cuts, ECandidateType candtype);
\r
50 virtual ~AliAnalysisTaskFlavourJetCorrelations();
\r
52 virtual void UserCreateOutputObjects();
\r
53 virtual void UserExec(Option_t *option);
\r
54 virtual void Terminate(Option_t *);
\r
55 virtual void Init();
\r
56 virtual void LocalInit() {Init();}
\r
59 Bool_t DefineHistoForAnalysis();
\r
62 void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
\r
63 Bool_t GetMC() const {return fUseMCInfo;}
\r
64 // set usage of reconstructed tracks
\r
65 void SetUseReco(Bool_t reco) {fUseReco=reco;}
\r
66 Bool_t GetUseReco() {return fUseReco;}
\r
69 void SetMassLimits(Double_t range, Int_t pdg);
\r
70 void SetMassLimits(Double_t lowlimit, Double_t uplimit);
\r
72 //jet reconstruction algorithm
\r
73 void SetJetArrayName(TString jetArrName) {fJetArrName=jetArrName;};
\r
74 TString GetJetArrayName() const {return fJetArrName;};
\r
76 // trigger on jet events
\r
77 void SetTriggerOnLeadingJet(Bool_t triggerOnLeadingJet) {fLeadingJetOnly=triggerOnLeadingJet;};
\r
78 Bool_t GetTriggerOnLeadingJet() const {return fLeadingJetOnly;}
\r
81 // Array of D0 width for the Dstar
\r
82 Bool_t SetD0WidthForDStar(Int_t nptbins,Float_t* width);
\r
84 //Bool_t FillMCDJetInfo(AliPicoTrack *jetTrk,AliEmcalJet* jet, TClonesArray *mcArray,Double_t ptjet);
\r
85 void FillHistogramsRecoJetCorr(AliVParticle* candidate, AliEmcalJet *jet);
\r
86 void FillHistogramsD0JetCorr(AliAODRecoDecayHF* candidate, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj, Double_t deltaR, AliAODEvent* aodEvent);
\r
88 void FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj,Double_t deltaR);
\r
89 void FillHistogramsMCGenDJetCorr(Double_t dPhi, Double_t z,Double_t ptD,Double_t ptjet,Double_t deltaR);
\r
90 void SideBandBackground(AliAODRecoCascadeHF *candDstar, AliEmcalJet *jet);
\r
91 void MCBackground(AliAODRecoDecayHF *candbg, AliEmcalJet *jet);
\r
92 void FillMassHistograms(Double_t mass,Double_t ptD, Double_t deltaR);
\r
93 void FlagFlavour(AliVParticle* charm, AliEmcalJet* jet);
\r
97 AliAnalysisTaskFlavourJetCorrelations(const AliAnalysisTaskFlavourJetCorrelations &source);
\r
98 AliAnalysisTaskFlavourJetCorrelations& operator=(const AliAnalysisTaskFlavourJetCorrelations& source);
\r
100 Double_t Z(AliVParticle* part,AliEmcalJet* jet) const;
\r
101 Float_t DeltaR(AliVParticle *p1, AliVParticle *p2) const;
\r
104 Bool_t fUseMCInfo; // Use MC info
\r
105 Bool_t fUseReco; // use reconstructed tracks when running on MC
\r
106 Int_t fCandidateType; // Dstar or D0
\r
107 Int_t fPDGmother; // PDG code of D meson
\r
108 Int_t fNProngs; // number of prong of the decay channel
\r
109 Int_t fPDGdaughters[4]; // PDG codes of daughters
\r
110 Float_t fSigmaD0[30]; //
\r
111 TString fBranchName; // AOD branch name
\r
112 TList *fmyOutput; //! user output
\r
113 AliRDHFCuts *fCuts; // Cuts
\r
115 Double_t fMinMass; // mass lower limit histogram
\r
116 Double_t fMaxMass; // mass upper limit histogram
\r
118 TString fJetArrName; // name of the jet array, taken from the task running the jet finder
\r
119 TString fCandArrName; // string which correspond to the candidate type
\r
120 Bool_t fLeadingJetOnly; // use only the leading jet in the event to make the correlations
\r
121 Double_t fJetRadius; // jet radius (filled from the JetContainer)
\r
123 ClassDef(AliAnalysisTaskFlavourJetCorrelations,2); // class for charm-jet correlations
\r