1 /**************************************************************************
2 * Author: Andrey Ivanov. *
3 * Contributors are mentioned in the code where appropriate. *
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 //-------------------------------------------------------------------------
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 // Andrey Ivanov (SPbSU-CERN), Igor Altsebeev (SPbSU-CERN)
20 //-------------------------------------------------------------------------
24 #include "AliLRCPtPt.h"
37 /******************************************************
39 ******************************************************/
40 AliLRCPtPt::AliLRCPtPt():AliLRCAnalysis() {
44 AliLRCPtPt::~AliLRCPtPt() {
48 AliLRCPtPt::AliLRCPtPt(char *name, TH2D* sourceHist, double ptd, TH2D* nb):AliLRCAnalysis() {
49 //Make PtPt form 2d histogram
51 CreateHist(name, (char*)"PtPt_abs", (char*)"PtPt_rel", (char*)"Pt_{F}", (char*)"<Pt_{B}>_{Pt_{F}}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
52 SetErrors(sourceHist, name, ptd, nb);
55 AliLRCPtPt::AliLRCPtPt(char *name, TH2D* sourceHist, double ptd, TProfile* nb):AliLRCAnalysis() {
56 //Make PtPt form 2d histogram
58 CreateHist(name, (char*)"PtPt_abs", (char*)"PtPt_rel", (char*)"Pt_{F}", (char*)"<Pt_{B}>_{Pt_{F}}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
59 SetErrors(sourceHist, name, ptd, nb);
62 AliLRCPtPt::AliLRCPtPt(char *fileHistname, char *histname, char *profname, double ptd, char *errhistname):AliLRCAnalysis() {
63 //Make PtPt form 2d histogram from root file
65 fileHist = new TFile(fileHistname);
66 TH2D* sourceHist = (TH2D*) fileHist->Get(histname);
67 CreateHist(profname, (char*)"PtPt_abs", (char*)"PtPt_rel", (char*)"Pt_{F}", (char*)"<Pt_{B}>_{Pt_{F}}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
68 TProfile* nbP = (TProfile*) fileHist->Get(errhistname);
69 SetErrors(sourceHist, profname, ptd, nbP);
72 AliLRCPtPt::AliLRCPtPt(const TList * const LHist, char *histname, char *profname, char *ptdname, char *errhistname):AliLRCAnalysis() {
73 //Make PtPt form 2d histogram from root file
75 TH2D* sourceHist = (TH2D*) LHist->FindObject(histname);
76 CreateHist(profname, (char*)"PtPt_abs", (char*)"PtPt_rel", (char*)"Pt_{F}", (char*)"<Pt_{B}>_{Pt_{F}}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
77 TProfile* nbP = (TProfile*) LHist->FindObject(errhistname);
78 TProfile *dPtB = (TProfile*) LHist->FindObject(ptdname);
79 double dptb=dPtB->GetBinError(1)*sqrt(dPtB->GetBinEntries(1));
80 SetErrors(sourceHist, profname, dptb, nbP);
83 void AliLRCPtPt::MakeHistogramm(char *name, TH2D* sourceHist, double ptd, TH2D* nb) {
84 //Make PtPt form 2d histogram
86 CreateHist(name, (char*)"PtPt_abs", (char*)"PtPt_rel", (char*)"Pt_{F}", (char*)"<Pt_{B}>_{Pt_{F}}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
87 SetErrors(sourceHist, name, ptd, nb);
90 void AliLRCPtPt::MakeHistogramm(char *name, TH2D* sourceHist, double ptd, TProfile* nb) {
91 //Make PtPt form 2d histogram
93 CreateHist(name, (char*)"PtPt_abs", (char*)"PtPt_rel", (char*)"Pt_{F}", (char*)"<Pt_{B}>_{Pt_{F}}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
94 SetErrors(sourceHist, name, ptd, nb);
98 void AliLRCPtPt::MakeHistogramm(char *fileHistname, char *histname, char *profname, double ptd, char *errhistname) {
99 //Make PtPt form 2d histogram from root file
101 fileHist = new TFile(fileHistname);
102 TH2D* sourceHist = (TH2D*) fileHist->Get(histname);
103 CreateHist(profname, (char*)"PtPt_abs", (char*)"PtPt_rel", (char*)"Pt_{F}", (char*)"<Pt_{B}>_{Pt_{F}}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
104 TProfile* nbP = (TProfile*) fileHist->Get(errhistname);
105 SetErrors(sourceHist, profname, ptd, nbP);
108 void AliLRCPtPt::MakeHistogramm(const TList * const LHist, char *histname, char *profname, char *ptdname, char *errhistname) {
109 //Make PtPt form 2d histogram from root file
111 TH2D* sourceHist = (TH2D*) LHist->FindObject(histname);
112 CreateHist(profname, (char*)"PtPt_abs", (char*)"PtPt_rel", (char*)"Pt_{F}", (char*)"<Pt_{B}>_{Pt_{F}}", (char*)"#frac{Pt_{F}}{<Pt_{F}>}", (char*)"#frac{<Pt_{B}>_{Pt_{F}}}{<Pt_{B}>}", sourceHist);
113 TProfile* nbP = (TProfile*) LHist->FindObject(errhistname);
114 TProfile *dPtB = (TProfile*) LHist->FindObject(ptdname);
115 double dptb=dPtB->GetBinError(1)*sqrt(dPtB->GetBinEntries(1));
116 SetErrors(sourceHist, profname, dptb, nbP);