Skip to content

Commit 23d6914

Browse files
committed
multigraph (thanks to Andreas Molander)
1 parent bc3852f commit 23d6914

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Detectors/CTP/macro/PlotPbLumi.C

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
#include <iostream>
3131
#endif
3232
using namespace o2::ctp;
33+
//
34+
// sum = 0: TCE and TSC separatelly otherwise TCE and (TCE+TSC)
35+
// qc = 0: takes scalers from CCDB (available only for finished runs) otherwise from QCCDB (available for active runs)
36+
// t0-tlast: window in seconds counted from beginning of run
37+
//
3338
void PlotPbLumi(int runNumber = 567905, bool sum = 0, bool qc = 0, Double_t t0 = 0., Double_t tlast = 0.)
3439
{ //
3540
// PLots in one canvas
@@ -221,7 +226,6 @@ void PlotPbLumi(int runNumber = 567905, bool sum = 0, bool qc = 0, Double_t t0 =
221226
gr2->SetMarkerStyle(21);
222227
gr3->SetMarkerStyle(23);
223228
gr4->SetMarkerStyle(23);
224-
gr11->SetTitle("R=ZNC/28 rate [Hz] (red=PilUp Corrected); time[sec]; R");
225229
if (sum) {
226230
gr2->SetTitle("R=(TSC+TCE)*TVTX*B*28/ZNC; time[sec]; R");
227231
} else {
@@ -235,14 +239,17 @@ void PlotPbLumi(int runNumber = 567905, bool sum = 0, bool qc = 0, Double_t t0 =
235239
gr4->SetTitle("R=(VCH)*TVTX*B*28/ZNC; time[sec]; R");
236240
// gr4->GetHistogram()->SetMaximum(0.6);
237241
// gr4->GetHistogram()->SetMinimum(0.4);
242+
TMultiGraph* mg1 = new TMultiGraph();
243+
mg1->SetTitle("R=ZNC/28 rate [Hz] (red=PilUp Corrected); time[sec]; R");
244+
mg1->Add(gr1);
245+
mg1->Add(gr11);
246+
mg1->Add(gr12);
238247
TCanvas* c1 = new TCanvas("c1", srun.c_str(), 200, 10, 800, 500);
239248
std::string title = "RUN " + std::to_string(runNumber);
240249
c1->SetTitle(title.c_str());
241250
c1->Divide(2, 2);
242251
c1->cd(1);
243-
gr11->Draw("AP");
244-
gr1->Draw("P");
245-
gr12->Draw("P");
252+
mg1->Draw("AP");
246253
c1->cd(2);
247254
gr2->Draw("AP");
248255
c1->cd(3);

0 commit comments

Comments
 (0)