34 #include "TPaveText.h" 36 #include "TObjArray.h" 77 Int_t histoRawsPercentIndex[] = {
82 const Int_t kNrawsHistos =
sizeof(histoRawsPercentIndex)/
sizeof(histoRawsPercentIndex[0]);
86 Float_t safeFactor = 5.;
87 Float_t warningPercentTrigAlgo[
AliMUONQAIndices::kNtrigAlgoErrorBins] = {
static_cast<Float_t
>(safeFactor*1.),
static_cast<Float_t
>(safeFactor*1.),
static_cast<Float_t
>(safeFactor*1.), 100., 100., 100., 100.,
static_cast<Float_t
>(safeFactor*1.),
static_cast<Float_t
>(safeFactor*1.),
static_cast<Float_t
>(safeFactor*1.)};
88 Float_t warningPercentCalib[
AliMUONQAIndices::kNtrigCalibSummaryBins] = {
static_cast<Float_t
>(safeFactor*0.4),
static_cast<Float_t
>(safeFactor*1.), 3.1, 0.0001,
static_cast<Float_t
>(safeFactor*0.4)};
89 Float_t warningPercentReadout[
AliMUONQAIndices::kNtrigStructErrorBins] = {
static_cast<Float_t
>(safeFactor*1.),
static_cast<Float_t
>(safeFactor*1.),
static_cast<Float_t
>(safeFactor*1.),
static_cast<Float_t
>(safeFactor*1.)};
91 Float_t* warningPercent[kNrawsHistos] = {warningPercentTrigAlgo, warningPercentCalib, warningPercentReadout};
93 Float_t errorFactor = 30.;
94 Float_t errorPercentTrigAlgo[
AliMUONQAIndices::kNtrigAlgoErrorBins] = {
static_cast<Float_t
>(errorFactor*1.),
static_cast<Float_t
>(errorFactor*1.),
static_cast<Float_t
>(errorFactor*1.), 100., 100., 100., 100.,
static_cast<Float_t
>(errorFactor*1.),
static_cast<Float_t
>(errorFactor*1.),
static_cast<Float_t
>(errorFactor*1.)};
95 Float_t errorPercentCalib[
AliMUONQAIndices::kNtrigCalibSummaryBins] = {
static_cast<Float_t
>(errorFactor*0.4),
static_cast<Float_t
>(errorFactor*1.), 6.2, 3.*0.0001,
static_cast<Float_t
>(errorFactor*0.4)};
96 Float_t errorPercentReadout[
AliMUONQAIndices::kNtrigStructErrorBins] = {
static_cast<Float_t
>(errorFactor*1.),
static_cast<Float_t
>(errorFactor*1.),
static_cast<Float_t
>(errorFactor*1.),
static_cast<Float_t
>(errorFactor*1.)};
99 Float_t* errorPercent[kNrawsHistos] = {errorPercentTrigAlgo, errorPercentCalib, errorPercentReadout};
102 messages.SetOwner(kTRUE);
104 TH1* currHisto = 0x0;
112 for(Int_t ihisto = 0; ihisto<kNrawsHistos; ihisto++){
113 Int_t nAnalyzedEvents = 0;
115 if ( hAnalyzedEvents ) nAnalyzedEvents = TMath::Nint(hAnalyzedEvents->GetBinContent(ibinNevents));
119 if ( ! currHisto )
continue;
121 Int_t nbins = currHisto->GetXaxis()->GetNbins();
122 for (Int_t ibin = 1; ibin<=nbins; ibin++){
123 Double_t binContent = currHisto->GetBinContent(ibin);
124 if ( binContent > errorPercent[ihisto][ibin-1] )
126 else if ( binContent > warningPercent[ihisto][ibin-1] )
129 messages.Add(
new TObjString(
"Do not panic:"));
130 messages.Add(
new TObjString(
"copy errors do not affect data"));
134 switch ( histoRawsPercentIndex[ihisto] ) {
137 messages.Add(
new TObjString(
"Trigger algo errors"));
139 case AliMUONQAIndices::kTriggerReadOutErrorsNorm:
140 messages.Add(
new TObjString(
"Readout errors"));
144 messages.Add(
new TObjString(
"are a little bit high"));
147 messages.Add(
new TObjString(
"are too high"));
149 else if ( nAnalyzedEvents != 0 ) {
150 switch ( histoRawsPercentIndex[ihisto] ) {
153 case AliMUONQAIndices::kTriggerReadOutErrorsNorm:
154 messages.Add(
new TObjString(
"Values within limits"));
158 if (
MarkHisto(*currHisto, currRv) < rv[specie] )
160 currHisto->GetYaxis()->SetRangeUser(0., 110.);
161 SetupHisto(nAnalyzedEvents, messages, *currHisto, currRv, specie);
192 Double_t y1 = 0.87 - (messages.GetLast()+2)*0.075;
193 TPaveText* text =
new TPaveText(0.25,y1,0.75,0.89,
"NDC");
198 text->AddText(Form(
"Total events %i", nevents));
200 TString defaultText =
"";
203 if ( nevents == 0 ) {
205 defaultText =
"No events analyzed!";
207 else if ( nevents <= eventLimit ) {
209 text->AddText(
"Not enough events to judge");
210 defaultText =
"Please wait for more statistics";
213 TIter next(&messages);
216 while ( ( str = static_cast<TObjString*>(next()) ) ){
217 text->AddText(str->String());
223 defaultText =
"All is fine!";
227 defaultText =
"Please keep an eye on it!";
231 defaultText =
"PLEASE CALL MUON TRIGGER EXPERT!!!";
235 defaultText =
"PLEASE CALL MUON TRIGGER EXPERT!";
240 text->AddText(defaultText.Data());
241 text->SetFillColor(color);
243 histo.SetFillStyle(1001);
244 histo.SetFillColor(color);
246 histo.SetStats(kFALSE);
248 histo.GetListOfFunctions()->Delete();
249 histo.GetListOfFunctions()->Add(text);
static const char * GetEventSpecieName(EventSpecie_t es)
Total number of bins for trigger calibration summary.
warning, i.e. might become an error later on
color for warning (online convention)
ECheckCode
Classification of errors severity.
virtual ECheckCode * CheckESD(TObjArray **list, const AliMUONRecoParam *recoParam)
Check the QA object(s) for the ESD.
Class with MUON reconstruction parameters.
virtual ~AliMUONTriggerQAChecker()
Total number of bins for trigger error summary.
void SetupHisto(Int_t nevents, const TObjArray &messages, TH1 &histo, AliMUONVQAChecker::ECheckCode code, Int_t esIndex)
color for normal error (online convention)
static EventSpecie_t ConvertIndex(Int_t index)
static TH1 * GetData(TObjArray **list, Int_t index, AliRecoParam::EventSpecie_t eventSpecie)
Number of analyzed events per event specie.
Base class for a MUON QA checker.
Percentage of read-out errors.
Implementation of QAChecker for MTR.
normal error, i.e. something is wrong
Percentage of errors for each trigger decision level.
AliMUONVQAChecker::ECheckCode MarkHisto(TH1 &histo, AliMUONVQAChecker::ECheckCode value) const
virtual ECheckCode * CheckRecPoints(TObjArray **list, const AliMUONRecoParam *recoParam)
Check the QA object(s) for the RecPoints.
color for information (online convention)
Total number of bins for struct error summary.
virtual ECheckCode * CheckRaws(TObjArray **list, const AliMUONRecoParam *recoParam)
Check the QA object(s) for the raw data.
color for fatal error (online convention)
Percentage of responding strips/boards and noisy strips.