]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis/AliFMDDndeta.h
313a3238aac295d609a2119b83c71637805c7ff7
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis / AliFMDDndeta.h
1 #ifndef ALIFMDDNDETA_H
2 #define ALIFMDDNDETA_H
3
4 #include "TObject.h"
5 #include "TList.h"
6 #include "TString.h"
7 class TH1F;
8
9 //
10 // This class creates dN/deta for the FMD from the analysis objects.
11 // The contents of this class should probably go into a task at some point
12 //
13
14 class AliFMDDndeta : public TObject
15 {
16
17  public:
18   AliFMDDndeta();
19  AliFMDDndeta(const AliFMDDndeta& o) : 
20   TObject(),
21     fList(0),
22     fMultList(),
23     fNbinsToCut(o.fNbinsToCut),
24     fVtxCut1(o.fVtxCut1),
25     fVtxCut2(o.fVtxCut2),
26     fIsInit(o.fIsInit),
27     fIsGenerated(),
28     fPrimEvents(o.fPrimEvents),
29     fEvents(o.fEvents),
30     fPrimdNdeta(fPrimdNdeta)
31     {}
32   
33   AliFMDDndeta& operator=(const AliFMDDndeta& /*o*/) 
34     {
35       // Assignment operator 
36       
37       return (*this);
38     }
39   
40   enum Analysis {kHits, kHitsTrVtx, kMult, kMultTrVtx};
41   
42   
43   
44   void Init(const Char_t* filename);
45   void Init(TList* list);
46   void GenerateMult(Analysis what);
47   void DrawDndeta(Analysis what, Int_t rebin = 1, Bool_t realdata = kFALSE);
48   void SetNbinsToCut(Int_t nbins) {fNbinsToCut = nbins;}
49   void SetVtxCut1(Int_t vtxcut) {fVtxCut1 = vtxcut;}
50   void SetVtxCut2(Int_t vtxcut) {fVtxCut2 = vtxcut;}
51   void CreateSharingEfficiency(const Char_t* filename, Bool_t store = kFALSE);
52   TList* GetMultList(Analysis what) {return fMultList[what];}
53  private:
54   void GenerateHits(Analysis what);
55   void SetNames(Analysis what);
56   const char* GetAnalysisName(Analysis what, UShort_t det, Char_t ring, Int_t vtxbin);
57   const char* GetPrimName(Analysis what, UShort_t det, Char_t ring, Int_t vtxbin);
58   void   RebinHistogram(TH1F* hist, Int_t rebin);
59   TList*  fList;                         // A list of input histograms
60   TList*  fMultList[4];                  // A list of mult histograms 
61   Int_t   fNbinsToCut;                   // The number of bins to cut
62   Int_t   fVtxCut1;                      // Vtx low
63   Int_t   fVtxCut2;                      // Vtx high
64   Bool_t  fIsInit;                       // Are we init ? 
65   Bool_t  fIsGenerated[4];               // Have we generated ?
66   TString fPrimEvents;                   // Number of prim events
67   TString fEvents;                       // Number of events
68   TString fPrimdNdeta;                   // the primary dNdeta from MC
69   Char_t* fAnalysisNames[4];             // Names of analysis
70   ClassDef(AliFMDDndeta,2);
71 };
72
73
74 #endif
75 // Local Variables:
76 //  mode: C++
77 // End Variables;