]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FLOW/AliFlowCommonHistResults.cxx
added functionality to handle CDH and RCU trailer
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommonHistResults.cxx
CommitLineData
f1d945a1 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/*
17$Log$
18*/
19
20#include "Riostream.h" //needed as include
21#include "AliFlowCommonConstants.h" //needed as include
22#include "AliFlowCommonHistResults.h"
23
24#include "TString.h"
25#include "TH1D.h" //needed as include
26#include "TMath.h" //needed as include
27
28class TH1F;
29class AliFlowVector;
30class AliFlowCommonHist;
31
32// AliFlowCommonHistResults:
33// Class to organize the common histograms for Flow Analysis
34// Holds v2(pt), integrated v2 and chi (resolution)
35//
36// authors: N. van der Kolk (kolk@nikhef.nl) and A. Bilandzic (anteb@nikhef.nl)
37
38ClassImp(AliFlowCommonHistResults)
39
40//-----------------------------------------------------------------------
41
42 AliFlowCommonHistResults::AliFlowCommonHistResults(TString input):
43 fHistIntFlow(0),
44 fHistDiffFlow(0),
45 fHistChi(0)
46 {
47 //constructor creating histograms
48 Int_t fNbinsPt = AliFlowCommonConstants::GetNbinsPt();
49 TString name;
50
51 Double_t fPtMin = AliFlowCommonConstants::GetPtMin();
52 Double_t fPtMax = AliFlowCommonConstants::GetPtMax();
53
54 //integrated flow
55 name = "Flow_Integrated_";
56 name +=input;
57 fHistIntFlow = new TH1D(name.Data(), name.Data(),1,0.5,1.5);
58 fHistIntFlow ->SetXTitle("");
59 fHistIntFlow ->SetYTitle("Integrated Flow value (%)");
60
61 //differential flow
62 name = "Flow_Differential_Pt_";
63 name +=input;
64 fHistDiffFlow = new TH1D(name.Data(), name.Data(),fNbinsPt,fPtMin,fPtMax);
65 fHistDiffFlow ->SetXTitle("Pt");
66 fHistDiffFlow ->SetYTitle("v (%)");
67
68 //Chi (needed for rebinning later on)
69 name = "Flow_Chi_";
70 name +=input;
71 fHistChi = new TH1D(name.Data(), name.Data(),1,0.5,1.5);
72 fHistChi ->SetXTitle("");
73 fHistChi ->SetYTitle("Chi");
74 }
75
76//-----------------------------------------------------------------------
77
78AliFlowCommonHistResults::~AliFlowCommonHistResults()
79{
80 //deletes histograms
81 delete fHistIntFlow;
82 delete fHistDiffFlow;
83 delete fHistChi;
84}
85
86//-----------------------------------------------------------------------
87
88Bool_t AliFlowCommonHistResults::FillIntegratedFlow(Double_t fV, Double_t fError)
89{
90 //Fill fHistIntFlow
91 fHistIntFlow -> SetBinContent(1,fV);
92 fHistIntFlow -> SetBinError(1,fError);
93
94 return kTRUE;
95}
96
97//-----------------------------------------------------------------------
98
99Bool_t AliFlowCommonHistResults::FillDifferentialFlow(Int_t fBin, Double_t fv, Double_t fError)
100{
101 //Fill fHistDiffFlow
102 fHistDiffFlow ->SetBinContent(fBin,fv);
103 fHistDiffFlow ->SetBinError(fBin,fError);
104
105 return kTRUE;
106}
107
108//-----------------------------------------------------------------------
109
110Bool_t AliFlowCommonHistResults::FillChi(Double_t fChi)
111{
112 //Fill fHistChi
113 fHistChi -> SetBinContent(1,fChi);
114
115 return kTRUE;
116}
117
118//-----------------------------------------------------------------------