Flexible pt range for the efficiency histogramming
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerQADataMakerRec.cxx
CommitLineData
ece56eb9 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16// $Id: AliMUONTriggerQADataMakerRec.cxx 35760 2009-10-21 21:45:42Z ivana $
17
18// --- MUON header files ---
19#include "AliMUONTriggerQADataMakerRec.h"
20
21//-----------------------------------------------------------------------------
22/// \class AliMUONTriggerQADataMakerRec
23///
24/// MUON class for quality assurance data (histo) maker
25///
a026ce9e 26/// \author C. Finck, D. Stocco, L. Aphecetche, A. Blanc
ece56eb9 27
28/// \cond CLASSIMP
29ClassImp(AliMUONTriggerQADataMakerRec)
30/// \endcond
31
32#include "AliCodeTimer.h"
33#include "AliMUONConstants.h"
34#include "AliMpConstants.h"
35#include "AliMUONTriggerDisplay.h"
36#include "TH2.h"
c39cf12d 37#include "TH1F.h"
ece56eb9 38#include "TString.h"
39#include "AliRecoParam.h"
40#include "AliMUONDigitStoreV2R.h"
41#include "AliMUONTriggerStoreV1.h"
42#include "AliMpCDB.h"
43#include "AliMUONRawStreamTriggerHP.h"
44#include "AliMpDDLStore.h"
45#include "AliMpTriggerCrate.h"
46#include "AliMpLocalBoard.h"
47#include "AliQAv1.h"
48#include "AliRawReader.h"
49#include "AliMUONDigitMaker.h"
50#include "AliMUONLocalTrigger.h"
51#include "AliMUONRecoParam.h"
52#include "AliMUONTriggerElectronics.h"
53#include "AliMUONCalibrationData.h"
54#include "AliDCSValue.h"
55#include "AliMpDCSNamer.h"
56#include "AliMpDEManager.h"
57#include "AliMpDEIterator.h"
58#include "AliCDBManager.h"
59#include "TTree.h"
60#include "AliMUONGlobalTriggerBoard.h"
a026ce9e 61#include "AliMUONGlobalTrigger.h"
ece56eb9 62#include "AliMUONGlobalCrateConfig.h"
6482f70b 63#include "AliMUONQAIndices.h"
616d91d8 64#include "AliMpPad.h"
65#include "AliMpVSegmentation.h"
66#include "AliMpSegmentation.h"
1c9a6054 67#include "AliMUONTriggerUtilities.h"
ece56eb9 68
34a26958 69namespace
70{
71 Double_t ProtectedSqrt(Double_t x)
72 {
73 return ( x > 0.0 ? TMath::Sqrt(x) : 0.0 );
74 }
75}
ece56eb9 76//____________________________________________________________________________
77AliMUONTriggerQADataMakerRec::AliMUONTriggerQADataMakerRec(AliQADataMakerRec* master) :
78AliMUONVQADataMakerRec(master),
79fDigitMaker(new AliMUONDigitMaker(kFALSE)),
203ce87e 80fCalibrationData(0x0),
81fTriggerProcessor(0x0),
9f3f7bb6 82fDigitStore(0x0),
83fDigitStoreFromRaw(0x0),
84fTriggerStoreFromRaw(0x0),
1c9a6054 85fTriggerStoreReprocessRaw(0x0),
86fTriggerUtils(0x0)
ece56eb9 87{
88 /// ctor
89}
90
91
92//__________________________________________________________________
93AliMUONTriggerQADataMakerRec::~AliMUONTriggerQADataMakerRec()
94{
95 /// dtor
96 delete fDigitMaker;
ece56eb9 97 delete fTriggerProcessor;
98 delete fCalibrationData;
9f3f7bb6 99 delete fDigitStore;
100 delete fDigitStoreFromRaw;
101 delete fTriggerStoreFromRaw;
102 delete fTriggerStoreReprocessRaw;
1c9a6054 103 delete fTriggerUtils;
ece56eb9 104}
105
106//____________________________________________________________________________
107void AliMUONTriggerQADataMakerRec::EndOfDetectorCycleESDs(Int_t /*specie*/, TObjArray** /*list*/)
108{
109 /// Normalize ESD histograms
110}
111
112//____________________________________________________________________________
113void AliMUONTriggerQADataMakerRec::EndOfDetectorCycleRecPoints(Int_t /*specie*/, TObjArray** /*list*/)
114{
115 /// Normalize RecPoints histograms
ece56eb9 116}
117
118
119//____________________________________________________________________________
120void AliMUONTriggerQADataMakerRec::EndOfDetectorCycleRaws(Int_t /*specie*/, TObjArray** /*list*/)
121{
122 /// create Raws histograms in Raws subdir
ac09753d 123
ece56eb9 124 Int_t histoRawsIndex[] = {
6482f70b 125 AliMUONQAIndices::kTriggerErrorSummary,
126 AliMUONQAIndices::kTriggerCalibSummary,
127 AliMUONQAIndices::kTriggerReadOutErrors,
128 AliMUONQAIndices::kTriggerGlobalOutput
ece56eb9 129 };
a026ce9e 130 Int_t histoRawsScaledIndex[] = {
6482f70b 131 AliMUONQAIndices::kTriggerErrorSummaryNorm,
132 AliMUONQAIndices::kTriggerCalibSummaryNorm,
133 AliMUONQAIndices::kTriggerReadOutErrorsNorm,
134 AliMUONQAIndices::kTriggerGlobalOutputNorm
a026ce9e 135 };
ac09753d 136
ece56eb9 137 const Int_t kNrawsHistos = sizeof(histoRawsIndex)/sizeof(histoRawsIndex[0]);
138 Float_t scaleFactor[kNrawsHistos] = {100., 100., 100., 1.};
a026ce9e 139
ac09753d 140 for ( Int_t itc=-1; itc<AliQADataMakerRec::GetNTrigClasses(); itc++) {
141
142 DisplayTriggerInfo(itc);
143
144 // Normalize RawData histos
145 TH1* histo1D = GetRawsData(AliMUONQAIndices::kTriggerRawNAnalyzedEvents,itc);
146 // This histogram is there for all relevant triggers
147 // if it is not there, it means that the trigger is not taken into account
148 // so we can skip the trigger class for all other histos
149 if ( ! histo1D ) continue;
1c9a6054 150
ac09753d 151 for(Int_t ihisto=0; ihisto<kNrawsHistos; ihisto++){
1c9a6054 152 Float_t nbevent = ( histoRawsIndex[ihisto] == AliMUONQAIndices::kTriggerReadOutErrors ) ? histo1D->GetBinContent(1) : histo1D->GetBinContent(2);
ac09753d 153 TH1* inputHisto = GetRawsData(histoRawsIndex[ihisto],itc);
154 TH1* scaledHisto = GetRawsData(histoRawsScaledIndex[ihisto],itc);
155 // Check here for both since we do not clone Calib-only histograms
156 if ( scaledHisto && inputHisto && nbevent > 0 ) {
157 scaledHisto->Reset();
158 scaledHisto->Add(inputHisto);
159 scaledHisto->Scale(scaleFactor[ihisto]/nbevent);
160 }
161 } // loop on histos
162
163
164 // The following histograms are surely there
165 // if the histogram with analyzed events is there:
166 // test on the existence of each histogram is not necessary
167 TH1* hYCopy = GetRawsData(AliMUONQAIndices::kTriggerErrorLocalYCopy,itc); //number of YCopy error per board
168 TH1* hYCopyTests = GetRawsData(AliMUONQAIndices::kTriggerErrorLocalYCopyTest,itc); //contains the number of YCopy test per board
169 TH1* hYCopyNorm = GetRawsData(AliMUONQAIndices::kTriggerErrorLocalYCopyNorm,itc);
170 hYCopyNorm->Reset();
171 hYCopyNorm->Divide(hYCopy, hYCopyTests, 100., 1.);
a026ce9e 172
ac09753d 173 Float_t mean = hYCopyNorm->Integral();
a026ce9e 174
ac09753d 175 TH1* hSummary = GetRawsData(AliMUONQAIndices::kTriggerErrorSummaryNorm,itc);
176 hSummary->SetBinContent(AliMUONQAIndices::kAlgoLocalYCopy+1,mean/192.); //put the mean of the % of YCopy error in the kTriggerError's corresponding bin
c39cf12d 177
ac09753d 178 TH1F* hTriggerRatio = (TH1F*)GetRawsData(AliMUONQAIndices::kTriggerLocalRatio4434,itc);
179 if ( hTriggerRatio ){
180 hTriggerRatio->Divide(((TH1F*)GetRawsData(AliMUONQAIndices::kTriggerNumberOf44Dec,itc)),((TH1F*)GetRawsData(AliMUONQAIndices::kTriggerNumberOf34Dec,itc)));
c39cf12d 181
ac09753d 182 FillRatio4434Histos(1,itc,kTRUE);
25bf7c78 183
ac09753d 184 //reset bins temporary used to store informations
185 ((TH1F*)GetRawsData(AliMUONQAIndices::kTriggerRatio4434AllEvents,itc))->SetBinContent(0,0);
186 Int_t nbins = ((TH1F*)GetRawsData(AliMUONQAIndices::kTriggerRatio4434AllEvents,itc))->GetNbinsX();
187 ((TH1F*)GetRawsData(AliMUONQAIndices::kTriggerRatio4434AllEvents,itc))->SetBinContent(nbins+1,0);
c39cf12d 188
ac09753d 189 ((TH1F*)GetRawsData(AliMUONQAIndices::kTriggerLocalRatio4434,itc))->SetMaximum(1.1);
190 ((TH1F*)GetRawsData(AliMUONQAIndices::kTriggerRatio4434AllEvents,itc))->SetMaximum(1.1);
191 ((TH1F*)GetRawsData(AliMUONQAIndices::kTriggerRatio4434SinceLastUpdate,itc))->SetMaximum(1.1);
192 }
203ce87e 193
ac09753d 194 if ( GetRawsData(AliMUONQAIndices::kTriggerGlobalScalersNorm,itc) ) {
195 TH1* inputHisto = GetRawsData(AliMUONQAIndices::kTriggerGlobalScalers,itc);
196 TH1* scaledHisto = GetRawsData(AliMUONQAIndices::kTriggerGlobalScalersNorm,itc);
197 scaledHisto->Reset();
198 scaledHisto->Add(inputHisto);
199 Float_t scaleValue = ((TH1F*)GetRawsData(AliMUONQAIndices::kTriggerScalersTime,itc))->GetBinContent(1);
200 if ( scaleValue > 0. ) scaledHisto->Scale(1./scaleValue);
201 }
202 } // loop on trigger classes
ece56eb9 203}
204
205//____________________________________________________________________________
206void AliMUONTriggerQADataMakerRec::InitRaws()
207{
208 /// create Raws histograms in Raws subdir
92664bc8 209
210 // RS: Since there is no sense in cloning trigger scalers per trigger, I am (for the moment) forbidding their cloning
211
ece56eb9 212 AliCodeTimerAuto("",0);
4e868237 213
ece56eb9 214 const Bool_t expert = kTRUE ;
215 const Bool_t saveCorr = kTRUE ;
216 const Bool_t image = kTRUE ;
217
218 TString boardName = "Local board Id";
219
220 Int_t nbLocalBoard = AliMUONConstants::NTriggerCircuit();
221
222 TH1F* histo1D = 0x0;
223 TH2F* histo2D = 0x0;
224
225 AliMUONTriggerDisplay triggerDisplay;
226
227 TString histoName, histoTitle;
1c9a6054 228 if ( CurrentEventSpecie() == AliRecoParam::kCalib ) {
a026ce9e 229 histo1D = new TH1F("hTriggerScalersTime", "Acquisition time from trigger scalers", 1, 0.5, 1.5);
230 histo1D->GetXaxis()->SetBinLabel(1, "One-bin histogram: bin is filled at each scaler event.");
231 histo1D->GetYaxis()->SetTitle("Cumulated scaler time (s)");
6482f70b 232 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerScalersTime, expert, !image, !saveCorr);
92664bc8 233 ForbidCloning(histo1D); // RS
a026ce9e 234
ece56eb9 235 for(Int_t iCath=0; iCath<AliMpConstants::NofCathodes(); iCath++){
236 TString cathName = ( iCath==0 ) ? "BendPlane" : "NonBendPlane";
237 for(Int_t iChamber=0; iChamber<AliMpConstants::NofTriggerChambers(); iChamber++){
238 histoName = Form("hTriggerScalers%sChamber%i", cathName.Data(), 11+iChamber);
239 histoTitle = Form("Chamber %i - %s: trigger scaler counts", 11+iChamber, cathName.Data());
240 histo2D = new TH2F(histoName.Data(), histoTitle.Data(),
241 nbLocalBoard, 0.5, (Float_t)nbLocalBoard + 0.5,
242 16, -0.5, 15.5);
243 histo2D->GetXaxis()->SetTitle(boardName.Data());
244 histo2D->GetYaxis()->SetTitle("Strip");
245 histo2D->SetOption("COLZ");
6482f70b 246 Add2RawsList(histo2D, AliMUONQAIndices::kTriggerScalers + AliMpConstants::NofTriggerChambers()*iCath + iChamber, expert, !image, !saveCorr);
92664bc8 247 ForbidCloning(histo2D); // RS
ece56eb9 248 } // loop on chambers
249 } // loop on cathodes
250
251 for(Int_t iCath=0; iCath<AliMpConstants::NofCathodes(); iCath++){
252 TString cathName = ( iCath==0 ) ? "BendPlane" : "NonBendPlane";
253 for(Int_t iChamber=0; iChamber<AliMpConstants::NofTriggerChambers(); iChamber++){
254 histoName = Form("hTriggerScalersDisplay%sChamber%i", cathName.Data(), 11+iChamber);
255 histoTitle = Form("Chamber %i - %s: Hit rate from scalers (Hz/cm^{2})", 11+iChamber, cathName.Data());
256 histo2D = (TH2F*)triggerDisplay.GetEmptyDisplayHisto(histoName, AliMUONTriggerDisplay::kDisplayStrips,
257 iCath, iChamber, histoTitle);
258 histo2D->SetOption("COLZ");
6482f70b 259 Add2RawsList(histo2D, AliMUONQAIndices::kTriggerScalersDisplay + AliMpConstants::NofTriggerChambers()*iCath + iChamber, expert, !image, !saveCorr);
92664bc8 260 ForbidCloning(histo2D); // RS
ece56eb9 261 } // loop on chambers
a026ce9e 262 } // loop on cathodes
ece56eb9 263
1c9a6054 264 //TString axisLabel[AliMUONQAIndices::kNtrigCalibSummaryBins] = {"#splitline{Dead}{Channels}", "#splitline{Dead}{Local Boards}", "#splitline{Dead}{Regional Boards}", "#splitline{Dead}{Global Board}", "#splitline{Noisy}{Strips}"};
265 TString axisLabel[AliMUONQAIndices::kNtrigCalibSummaryBins] = {"#splitline{Dead}{Channels}", "#splitline{Dead}{Local Boards}", "#splitline{Dead}{Regional Boards}", "#splitline{Dead}{Global Board}", ""}; // Change for nosiy strips
ece56eb9 266
6482f70b 267 TH1F* histoCalib = new TH1F("hTriggerCalibSummaryAll", "MTR calibration summary counts", AliMUONQAIndices::kNtrigCalibSummaryBins, -0.5, (Float_t)AliMUONQAIndices::kNtrigCalibSummaryBins - 0.5);
268 for (Int_t ibin=1; ibin<=AliMUONQAIndices::kNtrigCalibSummaryBins; ibin++){
a026ce9e 269 histoCalib->GetXaxis()->SetBinLabel(ibin, axisLabel[ibin-1].Data());
ece56eb9 270 }
a026ce9e 271 histoCalib->SetFillColor(kBlue);
272 histoCalib->GetYaxis()->SetTitle("Counts");
273 // Copy of previous histo for scaling purposes
274 TH1F* histoCalibNorm = (TH1F*)histoCalib->Clone("hTriggerCalibSummary");
275 histoCalibNorm->SetTitle("MTR calibration summary");
81813481 276 histoCalibNorm->SetOption("bartext0");
a026ce9e 277 histoCalibNorm->GetYaxis()->SetTitle("Percentage per event (%)");
278 // Adding both histos after cloning to avoid problems with the expert bit
6482f70b 279 Add2RawsList(histoCalib, AliMUONQAIndices::kTriggerCalibSummary, expert, !image, !saveCorr);
92664bc8 280 ForbidCloning(histoCalib); // RS
281
6482f70b 282 Add2RawsList(histoCalibNorm, AliMUONQAIndices::kTriggerCalibSummaryNorm, !expert, image, !saveCorr);
92664bc8 283 ForbidCloning(histoCalibNorm); // RS
284
ece56eb9 285 } // Calibration reco param
ece56eb9 286
213812e8 287 const char *globalXaxisName[6] = {"US HPt", "US LPt", "LS HPt", "LS LPt", "SGL HPt", "SGL LPt"};
6482f70b 288 const char *allLevelXaxisName[AliMUONQAIndices::kNtrigAlgoErrorBins] = {"Local algo X", "Local algo Y", "Local LUT","Local Y Copy" , "Local2Regional", "Regional", "Regional2Global", "GlobalFromInGlobal", "GlobalFromInLocal", "GlobalFromOutLocal"};
289 const char *readoutErrNames[AliMUONQAIndices::kNtrigStructErrorBins]={"Local","Regional","Global","DARC"};
ece56eb9 290
291 TString errorAxisTitle = "Number of errors";
292
b71c3d2d 293 histo1D = new TH1F("hTriggerErrorLocalXPos", "ErrorLocalXPos",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 294 histo1D->GetXaxis()->SetTitle(boardName.Data());
295 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 296 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocalXPos, expert, !image, !saveCorr);
a026ce9e 297
b71c3d2d 298 histo1D = new TH1F("hTriggerErrorLocalYPos", "ErrorLocalYPos",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 299 histo1D->GetXaxis()->SetTitle(boardName.Data());
300 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 301 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocalYPos, expert, !image, !saveCorr);
a026ce9e 302
b71c3d2d 303 histo1D = new TH1F("hTriggerErrorLocalDev", "ErrorLocalDev",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 304 histo1D->GetXaxis()->SetTitle(boardName.Data());
305 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 306 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocalDev, expert, !image, !saveCorr);
a026ce9e 307
b71c3d2d 308 histo1D = new TH1F("hTriggerErrorLocalTriggerDec", "ErrorLocalTriggerDec",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 309 histo1D->GetXaxis()->SetTitle(boardName.Data());
310 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 311 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocalTriggerDec, expert, !image, !saveCorr);
a026ce9e 312
b71c3d2d 313 histo1D = new TH1F("hTriggerErrorLocalLPtLSB", "ErrorLocalLPtLSB",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 314 histo1D->GetXaxis()->SetTitle(boardName.Data());
315 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 316 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocalLPtLSB, expert, !image, !saveCorr);
a026ce9e 317
b71c3d2d 318 histo1D = new TH1F("hTriggerErrorLocalLPtMSB", "ErrorLocalLPtMSB",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 319 histo1D->GetXaxis()->SetTitle(boardName.Data());
320 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 321 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocalLPtMSB, expert, !image, !saveCorr);
a026ce9e 322
b71c3d2d 323 histo1D = new TH1F("hTriggerErrorLocalHPtLSB", "ErrorLocalHPtLSB",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 324 histo1D->GetXaxis()->SetTitle(boardName.Data());
325 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 326 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocalHPtLSB, expert, !image, !saveCorr);
a026ce9e 327
b71c3d2d 328 histo1D = new TH1F("hTriggerErrorLocalHPtMSB", "ErrorLocalHPtMSB",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 329 histo1D->GetXaxis()->SetTitle(boardName.Data());
330 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 331 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocalHPtMSB, expert, !image, !saveCorr);
a026ce9e 332
b71c3d2d 333 histo1D = new TH1F("hTriggerErrorLocalTrigY", "ErrorLocalTrigY",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 334 histo1D->GetXaxis()->SetTitle(boardName.Data());
335 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 336 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocalTrigY, expert, !image, !saveCorr);
a026ce9e 337
1c9a6054 338 if ( CurrentEventSpecie() != AliRecoParam::kCalib ) {
fa7e0953 339 histo1D = new TH1F("hTriggerRatio4434Local", "Ratio4434Local",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
340 histo1D->GetXaxis()->SetTitle(boardName.Data());
341 histo1D->GetYaxis()->SetTitle("ratio 44/34");
342 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerLocalRatio4434, expert, !image, !saveCorr);
343 histo1D = new TH1F("hTriggerRatio4434AllEvents", "Ratio4434AllEvents",1,0,1);
344 histo1D->GetXaxis()->SetTitle("Event number");
345 histo1D->GetYaxis()->SetTitle("ratio 44/34");
346 histo1D->SetLineColor(4);
347 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerRatio4434AllEvents, expert, !image, !saveCorr);
348 histo1D = new TH1F("hTriggerRatio4434SinceLastUpdate", "Ratio4434SinceLastUpdate",1,0,1);
349 histo1D->GetXaxis()->SetTitle("Event number");
350 histo1D->GetYaxis()->SetTitle("ratio 44/34");
351 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerRatio4434SinceLastUpdate, expert, !image, !saveCorr);
352 }
c39cf12d 353
b71c3d2d 354 histo1D = new TH1F("hTriggerErrorLocal2RegionalLPtLSB", "ErrorLocal2RegionalLPtLSB",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 355 histo1D->GetXaxis()->SetTitle(boardName.Data());
356 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 357 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocal2RegionalLPtLSB, expert, !image, !saveCorr);
a026ce9e 358
b71c3d2d 359 histo1D = new TH1F("hTriggerErrorLocal2RegionalLPtMSB", "ErrorLocal2RegionalLPtMSB",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 360 histo1D->GetXaxis()->SetTitle(boardName.Data());
361 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 362 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocal2RegionalLPtMSB, expert, !image, !saveCorr);
a026ce9e 363
b71c3d2d 364 histo1D = new TH1F("hTriggerErrorLocal2RegionalHPtLSB", "ErrorLocal2RegionalHPtLSB",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 365 histo1D->GetXaxis()->SetTitle(boardName.Data());
366 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 367 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocal2RegionalHPtLSB, expert, !image, !saveCorr);
a026ce9e 368
b71c3d2d 369 histo1D = new TH1F("hTriggerErrorLocal2RegionalHPtMSB", "ErrorLocal2RegionalHPtMSB",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 370 histo1D->GetXaxis()->SetTitle(boardName.Data());
371 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
6482f70b 372 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorLocal2RegionalHPtMSB, expert, !image, !saveCorr);
a026ce9e 373
b71c3d2d 374 histo1D = new TH1F("hTriggerErrorOutGlobalFromInGlobal", "ErrorOutGlobalFromInGlobal",6,-0.5,6-0.5);
a026ce9e 375 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
ece56eb9 376 for (int ibin=0;ibin<6;ibin++){
a026ce9e 377 histo1D->GetXaxis()->SetBinLabel(ibin+1,globalXaxisName[ibin]);
ece56eb9 378 }
6482f70b 379 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorOutGlobalFromInGlobal, expert, !image, !saveCorr);
ece56eb9 380
b71c3d2d 381 histo1D = new TH1F("hTriggerErrorOutGlobalFromInLocal", "ErrorOutGlobalFromInLocal",6,-0.5,6-0.5);
c39cf12d 382 histo1D->GetYaxis()->SetTitle(errorAxisTitle.Data());
383 for (int ibin=0;ibin<6;ibin++){
384 histo1D->GetXaxis()->SetBinLabel(ibin+1,globalXaxisName[ibin]);
385 }
386 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerErrorOutGlobalFromInLocal, expert, !image, !saveCorr);
387
6482f70b 388 TH1F* histoAlgoErr = new TH1F("hTriggerAlgoNumOfErrors", "Trigger Algorithm total errors",AliMUONQAIndices::kNtrigAlgoErrorBins,-0.5,(Float_t)AliMUONQAIndices::kNtrigAlgoErrorBins-0.5);
a026ce9e 389 histoAlgoErr->GetYaxis()->SetTitle("Number of events with errors");
6482f70b 390 for (int ibin=0;ibin<AliMUONQAIndices::kNtrigAlgoErrorBins;ibin++){
a026ce9e 391 histoAlgoErr->GetXaxis()->SetBinLabel(ibin+1,allLevelXaxisName[ibin]);
ece56eb9 392 }
a026ce9e 393 histoAlgoErr->SetFillColor(kBlue);
394 // Copy of previous histo for scaling purposes
395 TH1F* histoAlgoErrNorm = (TH1F*)histoAlgoErr->Clone("hTriggerAlgoErrors");
81813481 396 histoAlgoErrNorm->SetOption("bartext0");
a026ce9e 397 histoAlgoErrNorm->SetTitle("Trigger algorithm errors");
398 histoAlgoErrNorm->GetYaxis()->SetTitle("% of events with errors");
399 // Adding both histos after cloning to avoid problems with the expert bit
6482f70b 400 Add2RawsList(histoAlgoErr, AliMUONQAIndices::kTriggerErrorSummary, expert, !image, !saveCorr);
401 Add2RawsList(histoAlgoErrNorm, AliMUONQAIndices::kTriggerErrorSummaryNorm, !expert, image, !saveCorr);
ece56eb9 402
b71c3d2d 403 histo1D = new TH1F("hTriggerTriggeredBoards", "Triggered boards", nbLocalBoard, 0.5, (Float_t)nbLocalBoard + 0.5);
6482f70b 404 Add2RawsList(histo1D, AliMUONQAIndices::kTriggeredBoards, expert, !image, !saveCorr);
a026ce9e 405
b71c3d2d 406 histo2D = (TH2F*)triggerDisplay.GetEmptyDisplayHisto("hTriggerFiredBoardsDisplay", AliMUONTriggerDisplay::kDisplayBoards,
a026ce9e 407 0, 0, "Local board triggers / event");
408 histo2D->SetOption("COLZ");
6482f70b 409 Add2RawsList(histo2D, AliMUONQAIndices::kTriggerBoardsDisplay, expert, !image, !saveCorr);
a026ce9e 410
b71c3d2d 411 TH1F* histoYCopyErr = new TH1F("hTriggerErrorLocalYCopy", "Number of YCopy errors",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
a026ce9e 412 histoYCopyErr->GetXaxis()->SetTitle(boardName.Data());
413 histoYCopyErr->GetYaxis()->SetTitle(errorAxisTitle.Data());
414 // Copy of previous histo for scaling purposes
b71c3d2d 415 TH1F* histoYCopyErrTest = (TH1F*)histoYCopyErr->Clone("hTriggerErrorLocalYCopyTest");
a026ce9e 416 histoYCopyErrTest->SetTitle("Number of YCopy tested");
417 // Copy of previous histo for scaling purposes
b71c3d2d 418 TH1F* histoYCopyErrNorm = (TH1F*)histoYCopyErr->Clone("hTriggerErrorLocalYCopyNorm");
a026ce9e 419 histoYCopyErrNorm->SetTitle("% of YCopy errors");
420 // Adding both histos after cloning to avoid problems with the expert bit
6482f70b 421 Add2RawsList(histoYCopyErr, AliMUONQAIndices::kTriggerErrorLocalYCopy, expert, !image, !saveCorr);
422 Add2RawsList(histoYCopyErrTest, AliMUONQAIndices::kTriggerErrorLocalYCopyTest, expert, !image, !saveCorr);
423 Add2RawsList(histoYCopyErrNorm, AliMUONQAIndices::kTriggerErrorLocalYCopyNorm, expert, !image, !saveCorr);
a026ce9e 424
6482f70b 425 TH1F* histoROerr = new TH1F("hTriggerReadoutNumOfErrors","Trigger Read-Out total errors", AliMUONQAIndices::kNtrigStructErrorBins, -0.5, (Float_t)AliMUONQAIndices::kNtrigStructErrorBins-0.5);
a026ce9e 426 histoROerr->GetYaxis()->SetTitle("Fraction of errors");
427 histoROerr->SetFillColor(kBlue);
6482f70b 428 for (int ibin=0;ibin<AliMUONQAIndices::kNtrigStructErrorBins;ibin++){
a026ce9e 429 histoROerr->GetXaxis()->SetBinLabel(ibin+1,readoutErrNames[ibin]);
ece56eb9 430 }
a026ce9e 431 // Copy of previous histo for scaling purposes
432 TH1F* histoROerrNorm = (TH1F*)histoROerr->Clone("hTriggerReadoutErrors");
433 histoROerrNorm->SetTitle("Trigger Read-Out errors");
81813481 434 histoROerrNorm->SetOption("bartext0");
a026ce9e 435 histoROerrNorm->GetYaxis()->SetTitle("% of errors per event");
436 // Adding both histos after cloning to avoid problems with the expert bit
6482f70b 437 Add2RawsList(histoROerr, AliMUONQAIndices::kTriggerReadOutErrors, expert, !image, !saveCorr);
438 Add2RawsList(histoROerrNorm, AliMUONQAIndices::kTriggerReadOutErrorsNorm, !expert, image, !saveCorr);
a026ce9e 439
440 TH1F* histoGlobalMult = new TH1F("hTriggerGlobalOutMultiplicity","Trigger global outputs multiplicity", 6, -0.5, 6.-0.5);
441 histoGlobalMult->GetYaxis()->SetTitle("Number of triggers");
442 histoGlobalMult->GetXaxis()->SetTitle("Global output");
ece56eb9 443 for (int ibin=0;ibin<6;ibin++){
a026ce9e 444 histoGlobalMult->GetXaxis()->SetBinLabel(ibin+1,globalXaxisName[ibin]);
ece56eb9 445 }
a026ce9e 446 histoGlobalMult->SetFillColor(kBlue);
447 // Copy of previous histo for scaling purposes
448 TH1F* histoGlobalMultNorm = (TH1F*)histoGlobalMult->Clone("hTriggerGlobalOutMultiplicityPerEvt");
449 histoGlobalMultNorm->SetTitle("Trigger global outputs multiplicity per event");
81813481 450 histoGlobalMultNorm->SetOption("bartext0");
451 //histoGlobalMultNorm->SetBarWidth(0.5);
452 //histoGlobalMultNorm->SetBarOffset(0.25);
a026ce9e 453 histoGlobalMultNorm->GetYaxis()->SetTitle("Triggers per event");
454 // Adding both histos after cloning to avoid problems with the expert bit
6482f70b 455 Add2RawsList(histoGlobalMult, AliMUONQAIndices::kTriggerGlobalOutput, expert, !image, !saveCorr);
456 Add2RawsList(histoGlobalMultNorm, AliMUONQAIndices::kTriggerGlobalOutputNorm, expert, !image, !saveCorr);
a026ce9e 457
1c9a6054 458 histo1D = new TH1F("hTriggerRawNAnalyzedEvents", "Number of analyzed events per specie", 2, 0.5, 2.5);
459 //histo1D->GetXaxis()->SetBinLabel(1, AliRecoParam::GetEventSpecieName(CurrentEventSpecie()));
460 histo1D->GetXaxis()->SetBinLabel(1,"All");
461 histo1D->GetXaxis()->SetBinLabel(2,"w/o Readout errors");
a026ce9e 462 histo1D->GetYaxis()->SetTitle("Number of analyzed events");
6482f70b 463 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerRawNAnalyzedEvents, expert, !image, !saveCorr);
c39cf12d 464
1c9a6054 465 if ( CurrentEventSpecie() != AliRecoParam::kCalib ) {
2e010e03 466 histo1D = new TH1F("hTriggerNumberOf34Dec", "Number of 3/4",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
467 histo1D->GetXaxis()->SetTitle(boardName.Data());
468 histo1D->GetYaxis()->SetTitle("Number of 3/4");
469 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerNumberOf34Dec, expert, !image, !saveCorr);
470
471 histo1D = new TH1F("hTriggerNumberOf44Dec", "Number of 4/4",nbLocalBoard,0.5,(Float_t)nbLocalBoard+0.5);
472 histo1D->GetXaxis()->SetTitle(boardName.Data());
473 histo1D->GetYaxis()->SetTitle("Number of 4/4");
474 Add2RawsList(histo1D, AliMUONQAIndices::kTriggerNumberOf44Dec, expert, !image, !saveCorr);
475 }
bd6fae1e 476
92664bc8 477 histo1D = new TH1F("hTriggerIsThere","trigger is there",1,0,1);
478 Add2RawsList(histo1D,AliMUONQAIndices::kTriggerIsThere,kTRUE,kFALSE,kFALSE);
bd6fae1e 479
1c9a6054 480 if ( CurrentEventSpecie() == AliRecoParam::kCalib ) {
203ce87e 481 TH1F* histoGlobalScalers = new TH1F("hTriggerGlobalScalers","Trigger global scalers", 6, -0.5, 6.-0.5);
482 histoGlobalScalers->GetYaxis()->SetTitle("L0 counts");
483 histoGlobalScalers->GetXaxis()->SetTitle("Global output");
484 for (int ibin=0;ibin<6;ibin++){
485 histoGlobalScalers->GetXaxis()->SetBinLabel(ibin+1,globalXaxisName[ibin]);
486 }
487 // Copy of previous histo for scaling purposes
488 TH1F* histoGlobalScalersNorm = (TH1F*)histoGlobalScalers->Clone("hTriggerGlobalScalersRate");
489 histoGlobalScalersNorm->SetTitle("Trigger global L0 scalers rate");
490 histoGlobalScalersNorm->SetOption("etext0");
491 histoGlobalScalersNorm->GetYaxis()->SetTitle("L0 scalers rate (Hz)");
492 // Adding both histos after cloning to avoid problems with the expert bit
493 Add2RawsList(histoGlobalScalers, AliMUONQAIndices::kTriggerGlobalScalers, expert, !image, !saveCorr);
92664bc8 494 ForbidCloning(histoGlobalScalers); // RS
203ce87e 495 Add2RawsList(histoGlobalScalersNorm, AliMUONQAIndices::kTriggerGlobalScalersNorm, expert, !image, !saveCorr);
92664bc8 496 ForbidCloning(histoGlobalScalersNorm); // RS
203ce87e 497 }
92664bc8 498 //
ac09753d 499 //ClonePerTrigClass(AliQAv1::kRAWS); // RS: this should be the last line DONE at parent level
92664bc8 500 //
ece56eb9 501}
502
503//__________________________________________________________________
504void AliMUONTriggerQADataMakerRec::InitDigits()
505{
506 /// Initialized Digits spectra
507 const Bool_t expert = kTRUE ;
508 const Bool_t image = kTRUE ;
509
b71c3d2d 510 TH1I* h0 = new TH1I("hTriggerDigitsDetElem", "Detection element distribution in Digits;Detection element Id;Counts", 400, 1100, 1500);
ece56eb9 511 Add2DigitsList(h0, 0, !expert, image);
92664bc8 512 ForbidCloning(h0);
513 //
ac09753d 514 //ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line DONE at parent level
92664bc8 515 //
ece56eb9 516}
517
518//____________________________________________________________________________
519void AliMUONTriggerQADataMakerRec::InitRecPoints()
520{
521 /// create Reconstructed Points histograms in RecPoints subdir for the
522 /// MUON Trigger subsystem.
523
524 const Bool_t expert = kTRUE ;
525 const Bool_t image = kTRUE ;
526
527 TH1F* histo1D = 0x0;
528
b71c3d2d 529 histo1D = new TH1F("hTriggerNAnalyzedEvents", "Number of analyzed events per specie", 1, 0.5, 1.5);
1c9a6054 530 histo1D->GetXaxis()->SetBinLabel(1, AliRecoParam::GetEventSpecieName(CurrentEventSpecie()));
ece56eb9 531 histo1D->GetYaxis()->SetTitle("Number of analyzed events");
6482f70b 532 Add2RecPointsList(histo1D, AliMUONQAIndices::kTriggerNAnalyzedEvents, expert, !image);
92664bc8 533 ForbidCloning(histo1D);
ece56eb9 534
535 histo1D = new TH1F("hTriggerTrippedChambers", "Trigger RPCs in trip", 418, 1100-0.5, 1417+0.5);
536 histo1D->GetXaxis()->SetTitle("DetElemId");
537 histo1D->GetYaxis()->SetTitle("# of trips");
538 histo1D->SetFillColor(kRed);
539 histo1D->SetLineColor(kRed);
6482f70b 540 Add2RecPointsList(histo1D, AliMUONQAIndices::kTriggerRPCtrips, !expert, image);
92664bc8 541 ForbidCloning(histo1D); // RS this histo is not cloned
542 //
543 FillTriggerDCSHistos();
544 //
ac09753d 545 //ClonePerTrigClass(AliQAv1::kRECPOINTS); DONE at parent level
92664bc8 546 //
ece56eb9 547}
548
549
550//____________________________________________________________________________
551void AliMUONTriggerQADataMakerRec::InitESDs()
552{
3e1866ad 553 /// Empty implementation
ece56eb9 554}
555
556//____________________________________________________________________________
557void AliMUONTriggerQADataMakerRec::MakeRaws(AliRawReader* rawReader)
558{
559 /// make QA for rawdata trigger
a026ce9e 560
561 AliCodeTimerAuto("",0);
ece56eb9 562
ece56eb9 563 // Init Local/Regional/Global decision with fake values
92664bc8 564 //
ece56eb9 565
a026ce9e 566 UInt_t globalInput[4];
567 for (Int_t bit=0; bit<4; bit++){
568 globalInput[bit]=0;
ece56eb9 569 }
570
a026ce9e 571 //for (Int_t reg=0;reg<16;reg++){
572 //fTriggerOutputRegionalData[reg]=0;
573 //for (Int_t bit=0;bit<4;bit++){
574 //fTriggerInputGlobalDataLPt[reg][bit]=0;
575 //fTriggerInputGlobalDataHPt[reg][bit]=0;
576 //}
577 //}
4e868237 578
579 if ( fDigitStoreFromRaw ) fDigitStoreFromRaw->Clear();
580 else fDigitStoreFromRaw = new AliMUONDigitStoreV2R();
581 if ( fTriggerStoreFromRaw ) fTriggerStoreFromRaw->Clear();
582 else fTriggerStoreFromRaw = new AliMUONTriggerStoreV1();
583 if ( fTriggerStoreReprocessRaw ) fTriggerStoreReprocessRaw->Clear();
584 else fTriggerStoreReprocessRaw = new AliMUONTriggerStoreV1();
a026ce9e 585
586 AliMUONGlobalTrigger inputGlobalTrigger;
ece56eb9 587
1c9a6054 588 //UShort_t maxNcounts = 0xFFFF; // Uncomment for noisy strips
ece56eb9 589
590 // Get trigger Local, Regional, Global in/outputs and scalers
1c9a6054 591
ece56eb9 592 AliMpCDB::LoadDDLStore();
593
594 const AliMUONRawStreamTriggerHP::AliHeader* darcHeader = 0x0;
595 const AliMUONRawStreamTriggerHP::AliRegionalHeader* regHeader = 0x0;
596 const AliMUONRawStreamTriggerHP::AliLocalStruct* localStruct = 0x0;
597
598 Int_t nDeadLocal = 0, nDeadRegional = 0, nDeadGlobal = 0, nNoisyStrips = 0;
616d91d8 599 Int_t nFiredStrips = 0, nStripsTot = 0;
ece56eb9 600
601 // When a crate is not present, the loop on boards is not performed
602 // This should allow to correctly count the local boards
1c9a6054 603 Int_t countAllBoards = 0;
ece56eb9 604
3e42c3a7 605 Bool_t containTriggerData = kFALSE;
1c9a6054 606 Bool_t hasReadoutErrors = kFALSE;
ece56eb9 607 AliMUONRawStreamTriggerHP rawStreamTrig(rawReader);
608 while (rawStreamTrig.NextDDL())
92664bc8 609 {
610 containTriggerData = kTRUE;
3e42c3a7 611
04ab4661 612 Bool_t scalerEvent = rawReader->GetDataHeader()->GetL1TriggerMessage() & 0x1;
613 if ( scalerEvent ) AliDebug(1,Form("Scaler event: evtSpecie recoParam %s QA %s\n",
1c9a6054 614 AliRecoParam::GetEventSpecieName(AliRecoParam::Convert(GetRecoParam()->GetEventSpecie())),
615 AliRecoParam::GetEventSpecieName(CurrentEventSpecie())));
ece56eb9 616
617 Bool_t fillScalerHistos = ( scalerEvent &&
1c9a6054 618 ( CurrentEventSpecie() == AliRecoParam::kCalib ) );
ece56eb9 619
620 if ( scalerEvent != fillScalerHistos ) {
1c9a6054 621 AliWarning(Form("Scaler event found but event specie is %s. Scaler histos will not be filled", AliRecoParam::GetEventSpecieName(CurrentEventSpecie())));
ece56eb9 622 }
623
624 darcHeader = rawStreamTrig.GetHeaders();
625
626 if (darcHeader->GetGlobalFlag()){
203ce87e 627 if ( fillScalerHistos ) {
628 UInt_t nOfClocks = darcHeader->GetGlobalClock();
629 Double_t nOfSeconds = ((Double_t) nOfClocks) / 40e6; // 1 clock each 25 ns
92664bc8 630 FillRawsData(AliMUONQAIndices::kTriggerScalersTime, 1., nOfSeconds);
203ce87e 631 const UInt_t* globScaler = darcHeader->GetGlobalScaler();
632 Int_t bitCorr[6] = {2,0,3,1,4,5};
633 for (Int_t bit=0; bit<6; bit++){
92664bc8 634 FillRawsData(AliMUONQAIndices::kTriggerGlobalScalers, bitCorr[bit],(double)(*(globScaler+bit)));
203ce87e 635 }
636 }
637
638 //Get Global datas
639 inputGlobalTrigger.SetFromGlobalResponse(darcHeader->GetGlobalOutput());
640 Int_t resp[6] = {inputGlobalTrigger.PairUnlikeHpt(), inputGlobalTrigger.PairUnlikeLpt(),
641 inputGlobalTrigger.PairLikeHpt(), inputGlobalTrigger.PairLikeLpt(),
642 inputGlobalTrigger.SingleHpt(), inputGlobalTrigger.SingleLpt()};
643 for (Int_t bit=0; bit<6; bit++){
644 if ( resp[bit] == 0 ){
645 if ( fillScalerHistos )
646 nDeadGlobal++;
647 }
648 else
92664bc8 649 FillRawsData(AliMUONQAIndices::kTriggerGlobalOutput, bit, resp[bit]);
203ce87e 650 } // loop on bits
651
652 //for (Int_t Bit=0; Bit<32; Bit++){
653 //fTriggerInputGlobalDataLPt[Bit/4][Bit%4]=((darcHeader->GetGlobalInput(0)>>Bit)&1);
654 //fTriggerInputGlobalDataLPt[Bit/4+8][Bit%4]=((darcHeader->GetGlobalInput(1)>>Bit)&1);
655 //fTriggerInputGlobalDataHPt[Bit/4][Bit%4]=((darcHeader->GetGlobalInput(2)>>Bit)&1);
656 //fTriggerInputGlobalDataHPt[Bit/4+8][Bit%4]=((darcHeader->GetGlobalInput(3)>>Bit)&1);
657 //}
658
659 for (Int_t i=0; i<4; i++){
660 globalInput[i]=darcHeader->GetGlobalInput(i);
661 }
ece56eb9 662 }
663
664 Int_t nReg = rawStreamTrig.GetRegionalHeaderCount();
665
666 for(Int_t iReg = 0; iReg < nReg ;iReg++)
667 { //reg loop
668
a026ce9e 669 //Int_t regId=rawStreamTrig.GetDDL()*8+iReg;
ece56eb9 670
671 // crate info
672 AliMpTriggerCrate* crate = AliMpDDLStore::Instance()->GetTriggerCrate(rawStreamTrig.GetDDL(), iReg);
673
674 regHeader = rawStreamTrig.GetRegionalHeader(iReg);
675
a026ce9e 676 //Get regional outputs -> not checked, hardware read-out doesn't work
677 //fTriggerOutputRegionalData[regId]=Int_t(regHeader->GetOutput());
678 // if ( ! fTriggerOutputRegionalData[regId] )
679 // nDeadRegional++;
ece56eb9 680 Int_t nBoardsInReg = 0; // Not necessary when regional output will work
681
682 // loop over local structures
683 Int_t nLocal = regHeader->GetLocalStructCount();
684
685 for(Int_t iLocal = 0; iLocal < nLocal; iLocal++)
686 {
687
688 localStruct = regHeader->GetLocalStruct(iLocal);
689
690 // if card exist
691 if (!localStruct) continue;
1c9a6054 692
693 Int_t loCircuit = crate->GetLocalBoardId(localStruct->GetId());
ece56eb9 694
695 if ( !loCircuit ) continue; // empty slot
12549f10 696
ece56eb9 697 AliMpLocalBoard* localBoard = AliMpDDLStore::Instance()->GetLocalBoard(loCircuit, false);
698
699 nBoardsInReg++; // Not necessary when regional output will work
700 countAllBoards++;
701
a026ce9e 702 AliMUONLocalTrigger inputLocalTrigger;
703 inputLocalTrigger.SetLocalStruct(loCircuit, *localStruct);
9f3f7bb6 704 fTriggerStoreFromRaw->Add(inputLocalTrigger);
a026ce9e 705
ece56eb9 706 TArrayS xyPattern[2];
707 localStruct->GetXPattern(xyPattern[0]);
708 localStruct->GetYPattern(xyPattern[1]);
9f3f7bb6 709 fDigitMaker->TriggerDigits(loCircuit, xyPattern, *fDigitStoreFromRaw);
ece56eb9 710
ece56eb9 711 //Get electronic Decisions from data
712
713 //Get regional inputs -> not checked, hardware read-out doesn't work
a026ce9e 714 //fTriggerInputRegionalDataLPt[0][loCircuit]=Int_t(((regHeader->GetInput(0))>>(2*iLocal))&1);
715 //fTriggerInputRegionalDataLPt[1][loCircuit]=Int_t(((regHeader->GetInput(1))>>((2*iLocal)+1))&1);
12549f10
VB
716
717 if ( ! localBoard->IsNotified() ) continue;
ece56eb9 718
719 //Get local in/outputs
720 if (Int_t(localStruct->GetDec())!=0){
92664bc8 721 FillRawsData(AliMUONQAIndices::kTriggeredBoards,loCircuit);
ece56eb9 722 }
1c9a6054 723 else if ( fillScalerHistos && ! TriggerUtilities()->IsMaskedBoard(loCircuit) ) nDeadLocal++;
ece56eb9 724
725 // loop over strips
a026ce9e 726 if ( fillScalerHistos ) {
727 Int_t cathode = localStruct->GetComptXY()%2;
616d91d8 728
729 Int_t offset = 0;
730 if (cathode && localBoard->GetSwitch(AliMpLocalBoard::kZeroAllYLSB)) offset = -8;
731
a026ce9e 732 for (Int_t ibitxy = 0; ibitxy < 16; ++ibitxy) {
733 if (ibitxy==0){
734 AliDebug(AliQAv1::GetQADebugLevel(),"Filling trigger scalers");
735 }
736
737 UShort_t scalerVal[4] = {
738 localStruct->GetXY1(ibitxy),
739 localStruct->GetXY2(ibitxy),
740 localStruct->GetXY3(ibitxy),
741 localStruct->GetXY4(ibitxy)
742 };
616d91d8 743
744
745
746 for(Int_t ich=0; ich<AliMpConstants::NofTriggerChambers(); ich++){
747 // getDetElemId
748 Int_t detElemId = AliMpDDLStore::Instance()->GetDEfromLocalBoard(loCircuit, ich);
749
750 const AliMpVSegmentation* seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, AliMp::GetCathodType(cathode));
751
752
753 Int_t istrip = ibitxy + offset;
754
755 AliMpPad pad = seg->PadByLocation(loCircuit,istrip,kFALSE);
756 if (!pad.IsValid()) continue;
1c9a6054 757 if ( ! TriggerUtilities()->IsMasked(pad, detElemId, cathode)) nStripsTot++;
616d91d8 758
759 // UShort_t pattern = (UShort_t)xyPattern[cathode].At(ich);
760 // if ((pattern >> ibitxy) & 0x1) nFiredStrips++;
761
762 if ( scalerVal[ich] > 0 ) {
92664bc8 763 FillRawsData(AliMUONQAIndices::kTriggerScalers + AliMpConstants::NofTriggerChambers()*cathode + ich,
764 loCircuit, istrip, 2*(Float_t)scalerVal[ich]);
616d91d8 765 nFiredStrips++;
766 }
767
1c9a6054 768 //if ( scalerVal[ich] >= maxNcounts ) nNoisyStrips++; // Uncomment for noisy strips
616d91d8 769 } // loop on chamber
a026ce9e 770 } // loop on strips
771 } // scaler event
ece56eb9 772 } // iLocal
1c9a6054 773 if ( nBoardsInReg == 0 ) {
774 // Check masks
775 Int_t nMaskedInReg = 0;
776 for ( Int_t iLocal = 0; iLocal < crate->GetNofLocalBoards(); ++iLocal ) {
777 Int_t loCircuit = crate->GetLocalBoardId(iLocal);
778 if ( TriggerUtilities()->IsMaskedBoard(loCircuit) ) nMaskedInReg++;
779 }
780 if ( nMaskedInReg != crate->GetNofLocalBoards() ) nDeadRegional++; // Not necessary when regional output will work
781 }
ece56eb9 782 } // iReg
783
6482f70b 784 Float_t readoutErrors[AliMUONQAIndices::kNtrigStructErrorBins] = {
eaf6dbb0 785 countAllBoards>0?((Float_t)rawStreamTrig.GetLocalEoWErrors())/((Float_t)countAllBoards):0,
ece56eb9 786 ((Float_t)rawStreamTrig.GetRegEoWErrors())/16.,
787 ((Float_t)rawStreamTrig.GetGlobalEoWErrors())/6.,
788 ((Float_t)rawStreamTrig.GetDarcEoWErrors())/2.
789 };
790
6482f70b 791 for (Int_t ibin=0; ibin<AliMUONQAIndices::kNtrigStructErrorBins; ibin++){
1c9a6054 792 if ( readoutErrors[ibin] > 0 ) {
793 hasReadoutErrors = kTRUE;
794 FillRawsData(AliMUONQAIndices::kTriggerReadOutErrors, ibin, readoutErrors[ibin]);
795 }
ece56eb9 796 }
797 } // NextDDL
798
3e42c3a7 799 if ( ! containTriggerData ) return;
2e010e03 800
92664bc8 801 FillRawsData(AliMUONQAIndices::kTriggerRawNAnalyzedEvents,1.);
1c9a6054 802
803 // Do not check algorithm if there are ReadOut errors
804 if ( hasReadoutErrors ) return; // COMMENT if you want to check events with readout errors as well
805 FillRawsData(AliMUONQAIndices::kTriggerRawNAnalyzedEvents,2.);
3e42c3a7 806
ece56eb9 807 if ( nStripsTot > 0 ) { // The value is != 0 only for scaler events
616d91d8 808 AliDebug(AliQAv1::GetQADebugLevel(), Form("nStripsFired %i nStripsTot %i", nFiredStrips, nStripsTot));
6482f70b 809 Float_t fraction[AliMUONQAIndices::kNtrigCalibSummaryBins] = {
616d91d8 810 ((Float_t)(nStripsTot - nFiredStrips)) / ((Float_t)nStripsTot),
1c9a6054 811 (Float_t)nDeadLocal / ((Float_t)AliMUONConstants::NTriggerCircuit()),
ece56eb9 812 (Float_t)nDeadRegional / 16.,
813 (Float_t)nDeadGlobal / 6., // Number of bits of global response
814 (Float_t)nNoisyStrips / ((Float_t)nStripsTot),
815 };
816
6482f70b 817 for(Int_t ibin = 0; ibin < AliMUONQAIndices::kNtrigCalibSummaryBins; ibin++){
ece56eb9 818 if ( fraction[ibin] > 0. )
92664bc8 819 FillRawsData(AliMUONQAIndices::kTriggerCalibSummary,ibin, fraction[ibin]);
ece56eb9 820 }
821 }
822
9f3f7bb6 823 TriggerElectronics()->Digits2Trigger(*fDigitStoreFromRaw,*fTriggerStoreReprocessRaw);
ece56eb9 824
c39cf12d 825 AliMUONGlobalTrigger* recoGlobalTriggerFromLocal;
9f3f7bb6 826 recoGlobalTriggerFromLocal = fTriggerStoreReprocessRaw->Global();
c39cf12d 827
a026ce9e 828 //Reconstruct Global decision from Global inputs
829 UChar_t recoResp = RawTriggerInGlobal2OutGlobal(globalInput);
c39cf12d 830 AliMUONGlobalTrigger recoGlobalTriggerFromGlobal;
831 recoGlobalTriggerFromGlobal.SetFromGlobalResponse(recoResp);
ece56eb9 832
a026ce9e 833 // Compare data and reconstructed decisions and fill histos
9f3f7bb6 834 RawTriggerMatchOutLocal();
c39cf12d 835 //Fill ratio 44/34 histos
ac09753d 836 for ( Int_t itc=-1; itc<AliQADataMakerRec::GetNEventTrigClasses(); ++itc ) FillRatio4434Histos(fgkUpdateRatio4434, itc, kFALSE);
a026ce9e 837 //RawTriggerMatchOutLocalInRegional(); // Not tested, hardware read-out doesn't work
c39cf12d 838 RawTriggerMatchOutGlobal(inputGlobalTrigger, recoGlobalTriggerFromGlobal, 'G');
839 // Global, reconstruction from Local inputs: compare data and reconstructed decisions and fill histos
840 RawTriggerMatchOutGlobal(inputGlobalTrigger, *recoGlobalTriggerFromLocal, 'L');
841 // Global, reconstruction from Global inputs: compare data and reconstructed decisions and fill histos
92664bc8 842 //
ece56eb9 843}
844
845//__________________________________________________________________
846void AliMUONTriggerQADataMakerRec::MakeDigits(TTree* digitsTree)
847{
848 /// makes data from Digits
849
850 // Do nothing in case of calibration event
1c9a6054 851 if ( CurrentEventSpecie() == AliRecoParam::kCalib ) return;
92664bc8 852
ece56eb9 853 if (!fDigitStore)
854 fDigitStore = AliMUONVDigitStore::Create(*digitsTree);
92664bc8 855
ece56eb9 856 fDigitStore->Clear();
857 fDigitStore->Connect(*digitsTree, false);
858 digitsTree->GetEvent(0);
859
860 TIter next(fDigitStore->CreateIterator());
861
862 AliMUONVDigit* dig = 0x0;
863
864 while ( ( dig = static_cast<AliMUONVDigit*>(next()) ) )
865 {
92664bc8 866 FillDigitsData(0,dig->DetElemId());
ece56eb9 867 }
868}
869
870//____________________________________________________________________________
871void AliMUONTriggerQADataMakerRec::MakeRecPoints(TTree* /*clustersTree*/)
872{
bd47a7f7 873 /// Fill histogram with total number of analyzed events for normalization purposes
874
ece56eb9 875 // Do nothing in case of calibration event
1c9a6054 876 if ( CurrentEventSpecie() == AliRecoParam::kCalib ) return;
ece56eb9 877
92664bc8 878 FillRecPointsData(AliMUONQAIndices::kTriggerNAnalyzedEvents,1.);
ece56eb9 879}
880
881//____________________________________________________________________________
882void AliMUONTriggerQADataMakerRec::MakeESDs(AliESDEvent* /*esd*/)
883{
3e1866ad 884 /// Empty implementation
ece56eb9 885}
886
887
888//____________________________________________________________________________
ac09753d 889void AliMUONTriggerQADataMakerRec::DisplayTriggerInfo(Int_t itc)
ece56eb9 890{
891 //
892 /// Display trigger information in a user-friendly way:
893 /// from local board and strip numbers to their position on chambers
894 //
895
896 AliMUONTriggerDisplay triggerDisplay;
897
92664bc8 898 TH2* histoStrips=0x0;
899 TH2* histoDisplayStrips=0x0;
900 if ( GetRawsData(AliMUONQAIndices::kTriggerScalers, itc) ) {
ece56eb9 901 AliMUONTriggerDisplay::EDisplayOption displayOption = AliMUONTriggerDisplay::kNormalizeToArea;
902 for (Int_t iCath = 0; iCath < AliMpConstants::NofCathodes(); iCath++)
903 {
904 for (Int_t iChamber = 0; iChamber < AliMpConstants::NofTriggerChambers(); iChamber++)
905 {
92664bc8 906 histoStrips = (TH2*)GetRawsData(AliMUONQAIndices::kTriggerScalers + AliMpConstants::NofTriggerChambers()*iCath + iChamber, itc);
ece56eb9 907
908 if(histoStrips->GetEntries()==0) continue; // No events found => No need to display
909
92664bc8 910 histoDisplayStrips = (TH2*)GetRawsData(AliMUONQAIndices::kTriggerScalersDisplay + AliMpConstants::NofTriggerChambers()*iCath + iChamber, itc);
ece56eb9 911
912 triggerDisplay.FillDisplayHistogram(histoStrips, histoDisplayStrips,
913 AliMUONTriggerDisplay::kDisplayStrips, iCath, iChamber, displayOption);
914
92664bc8 915 Float_t scaleValue = ((TH1*)GetRawsData(AliMUONQAIndices::kTriggerScalersTime, itc))->GetBinContent(1);
ece56eb9 916 if(scaleValue>0.) histoDisplayStrips->Scale(1./scaleValue);
917 } // iChamber
918 } // iCath
919 }
92664bc8 920
921 if ( GetRawsData(AliMUONQAIndices::kTriggeredBoards, itc) ){
922 TH1* histoBoards = (TH1*)GetRawsData(AliMUONQAIndices::kTriggeredBoards, itc);
923 TH2* histoDisplayBoards = (TH2*)GetRawsData(AliMUONQAIndices::kTriggerBoardsDisplay, itc);
ece56eb9 924 triggerDisplay.FillDisplayHistogram(histoBoards, histoDisplayBoards, AliMUONTriggerDisplay::kDisplayBoards, 0, 0);
92664bc8 925 Float_t scaleValue = GetRawsData(AliMUONQAIndices::kTriggerRawNAnalyzedEvents, itc)->GetBinContent(1);
ece56eb9 926 if(scaleValue>0.) histoDisplayBoards->Scale(1./scaleValue);
927 }
928}
929
930
931//_____________________________________________________________________________
932Bool_t
933AliMUONTriggerQADataMakerRec::FillTriggerDCSHistos()
934{
935 /// Get HV and currents values for one trigger chamber
92664bc8 936 // RS: Note: the histos involved in this routin are forbidden to be cloned, -1 in GetRawsData returns the default histos
937 int itc = -1;
938 //
ece56eb9 939 AliCodeTimerAuto("",0);
e35bc8c6 940
941 TMap* triggerDcsMap = CalibrationData()->TriggerDCS();
ece56eb9 942
943 if ( !triggerDcsMap )
944 {
945 AliError("Cannot fill DCS histos, as triggerDcsMap is NULL");
946 return kFALSE;
947 }
948
949 const Double_t kMaxDelay = 3.;
950 const Double_t kMaxVariation = 25.; // Volts
951 const Int_t kDefaultNpoints = 200;
952 Double_t scaleFactor = 1./1000.;
953
954 Bool_t error = kFALSE;
955 Bool_t expert = kTRUE;
956 Bool_t image = kTRUE;
957
958 AliMpDEIterator deIt;
959
960 AliMpDCSNamer triggerDcsNamer("TRIGGER");
961
962 TH2F* currHisto = 0x0;
963 Int_t histoIndex = 0;
964 TString histoName, histoTitle;
965
966 TArrayD axisSlat(18+1);
967 for(Int_t islat=0; islat<=18; islat++){
968 axisSlat[islat] = -0.5 + (Float_t)islat;
969 }
970
971 TArrayD axisTimeAux[4], axisTime[4], axisTimeDE(kDefaultNpoints);
972 TArrayI index[4], npoints(4);
973
974 // Build axis of times
975 npoints.Reset();
976 for(Int_t ich=0; ich<4; ich++){
977 axisTimeAux[ich].Set(kDefaultNpoints);
978 axisTimeAux[ich].Reset(-1.);
979 }
980
981 deIt.First();
982 while ( !deIt.IsDone() )
983 {
984 Int_t detElemId = deIt.CurrentDEId();
985 TObjArray* values = GetDCSValues(AliMpDCSNamer::kDCSHV, detElemId, triggerDcsMap, triggerDcsNamer);
986
987 if ( values ) {
988
989 AliDebug(AliQAv1::GetQADebugLevel(), Form("DetElemId %i", detElemId));
990
991 axisTimeDE.Reset(-1.);
992
993 TIter next(values);
994 AliDCSValue* val = 0x0;
995 Double_t previousVal = -999.;
996 Int_t npointsde = 0;
997 while ( ( val = static_cast<AliDCSValue*>(next()) ) )
998 {
999 if ( npointsde + 1 > kDefaultNpoints ) {
1000 axisTimeDE.Set(npointsde + 1);
1001 }
1002
1003 Double_t currVal = val->GetFloat();
1004 Double_t currTime = (Double_t)val->GetTimeStamp();
1005 if (npointsde > 0 ){
1006 if ( TMath::Abs( currVal - previousVal ) < kMaxVariation &&
1007 TMath::Abs( currTime - axisTimeDE[npointsde-1] ) < 40 ) continue;
1008 }
1009
1010 axisTimeDE[npointsde] = currTime;
1011 previousVal = currVal;
1012 npointsde++;
1013 } // loop on values
1014
1015 // AliDebug(AliQAv1::GetQADebugLevel(), Form("Adding DE point %2i (%2i) %.2f (%i)\n", previousBin, npointsde, axisTimeDE[previousBin], nTimesPerBin));
1016
1017 Int_t iChamber = AliMpDEManager::GetChamberId(detElemId);
1018 Int_t ich = iChamber - AliMpConstants::NofTrackingChambers();
1019
1020 for(Int_t ipde=0; ipde<npointsde; ipde++){
1021
1022 if ( npoints[ich] + 1 > kDefaultNpoints ) {
1023 axisTimeAux[ich].Set(npoints[ich] + 1);
1024 }
1025
1026 for(Int_t ipoint = 0; ipoint < axisTimeAux[ich].GetSize(); ipoint++){
1027 if (axisTimeAux[ich][ipoint] < 0.) {
1028 axisTimeAux[ich][ipoint] = axisTimeDE[ipde];
1029 npoints[ich]++;
1030 AliDebug(AliQAv1::GetQADebugLevel(), Form("Adding point %2i %.0f\n", ipoint, axisTimeAux[ich][ipoint]));
1031 break;
1032 }
1033 if ( TMath::Abs( axisTimeDE[ipde] - axisTimeAux[ich][ipoint]) < kMaxDelay ) {
1034 axisTimeAux[ich][ipoint] = TMath::Min(axisTimeAux[ich][ipoint], axisTimeDE[ipde]);
1035 break;
1036 }
1037 } // loop on points
1038 } // loop on reorganized values
1039
1040 } // if ( values )
1041 deIt.Next();
1042 } // loop on DetElemId
1043
1044 for(Int_t ich=0; ich<4; ich++){
1045 axisTimeAux[ich].Set(npoints[ich]);
1046 index[ich].Set(npoints[ich]);
1047 TMath::Sort(npoints[ich], axisTimeAux[ich].GetArray(), index[ich].GetArray(), kFALSE);
1048
1049 axisTime[ich].Set(npoints[ich]+1);
1050 for(Int_t ipoint = 0; ipoint < axisTimeAux[ich].GetSize(); ipoint++){
1051 axisTime[ich][ipoint] = axisTimeAux[ich][index[ich][ipoint]];
1052 }
1053 Double_t minStartEndWidth = 0.1 * (axisTime[ich][npoints[ich]-1] - axisTime[ich][0]);
1054 axisTime[ich][npoints[ich]] = axisTime[ich][npoints[ich]-1] + minStartEndWidth;
1055 if ( npoints[ich] >= 1)
1056 if ( axisTime[ich][1] - axisTime[ich][0] < minStartEndWidth )
1057 axisTime[ich][0] = axisTime[ich][1] - minStartEndWidth;
1058 }
1059
1060
1061 // Loop again on detection elements: create and fill histos
1062 deIt.First();
1063 while ( !deIt.IsDone() )
1064 {
1065 Int_t detElemId = deIt.CurrentDEId();
1066 TObjArray* values = GetDCSValues(AliMpDCSNamer::kDCSHV, detElemId, triggerDcsMap, triggerDcsNamer);
1067
1068 if ( values ) {
1069 Int_t iChamber = AliMpDEManager::GetChamberId(detElemId);
1070 Int_t ich = iChamber - AliMpConstants::NofTrackingChambers();
1071
6482f70b 1072 histoIndex = AliMUONQAIndices::kTriggerRPChv + ich;
b71c3d2d 1073 histoName = Form("hTriggerRPCHVChamber%i", 11+ich);
ece56eb9 1074 histoTitle = Form("Chamber %i: RPC HV (kV)", 11+ich);
1075
92664bc8 1076 currHisto = (TH2F*)GetRecPointsData(histoIndex,itc); // RS this histo is not cloned
ece56eb9 1077
1078 if(!currHisto){
1079 currHisto = new TH2F(histoName.Data(), histoTitle.Data(),
1080 npoints[ich], axisTime[ich].GetArray(),
1081 18, axisSlat.GetArray());
1082 currHisto->GetXaxis()->SetTitle("Time");
1083 currHisto->GetXaxis()->SetTimeDisplay(1);
1084 //currHisto->GetXaxis()->SetTimeFormat("%d%b%y %H:%M:%S");
1085 currHisto->GetXaxis()->SetLabelSize(0.03);
1086 currHisto->GetYaxis()->SetTitle("RPC");
1087 currHisto->SetOption("TEXT45COLZ");
1088 Add2RecPointsList(currHisto, histoIndex, expert, !image);
92664bc8 1089 ForbidCloning(currHisto); // RS
ece56eb9 1090 }
1091
1092 Int_t slat = detElemId%100;
1093 Int_t slatBin = currHisto->GetYaxis()->FindBin(slat);
1094
1095 TIter next(values);
1096 AliDCSValue* val = 0x0;
1097 Double_t sumValuesPerBin = 0.;
1098 Int_t nValuesPerBin = 0;
1099 Int_t previousBin = -1;
1100 Double_t previousTime = -1., previousVal = -999., sumVal = 0., sumTime = 0.;
1101 Bool_t isTrip = kFALSE;
1102 Int_t nPointsForSlope = 0;
1103 while ( ( val = static_cast<AliDCSValue*>(next()) ) )
1104 {
1105 Double_t currTime = (Double_t)val->GetTimeStamp();
1106 Int_t currentBin = currHisto->GetXaxis()->FindBin(currTime+0.5);
1107 Double_t currVal = val->GetFloat();
1108 Double_t deltaVal = currVal - previousVal;
1109 Bool_t isRepeated = kFALSE;
1110 if ( previousTime > 0 ){
1111 isRepeated = ( TMath::Abs( currVal - previousVal ) < kMaxVariation &&
1112 TMath::Abs( currTime - previousTime ) < 40 );
1113
1114 // Check for trips
1115 sumTime += currTime - previousTime;
1116 sumVal += deltaVal;
1117 nPointsForSlope++;
1118
1119 if ( sumTime > 0. && nPointsForSlope >= 3 ){
1120 Double_t slope = sumVal / sumTime;
1121 if ( slope < -10. ) // going down of more than 10V/s
1122 isTrip = kTRUE;
1123 }
1124
1125 if ( deltaVal * sumVal < 0. ) {
1126 sumTime = 0.;
1127 sumVal = 0.;
1128 nPointsForSlope = 0;
1129 }
1130 }
1131
1132 if ( ! isRepeated ) {
1133 if ( currentBin != previousBin ) {
1134 if ( previousBin >= 0 ) {
1135 currHisto->SetBinContent(previousBin, slatBin, scaleFactor*sumValuesPerBin/((Double_t)nValuesPerBin));
1136 sumValuesPerBin = 0.;
1137 nValuesPerBin = 0;
1138 }
1139 previousBin = currentBin;
1140 }
1141 }
1142
1143 sumValuesPerBin += currVal;
1144 nValuesPerBin++;
1145 previousTime = currTime;
1146 previousVal = currVal;
1147 } // loop on values
1148 currHisto->SetBinContent(previousBin, slatBin, scaleFactor*sumValuesPerBin/((Double_t)nValuesPerBin)); // Fill last value
92664bc8 1149 if ( isTrip ) ((TH1*)GetRecPointsData(AliMUONQAIndices::kTriggerRPCtrips,itc))->Fill(detElemId);
ece56eb9 1150 } // if ( values )
1151 deIt.Next();
1152 } // loop on detElem
1153 return error;
1154}
1155
1156
1157//____________________________________________________________________________
1158TObjArray*
1159AliMUONTriggerQADataMakerRec::GetDCSValues(Int_t iMeas, Int_t detElemId,
1160 TMap* triggerDcsMap, AliMpDCSNamer& triggerDcsNamer)
1161{
bd47a7f7 1162 //
1163 /// Get values of DCS data points from the map
1164 //
1165
ece56eb9 1166 if ( AliMpDEManager::GetStationType(detElemId) != AliMp::kStationTrigger) return 0x0;
1167
1d5cf0f2 1168 TString currAlias = triggerDcsNamer.DCSAliasName(detElemId, 0, iMeas);
ece56eb9 1169
1170 TPair* triggerDcsPair = static_cast<TPair*>(triggerDcsMap->FindObject(currAlias.Data()));
1171
1172 if (!triggerDcsPair)
1173 {
213812e8 1174 AliError(Form("Did not find expected alias (%s) for DE %d\n",
1175 currAlias.Data(),detElemId));
ece56eb9 1176 return 0x0;
1177 }
1178
1179 TObjArray* values = static_cast<TObjArray*>(triggerDcsPair->Value());
1180 if (!values)
1181 {
213812e8 1182 AliError(Form("Could not get values for alias %s\n",currAlias.Data()));
ece56eb9 1183 return 0x0;
1184 }
1185
1186 return values;
1187}
1188
1189
1190//____________________________________________________________________________
a026ce9e 1191UChar_t AliMUONTriggerQADataMakerRec::RawTriggerInGlobal2OutGlobal(UInt_t globalInput[4])
ece56eb9 1192{
1193 //
1194 /// Reconstruct Global Trigger decision using Global Inputs
1195 //
1196
a026ce9e 1197 AliCodeTimerAuto("",0);
1198
e35bc8c6 1199 AliMUONGlobalCrateConfig* globalConfig = CalibrationData()->GlobalTriggerCrateConfig();
ece56eb9 1200
1201 AliMUONGlobalTriggerBoard globalTriggerBoard;
1202 globalTriggerBoard.Reset();
1203 for (Int_t i = 0; i < 4; i++) {
1204 globalTriggerBoard.Mask(i,globalConfig->GetGlobalMask(i));
1205 }
1206
a026ce9e 1207 globalTriggerBoard.RecomputeRegional(globalInput);
ece56eb9 1208 globalTriggerBoard.Response();
a026ce9e 1209 return globalTriggerBoard.GetResponse();
ece56eb9 1210
ece56eb9 1211}
1212
1213//____________________________________________________________________________
9f3f7bb6 1214void AliMUONTriggerQADataMakerRec::RawTriggerMatchOutLocal()
ece56eb9 1215{
1216 //
1217 /// Match data and reconstructed Local Trigger decision
ece56eb9 1218
a026ce9e 1219 AliCodeTimerAuto("",0);
ece56eb9 1220
a026ce9e 1221 Bool_t skipBoard[234];
1222 memset(skipBoard,0,AliMUONConstants::NTriggerCircuit()*sizeof(Bool_t));
ece56eb9 1223
a026ce9e 1224 Bool_t errorInYCopy = kFALSE;
1225
1226 // First search for YCopy errors.
1227 Int_t loCircuit = -1;
9f3f7bb6 1228 TIter next(fTriggerStoreReprocessRaw->CreateLocalIterator());
1c9a6054 1229 AliMUONLocalTrigger* recoLocalTrigger = 0x0;
a026ce9e 1230 while ( ( recoLocalTrigger = static_cast<AliMUONLocalTrigger*>(next()) ) )
1231 {
1232 loCircuit = recoLocalTrigger->LoCircuit();
12549f10
VB
1233 // FIXME: skip copy boards for the moment
1234 if ( loCircuit > AliMUONConstants::NTriggerCircuit() ) continue;
a026ce9e 1235 Int_t iboard = loCircuit - 1;
1236
92664bc8 1237 FillRawsData(AliMUONQAIndices::kTriggerErrorLocalYCopyTest,loCircuit);
a026ce9e 1238
1c9a6054 1239 AliMUONLocalTrigger* inputLocalTrigger = fTriggerStoreFromRaw->FindLocal(loCircuit);
a026ce9e 1240
1241 Int_t recoTrigPattern[4] = {recoLocalTrigger->GetY1Pattern(), recoLocalTrigger->GetY2Pattern(), recoLocalTrigger->GetY3Pattern(), recoLocalTrigger->GetY4Pattern()};
1242 Int_t inputTrigPattern[4] = {inputLocalTrigger->GetY1Pattern(), inputLocalTrigger->GetY2Pattern(), inputLocalTrigger->GetY3Pattern(), inputLocalTrigger->GetY4Pattern()};
1243
1244 AliMpLocalBoard* localBoardMp = AliMpDDLStore::Instance()->GetLocalBoard(loCircuit); // get local board object for switch value
1245
1246 Bool_t errorInCopyBoard = kFALSE;
1247 for(Int_t ich=0; ich<4; ich++){
1248 if ( recoTrigPattern[ich] != inputTrigPattern[ich] ){
1249 skipBoard[iboard] = kTRUE;
1250 if ( ich >=2 ){
1251 if ( localBoardMp->GetSwitch(AliMpLocalBoard::kOR0) )
1252 skipBoard[iboard+1] = kTRUE;
1253 if ( localBoardMp->GetSwitch(AliMpLocalBoard::kOR1) )
1254 skipBoard[iboard-1] = kTRUE;
ece56eb9 1255 }
a026ce9e 1256 errorInCopyBoard = kTRUE;
1257 errorInYCopy = kTRUE;
1258 }
1259 } // loop on chambers
1260 if ( errorInCopyBoard )
92664bc8 1261 FillRawsData(AliMUONQAIndices::kTriggerErrorLocalYCopy,loCircuit);
a026ce9e 1262 } // loop on local boards
1263
1264 if (errorInYCopy)
92664bc8 1265 FillRawsData(AliMUONQAIndices::kTriggerErrorSummary,AliMUONQAIndices::kAlgoLocalYCopy);
a026ce9e 1266
1267 Bool_t errorInXPosDev = kFALSE;
1268 Bool_t errorInYPosTrigY = kFALSE;
1269 Bool_t errorInLUT = kFALSE;
1270
1271 next.Reset();
c39cf12d 1272 Bool_t respBendPlane, respNonBendPlane;
a026ce9e 1273 while ( ( recoLocalTrigger = static_cast<AliMUONLocalTrigger*>(next()) ) )
1274 {
1275 loCircuit = recoLocalTrigger->LoCircuit();
12549f10
VB
1276 // FIXME: skip copy boards for the moment
1277 if ( loCircuit > AliMUONConstants::NTriggerCircuit() ) continue;
a026ce9e 1278 Int_t iboard = loCircuit - 1;
04ab4661 1279
1c9a6054 1280 AliMUONLocalTrigger* inputLocalTrigger = fTriggerStoreFromRaw->FindLocal(loCircuit);
1281
04ab4661 1282 TString debugString = Form("Local board %i", loCircuit);
a026ce9e 1283
25bf7c78 1284 // Fill ratio 44/34 histos (if not scaler event)
1c9a6054 1285 if ( CurrentEventSpecie() != AliRecoParam::kCalib ) {
04ab4661 1286 Bool_t is34 = ( recoLocalTrigger->IsTrigX() && recoLocalTrigger->IsTrigY() );
203ce87e 1287 Bool_t is44 = TriggerElectronics()->ModifiedLocalResponse(loCircuit, respBendPlane, respNonBendPlane, kTRUE);
92664bc8 1288 if ( is34 ) FillRawsData(AliMUONQAIndices::kTriggerNumberOf34Dec,loCircuit);
1289 if ( is44 ) FillRawsData(AliMUONQAIndices::kTriggerNumberOf44Dec,loCircuit);
04ab4661 1290
04ab4661 1291 if ( is44 && ! is34 ) {
1292 AliWarning(Form("Local board %i satisfies the 4/4 conditions but not the 3/4", loCircuit));
1293 debugString += Form(" is34 %i is44 %i is34_recalc %i", is34, is44, TriggerElectronics()->ModifiedLocalResponse(loCircuit, respBendPlane, respNonBendPlane, kFALSE));
1294 debugString += Form(" isTrigX %i %i isTrigY %i %i Lpt %i %i Hpt %i %i", recoLocalTrigger->IsTrigX(), inputLocalTrigger->IsTrigX(),
1295 recoLocalTrigger->IsTrigY(), inputLocalTrigger->IsTrigY(),
1296 recoLocalTrigger->LoLpt(), inputLocalTrigger->LoLpt(),
1297 recoLocalTrigger->LoHpt(), inputLocalTrigger->LoHpt());
1298 }
25bf7c78 1299 }
a026ce9e 1300
1301 if ( recoLocalTrigger->LoStripX() != inputLocalTrigger->LoStripX() ) {
92664bc8 1302 FillRawsData(AliMUONQAIndices::kTriggerErrorLocalXPos,loCircuit);
a026ce9e 1303 errorInXPosDev = kTRUE;
04ab4661 1304 debugString += Form(" errXpos (%i, %i)", recoLocalTrigger->LoStripX(), inputLocalTrigger->LoStripX());
a026ce9e 1305 }
92664bc8 1306
a026ce9e 1307 if ( recoLocalTrigger->GetDeviation() != inputLocalTrigger->GetDeviation() ) {
92664bc8 1308 FillRawsData(AliMUONQAIndices::kTriggerErrorLocalDev,loCircuit);
a026ce9e 1309 errorInXPosDev = kTRUE;
04ab4661 1310 debugString += Form(" errXdev (%i, %i)", recoLocalTrigger->GetDeviation(), inputLocalTrigger->GetDeviation());
a026ce9e 1311 }
1312
2fffb5d2 1313 // Skip following checks in case we previously found YCopy error and YPos or trigY errors
1314 if ( (!skipBoard[iboard]) || ( (recoLocalTrigger->LoStripY() == inputLocalTrigger->LoStripY()) && (recoLocalTrigger->LoTrigY() == inputLocalTrigger->LoTrigY())) ) {
1315
1316 if ( recoLocalTrigger->GetLoDecision() != inputLocalTrigger->GetLoDecision() ) {
92664bc8 1317 FillRawsData(AliMUONQAIndices::kTriggerErrorLocalTriggerDec,loCircuit);
04ab4661 1318 debugString += Form(" errDecision (%i, %i)", recoLocalTrigger->GetLoDecision(), inputLocalTrigger->GetLoDecision());
2fffb5d2 1319 }
1320
1321 // Test Hpt and LPT
1322 Int_t recoLut[2] = { recoLocalTrigger->LoLpt(), recoLocalTrigger->LoHpt() };
1323 Int_t inputLut[2] = {inputLocalTrigger->LoLpt(), inputLocalTrigger->LoHpt() };
6482f70b 1324 Int_t currIndex[2][2] = {{AliMUONQAIndices::kTriggerErrorLocalLPtLSB, AliMUONQAIndices::kTriggerErrorLocalLPtMSB},
1325 {AliMUONQAIndices::kTriggerErrorLocalHPtMSB, AliMUONQAIndices::kTriggerErrorLocalHPtMSB}};
2fffb5d2 1326 for (Int_t ilut=0; ilut<2; ilut++){
1327 Int_t bitDiff = recoLut[ilut]^inputLut[ilut];
1328 if ( bitDiff == 0 ) continue;
04ab4661 1329 debugString += Form(" errLUT[%i] (%i, %i)", ilut, recoLut[ilut], inputLut[ilut]);
2fffb5d2 1330 for (Int_t ibit=0; ibit<2; ibit++){
1331 Bool_t isBitDifferent = (bitDiff>>ibit)&1;
1332 if ( isBitDifferent ){
92664bc8 1333 FillRawsData(currIndex[ilut][ibit],loCircuit);
1334 errorInLUT = kTRUE;
2fffb5d2 1335 }
1336 }
ece56eb9 1337 }
a026ce9e 1338 }
2fffb5d2 1339
1340
1341 // Skip following checks in case we previously found YCopy errors
04ab4661 1342 if ( ! skipBoard[iboard] ) {
ece56eb9 1343
04ab4661 1344 if ( recoLocalTrigger->LoStripY() != inputLocalTrigger->LoStripY() ) {
1345 FillRawsData(AliMUONQAIndices::kTriggerErrorLocalYPos,loCircuit);
1346 errorInYPosTrigY = kTRUE;
1347 debugString += Form(" errYpos (%i, %i)", recoLocalTrigger->LoStripY(), inputLocalTrigger->LoStripY());
1348 }
a026ce9e 1349
04ab4661 1350 if ( recoLocalTrigger->LoTrigY() != inputLocalTrigger->LoTrigY() ) {
1351 FillRawsData(AliMUONQAIndices::kTriggerErrorLocalTrigY,loCircuit);
1352 errorInYPosTrigY = kTRUE;
1353 debugString += Form(" errYtrig (%i, %i)", recoLocalTrigger->LoTrigY(), inputLocalTrigger->LoTrigY());
1354 }
a026ce9e 1355 }
04ab4661 1356 if ( debugString.Length() > 15 ) AliDebug(1,debugString.Data());
a026ce9e 1357 } // loop on local boards
04ab4661 1358
92664bc8 1359
a026ce9e 1360 if (errorInXPosDev)
92664bc8 1361 FillRawsData(AliMUONQAIndices::kTriggerErrorSummary,AliMUONQAIndices::kAlgoLocalX);
a026ce9e 1362
1363 if (errorInLUT)
92664bc8 1364 FillRawsData(AliMUONQAIndices::kTriggerErrorSummary,AliMUONQAIndices::kAlgoLocalLUT);
a026ce9e 1365
1366 if (errorInYPosTrigY)
92664bc8 1367 FillRawsData(AliMUONQAIndices::kTriggerErrorSummary,AliMUONQAIndices::kAlgoLocalY);
a026ce9e 1368
1369}
1370/*
ece56eb9 1371//____________________________________________________________________________
1372void AliMUONTriggerQADataMakerRec::RawTriggerMatchOutLocalInRegional()
1373{
1374 //
1375 /// Match Local outputs and Regional inputs
1376 /// Not tested, hardware read-out doesn't work
1377 //
1378
1379 for (int localId=1;localId<235;localId++){
1380 if(fTriggerOutputLocalDataLPtDec[0][localId]!=fTriggerInputRegionalDataLPt[0][localId]){
1381 ((TH1F*)GetRawsData(kTriggerErrorLocal2RegionalLPtLSB))->Fill(localId);
1382 }
1383 if(fTriggerOutputLocalDataLPtDec[1][localId]!=fTriggerInputRegionalDataLPt[1][localId]){
1384 ((TH1F*)GetRawsData(kTriggerErrorLocal2RegionalLPtMSB))->Fill(localId);
1385 }
1386 if(fTriggerOutputLocalDataHPtDec[0][localId]!=fTriggerInputRegionalDataHPt[0][localId]){
1387 ((TH1F*)GetRawsData(kTriggerErrorLocal2RegionalHPtLSB))->Fill(localId);
1388 }
1389 if(fTriggerOutputLocalDataHPtDec[1][localId]!=fTriggerInputRegionalDataHPt[1][localId]){
1390 ((TH1F*)GetRawsData(kTriggerErrorLocal2RegionalHPtMSB))->Fill(localId);
1391 }
1392 }
ece56eb9 1393}
a026ce9e 1394*/
1395
ece56eb9 1396
1397//____________________________________________________________________________
c39cf12d 1398void AliMUONTriggerQADataMakerRec::RawTriggerMatchOutGlobal(AliMUONGlobalTrigger& inputGlobalTrigger,
1399 AliMUONGlobalTrigger& recoGlobalTrigger,
1400 Char_t histo)
ece56eb9 1401{
1402 //
c39cf12d 1403 /// Match data and reconstructed Global Trigger decision for a reconstruction from Global inputs.
203ce87e 1404 /// histo='G': fill FromGlobalInput histo='L': fill from Local input;
ece56eb9 1405 //
1406
a026ce9e 1407 if ( recoGlobalTrigger.GetGlobalResponse() == inputGlobalTrigger.GetGlobalResponse() )
1408 return;
c39cf12d 1409 Int_t histoToFill;
1410 Int_t binToFill;
1411
1412 if (histo=='G'){
1413 histoToFill=AliMUONQAIndices::kTriggerErrorOutGlobalFromInGlobal;
1414 binToFill=AliMUONQAIndices::kAlgoGlobalFromGlobal;
1415 }else{
1416 if (histo=='L'){
1417 histoToFill=AliMUONQAIndices::kTriggerErrorOutGlobalFromInLocal;
1418 binToFill=AliMUONQAIndices::kAlgoGlobalFromLocal;
1419 }else{
203ce87e 1420 AliWarning(Form("Global histos not filled, 3rd argument must be 'G' or 'L'"));
c39cf12d 1421 return;
1422 }
1423 }
a026ce9e 1424
92664bc8 1425 FillRawsData(AliMUONQAIndices::kTriggerErrorSummary,binToFill);
1426
203ce87e 1427 Int_t inputResp[6] = {inputGlobalTrigger.PairUnlikeHpt(), inputGlobalTrigger.PairUnlikeLpt(),
92664bc8 1428 inputGlobalTrigger.PairLikeHpt(), inputGlobalTrigger.PairLikeLpt(),
1429 inputGlobalTrigger.SingleHpt(), inputGlobalTrigger.SingleLpt()};
1430
203ce87e 1431 Int_t recoResp[6] = {recoGlobalTrigger.PairUnlikeHpt(), recoGlobalTrigger.PairUnlikeLpt(),
92664bc8 1432 recoGlobalTrigger.PairLikeHpt(), recoGlobalTrigger.PairLikeLpt(),
1433 recoGlobalTrigger.SingleHpt(), recoGlobalTrigger.SingleLpt()};
1434
ece56eb9 1435 for (int bit=0;bit<6;bit++){
a026ce9e 1436 if ( recoResp[bit] != inputResp[bit] )
92664bc8 1437 FillRawsData(histoToFill,bit);
c39cf12d 1438 }
1439}
1440
1441//____________________________________________________________________________
ac09753d 1442void AliMUONTriggerQADataMakerRec::FillRatio4434Histos(Int_t evtInterval, Int_t itc, Bool_t isEndOfCycle)
c39cf12d 1443{
1444 /// Fill ratio 44/34 histos
ac09753d 1445 TH1* histoEvents = ( isEndOfCycle ) ? GetRawsData(AliMUONQAIndices::kTriggerRawNAnalyzedEvents,itc) : GetMatchingRawsHisto(AliMUONQAIndices::kTriggerRawNAnalyzedEvents,itc);
1446 if ( ! histoEvents ) return;
1c9a6054 1447 Int_t numEvent = Int_t(histoEvents->GetBinContent(2));
c39cf12d 1448
25bf7c78 1449 // Fill every fgkUpdateRatio4434 events
1450 if (numEvent % evtInterval != 0)
1451 return;
ac09753d 1452
1453 TH1* histo44dec = ( isEndOfCycle ) ? GetRawsData(AliMUONQAIndices::kTriggerNumberOf44Dec,itc) : GetMatchingRawsHisto(AliMUONQAIndices::kTriggerNumberOf44Dec,itc);
1454 TH1* histo34dec = ( isEndOfCycle ) ? GetRawsData(AliMUONQAIndices::kTriggerNumberOf34Dec,itc) : GetMatchingRawsHisto(AliMUONQAIndices::kTriggerNumberOf34Dec,itc);
1455
1c9a6054 1456 if ( ! histo44dec || ! histo34dec ) return; // protection when running on calibration events only
1457
ac09753d 1458 Float_t totalNumberOf44 = histo44dec->GetSumOfWeights();
1459 Float_t totalNumberOf34 = histo34dec->GetSumOfWeights();
c39cf12d 1460
25bf7c78 1461 if ( totalNumberOf34 == 0 )
1462 return;
c39cf12d 1463
ac09753d 1464 TH1* histoAllEvents = ( isEndOfCycle ) ? GetRawsData(AliMUONQAIndices::kTriggerRatio4434AllEvents,itc) : GetMatchingRawsHisto(AliMUONQAIndices::kTriggerRatio4434AllEvents,itc);
1465
fa7e0953 1466 if ( ! histoAllEvents ) return;
25bf7c78 1467 Int_t nbins = histoAllEvents->GetNbinsX();
1468 Float_t maxBin = histoAllEvents->GetXaxis()->GetBinLowEdge(nbins+1);
1469
1470 if ( numEvent - maxBin < 1) return;
1471
1472 // Use the underflow and overflow to store the number of 34 and 44
1473 // in previous event
1474 Float_t previousNumOf34 = histoAllEvents->GetBinContent(0);
1475 Float_t previousNumOf44 = histoAllEvents->GetBinContent(nbins+1);
1476
1477 Float_t numOf34Update = totalNumberOf34 - previousNumOf34;
1478 Float_t numOf44Update = totalNumberOf44 - previousNumOf44;
1479
2e010e03 1480 // Not enough new tracks since last update
1481 //if ( numOf34Update == 0 && numOf44Update == 0 )
1482 if ( numOf34Update < evtInterval - 1 )
25bf7c78 1483 return;
1484
1485 Int_t newNbins = ( (Int_t)maxBin % fgkUpdateRatio4434 ) ? nbins : nbins+1;
1486 TString cloneName;
ac09753d 1487
1488 TH1* histoRatioSinceLastUpdate = ( isEndOfCycle ) ? GetRawsData(AliMUONQAIndices::kTriggerRatio4434SinceLastUpdate,itc) : GetMatchingRawsHisto(AliMUONQAIndices::kTriggerRatio4434SinceLastUpdate,itc);
25bf7c78 1489
ac09753d 1490 TH1* histos[2] = {histoAllEvents, histoRatioSinceLastUpdate};
25bf7c78 1491
1492 for (Int_t ihisto=0; ihisto<2; ihisto++){
ac09753d 1493 TH1* currHisto = histos[ihisto];
25bf7c78 1494 cloneName = Form("%sClone", currHisto->GetName());
1495 TArrayD newAxis(newNbins+1);
1496 for (Int_t ibin=0; ibin<newNbins; ibin++){
1497 newAxis[ibin] = currHisto->GetXaxis()->GetBinLowEdge(ibin+1);
986c0fd3 1498 }
25bf7c78 1499 newAxis[newNbins] = numEvent;
1500 TH1F* copyHisto = (TH1F*)currHisto->Clone(cloneName.Data());
1501 //currHisto->SetBins(newNbins, 0., fgkUpdateRatio4434*newNbins);
1502 currHisto->SetBins(newNbins, newAxis.GetArray());
1503 for (Int_t ibin=1; ibin<newNbins; ibin++){
1504 currHisto->SetBinContent(ibin, copyHisto->GetBinContent(ibin));
1505 currHisto->SetBinError(ibin, copyHisto->GetBinError(ibin));
1506 }
1507 delete copyHisto;
1508 }
1509
1510 Float_t ratio4434 = totalNumberOf44/totalNumberOf34;
1511 Float_t errorRatio4434 = ProtectedSqrt(totalNumberOf44*(1-ratio4434))/totalNumberOf34;
986c0fd3 1512
25bf7c78 1513 histoAllEvents->SetBinContent(newNbins,ratio4434);
1514 histoAllEvents->SetBinError(newNbins,errorRatio4434);
1515
1516 Float_t ratio4434Update = 0.;
1517 Float_t errorRatio4434Update = 0.;
c39cf12d 1518
25bf7c78 1519 if(numOf34Update!=0){
1520 ratio4434Update = numOf44Update/numOf34Update;
2e010e03 1521 if ( numOf44Update > numOf34Update ){
1522 AliWarning(Form("Number of 4/4 (%f) is higher than number of 3/4 (%f)", numOf44Update, numOf34Update));
1523 }
25bf7c78 1524 errorRatio4434Update = ProtectedSqrt(numOf44Update*(1-ratio4434Update))/numOf34Update;
ece56eb9 1525 }
2e010e03 1526
ac09753d 1527 histoRatioSinceLastUpdate->SetBinContent(newNbins,ratio4434Update);
1528 histoRatioSinceLastUpdate->SetBinError(newNbins,errorRatio4434Update);
25bf7c78 1529
1530 histoAllEvents->SetBinContent(0,totalNumberOf34);
1531 histoAllEvents->SetBinContent(newNbins+1,totalNumberOf44);
1532
ece56eb9 1533}
c39cf12d 1534
203ce87e 1535
1536//____________________________________________________________________________
1537AliMUONTriggerElectronics* AliMUONTriggerQADataMakerRec::TriggerElectronics()
1538{
1539 /// Return trigger electronics
1540 /// (create it if necessary)
e35bc8c6 1541 if ( ! fTriggerProcessor )
1542 fTriggerProcessor = new AliMUONTriggerElectronics(CalibrationData());
203ce87e 1543 return fTriggerProcessor;
1544}
e35bc8c6 1545
1546
1547//____________________________________________________________________________
1548AliMUONCalibrationData* AliMUONTriggerQADataMakerRec::CalibrationData()
1549{
1550 /// Return calibration data
1551 /// (create it if necessary)
1552 if ( ! fCalibrationData ) fCalibrationData = new AliMUONCalibrationData(AliCDBManager::Instance()->GetRun());
1553 return fCalibrationData;
1554}
bbeb95a9 1555
1c9a6054 1556//____________________________________________________________________________
1557AliMUONTriggerUtilities* AliMUONTriggerQADataMakerRec::TriggerUtilities()
1558{
1559 /// Return trigger utilities for masks
1560 /// (create it if necessary)
1561 if ( ! fTriggerUtils )
1562 fTriggerUtils = new AliMUONTriggerUtilities(CalibrationData());
1563 return fTriggerUtils;
1564}
1565
bbeb95a9 1566//____________________________________________________________________________
bae0b90c 1567void AliMUONTriggerQADataMakerRec::ResetDetectorRaws(TObjArray* list)
bbeb95a9 1568{
1569 /// Reset the calibration data
bae0b90c 1570 ResetDetector(list);
bbeb95a9 1571 delete fTriggerProcessor;
1572 fTriggerProcessor = 0x0;
1573 delete fCalibrationData;
1574 fCalibrationData = 0x0;
1575}