]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis/AliFMDDndeta.h
Fix warnings
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis / AliFMDDndeta.h
1 // Code to analyse dN/deta from the forward analysis
2 // This can plot the results 
3 // Also works for MC data 
4 #ifndef ALIFMDDNDETA_H
5 #define ALIFMDDNDETA_H
6
7 #include "TObject.h"
8 // #include "TList.h"
9 #include "TString.h"
10 class TList;
11 class TH1F;
12 class TH3F;
13 class TProfile3D;
14 class TProfile2D;
15 class TH3D;
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  */
20 class AliFMDDndeta : public TObject
21 {
22  public:
23   /** 
24    * 
25    * 
26    */
27   AliFMDDndeta();
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(o.fPrimdNdeta),
45       fDrawAll(kFALSE)
46   {
47     for (int i = 0; i < 5; i++) fAnalysisNames[i] = "";
48   }
49   /** 
50    * 
51    * 
52    * 
53    * @return 
54    */  
55   AliFMDDndeta& operator=(const AliFMDDndeta& /*o*/) 
56   {
57     // Assignment operator 
58     return (*this);
59   }
60   /**
61    * Enumeration of analysis types
62    * 
63    */
64   enum Analysis {kHits, kHitsTrVtx, kMult, kMultTrVtx, kMultNSD};
65
66   /** 
67    * Initialise 
68    * 
69    * @param filename 
70    */  
71   void Init(const Char_t* filename);
72   /** 
73    * Initialise 
74    * 
75    * @param list 
76    */
77   void Init(TList* list);
78   /** 
79    * Generate the multiplicity for analysis type @a what
80    * 
81    * @param what 
82    */
83   void GenerateMult(Analysis what);
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    */
101   void SetNbinsToCut(Int_t nbins) {fNbinsToCut = nbins;}
102   /** 
103    * Set the vertex cut
104    * 
105    * @param vtxcut 
106    */
107   void SetVtxCut1(Int_t vtxcut) {fVtxCut1 = vtxcut;}
108   /** 
109    * Set the vertex cut
110    * 
111    * @param vtxcut 
112    */
113   void SetVtxCut2(Int_t vtxcut) {fVtxCut2 = vtxcut;}
114   /** 
115    * Whether to draw all 
116    * 
117    * @param drawall 
118    */
119   void SetDrawAll(Bool_t drawall) {fDrawAll = drawall;}
120   /** 
121    * Create sharing efficiency from file 
122    * 
123    * @param filename 
124    * @param store 
125    */
126   void CreateSharingEfficiency(const Char_t* filename, Bool_t store = kFALSE);
127   /** 
128    * Get the list of multiplicities for a given type of analysis. 
129    * 
130    * @param what 
131    * 
132    * @return 
133    */
134   TList* GetMultList(Analysis what) const {return fMultList[what];}
135  private:
136   void GenerateHits(Analysis what);
137   void SetNames(Analysis what);
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);
142   void   RebinHistogram(TH1F* hist, Int_t rebin);
143   TList*  fList;                         // A list of input histograms
144   TList*  fMultList[5];                  // A list of mult histograms 
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 ? 
149   Bool_t  fIsGenerated[5];               // Have we generated ?
150   TString fPrimEvents;                   // Number of prim events
151   TString fEvents;                       // Number of events
152   TString fPrimdNdeta;                   // the primary dNdeta from MC
153   TString fAnalysisNames[5];             // Names of analysis
154   // TProfile3D*   fDataObject;                  // New data object
155   Bool_t fDrawAll;                        //Draw relevant or all
156   //TH3D*   fDataObject;                  // New data object
157   
158   ClassDef(AliFMDDndeta,2);
159 };
160
161
162 #endif
163 // Local Variables:
164 //  mode: C++
165 // End: