]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliForwardMultiplicityDistribution.h
Renamed some member functions for more logical names
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliForwardMultiplicityDistribution.h
1 #ifndef ALIFORWARDMULTIPLICITYDISTRIBUTION_H
2 #define ALIFORWARDMULTIPLICITYDISTRIBUTION_H
3  
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6   
7 #include "AliAnalysisTaskSE.h"
8 #include "AliBasedNdetaTask.h"
9 #include <TList.h>
10 #include <iostream>
11
12 class TH2D;
13
14 /**
15  * Task to do the multiplicity distibution
16  * 
17  */
18 class AliForwardMultiplicityDistribution : public AliBasedNdetaTask
19 {
20 public:
21   /**
22    * Default Constructor
23    */
24   AliForwardMultiplicityDistribution();
25   /**
26    * Constructor
27    */
28   AliForwardMultiplicityDistribution(const char* name);
29   /**
30    * Copy Constructor
31    */ 
32   AliForwardMultiplicityDistribution(const AliForwardMultiplicityDistribution& o) : AliBasedNdetaTask(o), fTrigger(o.fTrigger),fBins(), fOutput(o.fOutput), fLowCent(o.fLowCent), fHighCent(o.fHighCent),fNBins(o.fNBins), fCent(o.fCent){ }
33   /**
34    * Assignment Operator
35    */
36   AliForwardMultiplicityDistribution& operator=(const AliForwardMultiplicityDistribution&){return *this;}
37   /**
38    * Destructor
39    */
40   virtual ~AliForwardMultiplicityDistribution(){}
41   /**
42    * Embedded Class begins here
43    */
44   struct Bin : public TNamed
45   {
46     /**
47      * Default Constructor
48      */
49     Bin();
50     /**
51      * Constructor
52      */
53     Bin(Double_t etaLow, Double_t etaHigh);
54     /**
55      * Copy Constructor
56      */    
57     Bin(const Bin&);
58     /**
59      * Assignment operator
60      */
61     Bin&operator=(const Bin&){return*this;}
62     /**
63      * Destructor
64      */    
65     ~Bin(){}
66     /**
67      *  Define outputs of a single eta bin
68      */
69     virtual void CreateOutputObjectss(TList* cont,  Int_t max);
70     /**
71      * Process a single eta bin
72      */
73     virtual void Process(TH1D* dndetaForward, TH1D* dndetaCentral, TH1D* normForward,   TH1D* normCentral, Double_t VtxZ);
74     Double_t fEtaLow;           // low eta limit 
75     Double_t fEtaHigh;          // high eta limit 
76     TH1D*    fHist;             // multiplicity distribution hist 
77     TH1D*    fHistPlus05;       // multiplicity distribution hist scaled up with 5%
78     TH1D*    fHistPlus075;      // multiplicity distribution hist scaled up with 7.5%
79     TH1D*    fHistPlus10;       // multiplicity distribution hist scaled up with 10%
80     TH1D*    fHistMinus05;      // multiplicity distribution hist scaled down with 5%
81     TH1D*    fHistMinus075;     // multiplicity distribution hist scaled down with 7.5%
82     TH1D*    fHistMinus10;      // multiplicity distribution hist scaled down with 10%
83     TH1D*    fHistPlusSys;      // multiplicity distribution hist scaled up with the event uncertainty
84     TH1D*    fHistMinusSys;     // multiplicity distribution hist scaled down with the event uncertainty
85     TH2D*    fAcceptance;       // histogram showing the 'holes' in acceptance. 
86                                 // BinContent of 1 shows a hole, and BinContent of 10 shows data coverage
87     TH2D*    fVtxZvsNdataBins;  // VtxZ vs. number of data acceptance bins (normalised to the eta range) 
88     
89     ClassDef(Bin,2);  // Manager of data 
90   };
91   /**
92    * Create Output Objects
93    */
94   virtual void UserCreateOutputObjects();
95   /**
96    * User Exec
97    */
98   void UserExec(Option_t *option);
99   /**
100    * Terminate
101    */
102   void Terminate(Option_t *option);
103   /**
104    * Set Centrality
105    */
106   void SetCentrality(Int_t lowCent, Int_t highCent){fLowCent= lowCent; fHighCent= highCent;}
107   /**
108    * Set fNBins, multiplicity histos run from 0 to fNBins
109    */
110   void SetNBins(Int_t n){fNBins= n;}
111   /** 
112    * implementation of pure virtual function, always returning 0
113    */
114   virtual TH2D* GetHistogram(const AliAODEvent* aod, Bool_t mc);
115   /**
116    * Get single event forward and central dNĀ²/dEta dPhi histograms 
117    */
118   virtual void GetHistograms(const AliAODEvent* aod, TH2D& forward, TH2D& central , Bool_t mc=false);
119   /** 
120    * Add another eta bin to the task
121    */
122   void AddBin(Double_t etaLow, Double_t etaHigh){fBins.Add(new Bin(etaLow, etaHigh)); }
123   /**
124    *  Form name of eta bin
125    */
126   static const Char_t* FormBinName(Double_t etaLow, Double_t etaHigh);
127 protected:
128   TH1I*  fTrigger;   // trigger histogram
129   TList  fBins;      // eta bin list
130   TList* fOutput;    // output list
131   Int_t  fLowCent;   // lower centrality limit
132   Int_t  fHighCent;  // upper centrality limit
133   Int_t  fNBins;     // multiplicity axis' runs from 0 to fNbins
134   TH1D*  fCent;      // centrality
135   ClassDef(AliForwardMultiplicityDistribution, 2); 
136 };
137
138 #endif
139 // Local Variables:
140 //   mode: C++
141 // End: