1 #if !defined(__CINT__) || defined(__MAKECINT__) 2 #include <AliEMCALGeometry.h> 16 LDraw(
const char *name,
const char *fname=
"tempinfo.root");
35 TFile *inf = TFile::Open(
"ledinfo.root");
36 fArr =
dynamic_cast<TObjArray*
>(inf->Get(Form(
"led_%s",name)));
43 for (
Int_t i=0;i<rns;++i) {
50 cout <<
"fraction good strips ";
51 for (
Int_t i=0;i<20;++i)
54 cout <<
"fraction good towers ";
55 for (
Int_t i=0;i<20;++i)
64 TString cname(Form(
"cLedAll_%s",GetName()));
66 c1->Print(Form(
"%s.pdf[",cname.Data()));
67 c1->Print(Form(
"%s.pdf",cname.Data()));
69 c2->Print(Form(
"%s.pdf",cname.Data()));
72 for (
Int_t i=0;i<rns;++i) {
77 c->Print(Form(
"%s.pdf",cname.Data()));
80 c->Print(Form(
"%s.pdf",cname.Data()));
83 c->Print(Form(
"%s.pdf",cname.Data()));
86 c2->Print(Form(
"%s.pdf]",cname.Data()));
91 const char *tname=
"Led";
94 TString lab(Form(
"cLedFrac_%s_%s",tname,GetName()));
95 TCanvas *
c =
new TCanvas(lab,lab,1200,800);
96 TLegend *leg =
new TLegend(0.92,0.1,0.99,0.99);
99 for (
Int_t i=0;i<20;++i) {
103 case 9: col=kOrange+2;
break;
104 case 10: col=kOrange+10;
break;
105 case 11: col=kMagenta+2;
break;
106 case 12: col=kCyan+2;
break;
107 case 13: col=kYellow+2;
break;
108 case 14: col=kGray+2;
break;
109 case 15: col=kOrange-2;
break;
110 case 16: col=kViolet+2;
break;
111 case 17: col=kRed-2;
break;
112 case 18: col=kGreen+2;
break;
113 case 19: col=kGray+2;
break;
115 h->SetMarkerStyle(20+(i%2));
116 h->SetMarkerSize(1.2);
117 h->SetMarkerColor(col);
118 h->SetLineColor(col);
120 h->SetName(Form(
"SM%d",i));
122 leg->AddEntry(h,h->GetName(),
"p");
123 min=TMath::Min(min,h->GetMinimum());
124 max=TMath::Max(max,h->GetMaximum());
127 h2f->SetTitle(Form(
"Fraction %s per SM: run %d to %d, min=%.1f, max=%.1f",tname,
GetRunNo(0),
GetRunNo(
GetNRuns()-1), min, max));
131 for (
Int_t i=0;i<arr.GetEntries();++i)
132 arr.At(i)->Draw(
"same, p, hist");
136 c->Print(Form(
"%s.pdf",c->GetName()));
143 TH1F *ret =
new TH1F(Form(
"hFracRun_%d_%d",sm,t),Form(
";run idx;fraction"),rns,0,rns);
148 ret->SetDirectory(0);
150 ret->SetMarkerStyle(20);
151 ret->SetMarkerSize(1);
153 for (
Int_t i=0;i<rns;++i) {
162 ret->SetBinContent(i+1,val);
188 AliEMCALGeometry *g=AliEMCALGeometry::GetInstance(
"EMCAL_COMPLETE12SMV1_DCAL_8SM");
189 Int_t kSM=g->GetNumberOfSuperModules();
190 cout <<
"Number of SM: " << kSM << endl;
191 for (
Int_t i=0;i<kSM;++i) {
192 Int_t nrow = g->GetNumberOfCellsInPhiDirection(i);
193 Int_t ncol = g->GetNumberOfCellsInEtaDirection(i);
194 cout << i <<
": " << nrow <<
" " << ncol << endl;
196 TH2 *h2f =
new TH2F(Form(
"hsm%d",i),Form(
";col;row"), ncol, -0.5, ncol-0.5, nrow, -0.5, nrow-0.5);
197 for (
Int_t col=0;col<ncol;++col) {
198 for (
Int_t row=0;row<nrow;++row) {
199 Int_t id = g->GetAbsCellIdFromCellIndexes(i,row,col)-24*48;
200 cout <<
"Id " <<
id <<
" " << col <<
" " << row << endl;
201 Int_t bin = h2f->FindBin(col,row);
202 h2f->SetBinContent(bin,
id);
Double_t FracLeds(Int_t sm, Int_t gain=1) const
TCanvas * DrawHist(Int_t which, Int_t gain=1, const char *opt=0) const
void SetPrint(Bool_t b=1)
void Print(Option_t *option="") const
Int_t GetRunNo(Int_t run) const
Double_t FracStrips(Int_t sm, Int_t gain=1) const
LDraw(const char *name, const char *fname="tempinfo.root")
void Print(Option_t *opt="") const
TH1 * GetFracRun(Int_t sm, Int_t t) const
void plotOCDB_LED(const char *period="lhc18d")
TCanvas * DrawFrac(Int_t type) const
void plotL_period(const char *period, Bool_t doprint=0)