1 #ifndef ALIROOT_PWG2_FORWARD_ALIFORWARDUTIL_H
2 #define ALIROOT_PWG2_FORWARD_ALIFORWARDUTIL_H
12 * Utilities used in the forward multiplcity analysis
14 * @ingroup pwg2_forward_analysis
16 class AliForwardUtil : public TObject
20 * Read the trigger information from the ESD event
22 * @param esd ESD event
23 * @param triggers On return, contains the trigger bits
24 * @param hTriggers Histogram to fill
26 * @return @c true on success, @c false otherwise
28 static Bool_t ReadTriggers(AliESDEvent* esd, UInt_t& triggers,
31 * Read the vertex information from the ESD event
33 * @param esd ESD event
34 * @param vz On return, the vertex Z position
36 * @return @c true on success, @c false otherwise
38 static Bool_t ReadVertex(AliESDEvent* esd, Double_t& vz,
40 //__________________________________________________________________
42 * Structure to hold histograms
44 * @ingroup pwg2_forward_analysis
46 struct Histos : public TObject
53 Histos() : fFMD1i(0), fFMD2i(0), fFMD2o(0), fFMD3i(0), fFMD3o(0) {}
57 * @param o Object to copy from
59 Histos(const Histos& o)
68 * Assignement operator
70 * @return Reference to this
72 Histos& operator=(const Histos&) { return *this;}
78 * Initialize the object
80 * @param etaAxis Eta axis to use
82 void Init(const TAxis& etaAxis);
88 * @param etaAxis Eta axis to use
90 * @return Newly allocated histogram
92 TH2D* Make(UShort_t d, Char_t r, const TAxis& etaAxis) const;
96 * @param option Not used
98 void Clear(Option_t* option="");
99 // const TH2D* Get(UShort_t d, Char_t r) const;
101 * Get the histogram for a particular detector,ring
106 * @return Histogram for detector,ring or nul
108 TH2D* Get(UShort_t d, Char_t r) const;
109 TH2D* fFMD1i; // Histogram for FMD1i
110 TH2D* fFMD2i; // Histogram for FMD2i
111 TH2D* fFMD2o; // Histogram for FMD2o
112 TH2D* fFMD3i; // Histogram for FMD3i
113 TH2D* fFMD3o; // Histogram for FMD3o
118 //__________________________________________________________________
119 struct RingHistos : public TObject
121 RingHistos() : fDet(0), fRing('\0'), fName("") {}
122 RingHistos(UShort_t d, Char_t r)
123 : fDet(d), fRing(r), fName(TString::Format("FMD%d%c", d, r))
125 RingHistos(const RingHistos& o)
126 : TObject(o), fDet(o.fDet), fRing(o.fRing), fName(o.fName)
128 virtual ~RingHistos() {}
129 RingHistos& operator=(const RingHistos& o)
131 TObject::operator=(o);
137 TList* DefineOutputList(TList* d) const;
138 TList* GetOutputList(TList* d) const;
139 TH1* GetOutputHist(TList* d, const char* name) const;
144 ClassDef(RingHistos,1)