New implementation of the forward multiplicity analysis.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliForwardUtil.h
CommitLineData
7e4038b5 1#ifndef ALIROOT_PWG2_FORWARD_ALIFORWARDUTIL_H
2#define ALIROOT_PWG2_FORWARD_ALIFORWARDUTIL_H
3#include <TObject.h>
4class TH2D;
5class TAxis;
6
7/**
8 * Utilities used in the forward multiplcity analysis
9 *
10 * @ingroup pwg2_forward_analysis
11 */
12class AliForwardUtil : public TObject
13{
14 public:
15 /**
16 * Structure to hold histograms
17 *
18 * @ingroup pwg2_forward_analysis
19 */
20 struct Histos : public TObject
21 {
22 /**
23 * Constructor
24 *
25 *
26 */
27 Histos() : fFMD1i(0), fFMD2i(0), fFMD2o(0), fFMD3i(0), fFMD3o(0) {}
28 /**
29 * Copy constructor
30 *
31 * @param o Object to copy from
32 */
33 Histos(const Histos& o)
34 : TObject(o),
35 fFMD1i(o.fFMD1i),
36 fFMD2i(o.fFMD2i),
37 fFMD2o(o.fFMD2o),
38 fFMD3i(o.fFMD3i),
39 fFMD3o(o.fFMD3o)
40 {}
41 /**
42 * Assignement operator
43 *
44 * @return Reference to this
45 */
46 Histos& operator=(const Histos&) { return *this;}
47 /**
48 * Destructor
49 */
50 ~Histos();
51 /**
52 * Initialize the object
53 *
54 * @param etaAxis Eta axis to use
55 */
56 void Init(const TAxis& etaAxis);
57 /**
58 * Make a histogram
59 *
60 * @param d Detector
61 * @param r Ring
62 * @param etaAxis Eta axis to use
63 *
64 * @return Newly allocated histogram
65 */
66 TH2D* Make(UShort_t d, Char_t r, const TAxis& etaAxis) const;
67 /**
68 * Clear data
69 *
70 * @param option Not used
71 */
72 void Clear(Option_t* option="");
73 // const TH2D* Get(UShort_t d, Char_t r) const;
74 /**
75 * Get the histogram for a particular detector,ring
76 *
77 * @param d Detector
78 * @param r Ring
79 *
80 * @return Histogram for detector,ring or nul
81 */
82 TH2D* Get(UShort_t d, Char_t r) const;
83 TH2D* fFMD1i; // Histogram for FMD1i
84 TH2D* fFMD2i; // Histogram for FMD2i
85 TH2D* fFMD2o; // Histogram for FMD2o
86 TH2D* fFMD3i; // Histogram for FMD3i
87 TH2D* fFMD3o; // Histogram for FMD3o
88 };
89
90};
91
92#endif
93// Local Variables:
94// mode: C++
95// End:
96