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