]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/FORWARD/analysis2/AliFMDMCHitEnergyFitterTask.h
Updates
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliFMDMCHitEnergyFitterTask.h
CommitLineData
0b7de667 1#ifndef ALIFMDMCHITENERGYFITTERTASK_H
2#define ALIFMDMCHITENERGYFITTERTASK_H
3#include <AliBaseESDTask.h>
4#include <AliFMDMCHitEnergyFitter.h>
5#include <AliFMDEventInspector.h>
6class AliMCAuxHandler;
7
8/**
9 * This task is designed to read in MC truth information about the
10 * energy loss in each strip, and then fit the distributions from
11 * secondaries and primaries separately.
12 *
13 * Then (this is not implemented yet) it tries to deconvolve the
14 * contributions from secondaries and primaries separately from the
15 * total sum energy loss distribution, and in that way estimate the
16 * secondary to primary charge particle ratios per @f$\eta@f$ bin. If
17 * the same procedure is applied to real data, then we can have an
18 * estimate - from data - of the ratio of secondaries to primaries and
19 * thus perhaps get a clearer picture of the secondary particle
20 * contamination.
21 *
22 * The the function fitted to the (scaled) energy loss
23 * (@f$\Delta/\Delta_{mip}@f$ distributions is
24 *
25 * @f[
26 * F(\Delta;\Delta_p,\xi,\sigma,\mathbf{a}) =
27 * \sum_{i=1}^{N}a_i f(\Delta;\Delta_i,\xi_i,\sigma_i)
28 * @f]
29 * where @f$ a@f$ is of length @f$ N@f$ and
30 * @f[
31 * f(\Delta;\Delta,\xi,\sigma) =
32 * \int_{-\infty}^{+\infty}d\Delta' L(\Delta,\Delta',\xi)
33 * \frac{1}{\sqrt{2\pi\sigma^2}}
34 * e^{-\frac{(\Delta'-\Delta_mp^2}{2\sigma^2}}
35 * @f]
36 * and
37 * @f[
38 * \Delta_i = i(\Delta_1+\xi\log(i))\\
39 * \xi_i = i\xi_1\\
40 * \sigma_i = \sqrt{i}\sigma_1\\
41 * a_1 = 1\\
42 * \Delta_p = \Delta_1\\
43 * \xi = \xi_1\\
44 * \sigma = \sigma_1
45 * @f]
46 *
a19faec0 47 * See also AliLandauGausFitter
0b7de667 48 */
49class AliFMDMCHitEnergyFitterTask : public AliBaseESDTask
50{
51public:
52 /**
53 * Default CTOR - do not use
54 */
55 AliFMDMCHitEnergyFitterTask()
56 : AliBaseESDTask(),
57 fEventInspector(),
58 fEnergyFitter(),
59 fHitHandler(0)
60 {}
61 /**
62 * CTOR
63 *
64 * @param name Name - not used
65 * @param useTuple Whether to use store an NTuple
66 */
67 AliFMDMCHitEnergyFitterTask(const char* name,
68 Bool_t useTuple=false);
69 /**
70 * DTOR
71 */
72 ~AliFMDMCHitEnergyFitterTask() {}
73
74 /**
75 * Called when setting up the train on the client - i.e., called
76 * once before the job hits the worker nodes
77 *
78 * @return true
79 */
80 Bool_t Setup();
81 /**
82 * Called at start-up on the clients - i.e., called once per worker
83 * node before the event processing.
84 *
85 * @return true
86 */
87 Bool_t Book();
88 /**
89 * Called after the first event was seen - i.e., called once per
90 * worker node just after the first event was seen, but before event
91 * processing.
92 *
93 * @param ipz Interaction point Z--coordinate axis to use
94 * @param eta @f$\eta=-\log[\tan^{-1}(\theta/2)]@f$ axis to use
95 *
96 * @return true
97 */
98 Bool_t PreData(const TAxis& ipz, const TAxis& eta);
99 /**
100 * Process a single event
101 *
102 * @param esd ESD input event
103 *
104 * @return true on success
105 */
106 Bool_t Event(AliESDEvent& esd);
107 /**
108 * Finalize the task. This is called once after all event
109 * processing and after all outputs have been merged. This is
110 * called on the master/client once.
111 *
112 * @return true on success
113 */
114 Bool_t Finalize() { fEnergyFitter.Fit(fResults); return true; }
115 /**
116 * Print information to standard out
117 *
118 * @param option Passed to sub objects as-is
119 */
120 void Print(Option_t* option="") const;
121 /**
122 * Get the event inspector
123 *
124 * @return Reference to the event inspector
125 */
126 AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
127 /**
128 * Get the event inspector
129 *
130 * @return Constant reference to the event inspector
131 */
132 const AliFMDEventInspector& GetEventInspector() const
133 {
134 return fEventInspector;
135 }
136 /**
137 * Get the energy fitter
138 *
139 * @return Reference to the energy fitter
140 */
141 AliFMDMCHitEnergyFitter& GetEnergyFitter() { return fEnergyFitter; }
142 /**
143 * Get the energy fitter
144 *
145 * @return Constant reference to the energy fitter
146 */
147 const AliFMDMCHitEnergyFitter& GetEnergyFitter() const
148 {
149 return fEnergyFitter;
150 }
151 void SetDebug(Int_t dbg) {
152 AliBaseESDTask::SetDebug(dbg); GetEnergyFitter().SetDebug(dbg); }
153protected:
154 /**
155 * Copy CTOR - not Implemented
156 *
157 * @param o Object to copy from
158 */
159 AliFMDMCHitEnergyFitterTask(const AliFMDMCHitEnergyFitterTask& o);
160 /**
161 * Assignment operator - not implemented
162 *
163 * @param o Object to assign from
164 *
165 * @return Reference to this
166 */
167 AliFMDMCHitEnergyFitterTask& operator=(const AliFMDMCHitEnergyFitterTask&o);
168 /**
169 * Get the default @f$\eta=-\log[\tan^{-1}(\theta/2)]@f$ axis to use
170 *
171 * @return Pointer to static object
172 */
173 TAxis* DefaultEtaAxis() const;
174 /**
175 * Get the default interaction point Z--coordinate axis to use
176 *
177 * @return Pointer to static object
178 */
179 TAxis* DefaultVertexAxis() const;
180
181 AliFMDEventInspector fEventInspector; // The event inspector
182 AliFMDMCHitEnergyFitter fEnergyFitter; // The energy loss fitter
183 AliMCAuxHandler* fHitHandler; // Handler for reading hits in
184
185 ClassDef(AliFMDMCHitEnergyFitterTask,1); // Task to fit Delta from MC hits
186};
187
188#endif
189// Local Variables:
190// mode: C++
191// End: