Changeset 13427


Ignore:
Timestamp:
04/24/12 14:07:39 (13 years ago)
Author:
Jens Buss
Message:
add fit function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/rootmacros/slicecalculation.C

    r13425 r13427  
    11#include "slicecalculation.h"
    22#include <TROOT.h>
     3#include <TH1F.h>
     4#include <TH2F.h>
     5#include <TMath.h>
    36
    47//compute the median for 1-d histogram h1
     
    110113}
    111114
     115//fit a function to the given histogram
     116void
     117FitMaxPropabilityPuls(
     118        TH1*           phInputHistogram,
     119        float           left_border,
     120        float           right_border,
     121        int             verbosityLevel
     122        )
     123    {
     124      if (verbosityLevel > 2) cout << "...fit Landau in histograms" ;
     125      if (verbosityLevel > 2) cout << "\t...calculating Landaufit" ;
     126      phInputHistogram->Fit("landau", "", "", left_border, right_border);
     127      if (verbosityLevel > 2) cout << "...done" << endl;
     128    }
Note: See TracChangeset for help on using the changeset viewer.