]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/FORWARD/analysis2/AliAODForwardEP.cxx
Fixes for pA indenfication of events
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliAODForwardEP.cxx
CommitLineData
2b556440 1//
2// Class that contains results from FMD eventplane calculations
3//
4#include "AliAODForwardEP.h"
5#include <TBrowser.h>
6#include <iostream>
7#include <TMath.h>
8#include <TObjString.h>
9#include <TObjArray.h>
10#include "AliLog.h"
11ClassImp(AliAODForwardEP)
12#ifdef DOXY_INPUT
13; // For Emacs
14#endif
15
16//____________________________________________________________________
17AliAODForwardEP::AliAODForwardEP()
18 : fIsMC(false),
19 fEpT(-1),
20 fEpA(-1),
21 fEpC(-1),
22 fEp1(-1),
23 fEp2(-1),
24 fHist()
25{
26 //
27 // Constructor
28 //
29}
30
31//____________________________________________________________________
32AliAODForwardEP::AliAODForwardEP(Bool_t isMC)
33 : fIsMC(isMC),
34 fEpT(-1),
35 fEpA(-1),
36 fEpC(-1),
37 fEp1(-1),
38 fEp2(-1),
39 fHist()
40{
41 //
42 // Constructor
43 //
44 // Parameters:
45 // isMC If set to true this is for MC data (effects branch name)
46 //
47 fHist.SetXTitle("#eta");
48 fHist.SetDirectory(0);
49 fHist.Sumw2();
50}
51
52//____________________________________________________________________
53void
54AliAODForwardEP::Init(const TAxis& etaAxis)
55{
56 // Initialize the histogram with an eta axis
57 //
58 // Parameters:
59 // etaAxis Eta axis to use
60 //
61 fHist.SetBins(etaAxis.GetNbins()/10, etaAxis.GetXmin(), etaAxis.GetXmax());
62}
63
64//____________________________________________________________________
65void
66AliAODForwardEP::Clear(Option_t* option)
67{
68 // Clear (or reset) internal values
69 //
70 // Parameters:
71 // option Passed to TH1::Reset
72 //
73 fHist.Reset(option);
74 fEpT = -1;
75 fEpA = -1;
76 fEpC = -1;
77 fEp1 = -1;
78 fEp2 = -1;
79}
80//____________________________________________________________________
81void
82AliAODForwardEP::Browse(TBrowser* /*b*/)
83{
84 // Browse this object
85 //
86 // Parameters:
87 // b Browser to use
88 // TODO: Make nice
89/* static TObjString ipz;
90 static TObjString trg;
91 static TObjString cnt;
92 static TObjString ncl;
93 ipz = Form("ip_z=%fcm", fIpZ);
94 trg = GetTriggerString(fTriggers);
95 cnt = Form("%+6.1f%%", fCentrality);
96 ncl = Form("%d clusters", fNClusters);
97 b->Add(&fHist);
98 b->Add(&ipz);
99 b->Add(&trg);
100 b->Add(&cnt);
101 b->Add(&ncl);
102*/
103}
104
105//____________________________________________________________________
106void
107AliAODForwardEP::Print(Option_t* option) const
108{
109 // Print this object
110 //
111 // Parameters:
112 // option Not used
113 fHist.Print(option);
114 std::cout << "Total FMD EP: \t" << fEpT <<std::endl;
115 std::cout << "FMD1+2 EP: \t" << fEpA <<std::endl;
116 std::cout << "FMD3 EP: \t" << fEpC <<std::endl;
117 std::cout << "Random Subep 1: \t" << fEp1 <<std::endl;
118 std::cout << "Random Subep 2: \t" << fEp2 <<std::endl;
119}
120
121//____________________________________________________________________
122//
123// EOF
124//