1 #ifndef ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
2 #define ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
3 /**************************************************************************
4 * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //-----------------------------------------------------------------------
19 // Author : A. Grelli, Utrecht University
20 // C. Bianchin, Utrecht University
22 //-----------------------------------------------------------------------
26 #include "AliAODEvent.h"
27 #include "AliPicoTrack.h"
28 #include "AliAnalysisTaskEmcalJet.h"
34 class AliAODMCParticle;
37 class AliAODRecoDecayHF;
38 class AliAODRecoCascadeHF;
41 class AliAnalysisTaskFlavourJetCorrelations : public AliAnalysisTaskEmcalJet
46 enum ECandidateType{ kD0toKpi, kDstartoKpipi };
48 AliAnalysisTaskFlavourJetCorrelations();
49 AliAnalysisTaskFlavourJetCorrelations(const Char_t* name,AliRDHFCuts* cuts, ECandidateType candtype, TString jetArrName);
50 virtual ~AliAnalysisTaskFlavourJetCorrelations();
52 virtual void UserCreateOutputObjects();
53 virtual void UserExec(Option_t *option);
54 virtual void Terminate(Option_t *);
56 virtual void LocalInit() {Init();}
59 Bool_t DefineHistoForAnalysis();
62 void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
63 Bool_t GetMC() const {return fUseMCInfo;}
65 void SetMassLimits(Double_t range, Int_t pdg);
66 void SetMassLimits(Double_t lowlimit, Double_t uplimit);
68 //jet reconstruction algorithm
69 void SetJetArrayName(TString jetArrName) {fJetArrName=jetArrName;};
70 TString GetJetArrayName() const {return fJetArrName;};
72 // trigger on jet events
73 void SetTriggerOnLeadingJet(Bool_t triggerOnLeadingJet) {fLeadingJetOnly=triggerOnLeadingJet;};
74 Bool_t GetTriggerOnLeadingJet() const {return fLeadingJetOnly;}
77 // Array of D0 width for the Dstar
78 Bool_t SetD0WidthForDStar(Int_t nptbins,Float_t* width);
80 //Bool_t FillMCDJetInfo(AliPicoTrack *jetTrk,AliEmcalJet* jet, TClonesArray *mcArray,Double_t ptjet);
81 void FillHistogramsRecoJetCorr(AliAODRecoDecayHF* candidate, AliEmcalJet *jet);
82 void FillHistogramsD0JetCorr(AliAODRecoDecayHF* candidate, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj, Double_t deltaR, AliAODEvent* aodEvent);
84 void FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj,Double_t deltaR);
86 void FillHistograms(Double_t mass,Double_t dphi, Double_t z,Double_t ptD, Double_t deltaR);
89 AliAnalysisTaskFlavourJetCorrelations(const AliAnalysisTaskFlavourJetCorrelations &source);
90 AliAnalysisTaskFlavourJetCorrelations& operator=(const AliAnalysisTaskFlavourJetCorrelations& source);
92 Double_t Z(AliVParticle* part,AliEmcalJet* jet) const;
93 Float_t DeltaR(AliVParticle *p1, AliVParticle *p2) const;
96 Bool_t IsD(Int_t pdg) const;
97 Bool_t IsD(Int_t pdg,Int_t abspdgD) const;
98 Bool_t PartFromC(AliMCParticle* mother) const;
99 Int_t GetFirstMother(Int_t lab,TClonesArray* mcarr) const;
100 Int_t FindPDGInFamily(Int_t labpart,Int_t pdgcode, TClonesArray *mcArray) const;
103 Bool_t fUseMCInfo; // Use MC info
104 Int_t fCandidateType; // Dstar or D0
105 Int_t fPDGmother; // PDG code of D meson
106 Int_t fNProngs; // number of prong of the decay channel
107 Int_t fPDGdaughters[4]; // PDG codes of daughters
108 Float_t fSigmaD0[30]; //
109 TString fBranchName; // AOD branch name
110 TList *fOutput; //! user output
111 AliRDHFCuts *fCuts; // Cuts
113 Double_t fMinMass; // mass lower limit histogram
114 Double_t fMaxMass; // mass upper limit histogram
116 TString fJetArrName; // name of the jet array, taken from the task running the jet finder
117 TString fCandArrName; // string which correspond to the candidate type
118 Bool_t fLeadingJetOnly; // use only the leading jet in the event to make the correlations
120 ClassDef(AliAnalysisTaskFlavourJetCorrelations,1); // class for charm-jet correlations