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 PtN class
17 // calculates PtN 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 //-------------------------------------------------------------------------
25 #include "AliLRCPtN.h"
38 /******************************************************
40 ******************************************************/
44 AliLRCPtN::AliLRCPtN():AliLRCAnalysis() {
48 AliLRCPtN::~AliLRCPtN() {
52 AliLRCPtN::AliLRCPtN(char *name, TH2D* sourceHist, double ptd, TH2D* nb):AliLRCAnalysis() {
53 //Make PtN form 2d histogram
55 CreateHist(name, (char*)"PtN_abs", (char*)"PtN_rel", (char*)"n_{F}", (char*)"<Pt_{B}>_{n_{F}}", (char*)"#frac{n_{F}}{<n_{F}>}", (char*)"#frac{<Pt_{B}>_{n_{F}}}{<Pt_{B}>}", sourceHist);
56 SetErrors(sourceHist, name, ptd, nb);
59 AliLRCPtN::AliLRCPtN(char *fileHistname, char *histname, char *profname, double ptd, char *errhistname):AliLRCAnalysis() {
60 //Make PtN form 2d histogram from root file
62 fileHist = new TFile(fileHistname);
63 TH2D* sourceHist = (TH2D*) fileHist->Get(histname);
65 CreateHist(profname, (char*)"PtN_abs", (char*)"PtN_rel", (char*)"n_{F}", (char*)"<Pt_{B}>_{n_{F}}", (char*)"#frac{n_{F}}{<n_{F}>}", (char*)"#frac{<Pt_{B}>_{n_{F}}}{<Pt_{B}>}", sourceHist);
66 TProfile* nbP = (TProfile*) fileHist->Get(errhistname);
67 SetErrors(sourceHist, profname, ptd, nbP);
71 AliLRCPtN::AliLRCPtN(const TList * const LHist, char *histname, char *profname, char *ptdname, char *errhistname):AliLRCAnalysis() {
72 //Make PtN form 2d histogram from root file
74 TH2D* sourceHist = (TH2D*) LHist->FindObject(histname);
75 CreateHist(profname, (char*)"PtN_abs", (char*)"PtN_rel", (char*)"n_{F}", (char*)"<Pt_{B}>_{n_{F}}", (char*)"#frac{n_{F}}{<n_{F}>}", (char*)"#frac{<Pt_{B}>_{n_{F}}}{<Pt_{B}>}", sourceHist);
76 TProfile* nbP = (TProfile*) LHist->FindObject(errhistname);
77 TProfile *dPtB = (TProfile*) LHist->FindObject(ptdname);
78 double dptb=dPtB->GetBinError(1)*sqrt(dPtB->GetBinEntries(1));
79 SetErrors(sourceHist, profname, dptb, nbP);
82 AliLRCPtN::AliLRCPtN(char *name, TH2D* sourceHist, double ptd, TProfile* nb):AliLRCAnalysis() {
83 //Make PtN form 2d histogram
85 CreateHist(name, (char*)"PtN_abs", (char*)"PtN_rel", (char*)"n_{F}", (char*)"<Pt_{B}>_{n_{F}}", (char*)"#frac{n_{F}}{<n_{F}>}", (char*)"#frac{<Pt_{B}>_{n_{F}}}{<Pt_{B}>}", sourceHist);
86 SetErrors(sourceHist, name, ptd, nb);
89 void AliLRCPtN::MakeHistogramm(char *name, TH2D* sourceHist, double ptd, TH2D* nb) {
90 //Make PtN form 2d histogram
92 CreateHist(name, (char*)"PtN_abs", (char*)"PtN_rel", (char*)"n_{F}", (char*)"<Pt_{B}>_{n_{F}}", (char*)"#frac{n_{F}}{<n_{F}>}", (char*)"#frac{<Pt_{B}>_{n_{F}}}{<Pt_{B}>}", sourceHist);
93 SetErrors(sourceHist, name, ptd, nb);
96 void AliLRCPtN::MakeHistogramm(char *name, TH2D* sourceHist, double ptd, TProfile* nb) {
97 //Make PtN form 2d histogram
99 CreateHist(name, (char*)"PtN_abs", (char*)"PtN_rel", (char*)"n_{F}", (char*)"<Pt_{B}>_{n_{F}}", (char*)"#frac{n_{F}}{<n_{F}>}", (char*)"#frac{<Pt_{B}>_{n_{F}}}{<Pt_{B}>}", sourceHist);
100 SetErrors(sourceHist, name, ptd, nb);
103 void AliLRCPtN::MakeHistogramm(char *fileHistname, char *histname, char *profname, double ptd, char *errhistname) {
104 //Make PtN form 2d histogram from root file
106 fileHist = new TFile(fileHistname);
107 TH2D* sourceHist = (TH2D*) fileHist->Get(histname);
108 CreateHist(profname, (char*)"PtN_abs", (char*)"PtN_rel", (char*)"n_{F}", (char*)"<Pt_{B}>_{n_{F}}", (char*)"#frac{n_{F}}{<n_{F}>}", (char*)"#frac{<Pt_{B}>_{n_{F}}}{<Pt_{B}>}", sourceHist);
109 TProfile* nbP = (TProfile*) fileHist->Get(errhistname);
110 SetErrors(sourceHist, profname, ptd, nbP);
113 void AliLRCPtN::MakeHistogramm(const TList * const LHist, char *histname, char *profname, char *ptdname, char *errhistname) {
114 //Make PtN form 2d histogram from root file
116 TH2D* sourceHist = (TH2D*) LHist->FindObject(histname);
117 CreateHist(profname, (char*)"PtN_abs", (char*)"PtN_rel", (char*)"n_{F}", (char*)"<Pt_{B}>_{n_{F}}", (char*)"#frac{n_{F}}{<n_{F}>}", (char*)"#frac{<Pt_{B}>_{n_{F}}}{<Pt_{B}>}", sourceHist);
118 TProfile* nbP = (TProfile*) LHist->FindObject(errhistname);
119 TProfile *dPtB = (TProfile*) LHist->FindObject(ptdname);
120 double dptb=dPtB->GetBinError(1)*sqrt(dPtB->GetBinEntries(1));
121 SetErrors(sourceHist, profname, dptb, nbP);