]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/correlationHF/AliHFDmesonCorrAverage.h
- load TRD on-line gain tables together with TRAP configuration
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliHFDmesonCorrAverage.h
CommitLineData
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
19class 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 AliHFDhadronCorrSystUnc* GetAverageSystUncertainty(){return fSystDaverage;}
51 private:
52 void SetWeights();
53
54
55 AliHFDhadronCorrSystUnc *fSystDzero; // Dzero syst unc
56 AliHFDhadronCorrSystUnc *fSystDstar; // Dzero syst unc
57 AliHFDhadronCorrSystUnc *fSystDplus; // Dzero syst unc
58 AliHFDhadronCorrSystUnc *fSystDaverage; // Average syst unc
59 Bool_t fincludeDzero; //flag to include Dzero
60 Bool_t fincludeDstar; // flag to include Dstar
61 Bool_t fincludeDplus; // flag to include Dplus
62 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)
63 Double_t fptminD; // min D pt
64 Double_t fptmaxD; // max D pt
65 Double_t fptminAsso; // min associated track pt
66 Double_t fptmaxAsso; // max associated pt
67 TH1D *fhDzero; // Dzero input histo
68 TH1D *fhDstar; // Dstar input histo
69 TH1D *fhDplus; // Dplus input histo
70 TH1D *fhDaverage; // D average
71 TGraphAsymmErrors *fgrTotSystAverage; //
72 TGraphAsymmErrors *fgrFDSystAverage; //
73 TGraphAsymmErrors *fgrNonFDSystAverage; //
74 Double_t *fweightsDzeroStat; // Dzero weights used
75 Double_t *fweightsDstarStat; // Dstar weights used
76 Double_t *fweightsDplusStat; // Dplus weights used
77 Double_t *fweightsDzeroSystYield; // Dzero weights used
78 Double_t *fweightsDstarSystYield; // Dstar weights used
79 Double_t *fweightsDplusSystYield; // Dplus weights used
80 Double_t *fweightsDzeroSystBkg; // Dzero weights used
81 Double_t *fweightsDstarSystBkg; // Dstar weights used
82 Double_t *fweightsDplusSystBkg; // Dplus weights used
83 Int_t fnbinsphi; // nbins phi
84 Int_t fsys; //system (0=pp, 1=pPb)
85 Int_t fyear; // year (20010 for pp@7 TeV, 2013 for pPb@5.02 TeV)
86 ClassDef(AliHFDmesonCorrAverage,1); //class for averaging D meson -hadron correlations
87};
88
89
90#endif