1 #if !defined(__CINT__) || defined(__MAKECINT__)
14 #include "TObjArray.h"
15 #include "TObjString.h"
33 TString shortName = arr->At(0)->GetName();
34 if ( arr->GetEntries() > 2 ) {
35 shortName.Append(Form(
"-%s",arr->At(1)->GetName()));
44 TFile*
file = TFile::Open(filename.Data());
45 if ( ! file )
return NULL;
47 TCanvas* can =
static_cast<TCanvas*
>(file->Get(
"Global/AllTriggers"));
48 if ( ! can )
return NULL;
51 TIter next(can->GetListOfPrimitives());
54 while ( (obj = next()) ) {
55 if ( obj->InheritsFrom(TH2::Class()) ) {
56 histo =
static_cast<TH2*
>(obj);
61 if ( ! histo )
return NULL;
63 TAxis* axis = histo->GetXaxis();
64 if ( axis->GetNbins() == 0 )
return NULL;
69 for (
Int_t ibin=1; ibin<=axis->GetNbins(); ibin++ ) {
70 runList->Add(
new TObjString(axis->GetBinLabel(ibin)));
82 TFile*
file = TFile::Open(filename.Data());
83 if ( ! file )
return isOk;
85 TObject* obj = file->FindObjectAny(objName.Data());
88 if ( obj->IsA() == TCanvas::Class() ) {
89 can =
static_cast<TCanvas*
>(obj);
93 can =
new TCanvas(Form(
"%s_can",obj->GetName()),obj->GetTitle(),600,600);
95 if ( obj->InheritsFrom(TH2::Class()) ) {
97 TH2* histo =
static_cast<TH2*
>(obj);
98 if ( histo->GetMinimum() == 0. && histo->GetMaximum() == 0. ) histo->SetMaximum(0.1);
100 obj->Draw(drawOpt.Data());
103 if (
fNpages == 0 ) outFile.Append(
"(");
104 else if ( closeFile ) outFile.Append(
")");
106 can->Print(outFile.Data());
107 if ( obj != can )
delete obj;
111 else if ( warnIfMissing ) {
112 printf(
"Warning: cannot find %s\n",objName.Data());
123 str.ReplaceAll(
"\\",
"");
125 TObjArray* specialList = specials.Tokenize(
" ");
126 for (
Int_t ichar=0; ichar<specialList->GetEntries(); ichar++ ) {
127 TString currChar =
static_cast<TObjString*
>(specialList->At(ichar))->GetString();
128 if ( str.Contains(currChar.Data()) ) str.ReplaceAll(currChar.Data(),Form(
"\\\%s",currChar.Data()));
136 if ( ! outFile.is_open() )
return;
138 outFile <<
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
139 outFile <<
"\\begin{frame}";
140 if ( ! label.IsNull() ) outFile <<
"\\label{" << label.Data() <<
"}";
142 outFile <<
" \\frametitle{" << title.Data() <<
"}" << endl;
148 if ( ! outFile.is_open() )
return;
149 outFile <<
"\\end{frame}" << endl;
155 if ( ! outFile.is_open() )
return;
156 outFile <<
"\\begin{itemize}" << endl;
157 outFile <<
" \\item " << defaultItem.Data() << endl;
158 outFile <<
"\\end{itemize}" << endl;
169 if ( ! outFile.is_open() )
return kTRUE;
172 outFile <<
" \\begin{columns}[onlytextwidth]" << endl;
173 outFile <<
" \\column{\\textwidth}" << endl;
174 outFile <<
" \\centering" << endl;
175 outFile <<
" \\includegraphics[width=0.98\\textwidth,height=0.92\\textheight,page=" <<
fNpages <<
"]{" <<
outPdf <<
"}" <<endl;
176 outFile <<
" \\end{columns}" << endl;
184 TString baseName[3] = {
"bendPlane",
"nonBendPlane",
"bothPlanes"};
186 TH2* histo[3] = {0x0,0x0,0x0};
187 TH1* histoTotal = 0x0;
188 TFile*
file = TFile::Open(filename.Data());
189 for (
Int_t ieff=0; ieff<3; ieff++ ) {
190 histo[ieff] =
static_cast<TH2*
>(file->FindObjectAny(Form(
"effEvolution%sChamber",baseName[ieff].
Data())));
191 histo[ieff]->SetDirectory(0);
193 histoTotal =
static_cast<TH1*
>(file->FindObjectAny(
"totalEffEvolution"));
194 histoTotal->SetDirectory(0);
197 TCanvas* can =
new TCanvas(
"trigChEff",
"trigChEff",600,600);
198 can->Divide(2,2,0,0);
201 for (
Int_t ich=1; ich<=4; ich++ ) {
203 if ( ich == 4 ) leg =
new TLegend(0.3,0.17,0.7,0.37);
205 if ( ich > 2 ) gPad->SetBottomMargin(0.15);
206 for (
Int_t ieff=0; ieff<3; ieff++ ) {
207 TH1* proj = histo[ieff]->ProjectionX(Form(
"%s%i",histo[ieff]->GetName(),10+ich),ich,ich);
208 proj->SetLineColor(colors[ieff]);
209 proj->SetMarkerColor(colors[ieff]);
210 proj->SetMarkerStyle(20+ieff);
211 proj->SetMarkerSize(0.7);
212 proj->SetStats(kFALSE);
213 proj->SetTitle(Form(
"Chamber %i",10+ich));
214 proj->GetYaxis()->SetRangeUser(0.9,1.01);
215 proj->GetXaxis()->SetLabelSize(0.06);
216 proj->LabelsOption(
"v");
218 if ( gPad->GetListOfPrimitives() != 0 ) drawOpt.Append(
"same");
219 proj->Draw(drawOpt.Data());
220 if ( leg ) leg->AddEntry(proj,baseName[ieff].
Data(),
"lp");
222 if ( leg ) leg->Draw();
224 for (
Int_t ieff=0; ieff<3; ieff++ )
delete histo[ieff];
228 can =
new TCanvas(
"totalTrigEff",
"totalTrifEff",600,600);
229 can->SetLeftMargin(0.15);
230 can->SetBottomMargin(0.15);
231 histoTotal->GetXaxis()->SetLabelSize(0.06);
232 histoTotal->Draw(
"e");
237 if ( ! outFile.is_open() )
return kTRUE;
239 BeginFrame(
"Trigger chamber efficiencies", outFile);
240 outFile <<
" \\begin{columns}[onlytextwidth]" << endl;
241 outFile <<
" \\column{0.66\\textwidth}" << endl;
242 outFile <<
" \\centering" << endl;
243 outFile <<
" \\includegraphics[width=0.98\\textwidth,page=" <<
fNpages-1 <<
"]{" <<
outPdf <<
"}" << endl;
244 outFile <<
" \\column{0.34\\textwidth}" << endl;
245 outFile <<
" \\centering" << endl;
246 outFile <<
" \\includegraphics[width=0.98\\textwidth,page=" <<
fNpages <<
"]{" <<
outPdf <<
"}" << endl;
247 outFile <<
" \\end{columns}" << endl;
255 for (
Int_t ich=0; ich<4; ich++ ) {
256 TString currName = Form(
"effEvolutionbothPlanesRPCCh%i",11+ich);
257 if ( outliers ) currName +=
"_outlier";
261 if ( ! outFile.is_open() )
return kTRUE;
262 TString baseName = outliers ?
"eff.-<eff.> for outliers" :
"efficiency";
263 BeginFrame(Form(
"Trigger chamber %s per RPC",baseName.Data()),outFile,outliers?
"":
"rpcEff");
264 outFile <<
" \\begin{columns}[onlytextwidth]" << endl;
265 outFile <<
" \\column{\\textwidth}" << endl;
266 outFile <<
" \\centering" << endl;
267 for (
Int_t ich=0; ich<4; ich++ ) {
268 if ( ich%2 == 0 ) outFile << endl;
269 outFile <<
" \\includegraphics[width=0.37\\textwidth,page=" <<
fNpages-3+ich <<
"]{" <<
outPdf <<
"}" << endl;
271 outFile <<
" \\end{columns}" << endl;
279 TString trType = ( fromTrackerTrack ) ?
"Tracker" :
"Trigger";
280 for (
Int_t ich=0; ich<4; ich++ ) {
281 Int_t chamber = 11+ich;
282 TString trigEffName = Form(
"%s_fromRPCEffCh%i",trType.Data(),chamber);
283 Bool_t isOk =
MakeSingleFigureSlide(trigEffName.Data(), filename.Data(), Form(
"MTR RPC efficiency for chamber %i (from %s track)",chamber, trType.Data()), outFile);
284 if ( ! isOk )
return kFALSE;
292 if ( ! outFile.is_open() )
return;
294 outFile <<
"General informations" << endl;
295 outFile <<
"\\begin{itemize}" << endl;
296 outFile <<
" \\item Runs selected for MUON on ALICE logbook:" << endl;
297 outFile <<
" \\begin{itemize}" << endl;
298 outFile <<
" \\item Run Type: PHYSICS" << endl;
299 outFile <<
" \\item Duration: at least 10 min" << endl;
300 outFile <<
" \\item GDC mStream Recording: Yes" << endl;
301 outFile <<
" \\item Period: " << period.Data() << endl;
302 outFile <<
" \\item Detectors: At least [ MUON\\_TRG \\& MUON\\_TRK ] as Readout" << endl;
303 outFile <<
" \\item Quality: globally GOOD and NOT BAD for readout Detectors" << endl;
304 outFile <<
" \\item Beam Mode: STABLE" << endl;
305 outFile <<
" \\end{itemize}" << endl;
306 outFile <<
"\\end{itemize}" << endl;
308 outFile <<
" \\vspace{5mm}" << endl;
310 outFile <<
"\\begin{columns}[onlytextwidth]" << endl;
311 outFile <<
" \\column{\\textwidth}" << endl;
312 outFile <<
" \\centering" << endl;
313 outFile <<
" \\begin{tabular}{|l|lll|}" << endl;
314 outFile <<
" \\hline" << endl;
315 outFile <<
" & Total runs & CMUL & CMSL \\\\" << endl;
316 outFile <<
" \\hline" << endl;
317 outFile <<
" ALICE logbook & xx & xx & xx\\\\" << endl;
318 outFile <<
" Good from QA & xx & xx & xx\\\\" << endl;
319 outFile <<
" \\hline" << endl;
320 outFile <<
" \\end{tabular}" << endl;
321 outFile <<
"\\end{columns}" << endl;
326 outFile <<
"General:" << endl;
329 outFile <<
"MTR efficiency:" << endl;
332 outFile <<
"MCH and MUON data quality:" << endl;
340 std::map<Int_t,std::vector<Double_t>> map;
341 if (
gSystem->AccessPathName(evsQA.Data()) == 0 ) {
342 TFile*
file = TFile::Open(evsQA);
343 TTree* tree =
static_cast<TTree*
>(file->Get(
"trending"));
345 Int_t run, fill, bcs;
347 tree->SetBranchAddress(
"run",&run);
348 tree->SetBranchAddress(
"fill",&fill);
349 tree->SetBranchAddress(
"bcs",&bcs);
350 tree->SetBranchAddress(
"mu",&mu);
351 for (
Long64_t ientry=0; ientry<tree->GetEntries(); ientry++ ) {
352 tree->GetEntry(ientry);
353 auto search = map.find(run);
354 if ( search != map.end() )
continue;
355 auto vec = &(map[run]);
370 std::map<Int_t,std::vector<Double_t>> map =
GetRunInfo(evsQA);
375 Bool_t readSummary = ( inFile ) ? kTRUE : kFALSE;
377 TString romanNum[10] = {
"I",
"II",
"III",
"IV",
"V",
"VI",
"VII",
"VIII",
"IX",
"X"};
379 Int_t nRuns = runListArr->GetEntries();
380 Int_t nRunsPerPage = 40;
381 Int_t nRunsPerColumn = nRunsPerPage/2;
383 Int_t nPages = nRuns/nRunsPerPage;
384 if ( nRuns%nRunsPerPage > 0 ) nPages++;
387 Int_t readRun = -2, currRun = -1;
389 Int_t previousFill = -1;
392 for (
Int_t ipage=0; ipage<nPages; ipage++ ) {
394 if ( nPages > 1 ) title += Form(
" (%s)",romanNum[ipage].
Data());
396 outFile <<
" \\begin{columns}[onlytextwidth,T]" << endl;
397 outFile <<
" \\footnotesize" << endl;
398 for (
Int_t icol=0; icol<2; icol++ ) {
399 Bool_t needsHline = ( icol == 0 || irun < nRuns );
400 outFile <<
" \\column{0.5\\textwidth}" << endl;
401 outFile <<
" \\centering" << endl;
402 outFile <<
" \\begin{tabular}{|cp{0.63\\textwidth}|}" << endl;
403 if ( needsHline ) outFile <<
" \\hline" << endl;
405 outFile <<
" \\runTab[\\errorColor]{xxx}{xxx}" << endl;
408 while ( irun<nRuns ) {
409 currRun =
static_cast<TObjString*
>(runListArr->UncheckedAt(irun++))->GetString().Atoi();
411 TString readLines =
"", currLine =
"";
412 while ( readSummary ) {
413 currLine.ReadLine(*inFile,kFALSE);
414 if ( currLine.Contains(
"runTab") ) {
415 TString sRun = currLine(TRegexp(
"{[0-9][0-9][0-9][0-9][0-9][0-9]}"));
416 sRun.Remove(TString::kLeading,
'{');
417 sRun.Remove(TString::kTrailing,
'}');
418 readRun = sRun.Atoi();
419 if ( readRun <= currRun ) readLines += currLine +
"\n";
420 if ( readRun == currRun ) {
425 else if ( currLine.Contains(
"colorLegend") ) readSummary = kFALSE;
428 auto search = map.find(currRun);
430 if ( search != map.end() ) {
431 auto vec = search->second;
434 Double_t ratio = previousMu > 0. ? mu/previousMu : 10.;
435 if ( fill != previousFill || TMath::Abs(1.-ratio) > 0.5 ) {
438 info = Form(
"Fill %i, IB %i, mu %.3f",fill,(
Int_t)vec[1],mu);
441 outFile <<
" \\runTab{" << currRun <<
"}{" << info.Data() <<
"}" << endl;
443 else outFile << readLines.Data();
444 if ( irun%nRunsPerColumn == 0 )
break;
448 if ( needsHline ) outFile <<
" \\hline" << endl;
449 if ( icol == 1 && ipage == nPages -1 ) {
450 outFile <<
" \\hline" << endl;
451 outFile <<
" \\colorLegend" << endl;
452 outFile <<
" \\hline" << endl;
454 outFile <<
" \\end{tabular}" << endl;
455 if ( icol == 0 ) outFile << endl;
457 outFile <<
" \\end{columns}" << endl;
469 if ( ! outFile.is_open() )
return;
470 outFile <<
"\\documentclass[9pt,table]{beamer}" << endl;
471 outFile <<
"\\mode<presentation>" << endl;
472 outFile <<
"\\usepackage[T1]{fontenc}" << endl;
473 outFile <<
"\\usepackage{lmodern}" << endl;
474 outFile <<
"\\usepackage{textcomp}" << endl;
475 outFile <<
"\\usepackage{amsmath}" << endl;
476 outFile <<
"\\usepackage{color,graphicx}" << endl;
477 outFile <<
"\\usepackage{colortbl}" << endl;
478 outFile <<
"\\usepackage{multirow}" << endl;
479 outFile <<
"\\usepackage{pifont}" << endl;
480 outFile <<
"\\usepackage{wasysym}" << endl;
481 outFile <<
"\\usepackage{appendixnumberbeamer}" << endl;
482 outFile <<
"\\usepackage[absolute,overlay]{textpos}" << endl;
483 outFile <<
"\\usetheme{Madrid}" << endl;
484 outFile <<
"\\useoutertheme{shadow}" << endl;
486 outFile <<
"\\setbeamersize{text margin left=0.5cm, text margin right=0.5cm}" << endl;
488 outFile <<
"\\hypersetup{colorlinks,linkcolor=red,urlcolor=blue}" << endl;
490 outFile <<
"% Slightly change the template" << endl;
491 outFile <<
"\\setbeamertemplate{navigation symbols}{} %suppress navigation symbols (bottom-right of frame)" << endl;
493 outFile <<
"\\setbeamercolor*{author in head/foot}{parent=palette tertiary}" << endl;
494 outFile <<
"\\setbeamercolor*{title in head/foot}{parent=palette secondary}" << endl;
495 outFile <<
"\\setbeamercolor*{date in head/foot}{parent=palette primary}" << endl;
498 outFile <<
"\\newcommand{\\changeFootline}[1]{" << endl;
499 outFile <<
" \\setbeamertemplate{footline}{" << endl;
500 outFile <<
" \\hbox{%" << endl;
501 outFile <<
" \\begin{beamercolorbox}[wd=.2\\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%" << endl;
502 outFile <<
" \\insertshortauthor%~~(\\insertshortinstitute)" << endl;
503 outFile <<
" \\end{beamercolorbox}%" << endl;
504 outFile <<
" \\begin{beamercolorbox}[wd=.6\\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%" << endl;
505 outFile <<
" \\hypersetup{hidelinks}%" << endl;
506 outFile <<
" \\insertshorttitle" << endl;
507 outFile <<
" \\hspace*{2em}\\insertshortdate{}" << endl;
508 outFile <<
" \\end{beamercolorbox}%" << endl;
509 outFile <<
" \\begin{beamercolorbox}[wd=.2\\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%" << endl;
510 outFile <<
" #1\\hspace*{2ex}" << endl;
511 outFile <<
" \\end{beamercolorbox}}%" << endl;
512 outFile <<
" }}" << endl;
513 outFile <<
"\\changeFootline{\\insertframenumber / \\inserttotalframenumber}" << endl;
514 outFile <<
"\\setbeamertemplate{headline}{}" << endl;
517 outFile <<
"\\newcommand{\\badForPassColor}{magenta!50!white}" << endl;
518 outFile <<
"\\newcommand{\\errorColor}{red!50!white}" << endl;
520 outFile <<
"\\newcommand{\\notInLogColor}{black!20!white}" << endl;
521 outFile <<
"\\newcommand{\\pendingColor}{yellow!50!white}" << endl;
522 outFile <<
"\\newcommand{\\warningColor}{orange!50!white}" << endl;
523 outFile <<
"\\newcommand{\\colorLegend}{" << endl;
525 outFile <<
" \\multicolumn{2}{|l|}{\\colorbox{\\notInLogColor}{~~} = non-selected from e-logbook}\\\\" << endl;
526 outFile <<
" \\multicolumn{2}{|l|}{\\colorbox{\\pendingColor}{~~} = pending statement}\\\\" << endl;
527 outFile <<
" \\multicolumn{2}{|l|}{\\colorbox{\\warningColor}{~~} = possible problem}\\\\" << endl;
528 outFile <<
" \\multicolumn{2}{|l|}{\\colorbox{\\errorColor}{~~} = problem spotted}\\\\" << endl;
529 outFile <<
" \\multicolumn{2}{|l|}{\\colorbox{\\badForPassColor}{~~} = bad for this pass}\\\\}" << endl;
530 outFile <<
"\\newcommand{\\runTab}[3][white]{\\cellcolor{#1} #2 & \\cellcolor{#1} #3\\\\}" << endl;
532 outFile <<
"\\newcommand{\\pik}{\\ensuremath{\\pi\\mathrm{/K}}}" << endl;
533 outFile <<
"\\newcommand{\\mum}{\\mbox{$\\mu {\\rm m}$}}" << endl;
534 outFile <<
"\\newcommand{\\mom}{\\mbox{GeV$\\kern-0.15em /\\kern-0.12em c$}}" << endl;
535 outFile <<
"\\newcommand{\\pt}{\\ensuremath{p_{\\mathrm{T}}}}" << endl;
536 outFile <<
"\\newcommand{\\dd}{\\text{d}}" << endl;
537 outFile <<
"\\newcommand{\\raa}{\\ensuremath{R_{AA}}}" << endl;
538 outFile <<
"\\newcommand{\\un}[1]{\\protect\\detokenize{#1}}" << endl;
545 if ( ! outFile.is_open() )
return;
547 Bool_t previousIsLetter = kFALSE;
548 for (
Int_t ichar=0; ichar<authors.Length(); ichar++ ) {
549 TString currChar = authors[ichar];
551 Int_t currentIsLetter = currChar.IsAlpha();
552 if ( currentIsLetter && ! previousIsLetter ) authorsShort += currChar +
".";
553 if ( currChar ==
"," ) authorsShort +=
",";
554 previousIsLetter = currentIsLetter;
557 outFile <<
"\\title{Muon QA: " << period.Data() <<
" " << pass.Data() <<
"}" << endl;
558 outFile <<
"\\author[" << authorsShort.Data() <<
"]{" << authors.Data() <<
"}" << endl;
559 outFile <<
"\\date{\\today}" << endl;
561 outFile <<
"\\begin{document}" << endl;
562 outFile <<
"\\setlength{\\TPHorizModule}{1bp}" << endl;
563 outFile <<
"\\setlength{\\TPVertModule}{1bp}" << endl;
564 outFile <<
"\\textblockorigin{0bp}{0bp}" << endl;
567 outFile <<
"\\begin{frame}[plain]" << endl;
568 outFile <<
" \\titlepage" << endl;
569 outFile <<
"\\end{frame}" << endl;
575 if ( ! outFile.is_open() )
return;
576 outFile <<
"\\end{document}" << endl;
583 if ( ! outFile.is_open() )
return;
584 outFile <<
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
585 outFile <<
"\\appendix" << endl;
586 outFile <<
"\\renewcommand{\\theframenumber}{A.\\arabic{framenumber}}" << endl;
587 outFile <<
"\\changeFootline{\\theframenumber}" << endl;
588 outFile <<
"\\begin{frame}[plain]" << endl;
589 outFile <<
" \\title{Backup slides}\\author{}\\date{}\\institute{}\\subtitle{}" << endl;
590 outFile <<
" \\titlepage" << endl;
591 outFile <<
"\\end{frame}" << endl;
599 ofstream outFile(outFilename);
600 for (
Int_t irun=0; irun<runListArr->GetEntries(); irun++ ) {
601 outFile << static_cast<TObjString*>(runListArr->At(irun))->GetString().Atoi() << endl;
612 TString backupFile = texFilename;
613 backupFile.Append(
".backup");
614 printf(
"Copying existing file into %s\n",backupFile.Data());
615 TFile::Cp(texFilename.Data(),backupFile);
616 ofstream outFile(texFilename.Data(),std::ofstream::out | std::ofstream::trunc);
617 ifstream inFile(backupFile.Data());
618 TString currLine =
"", frameTitle =
"";
620 while ( ! inFile.eof() ) {
621 currLine.ReadLine(inFile,kFALSE);
623 if ( currLine.IsNull() ) {
625 if ( nBlanks > 2 )
continue;
628 if ( currLine ==
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" ) {
629 frameTitle.ReadLine(inFile,kFALSE);
630 currLine += Form(
"\n%s",frameTitle.Data());
631 frameTitle.ReadLine(inFile,kFALSE);
632 currLine += Form(
"\n%s",frameTitle.Data());
633 if ( frameTitle.Contains(
"frametitle") && frameTitle.Contains(
"Run summary") ) {
635 while ( currLine !=
"\\end{frame}" ) {
636 currLine.ReadLine(inFile);
641 else if ( currLine.Contains(
"%TriggerList=") ) {
643 triggers.Remove(0,triggers.Index(
"=")+1);
644 trigList = triggers.Tokenize(
",");
646 outFile << currLine.Data() << endl;
657 TString fileNames[2] = {trackerQA,triggerQA};
658 for (
Int_t ifile=0; ifile<2; ifile++ ) {
659 if (
gSystem->AccessPathName(fileNames[ifile].Data()) ) {
660 printf(
"Fatal: cannot open %s\n",fileNames[ifile].
Data());
667 if (
gSystem->AccessPathName(texFilename.Data()) == 0 ) {
668 printf(
"Output file %s already exists: updating it\n", texFilename.Data());
675 trigList = triggerList.Tokenize(
",");
677 outFile.open(texFilename);
678 outFile <<
"% !TEX pdfSinglePage" << endl;
679 outFile <<
"%TriggerList=" << triggerList.Data() << endl;
688 MakeSingleFigureSlide(
"L2AQAoverSCALERS",triggerQA,
"Reconstruction: reconstructed triggers in QA wrt L2A from OCDB scalers",outFile);
694 for (
Int_t itrig=0; itrig<trigList->GetEntries(); itrig++ ) {
695 TString currTrig = trigList->At(itrig)->GetName();
697 MakeSingleFigureSlide(Form(
"RatioTrackTypes_cent0trigger%s",currTrig.Data()),trackerQA,Form(
"Muon tracks / event in %s events",shortTrig.Data()),outFile);
698 MakeSingleFigureSlide(Form(
"RatioTrackTypes_cent3trigger%s",currTrig.Data()),trackerQA,Form(
"Muon tracks / event in %s events (central collisions)",shortTrig.Data()),outFile,
"",kFALSE);
699 MakeSingleFigureSlide(Form(
"TrackMult_cent0trigger%s",currTrig.Data()),trackerQA,Form(
"Muon tracker-trigger tracks / event in %s events",shortTrig.Data()),outFile);
700 MakeSingleFigureSlide(Form(
"AsymMatchedtrigger%s",currTrig.Data()),trackerQA,Form(
"Charge asymmetry in %s events",shortTrig.Data()),outFile);
701 MakeSingleFigureSlide(Form(
"BeamGasMatchedtrigger%s",currTrig.Data()),trackerQA,Form(
"Rel. num. of beam-gas tracks (id. by p$\\times$DCA cuts) in %s events",shortTrig.Data()),outFile,currTrig);
703 MakeSingleFigureSlide(
"cNClusters",trackerQA,
"Average number of clusters per track and dispersion",outFile);
MakeSingleFigureSlide(
"cNClustersPerCh",trackerQA,
"Average number of clusters per chamber",outFile,
"",
"clustersPerChamber");
707 MakeSingleFigureSlide(
"cClusterHitMapPerCh",trackerQA,
"Average cluster position per chamber",outFile,
"",
"clustersPosition");
717 if ( outFile.is_open() ) {
719 outFile <<
"MUON Trigger" << endl;
722 outFile <<
"MUON tracker" << endl;
731 if ( ! outRunList.IsNull() )
WriteRunList(trackerQA, outRunList);
void BeginSlides(TString period, TString pass, TString authors, ofstream &outFile)
Bool_t MakeTriggerSlide(TString filename, ofstream &outFile)
void MakeDefaultItem(ofstream &outFile, TString defaultItem="")
Bool_t MakeSingleFigureSlide(TString objName, TString filename, TString title, ofstream &outFile, TString label="", Bool_t warnIfMissing=kTRUE, Bool_t closePdf=kFALSE)
void WriteRunList(TString trackerQA, TString outFilename="runListQA.txt")
TObjArray * UpdateExisting(TString texFilename, TString trackerQA, TString evsQA)
Bool_t MakeTriggerRPCslide(TString filename, ofstream &outFile, Bool_t outliers=kFALSE)
Bool_t MakeTriggerRPCslides(TString filename, ofstream &outFile, Bool_t fromTrackerTrack=kFALSE)
Bool_t PrintToPdf(TString objName, TString filename, Bool_t closeFile, Bool_t warnIfMissing)
std::map< Int_t, std::vector< Double_t > > GetRunInfo(TString evsQA)
void MakePreamble(ofstream &outFile)
void EscapeSpecialChars(TString &str)
void EndSlides(ofstream &outFile)
void BeginFrame(TString title, ofstream &outFile, TString label="")
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
TObjArray * GetRunList(TString filename)
void MakeSlides(TString period, TString pass, TString triggerList, TString authors, TString trackerQA="QA_muon_tracker.root", TString triggerQA="QA_muon_trigger.root", TString evsQA="trending_evs.root", TString texFilename="muonQA.tex", TString outRunList="")
void EndFrame(ofstream &outFile)
void MakeSummary(TString period, ofstream &outFile)
TFile * file
TList with histograms for a given trigger.
void StartAppendix(ofstream &outFile)
void MakeRunSummary(ofstream &outFile, TString trackerQA, TString evsQA="", ifstream *inFile=0x0)
TString GetTriggerShort(TString trigName)