1 #include "BEMCPlotsPresenter.h"
13 #include <TObjArray.h>
15 #include <StMessMgr.h>
16 #include <GenericFile.h>
18 #include <StEmcUtil/database/StEmcDecoder.h>
20 #include "BEMCPlotsNames.h"
21 #include "StRoot/StEmcPool/StBEMCPlots/BemcTwMask.h"
23 #define min(A, B) (((A) < (B)) ? (A) : (B))
24 #define max(A, B) (((A) > (B)) ? (A) : (B))
26 TObjArray *BEMCPlotsCleanUp =
new TObjArray();
28 Bool_t useDecoderForBoundaries =
false;
31 TH1 *GetHisto(
FileType &fd,
const char *name) {
33 hist = fd.file() ? (TH1 *)fd.Get(name, 0) : 0;
35 hist->SetDirectory(0);
36 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(hist);
41 #define FIND_HISTO(TYPE, NAME, FILE, TITLE) \
42 TYPE *NAME = (TYPE*)GetHisto((FILE), (TITLE)); \
44 LOG_ERROR << "Histogram " << #NAME << " not found: " << (TITLE) << endm; \
48 void BEMCPlotsPresenter::displayStatus(
FileType file, TPad *pad,
int mDebug) {
49 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
55 FIND_HISTO(TH2F, Hist_TDC_status, file, Hist_TDC_statusName);
56 FIND_HISTO(TH2F, Hist_SMD_status, file, Hist_SMD_statusName);
57 FIND_HISTO(TH2F, Hist_PSD_status, file, Hist_PSD_statusName);
58 FIND_HISTO(TH1F, Hist_BTOW_Corruption, file, Hist_BTOW_CorruptionName);
60 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
63 c->Divide(2, 2, 0.001, 0.001);
66 if (Hist_TDC_status) {
67 Hist_TDC_status->Draw(
"H COLZ");
70 if (Hist_SMD_status) {
71 Hist_SMD_status->Draw(
"H COLZ");
74 if (Hist_PSD_status) {
75 Hist_PSD_status->Draw(
"H COLZ");
78 if (Hist_BTOW_Corruption) {
79 Hist_BTOW_Corruption->Draw(
"H COLZ");
82 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
86 void BEMCPlotsPresenter::displayTowers(
FileType file, TPad *pad,
int mDebug) {
87 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
93 FIND_HISTO(TH2F, Hist_btow_spectra_1, file, Hist_btow_spectra_1Name);
94 FIND_HISTO(TH2F, Hist_btow_spectra_2, file, Hist_btow_spectra_2Name);
95 FIND_HISTO(TH2F, Hist_btow_spectra_3, file, Hist_btow_spectra_3Name);
97 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
100 c->Divide(1, 3, 0.001, 0.001);
103 if (Hist_btow_spectra_1) {
104 Hist_btow_spectra_1->Draw(
"H COLZ");
107 if (Hist_btow_spectra_2) {
108 Hist_btow_spectra_2->Draw(
"H COLZ");
111 if (Hist_btow_spectra_3) {
112 Hist_btow_spectra_3->Draw(
"H COLZ");
115 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
119 void BEMCPlotsPresenter::displaySMDPSD(
FileType file, TPad *pad,
int mDebug) {
120 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
126 FIND_HISTO(TH1F, Hist_smd_spectra, file, Hist_smd_spectraName);
127 FIND_HISTO(TH1F, Hist_smd_spectraNonZS, file, Hist_smd_spectraNonZSName);
128 FIND_HISTO(TH2F, Hist_smd_capacitor, file, Hist_smd_capacitorName);
129 FIND_HISTO(TH2F, Hist_smd_sum, file, Hist_smd_sumName);
130 FIND_HISTO(TH1F, Hist_psd_spectra, file, Hist_psd_spectraName);
131 FIND_HISTO(TH1F, Hist_psd_spectraNonZS, file, Hist_psd_spectraNonZSName);
132 FIND_HISTO(TH2F, Hist_psd_capacitor, file, Hist_psd_capacitorName);
133 FIND_HISTO(TH2F, Hist_psd_sum, file, Hist_psd_sumName);
135 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
138 c->Divide(2, 3, 0.001, 0.001);
141 if (Hist_smd_spectra) {
142 Hist_smd_spectra->Draw(
"H COLZ");
144 if (Hist_smd_spectraNonZS) {
145 Hist_smd_spectraNonZS->SetLineColor(kRed);
146 Hist_smd_spectraNonZS->Draw(
"SAME H COLZ");
149 if (Hist_psd_spectra) {
150 Hist_psd_spectra->Draw(
"H COLZ");
152 if (Hist_psd_spectraNonZS) {
153 Hist_psd_spectraNonZS->SetLineColor(kRed);
154 Hist_psd_spectraNonZS->Draw(
"SAME H COLZ");
157 if (Hist_smd_capacitor) {
158 Hist_smd_capacitor->Draw(
"H COLZ");
161 if (Hist_psd_capacitor) {
162 Hist_psd_capacitor->Draw(
"H COLZ");
166 Hist_smd_sum->Draw(
"H COLZ");
170 Hist_psd_sum->Draw(
"H COLZ");
173 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
177 void BEMCPlotsPresenter::displayTrigger(
FileType file, TPad *pad,
int mDebug) {
178 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
184 FIND_HISTO(TH2F, Hist_HTMAX_spectra, file, Hist_HTMAX_spectraName);
185 FIND_HISTO(TH2F, Hist_PAMAX_spectra, file, Hist_PAMAX_spectraName);
186 FIND_HISTO(TH1F, Hist_HTMAX_dist, file, Hist_HTMAX_distName);
187 FIND_HISTO(TH1F, Hist_PAMAX_dist, file, Hist_PAMAX_distName);
189 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
192 c->Divide(2, 2, 0.001, 0.001);
195 if (Hist_HTMAX_spectra) {
196 Hist_HTMAX_spectra->Draw(
"H COLZ");
199 if (Hist_PAMAX_spectra) {
200 Hist_PAMAX_spectra->Draw(
"H COLZ");
203 if (Hist_HTMAX_dist) {
204 Hist_HTMAX_dist->Draw(
"H COLZ");
207 if (Hist_PAMAX_dist) {
208 Hist_PAMAX_dist->Draw(
"H COLZ");
211 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
215 void BEMCPlotsPresenter::displayJet(
FileType file, TPad *pad,
int mDebug) {
216 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
222 FIND_HISTO(TH2F, Hist_JET_ped, file, Hist_JET_pedName);
223 FIND_HISTO(TH2F, Hist_JET_spectra, file, Hist_JET_spectraName);
224 FIND_HISTO(TH2F, Hist_JETMAX_spectra, file, Hist_JETMAX_spectraName);
225 FIND_HISTO(TH1F, Hist_JETMAX_dist, file, Hist_JETMAX_distName);
227 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
230 c->Divide(2, 2, 0.001, 0.001);
234 Hist_JET_ped->Draw(
"H COLZ");
237 if (Hist_JET_spectra) {
238 Hist_JET_spectra->Draw(
"H COLZ");
241 if (Hist_JETMAX_spectra) {
242 Hist_JETMAX_spectra->Draw(
"H COLZ");
245 if (Hist_JETMAX_dist) {
246 Hist_JETMAX_dist->Draw(
"H COLZ");
249 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
253 void BEMCPlotsPresenter::displayRawAdc(
FileType file, TPad *pad,
bool psd,
bool zoom,
BemcTwMask *twMask, Int_t mDebug) {
254 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
256 FIND_HISTO(TH2F, HistRawAdc1, file, psd ? HistRawAdcPsd1Name : (zoom ? HistRawAdc1NameZoom : HistRawAdc1Name));
257 FIND_HISTO(TH2F, HistRawAdc2, file, psd ? HistRawAdcPsd2Name : (zoom ? HistRawAdc2NameZoom : HistRawAdc2Name));
258 FIND_HISTO(TH2F, HistRawAdc3, file, psd ? HistRawAdcPsd3Name : (zoom ? HistRawAdc3NameZoom : HistRawAdc3Name));
259 FIND_HISTO(TH2F, HistRawAdc4, file, psd ? HistRawAdcPsd4Name : (zoom ? HistRawAdc4NameZoom : HistRawAdc4Name));
265 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
268 c->Divide(1, 4, 0.001, 0.001);
271 Int_t linesColor = 16;
272 Int_t crateMinSoftId[] = {4661, 2421, 2581, 2741, 2901, 3061, 3221, 3381, 3541, 3701, 3861, 4021, 4181, 4341, 4501, 2181, 2021, 1861, 1701, 1541, 1381, 1221, 1061, 901, 741, 581, 421, 261, 101, 1};
273 Int_t crateMaxSoftId[] = {4800, 2580, 2740, 2900, 3060, 3220, 3380, 3540, 3700, 3860, 4020, 4180, 4340, 4500, 4660, 2340, 2180, 2020, 1860, 1700, 1540, 1380, 1220, 1060, 900, 740, 580, 420, 260, 100};
274 Int_t pmtbxMinSoftId[] = {2261, 2181, 2101, 2021, 1941, 1861, 1781, 1701, 1621, 1541, 1461, 1381, 1301, 1221, 1141, 1061, 981, 901, 821, 741, 661, 581, 501, 421, 341, 261, 181, 101, 21, 2341,
275 4661, 4741, 2421, 2501, 2581, 2661, 2741, 2821, 2901, 2981, 3061, 3141, 3221, 3301, 3381, 3461, 3541, 3621, 3701, 3781, 3861, 3941, 4021, 4101, 4181, 4261, 4341, 4421, 4501, 4581
278 Int_t pmtbxMaxSoftId[] = {2340, 2260, 2180, 2100, 2020, 1940, 1860, 1780, 1700, 1620, 1540, 1460, 1380, 1300, 1220, 1140, 1060, 980, 900, 820, 740, 660, 580, 500, 420, 340, 260, 180, 100, 2400,
279 4740, 4800, 2500, 2580, 2660, 2740, 2820, 2900, 2980, 3060, 3140, 3220, 3300, 3380, 3460, 3540, 3620, 3700, 3780, 3860, 3940, 4020, 4100, 4180, 4260, 4340, 4420, 4500, 4580, 4660
282 if (useDecoderForBoundaries && BEMCDecoderPresenter) {
283 for (Int_t crate = 0;crate < 30;crate++) {
284 crateMinSoftId[crate] = 4800;
285 crateMaxSoftId[crate] = 1;
287 for (Int_t crate = 0;crate < 30;crate++) {
288 if (BEMCDecoderPresenter) {
289 for (Int_t crateSeq = 0;crateSeq < 160;crateSeq++) {
292 if (softId < crateMinSoftId[crate]) crateMinSoftId[crate] = softId;
293 if (softId > crateMaxSoftId[crate]) crateMaxSoftId[crate] = softId;
302 Int_t *boxMinSoftId = psd ? pmtbxMinSoftId : crateMinSoftId;
303 Int_t *boxMaxSoftId = psd ? pmtbxMaxSoftId : crateMaxSoftId;
304 const Char_t *boxLabelFormat = psd ?
"%i" :
"0x%.2X";
305 Int_t numBoxes = psd ? (
sizeof(pmtbxMinSoftId)/
sizeof(pmtbxMinSoftId[0])) : (
sizeof(crateMinSoftId)/
sizeof(crateMinSoftId[0]));
309 HistRawAdc1->SetStats(0);
310 HistRawAdc1->Draw(
"COLZ");
312 TGraph &g1 = twMask->crG[0];
326 for (Int_t crate = 0;crate < numBoxes;crate++) {
327 if (!((boxMaxSoftId[crate] < HistRawAdc1->GetXaxis()->GetBinLowEdge(1))
328 || (boxMinSoftId[crate] > HistRawAdc1->GetXaxis()->GetBinUpEdge(HistRawAdc1->GetXaxis()->GetNbins())))
330 Float_t left = max(boxMinSoftId[crate], HistRawAdc1->GetXaxis()->GetBinCenter(1)) - 0.5;
331 Float_t right = 0.5 + min(boxMaxSoftId[crate], HistRawAdc1->GetXaxis()->GetBinCenter(HistRawAdc1->GetXaxis()->GetNbins()));
332 TLine *lCrates =
new TLine(left, HistRawAdc1->GetYaxis()->GetBinLowEdge(1), left, HistRawAdc1->GetYaxis()->GetBinUpEdge(HistRawAdc1->GetYaxis()->GetNbins()));
334 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lCrates);
335 lCrates->SetLineColor(linesColor);
336 lCrates->SetLineWidth(1);
339 TLine *rCrates =
new TLine(right, HistRawAdc1->GetYaxis()->GetBinLowEdge(1), right, HistRawAdc1->GetYaxis()->GetBinUpEdge(HistRawAdc1->GetYaxis()->GetNbins()));
341 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(rCrates);
342 rCrates->SetLineColor(linesColor);
343 rCrates->SetLineWidth(1);
347 crateLabel = Form(boxLabelFormat, crate + 1);
348 TLatex *textCrate =
new TLatex(left + 10, HistRawAdc1->GetYaxis()->GetBinUpEdge(HistRawAdc1->GetYaxis()->GetNbins()) * 0.8, crateLabel.Data());
350 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textCrate);
351 textCrate->SetTextColor(linesColor);
352 textCrate->SetTextSize(0.14);
360 HistRawAdc2->SetStats(0);
361 HistRawAdc2->Draw(
"COLZ");
363 TGraph &g2 = twMask->crG[1];
369 for (Int_t crate = 0;crate < numBoxes;crate++) {
370 if (!((boxMaxSoftId[crate] < HistRawAdc2->GetXaxis()->GetBinLowEdge(1))
371 || (boxMinSoftId[crate] > HistRawAdc2->GetXaxis()->GetBinUpEdge(HistRawAdc2->GetXaxis()->GetNbins())))
373 Float_t left = max(boxMinSoftId[crate], HistRawAdc2->GetXaxis()->GetBinCenter(1)) - 0.5;
374 Float_t right = 0.5 + min(boxMaxSoftId[crate], HistRawAdc2->GetXaxis()->GetBinCenter(HistRawAdc2->GetXaxis()->GetNbins()));
375 TLine *lCrates =
new TLine(left, HistRawAdc2->GetYaxis()->GetBinLowEdge(1), left, HistRawAdc2->GetYaxis()->GetBinUpEdge(HistRawAdc2->GetYaxis()->GetNbins()));
377 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lCrates);
378 lCrates->SetLineColor(linesColor);
379 lCrates->SetLineWidth(1);
382 TLine *rCrates =
new TLine(right, HistRawAdc2->GetYaxis()->GetBinLowEdge(1), right, HistRawAdc2->GetYaxis()->GetBinUpEdge(HistRawAdc2->GetYaxis()->GetNbins()));
384 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(rCrates);
385 rCrates->SetLineColor(linesColor);
386 rCrates->SetLineWidth(1);
390 crateLabel = Form(boxLabelFormat, crate + 1);
391 TLatex *textCrate =
new TLatex(left + 10, HistRawAdc2->GetYaxis()->GetBinUpEdge(HistRawAdc2->GetYaxis()->GetNbins()) * 0.8, crateLabel.Data());
393 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textCrate);
394 textCrate->SetTextColor(linesColor);
395 textCrate->SetTextSize(0.14);
404 HistRawAdc3->SetStats(0);
405 HistRawAdc3->Draw(
"COLZ");
407 TGraph &g3 = twMask->crG[2];
413 for (Int_t crate = 0;crate < numBoxes;crate++) {
414 if (!((boxMaxSoftId[crate] < HistRawAdc3->GetXaxis()->GetBinLowEdge(1))
415 || (boxMinSoftId[crate] > HistRawAdc3->GetXaxis()->GetBinUpEdge(HistRawAdc3->GetXaxis()->GetNbins())))
417 Float_t left = max(boxMinSoftId[crate], HistRawAdc3->GetXaxis()->GetBinCenter(1)) - 0.5;
418 Float_t right = 0.5 + min(boxMaxSoftId[crate], HistRawAdc3->GetXaxis()->GetBinCenter(HistRawAdc3->GetXaxis()->GetNbins()));
419 TLine *lCrates =
new TLine(left, HistRawAdc3->GetYaxis()->GetBinLowEdge(1), left, HistRawAdc3->GetYaxis()->GetBinUpEdge(HistRawAdc3->GetYaxis()->GetNbins()));
421 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lCrates);
422 lCrates->SetLineColor(linesColor);
423 lCrates->SetLineWidth(1);
426 TLine *rCrates =
new TLine(right, HistRawAdc3->GetYaxis()->GetBinLowEdge(1), right, HistRawAdc3->GetYaxis()->GetBinUpEdge(HistRawAdc3->GetYaxis()->GetNbins()));
428 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(rCrates);
429 rCrates->SetLineColor(linesColor);
430 rCrates->SetLineWidth(1);
434 crateLabel = Form(boxLabelFormat, crate + 1);
435 TLatex *textCrate =
new TLatex(left + 10, HistRawAdc3->GetYaxis()->GetBinUpEdge(HistRawAdc3->GetYaxis()->GetNbins()) * 0.8, crateLabel.Data());
437 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textCrate);
438 textCrate->SetTextColor(linesColor);
439 textCrate->SetTextSize(0.14);
448 HistRawAdc4->SetStats(0);
449 HistRawAdc4->Draw(
"COLZ");
451 TGraph &g4 = twMask->crG[3];
458 for (Int_t crate = 0;crate < numBoxes;crate++) {
459 if (!((boxMaxSoftId[crate] < HistRawAdc4->GetXaxis()->GetBinLowEdge(1))
460 || (boxMinSoftId[crate] > HistRawAdc4->GetXaxis()->GetBinUpEdge(HistRawAdc4->GetXaxis()->GetNbins())))
462 Float_t left = max(boxMinSoftId[crate], HistRawAdc4->GetXaxis()->GetBinCenter(1)) - 0.5;
463 Float_t right = 0.5 + min(boxMaxSoftId[crate], HistRawAdc4->GetXaxis()->GetBinCenter(HistRawAdc4->GetXaxis()->GetNbins()));
464 TLine *lCrates =
new TLine(left, HistRawAdc4->GetYaxis()->GetBinLowEdge(1), left, HistRawAdc4->GetYaxis()->GetBinUpEdge(HistRawAdc4->GetYaxis()->GetNbins()));
466 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lCrates);
467 lCrates->SetLineColor(linesColor);
468 lCrates->SetLineWidth(1);
471 TLine *rCrates =
new TLine(right, HistRawAdc4->GetYaxis()->GetBinLowEdge(1), right, HistRawAdc4->GetYaxis()->GetBinUpEdge(HistRawAdc4->GetYaxis()->GetNbins()));
473 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(rCrates);
474 rCrates->SetLineColor(linesColor);
475 rCrates->SetLineWidth(1);
479 crateLabel = Form(boxLabelFormat, crate + 1);
480 TLatex *textCrate =
new TLatex(left + 10, HistRawAdc4->GetYaxis()->GetBinUpEdge(HistRawAdc4->GetYaxis()->GetNbins()) * 0.8, crateLabel.Data());
482 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textCrate);
483 textCrate->SetTextColor(linesColor);
484 textCrate->SetTextSize(0.14);
493 void BEMCPlotsPresenter::displayJetPatchHT(
FileType file, TPad *pad, Int_t mDebug) {
494 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
500 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
503 c->Divide(3, 4, 0.001, 0.001);
505 for (Int_t jetPatch = 0;jetPatch < 12;jetPatch++) {
507 FIND_HISTO(TH1F, HistHighTowerSpectrum, file, Form(HistHighTowerSpectrumName
"_%u", jetPatch));
508 if (HistHighTowerSpectrum) {
509 HistHighTowerSpectrum->SetStats(0);
510 HistHighTowerSpectrum->Draw();
511 if (HistHighTowerSpectrum->GetEntries()) gPad->SetLogy();
516 void BEMCPlotsPresenter::displayJetPatchSum(
FileType file, TPad *pad, Int_t mDebug) {
517 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
523 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
526 c->Divide(3, 4, 0.001, 0.001);
528 for (Int_t jetPatch = 0;jetPatch < 12;jetPatch++) {
530 FIND_HISTO(TH1F, HistPatchSumSpectrum, file, Form(HistPatchSumSpectrumName
"_%u", jetPatch));
531 if (HistPatchSumSpectrum) {
532 HistPatchSumSpectrum->SetStats(0);
533 HistPatchSumSpectrum->Draw();
534 if (HistPatchSumSpectrum->GetEntries()) gPad->SetLogy();
539 void BEMCPlotsPresenter::displayL0Input(
FileType file, TPad *pad, Int_t mDebug) {
540 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
542 FIND_HISTO(TH2F, HistDsmL0InputHighTower, file, HistDsmL0InputHighTowerName);
543 FIND_HISTO(TH2F, HistDsmL0InputPatchSum, file, HistDsmL0InputPatchSumName);
549 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
552 c->Divide(1, 2, 0.001, 0.001);
555 Int_t linesColor = 16;
557 if (HistDsmL0InputHighTower && BEMCDecoderPresenter) {
558 HistDsmL0InputHighTower->SetStats(0);
559 HistDsmL0InputHighTower->Draw(
"COLZ");
560 TLine *lCrates =
new TLine(0, 50, 300, 50);
562 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lCrates);
563 lCrates->SetLineColor(linesColor);
564 lCrates->SetLineWidth(1);
567 TLatex *textCrates =
new TLatex(1, 50,
"BTOW Crates:");
569 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textCrates);
570 textCrates->SetTextColor(linesColor);
571 textCrates->SetTextSize(0.0333);
574 for (Int_t icrate = 1;icrate <= 30;icrate++) {
575 Int_t triggerPatchBegin, triggerPatchEnd;
577 TLine *lCrateBegin =
new TLine(triggerPatchBegin-0.5, 0, triggerPatchBegin-0.5, 50);
579 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lCrateBegin);
580 lCrateBegin->SetLineColor(linesColor);
581 lCrateBegin->SetLineWidth(1);
585 crateLabel = Form(
"%.2X", icrate);
586 TLatex *textCrate =
new TLatex(triggerPatchBegin + 1, 45, crateLabel.Data());
588 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textCrate);
589 textCrate->SetTextColor(linesColor);
590 textCrate->SetTextSize(0.0333);
595 for (Int_t ijp = 0;ijp < 12;ijp++) {
596 Int_t maxTriggerPatch = 0;
597 Int_t minTriggerPatch = 300;
598 for (Int_t j = 0;j < 25;j++) {
601 if (maxTriggerPatch < triggerPatch) maxTriggerPatch = triggerPatch;
602 if (minTriggerPatch > triggerPatch) minTriggerPatch = triggerPatch;
606 Int_t height = (ijp%2) ? 55 : 60;
607 TArrow *arrow =
new TArrow(minTriggerPatch-0.5, height, maxTriggerPatch-0.5, height, 0.02,
"<>");
609 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(arrow);
610 arrow->SetLineColor(linesColor);
611 arrow->SetFillColor(linesColor);
615 jpLabel = Form(
"JetPatch %u", ijp);
616 TLatex *text =
new TLatex(minTriggerPatch + 1, height + 1, jpLabel.Data());
618 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(text);
619 text->SetTextColor(linesColor);
620 text->SetTextSize(0.0333);
626 if (HistDsmL0InputPatchSum) {
627 HistDsmL0InputPatchSum->SetStats(0);
628 HistDsmL0InputPatchSum->Draw(
"COLZ");
629 for (Int_t icrate = 1;icrate <= 30;icrate++) {
630 Int_t triggerPatchBegin, triggerPatchEnd;
632 TLine *lCrateBegin =
new TLine(triggerPatchBegin-0.5, 0, triggerPatchBegin-0.5, 64);
634 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lCrateBegin);
635 lCrateBegin->SetLineColor(linesColor);
636 lCrateBegin->SetLineWidth(1);
640 crateLabel = Form(
"%.2X", icrate);
641 TLatex *textCrate =
new TLatex(triggerPatchBegin + 1, 60, crateLabel.Data());
643 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textCrate);
644 textCrate->SetTextColor(linesColor);
645 textCrate->SetTextSize(0.0333);
651 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
654 void BEMCPlotsPresenter::displayL1Input(
FileType file, TPad *pad, Int_t mDebug) {
655 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
657 FIND_HISTO(TH2F, HistDsmL1InputHighTowerBits, file, HistDsmL1InputHighTowerBitsName);
658 FIND_HISTO(TH2F, HistDsmL1InputPatchSum, file, HistDsmL1InputPatchSumName);
664 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
667 c->Divide(1, 2, 0.001, 0.001);
670 Int_t linesColor = 16;
672 if (HistDsmL1InputHighTowerBits) {
673 HistDsmL1InputHighTowerBits->SetStats(0);
674 HistDsmL1InputHighTowerBits->Draw(
"COLZ");
675 HistDsmL1InputHighTowerBits->GetXaxis()->SetNdivisions(0,
false);
676 HistDsmL1InputHighTowerBits->GetYaxis()->SetNdivisions(0,
false);
677 TLatex *textHT0 =
new TLatex(-3.5, 0.5,
"HT < th0");
679 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT0);
680 textHT0->SetTextColor(linesColor);
681 textHT0->SetTextSize(0.0333);
684 TLatex *textHT1 =
new TLatex(-3.5, 1.5,
"th0 < HT < th1");
686 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT1);
687 textHT1->SetTextColor(linesColor);
688 textHT1->SetTextSize(0.0333);
691 TLatex *textHT2 =
new TLatex(-3.5, 2.5,
"th1 < HT < th2");
693 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT2);
694 textHT2->SetTextColor(linesColor);
695 textHT2->SetTextSize(0.0333);
698 TLatex *textHT3 =
new TLatex(-3.5, 3.5,
"th2 < HT");
700 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT3);
701 textHT3->SetTextColor(linesColor);
702 textHT3->SetTextSize(0.0333);
705 TLatex *textDsmsL0 =
new TLatex(-3.5, 4.0,
"#splitline{#splitline{DSM Level-0}{Boards}}{BTOW Crates}");
707 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textDsmsL0);
708 textDsmsL0->SetTextColor(linesColor);
709 textDsmsL0->SetTextSize(0.0333);
728 for (Int_t idsmL1 = 0;idsmL1 < 6;idsmL1++) {
729 for (Int_t idsmL1ch = 0;idsmL1ch < 6;idsmL1ch++) {
730 TLine *lDsmL0Begin =
new TLine(ch-0.5, 0, ch-0.5, 4.4);
732 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lDsmL0Begin);
733 lDsmL0Begin->SetLineColor(linesColor);
734 lDsmL0Begin->SetLineWidth(1);
738 Int_t crate = 0, crateSeq = 0;
739 if (BEMCDecoderPresenter) {
740 Int_t triggerPatch = dsmL0 * 10;
744 label = Form(
"#splitline{#splitline{BW}{0%.2u}}{%.2X}", (dsmL0 % 15) + 1, crate);
746 label = Form(
"#splitline{#splitline{BE}{0%.2u}}{%.2X}", (dsmL0 % 15) + 1, crate);
748 TLatex *text =
new TLatex(ch + 0.1-0.5, 4.0, label.Data());
750 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(text);
751 text->SetTextColor(linesColor);
752 text->SetTextSize(0.0333);
771 if (idsmL1ch != 2) dsmL0++;
774 for (Int_t ijp = 0;ijp < 12;ijp++) {
775 Int_t maxCh = (ijp * 3) + 3;
776 Int_t minCh = (ijp * 3) + 0;
777 Float_t height = (ijp%2) ? 4.7 : 4.7;
778 TArrow *arrow =
new TArrow(minCh-0.5, height, maxCh-0.5, height, 0.02,
"<>");
780 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(arrow);
781 arrow->SetLineColor(linesColor);
782 arrow->SetFillColor(linesColor);
786 jpLabel = Form(
"JetPatch %u", ijp);
787 TLatex *text =
new TLatex(minCh + 0.1-0.5, height + 0.1, jpLabel.Data());
789 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(text);
790 text->SetTextColor(linesColor);
791 text->SetTextSize(0.0333);
795 TLatex *textDsmsL1 =
new TLatex(-3.5, -0.4,
"#splitline{DSM Level-1}{Boards}");
797 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textDsmsL1);
798 textDsmsL1->SetTextColor(linesColor);
799 textDsmsL1->SetTextSize(0.0333);
802 for (Int_t idsmL1 = 0;idsmL1 < 6;idsmL1++) {
803 TArrow *arrow =
new TArrow((idsmL1 * 6)-0.5, -0.4, (idsmL1 * 6) + 6-0.5, -0.4, 0.02,
"<>");
805 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(arrow);
806 arrow->SetLineColor(linesColor);
807 arrow->SetFillColor(linesColor);
812 label = Form(
"BW1%.2u", (idsmL1 % 3) + 1);
814 label = Form(
"BE1%.2u", (idsmL1 % 3) + 1);
816 TLatex *text =
new TLatex((idsmL1 * 6) + 1-0.5, -0.35, label.Data());
818 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(text);
819 text->SetTextColor(linesColor);
820 text->SetTextSize(0.0333);
827 if (HistDsmL1InputPatchSum) {
828 HistDsmL1InputPatchSum->SetStats(0);
829 HistDsmL1InputPatchSum->Draw(
"COLZ");
832 for (Int_t idsmL1 = 0;idsmL1 < 6;idsmL1++) {
833 for (Int_t idsmL1ch = 0;idsmL1ch < 6;idsmL1ch++) {
834 TLine *lDsmL0Begin =
new TLine(ch-0.5, 0, ch-0.5, 1024);
836 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lDsmL0Begin);
837 lDsmL0Begin->SetLineColor(linesColor);
838 lDsmL0Begin->SetLineWidth(1);
841 Int_t crate = 0, crateSeq = 0;
842 if (BEMCDecoderPresenter) {
843 Int_t triggerPatch = dsmL0 * 10;
847 label = Form(
"%.2X", crate);
848 TLatex *text =
new TLatex(ch + 0.1-0.5, 900, label.Data());
850 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(text);
851 text->SetTextColor(linesColor);
852 text->SetTextSize(0.0333);
856 if (idsmL1ch != 2) dsmL0++;
860 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
863 void BEMCPlotsPresenter::displayL2Input(
FileType file, TPad *pad, Int_t mDebug) {
864 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
866 FIND_HISTO(TH2F, HistDsmL2InputHighTowerBits, file, HistDsmL2InputHighTowerBitsName);
867 FIND_HISTO(TH2F, HistDsmL2InputPatchSumBits, file, HistDsmL2InputPatchSumBitsName);
868 FIND_HISTO(TH2F, HistDsmL2InputPatchSum, file, HistDsmL2InputPatchSumName);
874 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
877 c->Divide(1, 3, 0.001, 0.001);
880 Int_t linesColor = 16;
883 if (HistDsmL2InputHighTowerBits) {
884 HistDsmL2InputHighTowerBits->SetStats(0);
885 HistDsmL2InputHighTowerBits->Draw(
"COLZ");
886 HistDsmL2InputHighTowerBits->GetXaxis()->SetNdivisions(12,
false);
887 HistDsmL2InputHighTowerBits->GetYaxis()->SetNdivisions(0,
false);
888 TLatex *textHT0 =
new TLatex(-1.4, 0.5,
"HT < th0");
890 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT0);
891 textHT0->SetTextColor(linesColor);
892 textHT0->SetTextSize(0.05);
895 TLatex *textHT1 =
new TLatex(-1.4, 1.5,
"th0 < HT < th1");
897 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT1);
898 textHT1->SetTextColor(linesColor);
899 textHT1->SetTextSize(0.05);
902 TLatex *textHT2 =
new TLatex(-1.4, 2.5,
"th1 < HT < th2");
904 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT2);
905 textHT2->SetTextColor(linesColor);
906 textHT2->SetTextSize(0.05);
909 TLatex *textHT3 =
new TLatex(-1.4, 3.5,
"th2 < HT");
911 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT3);
912 textHT3->SetTextColor(linesColor);
913 textHT3->SetTextSize(0.05);
916 TLatex *textDsmsL1 =
new TLatex(-1.4, 4.5,
"#splitline{DSM Level-1}{Boards}");
918 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textDsmsL1);
919 textDsmsL1->SetTextColor(linesColor);
920 textDsmsL1->SetTextSize(0.05);
923 for (Int_t ch = 0;ch < 12;ch += 2) {
924 TLine *lDsmL1Begin =
new TLine(ch-0.5, 0, ch-0.5, 5);
926 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lDsmL1Begin);
927 lDsmL1Begin->SetLineColor(linesColor);
928 lDsmL1Begin->SetLineWidth(1);
933 label = Form(
"BW1%.2u", ((ch / 2) % 3) + 1);
935 label = Form(
"BE1%.2u", ((ch / 2) % 3) + 1);
937 TLatex *text =
new TLatex(ch + 0.1-0.5, 4.5, label.Data());
939 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(text);
940 text->SetTextColor(linesColor);
941 text->SetTextSize(0.05);
948 if (HistDsmL2InputPatchSumBits) {
949 HistDsmL2InputPatchSumBits->SetStats(0);
950 HistDsmL2InputPatchSumBits->Draw(
"COLZ");
951 HistDsmL2InputPatchSumBits->GetXaxis()->SetNdivisions(12,
false);
952 HistDsmL2InputPatchSumBits->GetYaxis()->SetNdivisions(0,
false);
953 TLatex *textHT0 =
new TLatex(-1.4, 0.5,
"Sum < th0");
955 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT0);
956 textHT0->SetTextColor(linesColor);
957 textHT0->SetTextSize(0.05);
960 TLatex *textHT1 =
new TLatex(-1.4, 1.5,
"th0 < Sum < th1");
962 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT1);
963 textHT1->SetTextColor(linesColor);
964 textHT1->SetTextSize(0.05);
967 TLatex *textHT2 =
new TLatex(-1.4, 2.5,
"th1 < Sum < th2");
969 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT2);
970 textHT2->SetTextColor(linesColor);
971 textHT2->SetTextSize(0.05);
974 TLatex *textHT3 =
new TLatex(-1.4, 3.5,
"th2 < Sum");
976 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(textHT3);
977 textHT3->SetTextColor(linesColor);
978 textHT3->SetTextSize(0.05);
981 for (Int_t ch = 0;ch < 12;ch += 2) {
982 TLine *lDsmL1Begin =
new TLine(ch-0.5, 0, ch-0.5, 4);
984 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lDsmL1Begin);
985 lDsmL1Begin->SetLineColor(linesColor);
986 lDsmL1Begin->SetLineWidth(1);
993 if (HistDsmL2InputPatchSum) {
994 HistDsmL2InputPatchSum->SetStats(0);
997 HistDsmL2InputPatchSum->Draw(
"COLZ");
998 for (Int_t ch = 0;ch < 6;ch++) {
999 TLine *lDsmL1Begin =
new TLine(ch-0.5, 0, ch-0.5, 256);
1001 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lDsmL1Begin);
1002 lDsmL1Begin->SetLineColor(linesColor);
1003 lDsmL1Begin->SetLineWidth(1);
1004 lDsmL1Begin->Draw();
1009 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
1012 void BEMCPlotsPresenter::displayL3Input(
FileType file, TPad *pad, Int_t mDebug) {
1013 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
1015 FIND_HISTO(TH1F, HistDsmL3InputHighTowerBits, file, HistDsmL3InputHighTowerBitsName);
1016 FIND_HISTO(TH1F, HistDsmL3InputPatchSumBits, file, HistDsmL3InputPatchSumBitsName);
1017 FIND_HISTO(TH1F, HistDsmL3InputBackToBackBit, file, HistDsmL3InputBackToBackBitName);
1018 FIND_HISTO(TH1F, HistDsmL3InputJPsiTopoBit, file, HistDsmL3InputJPsiTopoBitName);
1019 FIND_HISTO(TH1F, HistDsmL3InputJetPatchTopoBit, file, HistDsmL3InputJetPatchTopoBitName);
1025 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
1028 c->Divide(2, 1, 0.001, 0.001);
1031 if (HistDsmL3InputHighTowerBits) {
1033 HistDsmL3InputHighTowerBits->Draw();
1037 if (HistDsmL3InputPatchSumBits) {
1039 HistDsmL3InputPatchSumBits->Draw();
1044 void BEMCPlotsPresenter::displaySmdFeeSum(
FileType file, TPad *pad, Int_t mDebug) {
1045 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
1052 Int_t linesColor = 16;
1053 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
1056 c->Divide(1, 2, 0.001, 0.001);
1058 for (
int nonzs = 0;nonzs <= 1;nonzs++) {
1060 FIND_HISTO(TH2F, HistSmdFeeSum, file, nonzs ? HistSmdFeeSumNonZSName : HistSmdFeeSumName);
1061 if (HistSmdFeeSum) {
1062 HistSmdFeeSum->SetStats(0);
1063 HistSmdFeeSum->Draw(
"COLZ");
1064 Int_t moduleRdo[120];
1065 if(BEMCDecoderPresenter) {
1067 for (Int_t module = 1;module <= 120;module++) {
1068 moduleRdo[module - 1] = -1;
1069 if (BEMCDecoderPresenter->
GetSmdRDO(3, module, 1, 1, RDO, index)) {
1070 moduleRdo[module - 1] = RDO;
1077 Int_t beginrdo = -1;
1079 while (curmod <= 121) {
1081 if (((curmod <= 120) && (moduleRdo[curmod - 1] != currdo)) || (curmod == 121)) {
1082 if ((currdo == -1) && (curmod <= 120)) {
1084 currdo = moduleRdo[curmod - 1];
1087 endrdo = curmod - 1;
1088 TLine *lRdoBegin =
new TLine(beginrdo - 0.5, HistSmdFeeSum->GetYaxis()->GetBinLowEdge(1), beginrdo - 0.5, HistSmdFeeSum->GetYaxis()->GetBinUpEdge(HistSmdFeeSum->GetYaxis()->GetNbins()));
1090 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lRdoBegin);
1091 lRdoBegin->SetLineColor(linesColor);
1092 lRdoBegin->SetLineWidth(1);
1095 TLine *lRdoEnd =
new TLine(endrdo + 0.5, HistSmdFeeSum->GetYaxis()->GetBinLowEdge(1), endrdo + 0.5, HistSmdFeeSum->GetYaxis()->GetBinUpEdge(HistSmdFeeSum->GetYaxis()->GetNbins()));
1097 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lRdoEnd);
1098 lRdoEnd->SetLineColor(linesColor);
1099 lRdoEnd->SetLineWidth(1);
1103 label = Form(
"RDO %i", currdo);
1104 TLatex *text =
new TLatex(beginrdo + 1 -0.5, 0.8 * HistSmdFeeSum->GetYaxis()->GetBinUpEdge(HistSmdFeeSum->GetYaxis()->GetNbins()), label.Data());
1106 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(text);
1107 text->SetTextColor(linesColor);
1108 text->SetTextSize(0.03);
1112 if (curmod > 120) curmod++;
1122 void BEMCPlotsPresenter::displayPsdFeeSum(
FileType file, TPad *pad, Int_t mDebug) {
1123 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
1130 Int_t linesColor = 16;
1131 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
1134 c->Divide(1, 2, 0.001, 0.001);
1136 for (
int nonzs = 0;nonzs <= 1;nonzs++) {
1138 FIND_HISTO(TH2F, HistPsdFeeSum, file, nonzs ? HistPsdFeeSumNonZSName : HistPsdFeeSumName);
1139 if (HistPsdFeeSum) {
1140 HistPsdFeeSum->SetStats(0);
1141 HistPsdFeeSum->Draw(
"COLZ");
1143 for (Int_t box = 0;box < 60;box++) pmtRdo[box] = -1;
1144 if(BEMCDecoderPresenter) {
1145 for (Int_t rdo = 0;rdo < 4;rdo++) {
1146 for (Int_t index = 0;index < 4800;index++) {
1147 Int_t id, box, wire, Avalue;
1148 if (BEMCDecoderPresenter->
GetPsdId(rdo, index,
id, box, wire, Avalue)) {
1149 if ((box >= 1) && (box <= 60)) {
1150 pmtRdo[box - 1] = rdo + 8;
1158 Int_t beginrdo = -1;
1160 while (curmod <= 61) {
1162 if (((curmod <= 60) && (pmtRdo[curmod - 1] != currdo)) || (curmod == 61)) {
1163 if ((currdo == -1) && (curmod <= 60)) {
1165 currdo = pmtRdo[curmod - 1];
1168 endrdo = curmod - 1;
1169 TLine *lRdoBegin =
new TLine(beginrdo - 0.5, HistPsdFeeSum->GetYaxis()->GetBinLowEdge(1), beginrdo - 0.5, HistPsdFeeSum->GetYaxis()->GetBinUpEdge(HistPsdFeeSum->GetYaxis()->GetNbins()));
1171 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lRdoBegin);
1172 lRdoBegin->SetLineColor(linesColor);
1173 lRdoBegin->SetLineWidth(1);
1176 TLine *lRdoEnd =
new TLine(endrdo + 0.5, HistPsdFeeSum->GetYaxis()->GetBinLowEdge(1), endrdo + 0.5, HistPsdFeeSum->GetYaxis()->GetBinUpEdge(HistPsdFeeSum->GetYaxis()->GetNbins()));
1178 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(lRdoEnd);
1179 lRdoEnd->SetLineColor(linesColor);
1180 lRdoEnd->SetLineWidth(1);
1184 label = Form(
"RDO %i", currdo);
1185 TLatex *text =
new TLatex(beginrdo + 0.5 -0.5, 0.8 * HistPsdFeeSum->GetYaxis()->GetBinUpEdge(HistPsdFeeSum->GetYaxis()->GetNbins()), label.Data());
1187 if (BEMCPlotsCleanUp) BEMCPlotsCleanUp->Add(text);
1188 text->SetTextColor(linesColor);
1189 text->SetTextSize(0.03);
1193 if (curmod > 60) curmod++;
1203 void BEMCPlotsPresenter::displayTriggerCorruption(
FileType file, TPad *pad,
bool hold, Int_t mDebug) {
1204 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
1206 FIND_HISTO(TH1F, HistTriggerCorruptionHighTower, file, HistTriggerCorruptionHighTowerName);
1207 FIND_HISTO(TH1F, HistTriggerCorruptionPatchSum, file, HistTriggerCorruptionPatchSumName);
1208 FIND_HISTO(TH2F, HistDSM0HTCorr, file, HistDSM0HTCorrName);
1209 FIND_HISTO(TH2F, HistDSM0TPCorr, file, HistDSM0TPCorrName);
1217 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
1222 c->Divide(2, 1, 0.001, 0.001);
1237 if (HistDSM0HTCorr) {
1238 HistDSM0HTCorr->SetStats(0);
1239 HistDSM0HTCorr->Draw(
"COLZ");
1242 if (HistDSM0TPCorr) {
1243 HistDSM0TPCorr->SetStats(0);
1244 HistDSM0TPCorr->Draw(
"COLZ");
1250 void BEMCPlotsPresenter::displayAdcEtaPhi(
FileType file, TPad *pad, Int_t mDebug)
1252 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
1254 FIND_HISTO(TH2F, Hist_ADCEtaPhi_TowHits, file, Hist_ADCEtaPhi_TowHitsName);
1255 FIND_HISTO(TH2F, Hist_ADCEtaPhi_Pre1Hits, file, Hist_ADCEtaPhi_Pre1HitsName);
1261 TPad* c =
new TPad(
"pad2",
"apd2",0.0,0.1,1.,1.);
1267 if (Hist_ADCEtaPhi_TowHits) {
1268 Hist_ADCEtaPhi_TowHits->SetStats(0);
1269 Hist_ADCEtaPhi_TowHits->Draw(
"H COLZ");
1272 if (Hist_ADCEtaPhi_Pre1Hits) {
1273 Hist_ADCEtaPhi_Pre1Hits->SetStats(0);
1274 Hist_ADCEtaPhi_Pre1Hits->Draw(
"H COLZ");
1282 void BEMCPlotsPresenter::displayTab(Int_t tab, Int_t panel,
FileType file, TPad *pad,
const Char_t *bemcStatusFilename, Int_t mDebug) {
1284 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
1285 if (BEMCPlotsCleanUp) {
1286 BEMCPlotsCleanUp->Delete();
1288 if (!BEMCDecoderPresenter) BEMCDecoderPresenter =
new StEmcDecoder();
1290 static bool first =
true;
1294 bool twMaskFound = useBtowMask(bemcStatusFilename, twMask);
1302 if (mDebug >= 2) cout <<
"tab = " << tab << endl;
1303 if (mDebug >= 2) cout <<
"panel = " << panel << endl;
1304 if (!file.file() || (mDebug >= 2)) cout <<
"file = " << file.file() << endl;
1305 if (!pad || (mDebug >= 2)) cout <<
"pad = " << pad << endl;
1306 if (!BEMCDecoderPresenter || (mDebug >= 2)) cout <<
"BEMCDecoderPresenter = " << BEMCDecoderPresenter << endl;
1310 displayStatus(file, pad, mDebug);
1311 }
else if (panel == 1) {
1312 displayTowers(file, pad, mDebug);
1313 }
else if (panel == 2) {
1314 displaySMDPSD(file, pad, mDebug);
1315 }
else if (panel == 3) {
1316 displayTrigger(file, pad, mDebug);
1317 }
else if (panel == 4) {
1318 displayJet(file, pad, mDebug);
1319 }
else if (panel == 5) {
1320 displayRawAdc(file, pad,
false,
false, twMask, mDebug);
1321 }
else if (panel == 6) {
1322 displayJetPatchHT(file, pad, mDebug);
1323 }
else if (panel == 7) {
1324 displayJetPatchSum(file, pad, mDebug);
1328 else if (panel == 8) {
1329 displayL1Input(file, pad, mDebug);
1330 }
else if (panel == 9) {
1331 displayL2Input(file, pad, mDebug);
1344 displayRawAdc(file, pad,
false,
true, twMask, mDebug);
1345 }
else if (panel == 1) {
1346 displayAdcEtaPhi(file, pad, mDebug);
1347 }
else if (panel == 2) {
1348 displaySmdFeeSum(file, pad, mDebug);
1349 }
else if (panel == 3) {
1350 displayPsdFeeSum(file, pad, mDebug);
1351 }
else if (panel == 4) {
1352 displayRawAdc(file, pad,
true,
false, twMask, mDebug);
1353 }
else if (panel == 5) {
1354 displayL0Input(file, pad, mDebug);
1355 }
else if (panel == 6) {
1356 displayTriggerCorruption(file, pad,
true, mDebug);
1359 if (mDebug >= 10) cout << __FILE__ <<
":" << __LINE__ << endl;
1362 void BEMCPlotsPresenter::displayTab(
int tab,
int panel,
FileType file, TPad *pad,
int mDebug) {
1363 BEMCPlotsPresenter::displayTab(tab, panel, file, pad, gEnv->GetValue(
"Online.bemcStatus",
"bemcStatus.txt"), mDebug);
int GetTriggerPatchFromCrate(int crate, int sequence, int &patchId) const
returns the trigger patch from crate and sequence in the crate
int GetTriggerPatchFromJetPatch(int jetPatch, int sequence, int &patchId) const
returns the trigger patch from big jet patch and the sequence in it
int GetTowerIdFromCrate(int crate, int sequence, int &softId) const
Get Software Id from Crate number and position in crate for towers.
int GetCrateAndSequenceFromTriggerPatch(int patchId, int &crate, int &sequence) const
returns the crate number and start point for a given trigger patch
int GetPsdId(int RDO, int posInFiber, int &softId, bool print=false) const
Get PSD id.
int GetSmdRDO(int detector, int m, int e, int s, int &RDO, int &posInFiber) const
Get SMD fiber and position from detector number (3==SMDE, 4==SMDP), m, e, s.