2 // Class that contains the forward multiplicity data per event
4 // This class contains a histogram of
6 // \frac{d^2N_{ch}}{d\eta d\phi}\quad,
8 // as well as a trigger mask for each analysed event.
10 // The eta acceptance of the event is stored in the underflow bins of
11 // the histogram. So to build the final histogram, one needs to
12 // correct for this acceptance (properly weighted by the events), and
13 // the vertex efficiency. This simply boils down to defining a 2D
14 // histogram and summing the event histograms in that histogram. One
15 // should of course also do proper book-keeping of the accepted event.
17 #include "AliAODForwardMult.h"
21 #include <TObjString.h>
23 ClassImp(AliAODForwardMult)
28 //____________________________________________________________________
29 const Float_t AliAODForwardMult::fgkInvalidIpZ = 1e6;
31 //____________________________________________________________________
32 AliAODForwardMult::AliAODForwardMult()
43 //____________________________________________________________________
44 AliAODForwardMult::AliAODForwardMult(Bool_t isMC)
46 fHist("forwardMult", "d^{2}N_{ch}/d#etad#varphi in the forward regions",
47 200, -4, 6, 20, 0, 2*TMath::Pi()),
55 // isMC If set to true this is for MC data (effects branch name)
57 fHist.SetXTitle("#eta");
58 fHist.SetYTitle("#varphi [radians]");
59 fHist.SetZTitle("#frac{d^{2}N_{ch}}{d#etad#varphi}");
60 fHist.SetDirectory(0);
64 //____________________________________________________________________
66 AliAODForwardMult::Init(const TAxis& etaAxis)
68 // Initialize the histogram with an eta axis
71 // etaAxis Eta axis to use
73 fHist.SetBins(etaAxis.GetNbins(), etaAxis.GetXmin(), etaAxis.GetXmax(),
74 20, 0, 2*TMath::Pi());
77 //____________________________________________________________________
79 AliAODForwardMult::Clear(Option_t* option)
81 // Clear (or reset) internal values
84 // option Passed to TH1::Reset
90 //____________________________________________________________________
92 AliAODForwardMult::HasIpZ() const
94 // Check if we have valid z coordinate of the interaction point
97 // true if the z coordinate of the interaction point is valid
99 return TMath::Abs(fIpZ - fgkInvalidIpZ) > 1;
102 //____________________________________________________________________
104 AliAODForwardMult::Browse(TBrowser* b)
106 // Browse this object
110 static TObjString ipz;
111 static TObjString trg;
112 ipz = Form("ip_z=%fcm", fIpZ);
113 trg = GetTriggerString(fTriggers);
119 //____________________________________________________________________
121 AliAODForwardMult::GetTriggerString(UInt_t mask)
123 // Get a string that describes the triggers
126 // mask Bit pattern of triggers
128 // Character string representation of mask
131 if ((mask & kInel) != 0x0) trg.Append("INEL ");
132 if ((mask & kInelGt0) != 0x0) trg.Append("INEL>0 ");
133 if ((mask & kNSD) != 0x0) trg.Append("NSD ");
134 if ((mask & kA) != 0x0) trg.Append("A ");
135 if ((mask & kB) != 0x0) trg.Append("B ");
136 if ((mask & kC) != 0x0) trg.Append("C ");
137 if ((mask & kE) != 0x0) trg.Append("E ");
141 //____________________________________________________________________
143 AliAODForwardMult::Print(Option_t* option) const
148 // option Passed to TH1::Print
150 std::cout << "Ipz: " << fIpZ << "cm " << (HasIpZ() ? "" : "in")
152 << "Triggers: " << GetTriggerString(fTriggers) << std::endl;
155 //____________________________________________________________________