void droop() { gROOT->SetStyle("Plain"); TCanvas *c1=new TCanvas("c1","Canvas",800,600); gStyle->SetOptStat(0); gStyle->SetPalette(1); //gStyle->SetPadLeftMargin(0.12); //gStyle->SetPadRightMargin(0.12); //c1->UseCurrentStyle(); TGraph *tg[43]; for(unsigned i(0);i<43;i++) { tg[i]=new TGraph(20); tg[i]->SetMarkerStyle(20); //tg[i]->SetMarkerColor(i); //tg[i]->SetLineColor(i); if(i==0) { tg[i]->SetMarkerColor(2); tg[i]->SetLineColor(2); } else { tg[i]->SetMarkerColor(4); tg[i]->SetLineColor(4); } tg[i]->SetLineWidth(2); } ifstream fin("droop.txt"); unsigned ch; double p,s; for(unsigned i(0);i<86;i++) { fin >> ch; cout << " " << ch; //if(ch!=0) cout << i << " " << ch << endl; if((i%10)==9) cout << endl; } for(unsigned j(0);j<20;j++) { fin >> ch; cout << "N = " << 42*ch; fin >> ch; cout << ", run = " << ch << endl; for(unsigned i(0);i<43;i++) { fin >> p >> s; tg[i]->SetPoint(j,42*(j+1),s); //cout << i << ", ped = " << p << ", sigma = " << s << endl; } } tg[1]->SetTitle(";Number of unmasked pixels;Pixel noise (DTU)"); tg[1]->GetYaxis()->SetRangeUser(0,30); tg[1]->GetXaxis()->SetRangeUser(0,900); tg[1]->Draw("AL"); for(unsigned i(2);i<16;i++) { tg[i]->Draw("Lsame"); } tg[0]->Draw("Lsame"); c1->Update(); c1->Print("../droop.png"); }