1 #ifndef ALIFMDANALYSISTASKSHARING_H
2 #define ALIFMDANALYSISTASKSHARING_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice
8 #include "AliAnalysisTask.h"
10 #include "AliESDFMD.h"
12 #include "AliESDEvent.h"
13 #include "AliFMDFloatMap.h"
19 * Do the sharing correction.
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.
26 * Inputs: An AliESDFMD object
29 * An AliESDFMD object, but with hits merged according to algorithm.
31 * Used correction objects:
32 * Energy distribution fits (MPV and width of 1st landau)
33 * Hard low cut on 'mult' of 0.3
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.
40 * Remove calculation vertex efficiency. This is best taken care of
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.
59 class AliFMDAnalysisTaskSharing : public AliAnalysisTask
65 AliFMDAnalysisTaskSharing();
69 * @param name Name of task
70 * @param SE Whether we're run from an SE task or not
72 AliFMDAnalysisTaskSharing(const char* name, Bool_t SE = kTRUE);
77 virtual ~AliFMDAnalysisTaskSharing() {;}
81 * @param o Object to copy from
83 AliFMDAnalysisTaskSharing(const AliFMDAnalysisTaskSharing& o)
88 foutputESDFMD(o.foutputESDFMD),
89 fSharedThis(o.fSharedThis),
90 fSharedPrev(o.fSharedPrev),
92 fStandalone(o.fStandalone),
93 fEsdVertex(o.fEsdVertex),
95 fLastTrackByStrip(o.fLastTrackByStrip),
96 fLastOrbit(o.fLastOrbit) {}
100 * @return Reference to this object
102 AliFMDAnalysisTaskSharing&
103 operator=(const AliFMDAnalysisTaskSharing&) { return *this; }
107 * @name Implementation of interface methods
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;}
120 * Get the multiplicity of a strip
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
133 Float_t GetMultiplicityOfStrip(Float_t mult,
141 // void GetVertex(Double_t* vertexXYZ) ;
143 * Set the Output data
145 * @param fmd Output data
147 void SetFMDData(AliESDFMD* fmd) {foutputESDFMD = fmd;}
149 * Set the output list
153 void SetOutputList(TList* outlist) {fDiagList = outlist;}
159 void SetVertex(AliESDVertex* vertex) {fEsdVertex = vertex;}
165 void SetInputESD(AliESDEvent* esd) {fESD = esd;}
169 * @return @c true on success
171 Bool_t GetEventStatus() const {return fStatus;}
173 * Get the vertex efficiency from data. This is calculated as
176 * e_{vtx} = \frac{# events with vertex}{# of events with trigger}
181 Float_t GetVtxEfficiencyFromData() ;
183 * Get the vertex efficiency from the data for NSD triggers
187 Float_t GetNSDVtxEfficiencyFromData() ;
191 * Calculate eta from theta
193 * @param eta Input eta
195 * @return Theta corresponding to eta
197 Float_t Eta2Theta(Float_t eta) const ;
199 * Get the psuedo-rapidity of a strip
201 * @param det Detector
203 * @param sector Sector
205 * @param zvtx Vertex position along beam-axis
209 Double_t EtaFromStrip(UShort_t det,
215 * Process a primary particle (MC only)
218 void ProcessPrimary();
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
232 ClassDef(AliFMDAnalysisTaskSharing, 0); // Analysis task for FMD analysis