1 #ifndef ALIFMDMCTRACKINSPECTOR_H
2 #define ALIFMDMCTRACKINSPECTOR_H
3 #include "AliFMDEnergyFitter.h"
4 #include "AliFMDMCTrackELoss.h"
10 * Class to fit the simulated energy loss in the FMD
12 * @ingroup pwglf_forward_mc
13 * @ingroup pwglf_forward_eloss
15 class AliFMDMCTrackInspector : public AliFMDEnergyFitter
19 * Constructor - do not use
21 AliFMDMCTrackInspector();
25 * @param title Title of object - not significant
27 AliFMDMCTrackInspector(const char* title);
31 virtual ~AliFMDMCTrackInspector();
34 * Define the output histograms. These are put in a sub list of the
35 * passed list. The histograms are merged before the parent task calls
36 * AliAnalysisTaskSE::Terminate
38 * @param dir Directory to add to
40 virtual void CreateOutputObjects(TList* dir);
42 * Set-up before processing an event
44 * @param mcInput MC input
48 virtual Bool_t PreEvent(const AliMCEvent& mcInput);
50 * Process a single event
52 * @param esdInput ESD input
53 * @param mcInput MC input
54 * @param cent Event centrality
58 virtual Bool_t Event(const AliESDEvent& esdInput,
59 const AliMCEvent& mcInput,
62 * Post-process accumulated signals
66 virtual Bool_t PostEvent();
69 * Get reference to the tracker of energy loss
71 * @return Reference to tracker of energy loss
73 AliFMDMCTrackELoss& GetTracker() { return fTracker; }
75 * Get constant reference to the tracker of energy loss
77 * @return Constant reference to tracker of energy loss
79 const AliFMDMCTrackELoss& GetTracker() const { return fTracker; }
82 * copy constructor - not implemented
84 AliFMDMCTrackInspector(const AliFMDMCTrackInspector&);
86 * Assignment operator - not implemented
89 AliFMDMCTrackInspector& operator=(const AliFMDMCTrackInspector&);
92 * Container of ring histograms
96 struct RingHistos : public AliFMDEnergyFitter::RingHistos
99 * Default CTOR - do not use
105 * @param d Detector number
106 * @param r Ring identifier
108 RingHistos(UShort_t d, Char_t r);
114 * Copy constructor - not defined
116 * @param o Object to copy from
118 RingHistos(const RingHistos& o);
120 * Assignment operator - not defined
122 * @param o Object to assign from
124 * @return Reference to this
126 RingHistos& operator=(const RingHistos& o);
128 * Create a bin array of increasing bins. This overload uses the
129 * service AliFMDEncodedEdx::Spec::FillBinArray.
131 * @param nBins Number of bins - ignored
132 * @param low Low cut - ignored
133 * @param high High cut - ignored
135 * @return Array of bin boundaries
137 TArrayD MakeIncreasingAxis(Int_t nBins,
139 Double_t high) const;
143 * @param eAxis Eta axis
144 * @param cAxis Centrality axis
145 * @param maxDE Max energy loss to consider
146 * @param nDEbins Number of bins
147 * @param useIncrBin Whether to use an increasing bin size
149 virtual void SetupForData(const TAxis& eAxis,
153 Bool_t useIncrBin=true);
155 * Fill in observation
157 * @param flag 0 - fill all, 1 - primary, 2 - secondary
158 * @param eta Eta of particle observations
159 * @param mult Scaled energy loss
161 virtual void FillMC(UShort_t flag, Double_t eta, Double_t mult);
163 * Do scaling of histogram before fitting. This can be
164 * overwritten to do some smoothing or the like. By default, this
165 * simply scales to the bin width.
167 * @param dist Histogram to scale.
169 virtual void Scale(TH1* dist) const;
171 * Fit the final distributions - called via Terminate
173 * @param dir Containing directory
174 * @param lowCut Lower cut on @f$\Delta/\Delta_{mip}@f$
175 * @param nParticles Max. number of particle peaks to fit
176 * @param minEntries Least number of entries required before fitting
177 * @param minusBins Number of bins below the 1st peak we start fitting
178 * @param relErrorCut Largest relative error on paramters
179 * @param chi2nuCut Largest value of the @f$\chi^2/\nu@f$
180 * @param minWeight Least weight to consider
181 * @param regCut When to regalurize
182 * @param residuals How to do residuals - if at all
184 * @return List of histograms of parameters
186 TObjArray* Fit(TList* dir,
191 Double_t relErrorCut,
195 EResidualMethod residuals) const;
197 TH2* fPrimary; // @f$\Delta@f$ vs @f$\eta@f$ for primaries
198 TH2* fSecondary; // @f$\Delta@f$ vs @f$\eta@f$ for second.
203 ClassDef(RingHistos,1); // Cache of histograms per ring
207 * Create a container of histograms for a single ring
212 * @return Newly allocated container
214 AliFMDEnergyFitter::RingHistos* CreateRingHistos(UShort_t d, Char_t r) const;
216 AliFMDMCTrackELoss fTracker;
217 /** Cache of current MC IP */
219 /** Cache of number of tracks */
221 /** Cache of numbr of primaries */
224 ClassDef(AliFMDMCTrackInspector,1);