1 #ifndef ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDDENSITYCALCULATOR_H
2 #define ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDDENSITYCALCULATOR_H
5 #include "AliForwardUtil.h"
10 * This class calculates the inclusive charged particle density
11 * in each for the 5 FMD rings.
14 * - AliESDFMD object possibly corrected for sharing
17 * - 5 RingHistos objects - each with a number of vertex dependent
18 * 2D histograms of the inclusive charge particle density
20 * @par Corrections used:
21 * - AliFMDAnaCalibEnergyDistribution
22 * - AliFMDDoubleHitCorrection
23 * - AliFMDDeadCorrection
25 * @ingroup pwg2_forward_analysis
27 class AliFMDDensityCalculator : public TNamed
33 AliFMDDensityCalculator();
37 * @param name Name of object
39 AliFMDDensityCalculator(const char* name);
43 * @param o Object to copy from
45 AliFMDDensityCalculator(const AliFMDDensityCalculator& o);
49 virtual ~AliFMDDensityCalculator();
51 * Assignement operator
53 * @param o Object to assign from
55 * @return Reference to this object
57 AliFMDDensityCalculator& operator=(const AliFMDDensityCalculator&);
61 * @param fmd AliESDFMD object (possibly) corrected for sharing
62 * @param hists Histogram cache
63 * @param vtxBin Vertex bin
64 * @param lowFlux Low flux flag.
66 * @return true on successs
68 virtual Bool_t Calculate(const AliESDFMD& fmd,
69 AliForwardUtil::Histos& hists,
70 Int_t vtxBin, Bool_t lowFlux);
72 * Scale the histograms to the total number of events
74 * @param nEvents Number of events
76 void ScaleHistograms(Int_t nEvents);
78 * Output diagnostic histograms to directory
80 * @param dir List to write in
82 void Output(TList* dir);
85 * Get the number of particles corresponding to the signal mult
91 * @param t Strip (not used)
93 * @param eta Pseudo-rapidity
94 * @param lowFlux Low-flux flag
96 * @return The number of particles
98 virtual Float_t NParticles(Float_t mult,
99 UShort_t d, Char_t r, UShort_t s, UShort_t t,
100 Int_t v, Float_t eta, Bool_t lowFlux) const;
102 * Get the inverse correction factor. This consist of
104 * - acceptance correction (corners of sensors)
105 * - double hit correction (for low-flux events)
106 * - dead strip correction
111 * @param t Strip (not used)
112 * @param v Vertex bin
113 * @param eta Pseudo-rapidity
114 * @param lowFlux Low-flux flag
118 virtual Float_t Correction(UShort_t d, Char_t r, UShort_t s, UShort_t t,
119 Int_t v, Float_t eta, Bool_t lowFlux) const;
121 * Get the acceptance correction for strip @a t in an ring of type @a r
123 * @param r Ring type ('I' or 'O')
124 * @param t Strip number
126 * @return Inverse acceptance correction
128 virtual Float_t AcceptanceCorrection(Char_t r, UShort_t t) const;
131 * Internal data structure to keep track of the histograms
133 struct RingHistos : public TObject
145 RingHistos(UShort_t d, Char_t r);
149 * @param o Object to copy from
151 RingHistos(const RingHistos& o);
153 * Assignment operator
155 * @param o Object to assign from
157 * @return Reference to this
159 RingHistos& operator=(const RingHistos& o);
164 void Output(TList* dir);
165 UShort_t fDet; // Detector
166 Char_t fRing; // Ring
167 TH2D* fEvsN; // Correlation of Eloss vs uncorrected Nch
168 TH2D* fEvsM; // Correlation of Eloss vs corrected Nch
169 TH2D* fDensity; // Distribution inclusive Nch
172 * Get the ring histogram container
177 * @return Ring histogram container
179 RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
181 TList fRingHistos; // List of histogram containers
182 Double_t fMultCut; // Low cut on scaled energy loss
184 ClassDef(AliFMDDensityCalculator,1); // Calculate Nch density