]>
Commit | Line | Data |
---|---|---|
ec9cbe08 | 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");} | |
5657b8a7 | 37 | void SetArithmeticAverage(Bool_t averType){fArithmeticAverage=averType;} |
ec9cbe08 | 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); | |
5657b8a7 | 45 | TH1D *GetWeightsUsedDzero(){ |
46 | return fhUsedWeightsDzero; | |
47 | } | |
48 | TH1D *GetWeightsUsedDstar(){ | |
49 | return fhUsedWeightsDstar; | |
50 | } | |
51 | TH1D *GetWeightsUsedDplus(){ | |
52 | return fhUsedWeightsDplus; | |
53 | } | |
ec9cbe08 | 54 | void SetDzeroSystUnc(AliHFDhadronCorrSystUnc *sys){fSystDzero=(AliHFDhadronCorrSystUnc*)sys->Clone("fSystDzero");} |
55 | void SetDplusSystUnc(AliHFDhadronCorrSystUnc *sys){fSystDplus=(AliHFDhadronCorrSystUnc*)sys->Clone("fSystDplus");} | |
56 | void SetDstarSystUnc(AliHFDhadronCorrSystUnc *sys){fSystDstar=(AliHFDhadronCorrSystUnc*)sys->Clone("fSystDstar");} | |
acd5f443 | 57 | |
58 | void SetSystAreAlreadySet(Bool_t syst){fSystAlreadySet=syst;} | |
ec9cbe08 | 59 | AliHFDhadronCorrSystUnc* GetAverageSystUncertainty(){return fSystDaverage;} |
60 | private: | |
61 | void SetWeights(); | |
62 | ||
63 | ||
64 | AliHFDhadronCorrSystUnc *fSystDzero; // Dzero syst unc | |
65 | AliHFDhadronCorrSystUnc *fSystDstar; // Dzero syst unc | |
66 | AliHFDhadronCorrSystUnc *fSystDplus; // Dzero syst unc | |
67 | AliHFDhadronCorrSystUnc *fSystDaverage; // Average syst unc | |
68 | Bool_t fincludeDzero; //flag to include Dzero | |
69 | Bool_t fincludeDstar; // flag to include Dstar | |
70 | Bool_t fincludeDplus; // flag to include Dplus | |
71 | 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) | |
72 | Double_t fptminD; // min D pt | |
73 | Double_t fptmaxD; // max D pt | |
74 | Double_t fptminAsso; // min associated track pt | |
75 | Double_t fptmaxAsso; // max associated pt | |
76 | TH1D *fhDzero; // Dzero input histo | |
77 | TH1D *fhDstar; // Dstar input histo | |
78 | TH1D *fhDplus; // Dplus input histo | |
79 | TH1D *fhDaverage; // D average | |
80 | TGraphAsymmErrors *fgrTotSystAverage; // | |
81 | TGraphAsymmErrors *fgrFDSystAverage; // | |
82 | TGraphAsymmErrors *fgrNonFDSystAverage; // | |
83 | Double_t *fweightsDzeroStat; // Dzero weights used | |
84 | Double_t *fweightsDstarStat; // Dstar weights used | |
85 | Double_t *fweightsDplusStat; // Dplus weights used | |
86 | Double_t *fweightsDzeroSystYield; // Dzero weights used | |
87 | Double_t *fweightsDstarSystYield; // Dstar weights used | |
88 | Double_t *fweightsDplusSystYield; // Dplus weights used | |
89 | Double_t *fweightsDzeroSystBkg; // Dzero weights used | |
90 | Double_t *fweightsDstarSystBkg; // Dstar weights used | |
91 | Double_t *fweightsDplusSystBkg; // Dplus weights used | |
92 | Int_t fnbinsphi; // nbins phi | |
93 | Int_t fsys; //system (0=pp, 1=pPb) | |
acd5f443 | 94 | Int_t fyear; // year (2010 for pp@7 TeV, 2013 for pPb@5.02 TeV) |
95 | Bool_t fSystAlreadySet; // Set it to kTRUE when systematic uncertainties from external files are set | |
5657b8a7 | 96 | Bool_t fArithmeticAverage; // flag to perform arithmetic average |
97 | TH1D *fhUsedWeightsDzero; // histogram with final weights used for Dzero | |
98 | TH1D *fhUsedWeightsDstar; // histogram with final weights used for Dstar | |
99 | TH1D *fhUsedWeightsDplus; // histogram with final weights used for Dplus | |
100 | ||
101 | ClassDef(AliHFDmesonCorrAverage,3); //class for averaging D meson -hadron correlations | |
ec9cbe08 | 102 | }; |
103 | ||
104 | ||
105 | #endif |