Changeset 14760


Ignore:
Timestamp:
12/21/12 15:32:48 (12 years ago)
Author:
Jens Buss
Message:
add number of bootstrapp iterations
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/rootmacros/PulseTemplates/templateextractors.C

    r14751 r14760  
    525525        TString         overlayType,
    526526        int             pulse_order,
     527        int             numBootstrapIt,// = 10, //number of iterations for bootstrapping
    527528        int             verbosityLevel
    528529        )
     
    609610
    610611        //calculate Errors with bootstrapping
    611         CalculateErrorsWithBootstrapping(hTempHisto, 10, slMean, slError);
     612        CalculateErrorsWithBootstrapping(hTempHisto, numBootstrapIt, slMean, slError);
    612613
    613614        if (verbosityLevel > 3)
     
    617618
    618619        //Get maximum of slice's distribution
    619         max_prop    = hTempHisto->GetBinCenter( hTempHisto->GetMaximumBin() );
    620 //                max_prop    = slMean[0];
     620//        max_prop    = hTempHisto->GetBinCenter( hTempHisto->GetMaximumBin() );
     621                max_prop    = slMean[0];
    621622
    622623        //improve result by< fitting gaussian to slices distribution
    623         TF1 gaus("fgaus", "gaus", max_prop-30, max_prop+30);
    624         hTempHisto->Fit("fgaus", "QRN0");
    625         max_prop        = gaus.GetParameter(1);
     624//        TF1 gaus("fgaus", "gaus", max_prop-30, max_prop+30);
     625//        hTempHisto->Fit("fgaus", "QRN0");
     626//        max_prop        = gaus.GetParameter(1);
    626627
    627628        //calculate error of max prop
     
    634635            cout << "\t\t...calculating Median of slice " << slice << endl;
    635636        }
    636         median      = MedianOfH1(hTempHisto);
    637 //        median      = slMean[1];
     637//        median      = MedianOfH1(hTempHisto);
     638        median      = slMean[1];
    638639        median_err  = slError[1]; //error from bootstraping
    639640
     
    641642
    642643
    643         mean        = hTempHisto->GetMean();
    644 //        mean        = slMean[2];
    645         mean_err    = hTempHisto->GetRMS(); //RMS of slice
    646 //        mean_err    = slError[2];         //error from bootstraping
     644//        mean        = hTempHisto->GetMean();
     645        mean        = slMean[2];
     646//        mean_err    = hTempHisto->GetRMS()/hTempHisto->GetEntries(); //RMS of slice
     647        mean_err    = slError[2];         //error from bootstraping
    647648
    648649        if (verbosityLevel > 4) cout << "\t\t\t\t MaxProb of Slice " << slice << ": " << max_prop << endl;
Note: See TracChangeset for help on using the changeset viewer.