1 #ifndef ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDDENSITYCALCULATOR_H
2 #define ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDDENSITYCALCULATOR_H
5 #include "AliForwardUtil.h"
11 * This class calculates the inclusive charged particle density
12 * in each for the 5 FMD rings.
15 * - AliESDFMD object possibly corrected for sharing
18 * - 5 RingHistos objects - each with a number of vertex dependent
19 * 2D histograms of the inclusive charge particle density
21 * @par Corrections used:
22 * - AliFMDAnaCalibEnergyDistribution
23 * - AliFMDDoubleHitCorrection
24 * - AliFMDDeadCorrection
26 * @ingroup pwg2_forward_analysis
28 class AliFMDDensityCalculator : public TNamed
34 AliFMDDensityCalculator();
38 * @param name Name of object
40 AliFMDDensityCalculator(const char* name);
44 * @param o Object to copy from
46 AliFMDDensityCalculator(const AliFMDDensityCalculator& o);
50 virtual ~AliFMDDensityCalculator();
52 * Assignement operator
54 * @param o Object to assign from
56 * @return Reference to this object
58 AliFMDDensityCalculator& operator=(const AliFMDDensityCalculator&);
62 * @param fmd AliESDFMD object (possibly) corrected for sharing
63 * @param hists Histogram cache
64 * @param vtxBin Vertex bin
65 * @param lowFlux Low flux flag.
67 * @return true on successs
69 virtual Bool_t Calculate(const AliESDFMD& fmd,
70 AliForwardUtil::Histos& hists,
71 Int_t vtxBin, Bool_t lowFlux);
73 * Scale the histograms to the total number of events
75 * @param nEvents Number of events
77 void ScaleHistograms(TList* dir, Int_t nEvents);
79 * Output diagnostic histograms to directory
81 * @param dir List to write in
83 void DefineOutput(TList* dir);
86 * Get the number of particles corresponding to the signal mult
92 * @param t Strip (not used)
94 * @param eta Pseudo-rapidity
95 * @param lowFlux Low-flux flag
97 * @return The number of particles
99 virtual Float_t NParticles(Float_t mult,
100 UShort_t d, Char_t r, UShort_t s, UShort_t t,
101 Int_t v, Float_t eta, Bool_t lowFlux) const;
103 * Get the inverse correction factor. This consist of
105 * - acceptance correction (corners of sensors)
106 * - double hit correction (for low-flux events)
107 * - dead strip correction
112 * @param t Strip (not used)
113 * @param v Vertex bin
114 * @param eta Pseudo-rapidity
115 * @param lowFlux Low-flux flag
119 virtual Float_t Correction(UShort_t d, Char_t r, UShort_t s, UShort_t t,
120 Int_t v, Float_t eta, Bool_t lowFlux) const;
122 * Get the acceptance correction for strip @a t in an ring of type @a r
124 * @param r Ring type ('I' or 'O')
125 * @param t Strip number
127 * @return Inverse acceptance correction
129 virtual Float_t AcceptanceCorrection(Char_t r, UShort_t t) const;
132 * Internal data structure to keep track of the histograms
134 struct RingHistos : public AliForwardUtil::RingHistos
146 RingHistos(UShort_t d, Char_t r);
150 * @param o Object to copy from
152 RingHistos(const RingHistos& o);
154 * Assignment operator
156 * @param o Object to assign from
158 * @return Reference to this
160 RingHistos& operator=(const RingHistos& o);
165 void Output(TList* dir);
167 * Scale the histograms to the total number of events
169 * @param nEvents Number of events
171 void ScaleHistograms(TList* dir, Int_t nEvents);
172 TH2D* fEvsN; // Correlation of Eloss vs uncorrected Nch
173 TH2D* fEvsM; // Correlation of Eloss vs corrected Nch
174 TH2D* fDensity; // Distribution inclusive Nch
175 ClassDef(RingHistos,1);
178 * Get the ring histogram container
183 * @return Ring histogram container
185 RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
187 TList fRingHistos; // List of histogram containers
188 Double_t fMultCut; // Low cut on scaled energy loss
193 ClassDef(AliFMDDensityCalculator,1); // Calculate Nch density