]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/EBYE/LRC/AliLRCPtPt.cxx
Several updates from the validation phase of the Fast Or DA (A. Mastroserio)
[u/mrichter/AliRoot.git] / PWG2 / EBYE / LRC / AliLRCPtPt.cxx
1 /**************************************************************************
2  * Author: Panos Christakoglou.                                           *
3  * Contributors are mentioned in the code where appropriate.              *
4  *                                                                        *
5  * Permission to use, copy, modify and distribute this software and its   *
6  * documentation strictly for non-commercial purposes is hereby granted   *
7  * without fee, provided that the above copyright notice appears in all   *
8  * copies and that both the copyright notice and this permission notice   *
9  * appear in the supporting documentation. The authors make no claims     *
10  * about the suitability of this software for any purpose. It is          *
11  * provided "as is" without express or implied warranty.                  *
12  **************************************************************************/
13 //-------------------------------------------------------------------------
14 //    Description: 
15 //    This class include into LRC library for Long-Range Correlation analysis
16 //    it is the PtPt class
17 //    calculates PtPt correlations for abs and rel var
18 //    Origin: Petr Naumenko, SPbSU-CERN, Petr.Naoumenko@cern.ch
19 //-------------------------------------------------------------------------
20
21 /* $Id$ */
22
23 //-------------------------------------------------------------------------
24 //         LRC library for Long-Range Correlation analysis
25 //
26 //    Origin: Petr Naumenko, SPbSU-CERN, Petr.Naoumenko@cern.ch
27 //-------------------------------------------------------------------------
28
29 #include "AliLRCPtPt.h"
30
31 ClassImp(AliLRCPtPt)
32
33 /******************************************************
34  * AliLRCPtPt class
35  ******************************************************/
36 AliLRCPtPt::AliLRCPtPt():AliLRCAnalysis() {
37 //Empty constructor
38 }
39
40 AliLRCPtPt::~AliLRCPtPt() {
41 //Destructor
42 }
43
44 AliLRCPtPt::AliLRCPtPt(char *name, TH2D* sourceHist, double ptd, TH2D* nb):AliLRCAnalysis() {
45 //Make PtPt form 2d histogram
46     SetGraphics();
47     CreateHist(name, (char*)"PAliLRCPt_abs", (char*)"PAliLRCPt_rel", (char*)"Pt_{F}", (char*)"Pt_{B}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
48     SetErrors(sourceHist, name, ptd, nb);
49 }
50
51 AliLRCPtPt::AliLRCPtPt(char *fileHistname, char *histname, char *profname, double ptd, char *errhistname):AliLRCAnalysis() {
52 //Make PtPt form 2d histogram from root file
53     SetGraphics();
54     fileHist = new TFile(fileHistname);
55     TH2D* sourceHist = (TH2D*) fileHist->Get(histname);
56     TH2D* nb = (TH2D*) fileHist->Get(errhistname);
57     CreateHist(profname, (char*)"PAliLRCPt_abs", (char*)"PAliLRCPt_rel", (char*)"Pt_{F}", (char*)"Pt_{B}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
58     SetErrors(sourceHist, profname, ptd, nb);
59 }
60
61 void AliLRCPtPt::MakeHistogramm(char *name, TH2D* sourceHist, double ptd, TH2D* nb) {
62 //Make PtPt form 2d histogram
63     SetGraphics();
64     CreateHist(name, (char*)"PAliLRCPt_abs", (char*)"PAliLRCPt_rel", (char*)"Pt_{F}", (char*)"Pt_{B}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
65     SetErrors(sourceHist, name, ptd, nb);
66 }
67
68 void AliLRCPtPt::MakeHistogramm(char *fileHistname, char *histname, char *profname, double ptd, char *errhistname) {
69 //Make PtPt form 2d histogram from root file
70     SetGraphics();
71     fileHist = new TFile(fileHistname);
72     TH2D* sourceHist = (TH2D*) fileHist->Get(histname);
73     TH2D* nb = (TH2D*) fileHist->Get(errhistname);
74     CreateHist(profname, (char*)"PAliLRCPt_abs", (char*)"PAliLRCPt_rel", (char*)"Pt_{F}", (char*)"Pt_{B}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
75     SetErrors(sourceHist, profname, ptd, nb);
76 }