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