]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourJetCorrelations.h
dos2unix
[u/mrichter/AliRoot.git] / PWGJE / FlavourJetTasks / AliAnalysisTaskFlavourJetCorrelations.h
1 #ifndef ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
2 #define ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
3 // $Id$
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 // Author : A. Grelli,  Utrecht University
21 //          C. Bianchin, Utrecht University
22 //          X. Zhang, LBNL
23 //-----------------------------------------------------------------------
24
25
26 #include <TH2F.h>
27 #include "AliAODEvent.h"
28 #include "AliPicoTrack.h"
29 #include "AliAnalysisTaskEmcalJet.h"
30
31 class TH3F;
32 class TParticle ;
33 class TClonesArray ;
34 class AliMCParticle;
35 class AliAODMCParticle;
36 class AliRDHFCuts;
37 class AliEmcalJet;
38 class AliAODRecoDecayHF;
39 class AliAODRecoCascadeHF;
40 class AliAODEvent;
41
42 class AliAnalysisTaskFlavourJetCorrelations : public AliAnalysisTaskEmcalJet 
43 {
44
45  public:
46
47   enum ECandidateType{ kD0toKpi, kDstartoKpipi };
48
49   AliAnalysisTaskFlavourJetCorrelations();
50   AliAnalysisTaskFlavourJetCorrelations(const Char_t* name,AliRDHFCuts* cuts, ECandidateType candtype, TString jetArrName);
51   virtual ~AliAnalysisTaskFlavourJetCorrelations();
52
53   virtual void     UserCreateOutputObjects();
54   virtual void     UserExec(Option_t *option);
55   virtual void     Terminate(Option_t *);
56   virtual void     Init();
57   virtual void     LocalInit() {Init();}
58
59   // inizializations
60   Bool_t DefineHistoForAnalysis();  
61
62   // set MC usage
63   void   SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
64   Bool_t GetMC() const {return fUseMCInfo;}
65   
66   void SetMassLimits(Double_t range, Int_t pdg);
67   void SetMassLimits(Double_t lowlimit, Double_t uplimit);
68
69   //jet reconstruction algorithm
70   void SetJetArrayName(TString jetArrName) {fJetArrName=jetArrName;};
71   TString GetJetArrayName() const {return fJetArrName;};
72
73   // trigger on jet events
74   void SetTriggerOnLeadingJet(Bool_t triggerOnLeadingJet) {fLeadingJetOnly=triggerOnLeadingJet;};
75   Bool_t GetTriggerOnLeadingJet() const {return fLeadingJetOnly;}
76
77
78   // Array of D0 width for the Dstar
79   Bool_t SetD0WidthForDStar(Int_t nptbins,Float_t* width);
80
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);
84
85   void FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t dPhi, Double_t z, Double_t ptD, Double_t deltaR);
86
87   void FillHistogramsD(Double_t mass,Double_t dphi, Double_t z,Double_t ptD, Double_t deltaR);
88
89  private:
90   
91   AliAnalysisTaskFlavourJetCorrelations(const AliAnalysisTaskFlavourJetCorrelations &source);
92   AliAnalysisTaskFlavourJetCorrelations& operator=(const AliAnalysisTaskFlavourJetCorrelations& source); 
93
94   Double_t Z(AliVParticle* part,AliEmcalJet* jet) const;
95   Float_t DeltaR(AliVParticle *p1, AliVParticle *p2) const;
96
97   /*
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;
103   */
104
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 
114
115   Double_t fMinMass;             // mass lower limit histogram
116   Double_t fMaxMass;             // mass upper limit histogram
117
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
121
122   ClassDef(AliAnalysisTaskFlavourJetCorrelations,1); // class for charm-jet correlations
123 };
124
125 #endif