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; }
64 * Add a status pave to the plot
66 * @param ll List to add to
68 * @param xl X coordinate of lower-left corner (NDC)
69 * @param yl Y coordinate of lower-left corner (NDC)
70 * @param xh X coordinate of upper-right corner (NDC)
71 * @param yh Y coordinate of upper-right corner (NDC)
73 void AddStatusPave(TH1* hist, Int_t qual,
74 Double_t xl=-1, Double_t yl=-1,
75 Double_t xh=-1, Double_t yh=-1) const;
79 * @param specie Event specie
80 * @param hist Histogram to check
82 * @return 0 if all is good, increasing severity for increasingly
85 UShort_t CheckOne(AliQAv1::ALITASK_t what,
86 AliRecoParam::EventSpecie_t specie,
89 * Check raw input. If the reconstructor is enabled, then we try to fit
92 * f(\Delta;\Delta_p,\xi,\sigma) = \int_{-\infty}^{\infty}d\Delta_p'
93 * f_{L}(\Delta;\Delta_p',\xi) \times
94 * e^{\frac{(\Delta-\Delta_p')^2}{\sigma^2}}
97 * where @f$f_L@f$ is the Landau distribution, to the data. The
98 * quality is set according to the value of @f$\chi^2/\nu@f$.
100 * If no reconstructor is set, then simply check that the histogram
103 * @param specie Event specie
104 * @param hist Histogram to check
106 * @return 0 if all is good, increasing severity for increasingly
109 UShort_t CheckRaw(AliRecoParam::EventSpecie_t specie,
112 * Check simulation output. Does a simple test of whether the
113 * histogram is empty or not.
115 * @param specie Event specie
116 * @param hist Histogram to check
118 * @return 0 if all is good, increasing severity for increasingly
121 UShort_t CheckSim(AliRecoParam::EventSpecie_t specie,
124 * Check ESD. Does a simple test of whether the histogram is empty
127 * @param specie Event specie
128 * @param hist Histogram to check
130 * @return 0 if all is good, increasing severity for increasingly
133 UShort_t CheckESD(AliRecoParam::EventSpecie_t specie,
136 * Check reconstruction points. Does a simple test of whether the
137 * histogram is empty or not.
139 * @param specie Event specie
140 * @param hist Histogram to check
142 * @return 0 if all is good, increasing severity for increasingly
145 UShort_t CheckRec(AliRecoParam::EventSpecie_t specie,
148 * Set the returned QA from this checker based on the values in the
149 * array @a values. Note, this by-passes the Low/High setting of
150 * the base class (which are very confusing)
152 * @param index Task index
153 * @param values Array of values
155 void SetQA(AliQAv1::ALITASK_t index, Double_t* values) const;
157 * Process external parameters
160 void ProcessExternalParams();
162 * Process a single external parameter
164 * @param name Name of parameter
165 * @param v On return, the value - as a double
167 void ProcessExternalParam(const char* name, Double_t& v);
169 * Get the thresholds from OCDB
172 void GetThresholds();
174 * The basic check on a histogram
176 * @param hist Histogram
178 * @return 1 empty - 0 otherwise
180 UShort_t BasicCheck(TH1* hist) const;
182 * Translate our internal quality measure to QA framework bit
184 * @param qual Internal quality
186 * @return QA framework quality bit
188 AliQAv1::QABIT_t Quality2Bit(UShort_t qual) const;
190 * Add fit results to to plot
192 * @param hist Histogram
193 * @param res Fit result
194 * @param color Color to use for the text - depends on quality
195 * @param low Lower bound on fit range
196 * @param high Upper bound on fit range
198 UShort_t CheckFit(TH1* hist, const TFitResultPtr& res,
199 Double_t low, Double_t high, Int_t& color) const;
200 Bool_t fDoScale; // Whether to scale all histograms
201 Bool_t fDidExternal; // Whether we've processed the external params
202 Bool_t fShowFitResults; // Whether to put the fit result on the plots
203 Double_t fELossLowCut; // Low cut on ELoss fits
204 Double_t fELossNRMS; // Number of RMS to fit upward
205 Double_t fELossBadChi2Nu; // Cut on bad chi2/nu
206 Double_t fELossFkupChi2Nu; // Cut on F**ked up chi2/nu
207 Int_t fELossMinEntries; // Least number of entries before fitting
208 Int_t fELossMaxEntries; // Maximum number of entries before clear
209 Double_t fELossGoodParError; // Least relative error
210 Double_t fELossMinSharing; // Least to consider for sharing fit
211 Double_t fROErrorsBad; // Cut on read-out errors
212 Double_t fROErrorsFkup; // Cut on read-out errors
213 Int_t fMaxNProblem; // Maximum number of problematic fits
214 Int_t fMaxNBad; // Maximum number of bad fits
215 Bool_t fNoFits; // If true, do not fit at all
218 * Copy constructor - not implemented
220 * @param qac Object to copy from
222 AliFMDQAChecker(const AliFMDQAChecker& qac);
224 * assignment operator - not implemented
226 * @param qac Object to assign from
228 * @return Reference to this object
230 AliFMDQAChecker& operator=(const AliFMDQAChecker& qac);
232 ClassDef(AliFMDQAChecker,0) // Checker of FMD data quality
235 #endif // AliFMDQAChecker_H