]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/correlationHF/AliHFDmesonCorrAverage.h
Correct english typos in comment.
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliHFDmesonCorrAverage.h
1 #ifndef ALIHFDMESONCORRAVERAGE_H
2 #define ALIHFDMESONCORRAVERAGE_H
3 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: $ */
7
8 /////////////////////////////////////////////////////////////
9 // class to average D meson -hadron correlations
10 //
11 // Author: A. Rossi, andrea.rossi@cern.ch
12 /////////////////////////////////////////////////////////////
13 #include "AliHFDhadronCorrSystUnc.h"
14 #include <TMath.h>
15 #include <TH1D.h>
16 #include <TCanvas.h>
17 #include <TGraphAsymmErrors.h>
18
19 class AliHFDmesonCorrAverage : public TNamed {
20   
21
22  public:
23   
24   AliHFDmesonCorrAverage();
25   AliHFDmesonCorrAverage(const char* name);
26   ~AliHFDmesonCorrAverage();
27   
28   
29   Bool_t InitSystematicUncertainty(Int_t system=-1,Int_t year=-1);
30   void SetIncludeDzero(Bool_t inclDzero){fincludeDzero=inclDzero;}
31   void SetIncludeDstar(Bool_t inclDstar){fincludeDstar=inclDstar;}
32   void SetIncludeDplus(Bool_t inclDplus){fincludeDplus=inclDplus;}
33   
34   void SetDzeroHisto(TH1D *h){fhDzero=(TH1D*)h->Clone("hInputDzero");}
35   void SetDplusHisto(TH1D *h){fhDplus=(TH1D*)h->Clone("hInputDplus");}
36   void SetDstarHisto(TH1D *h){fhDstar=(TH1D*)h->Clone("hInputDstar");}
37   
38   void SetMethod(Int_t method){fmethod=method;}
39   void SetSystem(Int_t sys,Int_t year){fsys=sys;fyear=year;}
40   void SetMomentumRanges(Double_t minptD,Double_t maxptD,Double_t minptAsso,Double_t maxptAsso){fptminD=minptD;fptmaxD=maxptD;fptminAsso=minptAsso;fptmaxAsso=maxptAsso;}
41   void CalculateAverage();  
42   TH1D *GetAverageHisto(){return fhDaverage;}
43   void InitAverageHisto(TH1D *h);
44   TH1D *ReflectHisto(TH1D *h);
45   
46   void SetDzeroSystUnc(AliHFDhadronCorrSystUnc *sys){fSystDzero=(AliHFDhadronCorrSystUnc*)sys->Clone("fSystDzero");}
47   void SetDplusSystUnc(AliHFDhadronCorrSystUnc *sys){fSystDplus=(AliHFDhadronCorrSystUnc*)sys->Clone("fSystDplus");}
48   void SetDstarSystUnc(AliHFDhadronCorrSystUnc *sys){fSystDstar=(AliHFDhadronCorrSystUnc*)sys->Clone("fSystDstar");}
49
50   void SetSystAreAlreadySet(Bool_t syst){fSystAlreadySet=syst;}
51   AliHFDhadronCorrSystUnc* GetAverageSystUncertainty(){return fSystDaverage;}
52  private:
53   void SetWeights();
54
55
56   AliHFDhadronCorrSystUnc *fSystDzero;     // Dzero syst unc
57   AliHFDhadronCorrSystUnc *fSystDstar;     // Dzero syst unc
58   AliHFDhadronCorrSystUnc *fSystDplus;     // Dzero syst unc
59   AliHFDhadronCorrSystUnc *fSystDaverage;   // Average syst unc
60   Bool_t fincludeDzero;                    //flag to include Dzero
61   Bool_t fincludeDstar;                    // flag to include Dstar 
62   Bool_t fincludeDplus;                    // flag to include Dplus
63   Int_t fmethod;                     // flag to use abs uncertainty (first digit (unit)=0) or rel uncertainty (first digit=1) and stat only (second digit=0) or stat+uncorr syst (2nd digit =1)
64   Double_t fptminD;                        // min D pt
65   Double_t fptmaxD;                        // max D pt
66   Double_t fptminAsso;                        // min associated track pt
67   Double_t fptmaxAsso;                        // max associated pt
68   TH1D *fhDzero;                           //  Dzero input histo
69   TH1D *fhDstar;                           //  Dstar input histo
70   TH1D *fhDplus;                           //  Dplus input histo
71   TH1D *fhDaverage;                         // D average
72   TGraphAsymmErrors *fgrTotSystAverage;        // 
73   TGraphAsymmErrors *fgrFDSystAverage;        // 
74   TGraphAsymmErrors *fgrNonFDSystAverage;        // 
75   Double_t *fweightsDzeroStat;                       // Dzero weights used
76   Double_t *fweightsDstarStat;                       // Dstar weights used
77   Double_t *fweightsDplusStat;                       // Dplus weights used
78   Double_t *fweightsDzeroSystYield;                       // Dzero weights used
79   Double_t *fweightsDstarSystYield;                       // Dstar weights used
80   Double_t *fweightsDplusSystYield;                       // Dplus weights used
81   Double_t *fweightsDzeroSystBkg;                       // Dzero weights used
82   Double_t *fweightsDstarSystBkg;                       // Dstar weights used
83   Double_t *fweightsDplusSystBkg;                       // Dplus weights used
84   Int_t   fnbinsphi;                        // nbins phi
85   Int_t   fsys;                                 //system (0=pp, 1=pPb)
86   Int_t   fyear;                                // year  (2010 for pp@7 TeV, 2013 for pPb@5.02 TeV)
87   Bool_t fSystAlreadySet;                       // Set it to kTRUE when systematic uncertainties from external files are set
88   ClassDef(AliHFDmesonCorrAverage,2); //class for averaging D meson -hadron correlations
89 };
90
91
92 #endif