]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/AliMCTruthdNdetaTask.h
MB fix for 2.76 TeV
[u/mrichter/AliRoot.git] / PWG2 / 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 *
14 * @ingroup pwg2_forward_dndeta
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 *
24 * @ingroup pwg2_forward_tasks_dndeta
25 * @ingroup pwg2_forward_dndeta
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
50 *
51 * @param option Not used
52 */
53 virtual void Terminate(Option_t* option);
54protected:
55 /**
56 * Copy constructor
57 */
58 AliMCTruthdNdetaTask(const AliMCTruthdNdetaTask& o);
59 /**
60 * Assigmement operator
61 *
62 * @return Reference to this
63 */
64 AliMCTruthdNdetaTask& operator=(const AliMCTruthdNdetaTask&) { return *this; }
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 */
74 TH2D* GetHistogram(const AliAODEvent* aod, Bool_t mc);
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 */
103 struct CentralityBin : public AliBasedNdetaTask::CentralityBin
104 {
105 /**
106 * Constructor
107 */
108 CentralityBin() : AliBasedNdetaTask::CentralityBin(), fSumTruth(0) {}
109 /**
110 * Constructor
111 *
112 * @param name Name used for histograms (e.g., Forward)
113 * @param low Lower centrality cut in percent
114 * @param high Upper centrality cut in percent
115 */
116 CentralityBin(const char* name, Short_t low, Short_t high)
117 : AliBasedNdetaTask::CentralityBin(name, low, high),
118 fSumTruth(0)
119 {}
120 /**
121 * Copy constructor
122 *
123 * @param other Object to copy from
124 */
125 CentralityBin(const CentralityBin& other)
126 : AliBasedNdetaTask::CentralityBin(other),
127 fSumTruth(other.fSumTruth)
128 {}
129 /**
130 * Destructor
131 */
132 virtual ~CentralityBin() {}
133 /**
134 * Assignement operator
135 *
136 *
137 * @return
138 */
139 CentralityBin& operator=(const CentralityBin&) { return *this; }
140 /**
141 * Process an event
142 *
143 * @param forward Forward data (for trigger, vertex, & centrality)
144 * @param triggerMask Trigger mask
145 * @param isZero True if this is a zero bin event
146 * @param vzMin Minimum IP z coordinate
147 * @param vzMax Maximum IP z coordinate
148 * @param data Data histogram
149 * @param mc MC histogram
150 */
151 virtual void ProcessEvent(const AliAODForwardMult* forward,
152 Int_t triggerMask,
153 Bool_t isZero,
154 Double_t vzMin,
155 Double_t vzMax,
156 const TH2D* data,
157 const TH2D* mc);
158 /**
159 * End of processing
160 *
161 * @param sums List of sums
162 * @param results Output list of results
163 * @param scheme Normalisation scheme options
164 * @param shapeCorr Shape correction or nil
165 * @param trigEff Trigger efficiency
166 * @param symmetrice Whether to symmetrice the results
167 * @param rebin Whether to rebin the results
168 * @param rootProj If true, use TH2::ProjectionX
169 * @param corrEmpty Whether to correct for empty bins
170 * @param cutEdges Whether to cut edges when rebinning
171 * @param triggerMask Trigger mask
172 * @param color Marker colour
173 * @param marker Marker style
c6115ede 174 * @param mclist List of MC results
175 * @param truthlist List of MC truth results
9ecab72f 176 */
177 virtual void End(TList* sums,
178 TList* results,
179 UShort_t scheme,
180 const TH1* shapeCorr,
181 Double_t trigEff,
182 Bool_t symmetrice,
183 Int_t rebin,
184 Bool_t rootProj,
185 Bool_t corrEmpty,
186 Bool_t cutEdges,
187 Int_t triggerMask,
188 Int_t marker,
c89b9ac1 189 Int_t color,
190 TList* mclist,
191 TList* truthlist);
9ecab72f 192 protected:
193 TH2D* fSumTruth; // Sum of primary histograms
194 ClassDef(CentralityBin,1); // A centrality bin
195 };
196
197 ClassDef(AliMCTruthdNdetaTask,1); // Determine multiplicity in forward region
198};
199
200#endif
201//
202// Local Variables:
203// mode: C++
204// End:
205//