]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliForwarddNdetaTask.h
Coverity fixes
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliForwarddNdetaTask.h
1 //
2 // Task to analyse the AOD for for dN/deta in the forward regions 
3 //
4 #ifndef ALIFORWARDDNDETATASK_H
5 #define ALIFORWARDDNDETATASK_H
6 /**
7  * @file   AliForwarddNdetaTask.h
8  * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9  * @date   Wed Mar 23 14:04:54 2011
10  * 
11  * @brief  
12  * 
13  * 
14  * @ingroup pwg2_forward_dndeta
15  */
16 #include "AliBasedNdetaTask.h"
17 class TList;
18 class TH2D;
19 class TH1D;
20
21 /**
22  * Tasks to determine @f$ dN/d\eta@f$ in the forward regions
23  *
24  * @ingroup pwg2_forward_tasks_dndeta
25  * @ingroup pwg2_forward_dndeta
26  */
27 class AliForwarddNdetaTask : public AliBasedNdetaTask
28 {
29 public:
30   /** 
31    * Constructor 
32    * 
33    */
34   AliForwarddNdetaTask();
35   /** 
36    * Constructor
37    * 
38    * @param name    Name of task 
39    */
40   AliForwarddNdetaTask(const char* name);
41   /**
42    * Destructor
43    * 
44    */
45   virtual ~AliForwarddNdetaTask() {}
46   /** 
47    * Called at each event 
48    *
49    * This is called once in the master 
50    * 
51    * @param option Not used 
52    */
53   virtual void UserExec(Option_t* option);
54   /** 
55    * Called at end of event processing.
56    *
57    * This is called once in the master 
58    * 
59    * @param option Not used 
60    */
61   virtual void Terminate(Option_t* option);
62 protected:
63   /** 
64    * Copy constructor 
65    */
66   AliForwarddNdetaTask(const AliForwarddNdetaTask& o);
67   /** 
68    * Assigmement operator
69    * 
70    * @return Reference to this
71    */
72   AliForwarddNdetaTask& operator=(const AliForwarddNdetaTask&) { return *this; }
73
74   /** 
75    * Retrieve the histogram 
76    * 
77    * @param aod AOD event 
78    * @param mc  Whether to get the MC histogram or not
79    * 
80    * @return Retrieved histogram or null
81    */
82   TH2D* GetHistogram(const AliAODEvent* aod, Bool_t mc);
83   /** 
84    * Make a new centrality bin
85    * 
86    * @param name   Histogram names
87    * @param l      Lower cut
88    * @param h      Upper cut
89    * 
90    * @return Newly allocated object (of our type)
91    */
92   AliBasedNdetaTask::CentralityBin* 
93   MakeCentralityBin(const char* name, Short_t l, Short_t h) const;
94
95   struct CentralityBin : public AliBasedNdetaTask::CentralityBin 
96   {
97     /** 
98      * Constructor 
99      */
100     CentralityBin() : AliBasedNdetaTask::CentralityBin(), fSumPrimary(0) {}
101     /** 
102      * Constructor 
103      * 
104      * @param name Name used for histograms (e.g., Forward)
105      * @param low  Lower centrality cut in percent 
106      * @param high Upper centrality cut in percent 
107      */
108     CentralityBin(const char* name, Short_t low, Short_t high)
109       : AliBasedNdetaTask::CentralityBin(name, low, high), 
110         fSumPrimary(0)
111     {}
112     /** 
113      * Copy constructor 
114      * 
115      * @param other Object to copy from 
116      */
117     CentralityBin(const CentralityBin& other) 
118       : AliBasedNdetaTask::CentralityBin(other), 
119         fSumPrimary(other.fSumPrimary) 
120     {}
121     /** 
122      * Destructor 
123      */
124     virtual ~CentralityBin() {}
125     /** 
126      * Assignement operator 
127      * 
128      * 
129      * @return 
130      */
131     CentralityBin& operator=(const CentralityBin&) { return *this; }
132     /** 
133      * Process an event
134      * 
135      * @param forward     Forward data (for trigger, vertex, & centrality)
136      * @param triggerMask Trigger mask 
137      * @param vzMin       Minimum IP z coordinate
138      * @param vzMax       Maximum IP z coordinate
139      * @param primary     MC truth histogram
140      */
141     virtual void ProcessPrimary(const AliAODForwardMult* forward, 
142                                 Int_t triggerMask,
143                                 Double_t vzMin, Double_t vzMax, 
144                                 const TH2D* primary);
145     /** 
146      * End of processing 
147      * 
148      * @param sums        List of sums
149      * @param results     Output list of results
150      * @param scheme      Normalisation scheme options
151      * @param shapeCorr   Shape correction or nil
152      * @param trigEff     Trigger efficiency 
153      * @param symmetrice  Whether to symmetrice the results
154      * @param rebin       Whether to rebin the results
155      * @param rootProj    If true, use TH2::ProjectionX
156      * @param corrEmpty   Whether to correct for empty bins
157      * @param cutEdges    Whether to cut edges when rebinning
158      * @param triggerMask Trigger mask 
159      * @param color       Marker colour 
160      * @param marker      Marker style 
161      */
162     virtual void End(TList*      sums, 
163                      TList*      results,
164                      UShort_t    scheme,
165                      const TH1*  shapeCorr, 
166                      Double_t    trigEff,
167                      Bool_t      symmetrice,
168                      Int_t       rebin, 
169                      Bool_t      rootProj,
170                      Bool_t      corrEmpty, 
171                      Bool_t      cutEdges, 
172                      Int_t       triggerMask,
173                      Int_t       marker);
174   protected: 
175     TH2D*           fSumPrimary;    //  Sum of primary histograms
176     ClassDef(CentralityBin,1); // A centrality bin     
177   };
178
179   ClassDef(AliForwarddNdetaTask,1); // Determine multiplicity in forward region
180 };
181
182 #endif
183 //
184 // Local Variables:
185 //  mode: C++
186 // End:
187 //