1 #ifndef ALIFMDMCHITENERGYFITTER_H
2 #define ALIFMDMCHITENERGYFITTER_H
3 #include "AliFMDEnergyFitter.h"
4 #include "AliFMDFloatMap.h"
13 * Class to fit the simulated energy loss in the FMD
15 * @ingroup pwglf_forward_mc
16 * @ingroup pwglf_forward_eloss
18 class AliFMDMCHitEnergyFitter : public AliFMDEnergyFitter
22 * Constructor - do not use
24 AliFMDMCHitEnergyFitter();
28 * @param title Title of object - not significant
29 * @param useTuple If true, also make an NTuple of hits on output 3
31 AliFMDMCHitEnergyFitter(const char* title, Bool_t useTuple=false);
35 virtual ~AliFMDMCHitEnergyFitter();
38 * Define the output histograms. These are put in a sub list of the
39 * passed list. The histograms are merged before the parent task calls
40 * AliAnalysisTaskSE::Terminate
42 * @param dir Directory to add to
44 virtual void CreateOutputObjects(TList* dir);
46 * Set-up before processing an event
48 * @param mcInput MC input
52 virtual Bool_t PreEvent(const AliMCEvent& mcInput);
54 * Process a single event
56 * @param esdInput ESD input
57 * @param mcInput MC input
58 * @param handler Handler of additional input
62 virtual Bool_t Event(const AliESDEvent& esdInput,
63 const AliMCEvent& mcInput,
64 AliMCAuxHandler& handler);
66 * Accumulate signals from MC hits
68 * @param mcInput MC input event
69 * @param hits Clones array of hits
73 virtual Bool_t AccumulateHits(const AliMCEvent& mcInput,
74 const TClonesArray& hits);
76 * Post-process accumulated signals
78 * @param esdInput ESD event
82 virtual Bool_t PostEvent(const AliESDEvent& esdInput);
84 TNtuple* GetTuple() { return fTuple; }
87 * copy constructor - not implemented
89 AliFMDMCHitEnergyFitter(const AliFMDMCHitEnergyFitter&);
91 * Assignment operator - not implemented
94 AliFMDMCHitEnergyFitter& operator=(const AliFMDMCHitEnergyFitter&);
97 * Container of ring histograms
100 struct RingHistos : public AliFMDEnergyFitter::RingHistos
103 * Default CTOR - do not use
109 * @param d Detector number
110 * @param r Ring identifier
112 RingHistos(UShort_t d, Char_t r);
118 * Copy constructor - not defined
120 * @param o Object to copy from
122 RingHistos(const RingHistos& o);
124 * Assignment operator - not defined
126 * @param o Object to assign from
128 * @return Reference to this
130 RingHistos& operator=(const RingHistos& o);
132 * Create a bin array of increasing bins. This overload uses the
133 * service AliFMDEncodedEdx::Spec::FillBinArray.
135 * @param nBins Number of bins - ignored
136 * @param low Low cut - ignored
137 * @param high High cut - ignored
139 * @return Array of bin boundaries
141 TArrayD MakeIncreasingAxis(Int_t nBins,
143 Double_t high) const;
147 * @param eAxis Eta axis
148 * @param cAxis Centrality axis
149 * @param maxDE Max energy loss to consider
150 * @param nDEbins Number of bins
151 * @param useIncrBin Whether to use an increasing bin size
153 virtual void SetupForData(const TAxis& eAxis,
157 Bool_t useIncrBin=true);
159 * Fill in observation
161 * @param flag 0 - fill all, 1 - primary, 2 - secondary
162 * @param eta Eta of particle observations
163 * @param mult Scaled energy loss
165 virtual void FillMC(UShort_t flag, Double_t eta, Double_t mult);
167 * Fit the final distributions - called via Terminate
169 * @param dir Containing directory
170 * @param lowCut Lower cut on @f$\Delta/\Delta_{mip}@f$
171 * @param nParticles Max. number of particle peaks to fit
172 * @param minEntries Least number of entries required before fitting
173 * @param minusBins Number of bins below the 1st peak we start fitting
174 * @param relErrorCut Largest relative error on paramters
175 * @param chi2nuCut Largest value of the @f$\chi^2/\nu@f$
176 * @param minWeight Least weight to consider
177 * @param regCut When to regalurize
178 * @param residuals How to do residuals - if at all
180 * @return List of histograms of parameters
182 TObjArray* Fit(TList* dir,
187 Double_t relErrorCut,
191 EResidualMethod residuals) const;
193 TH2* fPrimary; // @f$\Delta@f$ vs @f$\eta@f$ for primaries
194 TH2* fSecondary; // @f$\Delta@f$ vs @f$\eta@f$ for second.
195 TH2* fKind; // Particle kind
196 ClassDef(RingHistos,1); // Cache of histograms per ring
199 * Create a container of histograms for a single ring
204 * @return Newly allocated container
206 AliFMDEnergyFitter::RingHistos* CreateRingHistos(UShort_t d, Char_t r) const;
207 /** Cache of per-strip energy loss of primaries */
208 AliFMDFloatMap fSumPrimary;
209 /** Cache of per-strip energy loss of secondaries */
210 AliFMDFloatMap fSumSecondary;
211 /** Cache of current MC IP */
213 /** Cache of number of tracks */
215 /** Cache of numbr of primaries */
217 /** Output nTuple of per-hit information */
220 ClassDef(AliFMDMCHitEnergyFitter,1);