{ TFile f("calibration-100225-140429-dispersion.root","READ"); f.cd(); TH1F *hh = new TH1F("hh","noise dispersion for M24 chip17, p-Side tpcb=343C; PH (mV);Entries",25,1.,3.0); TTree *tSave = f.Get("tSave"); tSave->Project("hh","sigma","probChi2>0.01&&sigma>-9."); TCanvas *c1 = new TCanvas("c1","",1024,768); c1->cd(); hh->Fit("gaus","LLME","e"); TPaveStats* ps = (TPaveStats*)hh->GetListOfFunctions()->FindObject("stats"); ps->SetFillStyle(0); // trasparent ps->Draw(); TF1 *ff = (TF1*)hh->GetFunction("gaus"); Double_t mean = ff->GetParameter(1); gSystem->CompileMacro("NoiseEstimator.C"); Double_t enc = NoiseEstimator(mean); Int_t Enc = Int_t(enc); TString *label = new TString(); label->Form("noise = %d enc",Enc); TPaveLabel *l = new TPaveLabel(1.,40,1.4,50,label->Data()); l->SetFillColor(0); l->Draw(); c1->SaveAs("noiseFSSR2_M24-Chip17_t343.png"); c1->SaveAs("noiseFSSR2_M24-Chip17_t343.pdf"); }