Fix some documentation issues
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliMCTruthdNdetaTask.h
CommitLineData
9ecab72f 1//
2// Task to analyse the AOD for for dN/deta in the forward regions
3//
4#ifndef ALIMCTRUTHDNDETATASK_H
5#define ALIMCTRUTHDNDETATASK_H
6/**
7 * @file AliMCTruthdNdetaTask.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 *
bd6f5206 14 * @ingroup pwglf_forward_dndeta
9ecab72f 15 */
16#include "AliBasedNdetaTask.h"
17class TList;
18class TH2D;
19class TH1D;
20
21/**
22 * Tasks to determine @f$ dN/d\eta@f$ in the forward regions
23 *
bd6f5206 24 * @ingroup pwglf_forward_tasks_dndeta
25 * @ingroup pwglf_forward_dndeta
9ecab72f 26 */
27class AliMCTruthdNdetaTask : public AliBasedNdetaTask
28{
29public:
30 /**
31 * Constructor
32 *
33 */
34 AliMCTruthdNdetaTask();
35 /**
36 * Constructor
37 *
38 * @param name Name of task
39 */
40 AliMCTruthdNdetaTask(const char* name);
41 /**
42 * Destructor
43 *
44 */
45 virtual ~AliMCTruthdNdetaTask() {}
46 /**
47 * Called at end of event processing.
48 *
49 * This is called once in the master
9ecab72f 50 */
c8b1a7db 51 virtual Bool_t Finalize();
9ecab72f 52protected:
53 /**
54 * Copy constructor
290052e7 55 *
56 * @param o Object to copy from
9ecab72f 57 */
58 AliMCTruthdNdetaTask(const AliMCTruthdNdetaTask& o);
59 /**
60 * Assigmement operator
61 *
62 * @return Reference to this
63 */
c8b1a7db 64 AliMCTruthdNdetaTask& operator=(const AliMCTruthdNdetaTask&);
9ecab72f 65
66 /**
67 * Retrieve the histogram
68 *
69 * @param aod AOD event
70 * @param mc Whether to get the MC histogram or not
71 *
72 * @return Retrieved histogram or null
73 */
c8b1a7db 74 TH2D* GetHistogram(const AliAODEvent& aod, Bool_t mc);
9ecab72f 75 /**
76 * Get the marker style
77 *
78 * @return Marker style
79 */
80 virtual Int_t GetMarker() const { return GetMarkerStyle(kStar); }
81 /**
82 * Get the colour to use for markers (only pp - in PbPb we use a rainbow)
83 *
84 * @return Marker colour
85 */
86 virtual Int_t GetColor() const { return kGray+2; }
87 /**
88 * Make a new centrality bin
89 *
90 * @param name Histogram names
91 * @param l Lower cut
92 * @param h Upper cut
93 *
94 * @return Newly allocated object (of our type)
95 */
96 AliBasedNdetaTask::CentralityBin*
97 MakeCentralityBin(const char* name, Short_t l, Short_t h) const;
98
99 /**
100 * Class that holds data for a single centrality bin
101 *
102 */
badf1074 103 class CentralityBin : public AliBasedNdetaTask::CentralityBin
9ecab72f 104 {
badf1074 105 public:
9ecab72f 106 /**
107 * Constructor
108 */
109 CentralityBin() : AliBasedNdetaTask::CentralityBin(), fSumTruth(0) {}
110 /**
111 * Constructor
112 *
113 * @param name Name used for histograms (e.g., Forward)
114 * @param low Lower centrality cut in percent
115 * @param high Upper centrality cut in percent
116 */
117 CentralityBin(const char* name, Short_t low, Short_t high)
118 : AliBasedNdetaTask::CentralityBin(name, low, high),
119 fSumTruth(0)
120 {}
121 /**
122 * Copy constructor
123 *
124 * @param other Object to copy from
125 */
126 CentralityBin(const CentralityBin& other)
127 : AliBasedNdetaTask::CentralityBin(other),
128 fSumTruth(other.fSumTruth)
129 {}
130 /**
131 * Destructor
132 */
133 virtual ~CentralityBin() {}
134 /**
135 * Assignement operator
136 *
137 *
138 * @return
139 */
140 CentralityBin& operator=(const CentralityBin&) { return *this; }
141 /**
142 * Process an event
143 *
144 * @param forward Forward data (for trigger, vertex, & centrality)
145 * @param triggerMask Trigger mask
146 * @param isZero True if this is a zero bin event
147 * @param vzMin Minimum IP z coordinate
148 * @param vzMax Maximum IP z coordinate
149 * @param data Data histogram
150 * @param mc MC histogram
151 */
bfab35d9 152 virtual Bool_t ProcessEvent(const AliAODForwardMult* forward,
153 Int_t triggerMask,
154 Bool_t isZero,
155 Double_t vzMin,
156 Double_t vzMax,
157 const TH2D* data,
158 const TH2D* mc);
9ecab72f 159 /**
160 * End of processing
161 *
162 * @param sums List of sums
163 * @param results Output list of results
164 * @param scheme Normalisation scheme options
165 * @param shapeCorr Shape correction or nil
166 * @param trigEff Trigger efficiency
66cf95f2 167 * @param trigEff0 0-bin trigger efficiency
9ecab72f 168 * @param symmetrice Whether to symmetrice the results
169 * @param rebin Whether to rebin the results
170 * @param rootProj If true, use TH2::ProjectionX
171 * @param corrEmpty Whether to correct for empty bins
172 * @param cutEdges Whether to cut edges when rebinning
173 * @param triggerMask Trigger mask
174 * @param color Marker colour
175 * @param marker Marker style
c6115ede 176 * @param mclist List of MC results
177 * @param truthlist List of MC truth results
9ecab72f 178 */
179 virtual void End(TList* sums,
180 TList* results,
181 UShort_t scheme,
f67d699c 182 const TH2F* shapeCorr,
9ecab72f 183 Double_t trigEff,
66cf95f2 184 Double_t trigEff0,
9ecab72f 185 Bool_t symmetrice,
186 Int_t rebin,
187 Bool_t rootProj,
188 Bool_t corrEmpty,
189 Bool_t cutEdges,
190 Int_t triggerMask,
191 Int_t marker,
c89b9ac1 192 Int_t color,
193 TList* mclist,
194 TList* truthlist);
9ecab72f 195 protected:
196 TH2D* fSumTruth; // Sum of primary histograms
5934a3e3 197 ClassDef(CentralityBin,2); // A centrality bin
9ecab72f 198 };
786db950 199 Bool_t fHasData; // whether we actually have data or not
5934a3e3 200 ClassDef(AliMCTruthdNdetaTask,2); // Determine multiplicity in forward region
9ecab72f 201};
202
203#endif
204//
205// Local Variables:
206// mode: C++
207// End:
208//