void DWeights(int ip=0) { TCanvas *c1(new TCanvas()); TFile::Open("SimAnalysisLayerTracks900066.root"); gStyle->SetOptStat(0); DWeightsNaive->SetLineColor(2); DWeightsNaive->SetTitle(";Layer;Weight w_{i} (GeV)"); DWeightsNaive->GetYaxis()->SetRangeUser(0,0.07); DWeightsNaive->GetYaxis()->SetTitleOffset(1.3); DWeightsNaive->Draw("hist"); if(ip>0) { DWeightsOpt->SetLineColor(4); DWeightsOpt->Draw("hist same"); } c1->Update(); if(ip==0) c1->Print("DWeights0.png"); if(ip> 0) c1->Print("DWeights1.png"); }