]>
Commit | Line | Data |
---|---|---|
ec9cbe08 | 1 | #ifndef ALIHFCORRELATIONFDSUBTRACTION_H |
2 | #define ALIHFCORRELATIONFDSUBTRACTION_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 | ///////////////////////////////////////////////////////////// | |
90c41c30 | 9 | // Class for subtracting D-hadron correlations from secondary D from B meson decay from D-hadron correlations of prompt+secondary D mesons |
10 | // n.b. requires the evaluation of the fraction of prompt D mesons using the same receipes used for D meson cross-section and RAA in D2H pag | |
11 | // (-> fprompt obtained from FONLL predictions of prompt and secondary D, prompt and secondary D meson efficiencies and a range of hypotheses for | |
12 | // RAA(DfromB)/RAA(promptD) (if needed) | |
ec9cbe08 | 13 | // |
14 | // Author: A. Rossi, andrea.rossi@cern.ch | |
15 | ///////////////////////////////////////////////////////////// | |
16 | ||
17 | ||
18 | #include <TH1D.h> | |
19 | #include <TGraphAsymmErrors.h> | |
20 | #include <TCanvas.h> | |
21 | ||
22 | class AliHFCorrelationFDsubtraction : public TNamed { | |
23 | ||
24 | public: | |
25 | ||
26 | AliHFCorrelationFDsubtraction(); | |
27 | AliHFCorrelationFDsubtraction(const char* name, const char* title); | |
28 | ~AliHFCorrelationFDsubtraction(); | |
29 | ||
30 | void SetUncorrectedHistogram(TH1D *h){fhDataUncorrected=(TH1D*)h->Clone();} | |
31 | Bool_t AddTemplateHisto(TH1D *h); | |
32 | void SetDptRange(Double_t ptmin,Double_t ptmax){fptmin=ptmin;fptmax=ptmax;} | |
33 | Bool_t Init(); | |
34 | void SetNTemplates(Int_t ntempl){fnTemplates=ntempl;} | |
35 | void SetFpromptGraphFc(TGraphAsymmErrors *gr){fgrConservativeFc=(TGraphAsymmErrors*)gr->Clone();} | |
36 | void SetFpromptGraphNb(TGraphAsymmErrors *gr){fgrConservativeNb=(TGraphAsymmErrors*)gr->Clone();} | |
37 | void SetMethod(Int_t method){fmethod=method;} | |
695050b7 | 38 | void SetSystOption(Int_t systOpt){fSystUseRMSfromFlatDistr=systOpt;} |
39 | Int_t GetSystOption(){return fSystUseRMSfromFlatDistr;} | |
ec9cbe08 | 40 | void SubtractFeedDown(TH1D *hFDTempl); |
695050b7 | 41 | |
ec9cbe08 | 42 | TGraphAsymmErrors* GetUncGraphFromHistos(TH1D *hRef,TH1D *hMin,TH1D *hMax); |
43 | void CalculateEnvelope(); | |
44 | TGraphAsymmErrors* GetGraphEnvelope(){return fgrEnvelope;} | |
45 | TGraphAsymmErrors* GetGraphEnvelopeRatio(){return fgrEnvelopeRatio;} | |
46 | TH1D* GetHistoEnvelopeRatioMin(){return fhEnvelopeMinRatio;} | |
47 | TH1D* GetHistoEnvelopeRatioMax(){return fhEnvelopeMaxRatio;} | |
48 | TH1D* GetHistoRelSystUncMin(); | |
49 | TH1D* GetHistoRelSystUncMax(); | |
50 | TH1D* GetHistoEnvelopeMin(){return fhEnvelopeMin;} | |
51 | TH1D* GetHistoEnvelopeMax(){return fhEnvelopeMax;} | |
52 | TH1D* GetCentralSubtractedPlot(){return fhDataCorrected[0];} | |
53 | TH1D* GetTemplate(Int_t i){ | |
54 | if (i>=fLastTemplAdded){Printf("Get Template: Error"); return 0;} | |
55 | else return fhTemplates[i]; | |
56 | } | |
695050b7 | 57 | TH1D* ReflectHisto(TH1D *h,Double_t scale=1.); |
58 | TH1D* DuplicateHistoTo2piRange(TH1D *h,Double_t scale=0.5); | |
59 | ||
ec9cbe08 | 60 | private: |
61 | ||
62 | Double_t fptmin; // min pt (D meson pt range) | |
63 | Double_t fptmax; // max pt (D meson pt range) | |
64 | TH1D* fhDataUncorrected; // Input correlation histogram | |
65 | Int_t fmethod; // method: 1= fc, 2= Nb, 3= both | |
66 | TGraphAsymmErrors* fgrConservativeFc; // fc graph, fc method | |
67 | TGraphAsymmErrors* fgrConservativeNb; // fc graph, Nb method | |
68 | Int_t fnTemplates; // maximum number of templates that will be included | |
69 | Int_t fLastTemplAdded; // counter of templates included | |
70 | TH1D **fhTemplates; // Array with template histo, size fnTemplates | |
71 | TH1D **fhDataCorrected; // Array with corrected histo, size 3*fnTemplates | |
72 | TH1D **fhRatioSameTemplate; // Array with ratio of histo based on the same template | |
73 | TH1D **fhRatioAllToCentralTempl; // array with ratio of all histos with respect to the central hypo | |
74 | TCanvas **fcCompare; // array of canvases with comparison (template by template) | |
75 | TCanvas **fcRatio; // array of canvases with ratio (templ by templ) | |
76 | Int_t fCountTempl; // internal counter | |
77 | TCanvas *fcAllRatio; // canva with all ratios with respect to central hypo | |
78 | TH1D* fhEnvelopeMax; // envelope with max variation | |
79 | TH1D* fhEnvelopeMin; // envelope with min variation | |
80 | TH1D* fhEnvelopeMaxRatio; // envelope with max relative variation | |
81 | TH1D* fhEnvelopeMinRatio; // envelope with min relative variation | |
82 | TGraphAsymmErrors* fgrEnvelope; // graph with envelope | |
83 | TGraphAsymmErrors* fgrEnvelopeRatio; // graph with envelope of ratios | |
695050b7 | 84 | Int_t fSystUseRMSfromFlatDistr; // different option to extract the systematic uncertainty. See .cxx, GetHistoRelSystUncMin method for a description |
85 | ClassDef(AliHFCorrelationFDsubtraction,2); | |
ec9cbe08 | 86 | |
87 | }; | |
88 | #endif |