1 #ifndef ALIROOT_PWG2_FORWARD_ALIFMDSHARINGFILTER_H
2 #define ALIROOT_PWG2_FORWARD_ALIFMDSHARINGFILTER_H
12 * Class to do the sharing correction. That is, a filter that merges
13 * adjacent strip signals presumably originating from a single particle
14 * that impinges on the detector in such a way that it deposite energy
15 * into two or more strips.
18 * - AliESDFMD object - from reconstruction
21 * - AliESDFMD object - copy of input, but with signals merged
23 * @par Corrections used:
24 * - AliFMDAnaCalibEnergyDistribution objects
27 * - For each ring (FMD1i, FMD2i, FMD2o, FMD3i, FMD3o) the distribution of
28 * signals before and after the filter.
29 * - For each ring (see above), an array of distributions of number of
30 * hit strips for each vertex bin (if enabled - see Init method)
33 * @ingroup pwg2_forward_analysis
35 class AliFMDSharingFilter : public TNamed
41 virtual ~AliFMDSharingFilter();
43 * Default Constructor - do not use
45 AliFMDSharingFilter();
49 * @param title Title of object - not significant
51 AliFMDSharingFilter(const char* title);
55 * @param o Object to copy from
57 AliFMDSharingFilter(const AliFMDSharingFilter& o);
61 * @param o Object to assign from
63 * @return Reference to this
65 AliFMDSharingFilter& operator=(const AliFMDSharingFilter& o);
68 * Initialise the filter
73 * Set the low cut used for sharing
75 * @param lowCut Low cut
77 void SetLowCut(Double_t lowCut=0.3) { fLowCut = lowCut; }
80 * Enable use of angle corrected signals in the algorithm
82 * @param use If true, use angle corrected signals,
83 * otherwise use de-corrected signals. In the final output, the
84 * signals are always angle corrected.
86 void UseAngleCorrectedSignals(Bool_t use) { fCorrectAngles = use; }
88 * Filter the input AliESDFMD object
91 * @param lowFlux If this is a low-flux event
92 * @param output Output AliESDFMD object
93 * @param vz Current vertex position
95 * @return True on success, false otherwise
97 Bool_t Filter(const AliESDFMD& input,
102 * Scale the histograms to the total number of events
104 * @param nEvents Number of events
106 void ScaleHistograms(Int_t nEvents);
108 void Output(TList* dir);
111 * Internal data structure to keep track of the histograms
113 struct RingHistos : public TObject
125 RingHistos(UShort_t d, Char_t r);
129 * @param o Object to copy from
131 RingHistos(const RingHistos& o);
133 * Assignment operator
135 * @param o Object to assign from
137 * @return Reference to this
139 RingHistos& operator=(const RingHistos& o);
145 * Initialise this object
148 void Clear(const Option_t* ="") { fNHits = 0; }
149 void Incr() { fNHits++; }
151 void Output(TList* dir);
152 UShort_t fDet; // Detector
153 Char_t fRing; // Ring
154 TH1D* fBefore; // Distribution of signals before filter
155 TH1D* fAfter; // Distribution of signals after filter
156 TH1D* fHits; // Distribution of hit strips.
157 Int_t fNHits; // Number of hit strips per event
160 * Get the ring histogram container
165 * @return Ring histogram container
167 RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
169 * Get the signal in a strip
171 * @param fmd ESD object
177 * @return The energy signal
179 Double_t SignalInStrip(const AliESDFMD& fmd,
185 * The actual algorithm
187 * @param mult The unfiltered signal in the strip
188 * @param eta Psuedo rapidity
189 * @param prevE Previous strip signal (or 0)
190 * @param nextE Next strip signal (or 0)
191 * @param lowFlux Whether this is a low flux event
196 * @param usedPrev Whether the previous strip was used in sharing or not
197 * @param usedThis Wether this strip was used in sharing or not.
199 * @return The filtered signal in the strip
201 Double_t MultiplicityOfStrip(Double_t mult,
213 * Angle correct the signal
215 * @param mult Angle Un-corrected Signal
216 * @param eta Pseudo-rapidity
218 * @return Angle corrected signal
220 Double_t AngleCorrect(Double_t mult, Double_t eta) const;
222 * Angle de-correct the signal
224 * @param mult Angle corrected Signal
225 * @param eta Pseudo-rapidity
227 * @return Angle un-corrected signal
229 Double_t DeAngleCorrect(Double_t mult, Double_t eta) const;
231 * Get the high cut. The high cut is defined as the
232 * most-probably-value peak found from the energy distributions, minus
233 * 2 times the width of the corresponding Landau.
235 virtual Double_t GetHighCut(UShort_t d, Char_t r, Double_t eta) const;
237 TList fRingHistos; // List of histogram containers
238 Double_t fLowCut; // Low cut on sharing
239 Bool_t fCorrectAngles; // Whether to work on angle corrected signals
242 ClassDef(AliFMDSharingFilter,1); //