]>
Commit | Line | Data |
---|---|---|
7c1a1f1d | 1 | // Code to analyse dN/deta from the forward analysis |
2 | // This can plot the results | |
3 | // Also works for MC data | |
c5058a61 | 4 | #ifndef ALIFMDDNDETA_H |
5 | #define ALIFMDDNDETA_H | |
6 | ||
7 | #include "TObject.h" | |
7c1a1f1d | 8 | // #include "TList.h" |
c5058a61 | 9 | #include "TString.h" |
7c1a1f1d | 10 | class TList; |
2dcdd4eb | 11 | class TH1F; |
059c7c6b | 12 | class TH3F; |
13 | class TProfile3D; | |
14 | class TProfile2D; | |
15 | class TH3D; | |
1b418b63 | 16 | /** |
17 | * This class creates dN/deta for the FMD from the analysis objects. | |
18 | * The contents of this class should probably go into a task at some point | |
19 | */ | |
c5058a61 | 20 | class AliFMDDndeta : public TObject |
21 | { | |
c5058a61 | 22 | public: |
1b418b63 | 23 | /** |
24 | * | |
25 | * | |
26 | */ | |
c5058a61 | 27 | AliFMDDndeta(); |
1b418b63 | 28 | /** |
29 | * | |
30 | * | |
31 | * @param o | |
32 | */ | |
33 | AliFMDDndeta(const AliFMDDndeta& o) | |
34 | : TObject(), | |
35 | fList(0), | |
36 | fMultList(), | |
37 | fNbinsToCut(o.fNbinsToCut), | |
38 | fVtxCut1(o.fVtxCut1), | |
39 | fVtxCut2(o.fVtxCut2), | |
40 | fIsInit(o.fIsInit), | |
41 | fIsGenerated(), | |
42 | fPrimEvents(o.fPrimEvents), | |
43 | fEvents(o.fEvents), | |
44 | fPrimdNdeta(fPrimdNdeta), | |
45 | fDrawAll(kFALSE) | |
46 | { | |
47 | for (int i = 0; i < 5; i++) fAnalysisNames[i] = ""; | |
48 | } | |
49 | /** | |
50 | * | |
51 | * | |
52 | * | |
53 | * @return | |
54 | */ | |
ae26bdd7 | 55 | AliFMDDndeta& operator=(const AliFMDDndeta& /*o*/) |
1b418b63 | 56 | { |
57 | // Assignment operator | |
58 | return (*this); | |
59 | } | |
60 | /** | |
61 | * Enumeration of analysis types | |
62 | * | |
63 | */ | |
059c7c6b | 64 | enum Analysis {kHits, kHitsTrVtx, kMult, kMultTrVtx, kMultNSD}; |
1b418b63 | 65 | |
66 | /** | |
67 | * Initialise | |
68 | * | |
69 | * @param filename | |
70 | */ | |
2dcdd4eb | 71 | void Init(const Char_t* filename); |
1b418b63 | 72 | /** |
73 | * Initialise | |
74 | * | |
75 | * @param list | |
76 | */ | |
2dcdd4eb | 77 | void Init(TList* list); |
1b418b63 | 78 | /** |
79 | * Generate the multiplicity for analysis type @a what | |
80 | * | |
81 | * @param what | |
82 | */ | |
c5058a61 | 83 | void GenerateMult(Analysis what); |
1b418b63 | 84 | /** |
85 | * Draw the result. | |
86 | * | |
87 | * @param what | |
88 | * @param rebin | |
89 | * @param realdata | |
90 | * @param filename | |
91 | */ | |
92 | void DrawDndeta(Analysis what, | |
93 | Int_t rebin = 1, | |
94 | Bool_t realdata = kFALSE, | |
95 | TString filename = "none"); | |
96 | /** | |
97 | * Set the number of bins to cut | |
98 | * | |
99 | * @param nbins | |
100 | */ | |
c5058a61 | 101 | void SetNbinsToCut(Int_t nbins) {fNbinsToCut = nbins;} |
1b418b63 | 102 | /** |
103 | * Set the vertex cut | |
104 | * | |
105 | * @param vtxcut | |
106 | */ | |
2dcdd4eb | 107 | void SetVtxCut1(Int_t vtxcut) {fVtxCut1 = vtxcut;} |
1b418b63 | 108 | /** |
109 | * Set the vertex cut | |
110 | * | |
111 | * @param vtxcut | |
112 | */ | |
2dcdd4eb | 113 | void SetVtxCut2(Int_t vtxcut) {fVtxCut2 = vtxcut;} |
1b418b63 | 114 | /** |
115 | * Whether to draw all | |
116 | * | |
117 | * @param drawall | |
118 | */ | |
059c7c6b | 119 | void SetDrawAll(Bool_t drawall) {fDrawAll = drawall;} |
1b418b63 | 120 | /** |
121 | * Create sharing efficiency from file | |
122 | * | |
123 | * @param filename | |
124 | * @param store | |
125 | */ | |
7e2bf482 | 126 | void CreateSharingEfficiency(const Char_t* filename, Bool_t store = kFALSE); |
1b418b63 | 127 | /** |
128 | * Get the list of multiplicities for a given type of analysis. | |
129 | * | |
130 | * @param what | |
131 | * | |
132 | * @return | |
133 | */ | |
7c1a1f1d | 134 | TList* GetMultList(Analysis what) const {return fMultList[what];} |
c5058a61 | 135 | private: |
2dcdd4eb | 136 | void GenerateHits(Analysis what); |
c5058a61 | 137 | void SetNames(Analysis what); |
1b418b63 | 138 | const char* GetAnalysisName(Analysis what, UShort_t det, |
139 | Char_t ring, Int_t vtxbin); | |
140 | const char* GetPrimName(Analysis what, UShort_t det, | |
141 | Char_t ring, Int_t vtxbin); | |
2dcdd4eb | 142 | void RebinHistogram(TH1F* hist, Int_t rebin); |
70d74659 | 143 | TList* fList; // A list of input histograms |
059c7c6b | 144 | TList* fMultList[5]; // A list of mult histograms |
70d74659 | 145 | Int_t fNbinsToCut; // The number of bins to cut |
146 | Int_t fVtxCut1; // Vtx low | |
147 | Int_t fVtxCut2; // Vtx high | |
148 | Bool_t fIsInit; // Are we init ? | |
059c7c6b | 149 | Bool_t fIsGenerated[5]; // Have we generated ? |
2dcdd4eb | 150 | TString fPrimEvents; // Number of prim events |
151 | TString fEvents; // Number of events | |
152 | TString fPrimdNdeta; // the primary dNdeta from MC | |
df2a9c32 | 153 | TString fAnalysisNames[5]; // Names of analysis |
059c7c6b | 154 | // TProfile3D* fDataObject; // New data object |
155 | Bool_t fDrawAll; //Draw relevant or all | |
156 | //TH3D* fDataObject; // New data object | |
157 | ||
c5058a61 | 158 | ClassDef(AliFMDDndeta,2); |
159 | }; | |
160 | ||
161 | ||
162 | #endif | |
163 | // Local Variables: | |
164 | // mode: C++ | |
7c1a1f1d | 165 | // End: |