]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourFilterAndJetCorrelations.h
fix finding of pad neighbours; remove methods to write them in OCDB
[u/mrichter/AliRoot.git] / PWGJE / FlavourJetTasks / AliAnalysisTaskFlavourFilterAndJetCorrelations.h
1 #ifndef ALIANALYSISTASKFlavourFilterAndJetCorrelations_H
2 #define ALIANALYSISTASKFlavourFilterAndJetCorrelations_H
3 /**************************************************************************
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  **************************************************************************/
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"
29
30 class TH3F;
31 class TParticle ;
32 class TClonesArray ;
33 class AliMCParticle;
34 class AliAODMCParticle;
35 class AliRDHFCuts;
36 class AliEmcalJet;
37 class AliAODRecoDecayHF;
38 class AliAODRecoCascadeHF;
39 class AliAODEvent;
40
41 class AliAnalysisTaskFlavourFilterAndJetCorrelations : public AliAnalysisTaskEmcalJet 
42 {
43
44  public:
45
46   enum ECandidateType{ kD0toKpi, kDstartoKpipi };
47
48   AliAnalysisTaskFlavourFilterAndJetCorrelations();
49   AliAnalysisTaskFlavourFilterAndJetCorrelations(const Char_t* name,AliRDHFCuts* cuts, ECandidateType candtype);
50   virtual ~AliAnalysisTaskFlavourFilterAndJetCorrelations();
51
52   virtual void     UserCreateOutputObjects();
53   virtual void     UserExec(Option_t *option);
54   virtual void     Terminate(Option_t *);
55   virtual void     Init();
56   virtual void     LocalInit() {Init();}
57
58   // inizializations
59   Bool_t DefineHistoForAnalysis();  
60   Bool_t DefineHistoForFiltering();
61
62   // set MC usage
63   void   SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
64   Bool_t GetMC() const {return fUseMCInfo;}
65   // set usage of reconstructed tracks
66   void   SetUseReco(Bool_t reco) {fUseReco=reco;}
67   Bool_t GetUseReco() {return fUseReco;}
68   
69   
70   void SetMassLimits(Double_t range, Int_t pdg);
71   void SetMassLimits(Double_t lowlimit, Double_t uplimit);
72
73   //jet reconstruction algorithm
74   void SetJetArrayName(TString jetArrName) {fJetArrName=jetArrName;};
75   TString GetJetArrayName() const {return fJetArrName;};
76
77   // trigger on jet events
78   void SetTriggerOnLeadingJet(Bool_t triggerOnLeadingJet) {fLeadingJetOnly=triggerOnLeadingJet;};
79   Bool_t GetTriggerOnLeadingJet() const {return fLeadingJetOnly;}
80
81
82   // Array of D0 width for the Dstar
83   Bool_t SetD0WidthForDStar(Int_t nptbins,Float_t* width);
84
85   //Bool_t   FillMCDJetInfo(AliPicoTrack *jetTrk,AliEmcalJet* jet, TClonesArray *mcArray,Double_t ptjet);
86   void FillHistogramsRecoJetCorr(AliVParticle* candidate, AliEmcalJet *jet);
87   void FillHistogramsD0JetCorr(AliAODRecoDecayHF* candidate, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj, Double_t deltaR, AliAODEvent* aodEvent);
88
89   void FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj,Double_t deltaR);
90   void FillHistogramsMCGenDJetCorr(Double_t dPhi, Double_t z,Double_t ptD,Double_t ptjet,Double_t deltaR);
91   void SideBandBackground(AliAODRecoCascadeHF *candDstar, AliEmcalJet *jet);
92   void MCBackground(AliAODRecoDecayHF *candbg, AliEmcalJet *jet);
93   void FillMassHistograms(Double_t mass,Double_t ptD, Double_t deltaR);
94   void FlagFlavour(AliVParticle* charm, AliEmcalJet* jet);
95   Int_t IsDzeroSideBand(AliAODRecoCascadeHF *candDstar);
96
97  private:
98   
99   AliAnalysisTaskFlavourFilterAndJetCorrelations(const AliAnalysisTaskFlavourFilterAndJetCorrelations &source);
100   AliAnalysisTaskFlavourFilterAndJetCorrelations& operator=(const AliAnalysisTaskFlavourFilterAndJetCorrelations& source); 
101
102   Double_t Z(AliVParticle* part,AliEmcalJet* jet) const;
103   Float_t DeltaR(AliVParticle *p1, AliVParticle *p2) const;
104
105
106   Bool_t fUseMCInfo;             //  Use MC info
107   Bool_t fUseReco;               // use reconstructed tracks when running on MC
108   Int_t  fCandidateType;         // Dstar or D0
109   Int_t  fPDGmother;             // PDG code of D meson
110   Int_t  fNProngs;               // number of prong of the decay channel  
111   Int_t  fPDGdaughters[4];       // PDG codes of daughters
112   Float_t fSigmaD0[30];          //
113   TString fBranchName;           // AOD branch name
114   TList *fmyOutput;                //! user output
115   TList *fmyOutputF;               //! user output
116   AliRDHFCuts *fCuts;            // Cuts 
117
118   Double_t fMinMass;             // mass lower limit histogram
119   Double_t fMaxMass;             // mass upper limit histogram
120
121   TString  fJetArrName;          // name of the jet array, taken from the task running the jet finder
122   TString fCandArrName;          // string which correspond to the candidate type
123   Bool_t fLeadingJetOnly;        // use only the leading jet in the event to make the correlations
124   Double_t fJetRadius;           // jet radius (filled from the JetContainer)
125   TClonesArray *fCandidateArray;
126   TClonesArray *fSideBandArray;
127
128   ClassDef(AliAnalysisTaskFlavourFilterAndJetCorrelations,1); // class for charm-jet correlations
129 };
130
131 #endif