]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/FORWARD/analysis/AliFMDAnalysisTaskSharing.h
Adding AOD task for FMDEventPlaneFinder
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis / AliFMDAnalysisTaskSharing.h
CommitLineData
3bb122c7 1#ifndef ALIFMDANALYSISTASKSHARING_H
2#define ALIFMDANALYSISTASKSHARING_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
0210c863 5 * See cxx source for full Copyright notice
6 **/
3bb122c7 7
8#include "AliAnalysisTask.h"
0210c863 9
3bb122c7 10#include "AliESDFMD.h"
0210c863 11//#include "TTree.h"
8dc7c4c2 12#include "AliESDEvent.h"
0a2f2742 13#include "AliFMDFloatMap.h"
3bb122c7 14class TChain;
15class AliAODEvent;
7c3e5162 16class AliESDVertex;
3bb122c7 17
cfe59e45 18/**
19 * Do the sharing correction.
1b418b63 20 *
21 * This is the task to do the FMD sharing or hit merging.
22 * It reads the input ESDFMD data and posts an ESDFMD object to
23 * the tasks that must be performed after this task ie.
24 * Density, BackgroundCorrection and Dndeta.
25 *
26 * Inputs: An AliESDFMD object
27 *
28 * Output:
29 * An AliESDFMD object, but with hits merged according to algorithm.
30 *
31 * Used correction objects:
32 * Energy distribution fits (MPV and width of 1st landau)
33 * Hard low cut on 'mult' of 0.3
34 *
35 * Simplications:
36 * Remove all diagnostics histograms except a few. The histograms
37 * needed for subsequent use are the ones for the sharing correction -
38 * but only from MC data.
39 *
40 * Remove calculation vertex efficiency. This is best taken care of
41 * elsewhere.
42 *
43 * Open issues:
44 * The ESD signal is un-angle-corrected and the after merging,
45 * Re-angle-corrected. I think this is wrong and will cause a
46 * problem for the low-eta (low-theta) bins where the correction is
47 * largets. Essentially, a particle that traverses two strips at
48 * low theta will have a relatively large path through and will,
49 * all things equal, deposite more energy. The sharing filter may
50 * then not pick this hit as steming from the same particle, but
51 * but rather from 2 particles. This is especially true of the MPV
52 * and width of the 1st Landau is determined from a full
53 * detector/ring spectra.
54 *
cfe59e45 55 * @ingroup FMD_ana
56 *
57 *
58 */
3bb122c7 59class AliFMDAnalysisTaskSharing : public AliAnalysisTask
60{
1b418b63 61public:
62 /**
63 * Constructor
64 */
65 AliFMDAnalysisTaskSharing();
66 /**
67 * Constrictor
68 *
69 * @param name Name of task
70 * @param SE Whether we're run from an SE task or not
71 */
72 AliFMDAnalysisTaskSharing(const char* name, Bool_t SE = kTRUE);
73 /**
74 * Destructor
75 *
76 */
77 virtual ~AliFMDAnalysisTaskSharing() {;}
78 /**
79 * Copy constructor
80 *
81 * @param o Object to copy from
82 */
83 AliFMDAnalysisTaskSharing(const AliFMDAnalysisTaskSharing& o)
84 : AliAnalysisTask(),
c78bc12b 85 fDebug(o.fDebug),
86 fESD(o.fESD),
7c3e5162 87 // fOutputESD(),
c78bc12b 88 foutputESDFMD(o.foutputESDFMD),
89 fSharedThis(o.fSharedThis),
7c3e5162 90 fSharedPrev(o.fSharedPrev),
91 fDiagList(),
92 fStandalone(o.fStandalone),
bb8a464f 93 fEsdVertex(o.fEsdVertex),
ae26bdd7 94 fStatus(o.fStatus),
aa303f0c 95 fLastTrackByStrip(o.fLastTrackByStrip),
96 fLastOrbit(o.fLastOrbit) {}
1b418b63 97 /**
98 * Assignment operator
99 *
100 * @return Reference to this object
101 */
102 AliFMDAnalysisTaskSharing&
103 operator=(const AliFMDAnalysisTaskSharing&) { return *this; }
8dc823cc 104
1b418b63 105 /**
106 * @{
107 * @name Implementation of interface methods
108 */
109 virtual void ConnectInputData(Option_t *option = "");
110 virtual void CreateOutputObjects();
111 virtual void Init() {}
112 virtual void LocalInit() {Init();}
113 virtual void Exec(Option_t */*option*/);
114 virtual void Terminate(Option_t* /* option*/);
115 virtual void SetDebugLevel(Int_t level) {fDebug = level;}
116 /**
117 * @}
118 */
119 /**
120 * Get the multiplicity of a strip
121 *
122 * @param mult Previous(?) multiplicty
123 * @param eta Pseudo rapidity of strip
124 * @param Eprev Previous energy deposition
125 * @param Enext Next energy deposition
126 * @param det Detector
127 * @param ring Ring
128 * @param sec Sector
129 * @param strip Strip
130 *
131 * @return
132 */
133 Float_t GetMultiplicityOfStrip(Float_t mult,
134 Float_t eta,
135 Float_t Eprev,
136 Float_t Enext,
137 UShort_t det,
138 Char_t ring,
139 UShort_t sec,
140 UShort_t strip);
141 // void GetVertex(Double_t* vertexXYZ) ;
142 /**
143 * Set the Output data
144 *
145 * @param fmd Output data
146 */
147 void SetFMDData(AliESDFMD* fmd) {foutputESDFMD = fmd;}
148 /**
149 * Set the output list
150 *
151 * @param outlist
152 */
153 void SetOutputList(TList* outlist) {fDiagList = outlist;}
154 /**
155 * Set the vertex
156 *
157 * @param vertex
158 */
159 void SetVertex(AliESDVertex* vertex) {fEsdVertex = vertex;}
160 /**
161 * Set the input data
162 *
163 * @param esd Input
164 */
165 void SetInputESD(AliESDEvent* esd) {fESD = esd;}
166 /**
167 * Get status flag
168 *
169 * @return @c true on success
170 */
171 Bool_t GetEventStatus() const {return fStatus;}
172 /**
173 * Get the vertex efficiency from data. This is calculated as
174 *
175 * @f[
176 * e_{vtx} = \frac{# events with vertex}{# of events with trigger}
177 * @f]
178 *
179 * @return
180 */
181 Float_t GetVtxEfficiencyFromData() ;
182 /**
183 * Get the vertex efficiency from the data for NSD triggers
184 *
185 * @return
186 */
187 Float_t GetNSDVtxEfficiencyFromData() ;
059c7c6b 188
3bb122c7 189 private:
1b418b63 190 /**
191 * Calculate eta from theta
192 *
193 * @param eta Input eta
194 *
195 * @return Theta corresponding to eta
196 */
197 Float_t Eta2Theta(Float_t eta) const ;
198 /**
199 * Get the psuedo-rapidity of a strip
200 *
201 * @param det Detector
202 * @param ring Ring
203 * @param sector Sector
204 * @param strip Strip
205 * @param zvtx Vertex position along beam-axis
206 *
207 * @return Eta
208 */
209 Double_t EtaFromStrip(UShort_t det,
210 Char_t ring,
211 UShort_t sector,
212 UShort_t strip,
213 Double_t zvtx);
214 /**
215 * Process a primary particle (MC only)
216 *
217 */
218 void ProcessPrimary();
aa303f0c 219
1b418b63 220 Int_t fDebug; // Debug flag
221 AliESDEvent* fESD; //! ESD
222 AliESDFMD* foutputESDFMD; // the output ESDFMD object
223 Bool_t fSharedThis; // was this strip shared?
224 Bool_t fSharedPrev; // was the previous strip shared?
225 TList* fDiagList; // list of diag histos
226 Bool_t fStandalone; // do we run standalone or in SE task
227 AliESDVertex* fEsdVertex; // vtx info from the ESD
228 Bool_t fStatus; // event status
229 AliFMDFloatMap fLastTrackByStrip; // the last track to hit this strip
230 UInt_t fLastOrbit;
231
232 ClassDef(AliFMDAnalysisTaskSharing, 0); // Analysis task for FMD analysis
3bb122c7 233};
234
235#endif
cfe59e45 236// Local Variables:
237// mode: C++
1b418b63 238// End Variables: