void fitPeds(void) { gROOT->Reset(); fitOneSlot(18, channel_vs_ped_slot18); fitOneSlot(19, channel_vs_ped_slot19); } void fitOneSlot(int slot, TH2F *chan_vs_ped) { cout<<"int ped_slot"<GetXaxis(); TH1D *ped = new TH1D("ped","Pedestal", xaxis->GetNbins(), xaxis->GetXmin(), xaxis->GetXmax()); for(int i=1; i<=32; i++){ chan_vs_ped->ProjectionX("ped", i,i); float max = ped->GetBinCenter(ped->GetMaximumBin()); ped->Fit("gaus","Q","",max-5, max+5); TF1 *func = ped->GetFunction("gaus"); float mean = func->GetParameter(1); if(((i-1)%8)==0)cout<