#include <RootFitGraph.h>
Definition at line 23 of file RootFitGraph.h.
 
◆ RootFitGraph()
      
        
          | dqm_algorithms::RootFitGraph::RootFitGraph | ( | const std::string & | name | ) |  | 
      
 
Definition at line 29 of file RootFitGraph.cxx.
   34     m_func = std::make_unique<TF1> ( 
"fermi",
"[0]/(1+exp(([1]-x)/[2]))" );
 
   37     m_func = std::make_unique<TF1> ( 
"erf",
"[0]*TMath::Erf((x-[1])/(sqrt(2.)*[2]))" );
 
   40     m_func = std::make_unique<TF1> ( 
"flat",
"[0]" );
 
 
 
 
◆ ~RootFitGraph()
      
        
          | dqm_algorithms::RootFitGraph::~RootFitGraph | ( |  | ) |  | 
      
 
 
◆ clone()
◆ execute()
Definition at line 59 of file RootFitGraph.cxx.
   66   if(
object.
IsA()->InheritsFrom( 
"TGraph" ))
 
   68       graph = 
static_cast<const TGraph*
>(&
object);
 
   71     throw dqm_core::BadConfig( ERS_HERE, 
name, 
"does not inherit from TGraph" );
 
   95   if (graph->GetN() < minpoint || graph->GetN()==0) {
 
   96     if(
verbose)std::cout << 
name << 
" number of points are too small " << graph->GetN() << std::endl;
 
   98     result->tags_[
"InsufficientN"] = graph->GetN();
 
  101   if(
verbose)std::cout << 
name << 
" enough number of points  " << graph->GetN() << std::endl;
 
  103   TAxis *
x = graph->GetXaxis();
 
  104   int nbins = 
x->GetNbins();
 
  105   double high = 
x->GetBinUpEdge(
nbins);
 
  106   double low = 
x->GetBinUpEdge(0);
 
  109   if ( 
xmin>high || xmin<low || xmax>high || 
xmax<low) {
 
  110     throw dqm_core::BadConfig( ERS_HERE, 
name, 
"xmin and/or xmax value not in graph bin range" );
 
  128   if ( minSig != 0    ) option += 
"E";
 
  129   if ( improve ) option += 
"M";
 
  132     std::cout <<
" graph name " << graph->GetName() << std::endl;
 
  133     std::cout <<
" fit option " << option << std::endl;
 
  137     if(
verbose)std::cout << 
"set "<<
name<< 
" parameters" << std::endl;
 
  139     m_func->SetParameter(1,xaxismean);
 
  140     m_func->SetParameter(2,xdiff/50.);
 
  141     m_func->SetParNames(
"Plateau",
"Threshold",
"Resolution");
 
  145     m_func->SetParLimits(2, 0., xdiff/4. );
 
  147   else if(
m_name == 
"erf") {
 
  148     if(
verbose)std::cout << 
"set "<<
name<< 
" parameters" << std::endl;
 
  150     m_func->SetParameter(1,xaxismean);
 
  151     m_func->SetParameter(2,xdiff/50.);
 
  152     m_func->SetParNames(
"Plateau",
"Threshold",
"Resolution");
 
  156     m_func->SetParLimits(2, 0., xdiff/4. );
 
  158   else if(
m_name == 
"flat") {
 
  159     if(
verbose)std::cout << 
"set "<<
name<< 
" parameters" << std::endl;
 
  160     m_func->SetParNames(
"Height");
 
  171   if(
verbose)std::cout << 
"fit "<<
name<< 
" with interval cut " << 
xmin << 
" - " << 
xmax  << std::endl;
 
  172   const_cast<TGraph*
>(graph)->Fit( 
m_func.get(), option.c_str(),
"",
xmin,
xmax );
 
  174   const int numsig = 
m_func->GetParNumber(
"Sigma");
 
  184   catch ( dqm_core::Exception & ex ) {
 
  185     throw dqm_core::BadConfig( ERS_HERE, 
name, ex.what(), ex );
 
 
 
 
◆ printDescription()
      
        
          | void dqm_algorithms::RootFitGraph::printDescription | ( | std::ostream & | out | ) |  | 
      
 
Definition at line 190 of file RootFitGraph.cxx.
  192   out<<
"Simple_"+
m_name+
"_Fit_Graph: Does simple "+
m_name+
" fit to graph and checks fit parameters against thresholds\n"<<std::endl;
 
  194     out<<
"The following fit Parameters can be checked with Red and Green Thresholds; only one parameter is needed to get back real result"<<std::endl;
 
  195     out<<
"Green/Red Threshold: Plateau : Plateau fit value to give Green/Red Result"<<std::endl;
 
  196     out<<
"Green/Red Threshold: Threshold : Fermi energy fit value to give Green/Red Result"<<std::endl;
 
  197     out<<
"Green/Red Threshold: Resolution : Templature fit value to give Green/Red Result\n"<<std::endl;
 
  198   }
else if (
m_name == 
"erf" ) {
 
  199     out<<
"The following fit Parameters can be checked with Red and Green Thresholds; only one parameter is needed to get back real result"<<std::endl;
 
  200     out<<
"Green/Red Threshold: Plateau : Plateau fit value to give Green/Red Result"<<std::endl;
 
  201     out<<
"Green/Red Threshold: Threshold : mean of gaussian fit value to give Green/Red Result"<<std::endl;
 
  202     out<<
"Green/Red Threshold: Resolution : sigma of gaussian fit value to give Green/Red Result\n"<<std::endl;
 
  204   out<<
"Optional Parameter: Verbose: Write out fit results to log file (set to 1)"<<std::endl;
 
  205   out<<
"Optional Parameter: MinPoint: Minimum graph point needed to perform Algorithm"<<std::endl;
 
  206   out<<
"Optional Parameter: MinSignificance : Minimum multiple of the error in fit paramenter by which the parameter must exceed the thresholds"<<std::endl;
 
  207   out<<
"Optional Parameter: ImproveFit : IMPROVE is used to avoid local minima"<<std::endl;
 
  208   out<<
"Optional Parameter: xmin: minimum x range"<<std::endl;
 
  209   out<<
"Optional Parameter: xmax: maximum x range"<<std::endl;
 
  210   out<<
"Optional Parameter: SubtractFromMean: value subtracted from XMean before test is applied: allows using AbsXMean for non-zero expected mean"<<std::endl;
 
 
 
 
◆ m_func
  
  | 
        
          | std::unique_ptr<TF1> dqm_algorithms::RootFitGraph::m_func |  | private | 
 
 
◆ m_name
  
  | 
        
          | std::string dqm_algorithms::RootFitGraph::m_name |  | private | 
 
 
The documentation for this struct was generated from the following files: