1 #ifndef ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
2 #define ALIANALYSISTASKFLAVOURJETCORRELATIONS_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 **************************************************************************/
19 //-----------------------------------------------------------------------
20 // Author : A. Grelli, Utrecht University
21 // C. Bianchin, Utrecht University
23 //-----------------------------------------------------------------------
27 #include "AliAODEvent.h"
28 #include "AliPicoTrack.h"
29 #include "AliAnalysisTaskEmcalJet.h"
35 class AliAODMCParticle;
38 class AliAODRecoDecayHF;
39 class AliAODRecoCascadeHF;
42 class AliAnalysisTaskFlavourJetCorrelations : public AliAnalysisTaskEmcalJet
47 enum ECandidateType{ kD0toKpi, kDstartoKpipi };
49 AliAnalysisTaskFlavourJetCorrelations();
50 AliAnalysisTaskFlavourJetCorrelations(const Char_t* name,AliRDHFCuts* cuts, ECandidateType candtype, TString jetArrName);
51 virtual ~AliAnalysisTaskFlavourJetCorrelations();
53 virtual void UserCreateOutputObjects();
54 virtual void UserExec(Option_t *option);
55 virtual void Terminate(Option_t *);
57 virtual void LocalInit() {Init();}
60 Bool_t DefineHistoForAnalysis();
63 void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
64 Bool_t GetMC() const {return fUseMCInfo;}
66 void SetMassLimits(Double_t range, Int_t pdg);
67 void SetMassLimits(Double_t lowlimit, Double_t uplimit);
69 //jet reconstruction algorithm
70 void SetJetArrayName(TString jetArrName) {fJetArrName=jetArrName;};
71 TString GetJetArrayName() const {return fJetArrName;};
73 // trigger on jet events
74 void SetTriggerOnLeadingJet(Bool_t triggerOnLeadingJet) {fLeadingJetOnly=triggerOnLeadingJet;};
75 Bool_t GetTriggerOnLeadingJet() const {return fLeadingJetOnly;}
78 // Array of D0 width for the Dstar
79 Bool_t SetD0WidthForDStar(Int_t nptbins,Float_t* width);
81 //Bool_t FillMCDJetInfo(AliPicoTrack *jetTrk,AliEmcalJet* jet, TClonesArray *mcArray,Double_t ptjet);
82 void FillHistogramsRecoJetCorr(AliAODRecoDecayHF* candidate, AliEmcalJet *jet);
83 void FillHistogramsD0JetCorr(AliAODRecoDecayHF* candidate, Double_t dPhi, Double_t z, Double_t ptD, Double_t deltaR, AliAODEvent* aodEvent);
85 void FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t dPhi, Double_t z, Double_t ptD, Double_t deltaR);
87 void FillHistogramsD(Double_t mass,Double_t dphi, Double_t z,Double_t ptD, Double_t deltaR);
91 AliAnalysisTaskFlavourJetCorrelations(const AliAnalysisTaskFlavourJetCorrelations &source);
92 AliAnalysisTaskFlavourJetCorrelations& operator=(const AliAnalysisTaskFlavourJetCorrelations& source);
94 Double_t Z(AliVParticle* part,AliEmcalJet* jet) const;
95 Float_t DeltaR(AliVParticle *p1, AliVParticle *p2) const;
98 Bool_t IsD(Int_t pdg) const;
99 Bool_t IsD(Int_t pdg,Int_t abspdgD) const;
100 Bool_t PartFromC(AliMCParticle* mother) const;
101 Int_t GetFirstMother(Int_t lab,TClonesArray* mcarr) const;
102 Int_t FindPDGInFamily(Int_t labpart,Int_t pdgcode, TClonesArray *mcArray) const;
105 Bool_t fUseMCInfo; // Use MC info
106 Int_t fCandidateType; // Dstar or D0
107 Int_t fPDGmother; // PDG code of D meson
108 Int_t fNProngs; // number of prong of the decay channel
109 Int_t fPDGdaughters[4]; // PDG codes of daughters
110 Float_t fSigmaD0[30]; //
111 TString fBranchName; // AOD branch name
112 TList *fOutput; //! user output
113 AliRDHFCuts *fCuts; // Cuts
115 Double_t fMinMass; // mass lower limit histogram
116 Double_t fMaxMass; // mass upper limit histogram
118 TString fJetArrName; // name of the jet array, taken from the task running the jet finder
119 TString fCandArrName; // string which correspond to the candidate type
120 Bool_t fLeadingJetOnly; // use only the leading jet in the event to make the correlations
122 ClassDef(AliAnalysisTaskFlavourJetCorrelations,1); // class for charm-jet correlations