]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/AliForwarddNdetaTask.h
Mega commit.
[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);
5bb5d1f6 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);
b2e7f2d6 62protected:
b2e7f2d6 63 /**
fe52e455 64 * Copy constructor
b2e7f2d6 65 */
fe52e455 66 AliForwarddNdetaTask(const AliForwarddNdetaTask& o);
b2e7f2d6 67 /**
fe52e455 68 * Assigmement operator
b2e7f2d6 69 *
fe52e455 70 * @return Reference to this
b2e7f2d6 71 */
fe52e455 72 AliForwarddNdetaTask& operator=(const AliForwarddNdetaTask&) { return *this; }
73
b2e7f2d6 74 /**
fe52e455 75 * Retrieve the histogram
b2e7f2d6 76 *
fe52e455 77 * @param aod AOD event
78 * @param mc Whether to get the MC histogram or not
79 *
80 * @return Retrieved histogram or null
b2e7f2d6 81 */
fb3430ac 82 TH2D* GetHistogram(const AliAODEvent* aod, Bool_t mc);
e1f47419 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
ffca499d 150 * @param scheme Normalisation scheme options
e1f47419 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
c25b5e1b 155 * @param rootProj If true, use TH2::ProjectionX
e1f47419 156 * @param corrEmpty Whether to correct for empty bins
157 * @param cutEdges Whether to cut edges when rebinning
e1f47419 158 * @param triggerMask Trigger mask
ffca499d 159 * @param color Marker colour
160 * @param marker Marker style
e1f47419 161 */
162 virtual void End(TList* sums,
163 TList* results,
ffca499d 164 UShort_t scheme,
e1f47419 165 const TH1* shapeCorr,
166 Double_t trigEff,
167 Bool_t symmetrice,
168 Int_t rebin,
c25b5e1b 169 Bool_t rootProj,
e1f47419 170 Bool_t corrEmpty,
171 Bool_t cutEdges,
ffca499d 172 Int_t triggerMask,
ffca499d 173 Int_t marker);
e1f47419 174 protected:
175 TH2D* fSumPrimary; // Sum of primary histograms
176 ClassDef(CentralityBin,1); // A centrality bin
177 };
b2e7f2d6 178
fe52e455 179 ClassDef(AliForwarddNdetaTask,1); // Determine multiplicity in forward region
b2e7f2d6 180};
181
182#endif
fe52e455 183//
184// Local Variables:
185// mode: C++
186// End:
187//