void AWeights(int ip=0) { TCanvas *c1(new TCanvas()); TFile::Open("SimAnalysisLayerTracks900066.root"); gStyle->SetOptStat(0); AWeightsNaive->SetLineColor(2); AWeightsNaive->SetTitle(";Layer;Weight w_{i} (GeV/MeV)"); AWeightsNaive->GetYaxis()->SetRangeUser(0,0.2); AWeightsNaive->GetYaxis()->SetTitleOffset(1.2); AWeightsNaive->Draw("hist"); if(ip>0) { AWeightsOpt->SetLineColor(4); AWeightsOpt->Draw("hist same"); } c1->Update(); if(ip==0) c1->Print("AWeights0.png"); if(ip> 0) c1->Print("AWeights1.png"); }