1 #ifndef ALIFMDQACHECKER_H
2 #define ALIFMDQACHECKER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * See cxx source for full Copyright notice
8 #include "AliQACheckerBase.h"
15 * @class AliFMDQAChecker
16 * @brief Quality assurance checker for the FMD
18 class AliFMDQAChecker : public AliQACheckerBase
24 virtual ~AliFMDQAChecker() {}
26 * Member function called to do the actual checking
28 * @param rv Array of return values.
29 * @param what What to check
30 * @param list Array of arrays of histograms. There's one arrat for
32 * @param t Reconstruction parameters - not used.
34 void Check(Double_t* rv, AliQAv1::ALITASK_t what,
35 TObjArray** list, const AliDetectorRecoParam* t);
37 * Make output images. This is overridden relative to the base
38 * class so that we can set the log(y) scale and put everything on
41 * @param list List of specie array of histograms
42 * @param task What to show
45 void MakeImage(TObjArray** list,
46 AliQAv1::TASKINDEX_t task,
47 AliQAv1::MODE_t mode);
49 * Set wether to scale the histograms to a common Y axis or not when
52 * @param on If true, do scale
54 void SetDoScale(Bool_t on=true) { fDoScale = on; }
66 * @param specie Event specie
67 * @param hist Histogram to check
69 * @return 0 if all is good, increasing severity for increasingly
72 UShort_t CheckOne(AliQAv1::ALITASK_t what,
73 AliRecoParam::EventSpecie_t specie,
76 * Check raw input. If the reconstructor is enabled, then we try to fit
79 * f(\Delta;\Delta_p,\xi,\sigma) = \int_{-\infty}^{\infty}d\Delta_p'
80 * f_{L}(\Delta;\Delta_p',\xi) \times
81 * e^{\frac{(\Delta-\Delta_p')^2}{\sigma^2}}
84 * where @f$f_L@f$ is the Landau distribution, to the data. The
85 * quality is set according to the value of @f$\chi^2/\nu@f$.
87 * If no reconstructor is set, then simply check that the histogram
90 * @param specie Event specie
91 * @param hist Histogram to check
93 * @return 0 if all is good, increasing severity for increasingly
96 UShort_t CheckRaw(AliRecoParam::EventSpecie_t specie,
99 * Check simulation output. Does a simple test of whether the
100 * histogram is empty or not.
102 * @param specie Event specie
103 * @param hist Histogram to check
105 * @return 0 if all is good, increasing severity for increasingly
108 UShort_t CheckSim(AliRecoParam::EventSpecie_t specie,
111 * Check ESD. Does a simple test of whether the histogram is empty
114 * @param specie Event specie
115 * @param hist Histogram to check
117 * @return 0 if all is good, increasing severity for increasingly
120 UShort_t CheckESD(AliRecoParam::EventSpecie_t specie,
123 * Check reconstruction points. Does a simple test of whether the
124 * histogram is empty or not.
126 * @param specie Event specie
127 * @param hist Histogram to check
129 * @return 0 if all is good, increasing severity for increasingly
132 UShort_t CheckRec(AliRecoParam::EventSpecie_t specie,
135 * Set the returned QA from this checker based on the values in the
136 * array @a values. Note, this by-passes the Low/High setting of
137 * the base class (which are very confusing)
139 * @param index Task index
140 * @param values Array of values
142 void SetQA(AliQAv1::ALITASK_t index, Double_t* values) const;
144 * Process external parameters
147 void ProcessExternalParams();
149 * Process a single external parameter
151 * @param name Name of parameter
152 * @param v On return, the value - as a double
154 void ProcessExternalParam(const char* name, Double_t& v);
156 * Get the thresholds from OCDB
159 void GetThresholds();
161 * The basic check on a histogram
163 * @param hist Histogram
165 * @return 1 empty - 0 otherwise
167 UShort_t BasicCheck(TH1* hist) const;
169 * Translate our internal quality measure to QA framework bit
171 * @param qual Internal quality
173 * @return QA framework quality bit
175 AliQAv1::QABIT_t Quality2Bit(UShort_t qual) const;
177 * Add fit results to to plot
179 * @param hist Histogram
180 * @param res Fit result
181 * @param color Color to use for the text - depends on quality
182 * @param low Lower bound on fit range
183 * @param high Upper bound on fit range
185 void AddFitResults(TH1* hist, const TFitResultPtr& res, Int_t color,
186 Double_t low, Double_t high) const;
187 UShort_t CheckFit(TH1* hist, const TFitResultPtr& res,
188 Double_t low, Double_t high, Int_t& color) const;
189 Bool_t fDoScale; // Whether to scale all histograms
190 Bool_t fDidExternal; // Whether we've processed the external params
191 Bool_t fShowFitResults; // Whether to put the fit result on the plots
192 Double_t fELossLowCut; // Low cut on ELoss fits
193 Double_t fELossNRMS; // Number of RMS to fit upward
194 Double_t fELossBadChi2Nu; // Cut on bad chi2/nu
195 Double_t fELossFkupChi2Nu; // Cut on F**ked up chi2/nu
196 Int_t fELossMinEntries; // Least number of entries before fitting
197 Double_t fELossGoodParError; // Least relative error
198 Double_t fROErrorsBad; // Cut on read-out errors
199 Double_t fROErrorsFkup; // Cut on read-out errors
202 * Copy constructor - not implemented
204 * @param qac Object to copy from
206 AliFMDQAChecker(const AliFMDQAChecker& qac);
208 * assignment operator - not implemented
210 * @param qac Object to assign from
212 * @return Reference to this object
214 AliFMDQAChecker& operator=(const AliFMDQAChecker& qac);
216 ClassDef(AliFMDQAChecker,0) // Yves? what to do?
219 #endif // AliFMDQAChecker_H