CMS 3D CMS Logo

Functions
ESRecHitFitAlgo.cc File Reference
#include "RecoLocalCalo/EcalRecAlgos/interface/ESRecHitFitAlgo.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "TMath.h"
#include "TGraph.h"
#include <iostream>
#include <cmath>

Go to the source code of this file.

Functions

Double_t fitf (Double_t *x, Double_t *par)
 

Function Documentation

◆ fitf()

Double_t fitf ( Double_t *  x,
Double_t *  par 
)

Definition at line 11 of file ESRecHitFitAlgo.cc.

References dqmiodumpmetadata::n, funct::pow(), findQualityFiles::v, and x.

Referenced by ESRecHitFitAlgo::ESRecHitFitAlgo().

11  {
12  Double_t wc = 0.07291;
13  Double_t n = 1.798; // n-1 (in fact)
14  Double_t v1 = pow(wc / n * (x[0] - par[1]), n);
15  Double_t v2 = TMath::Exp(n - wc * (x[0] - par[1]));
16  Double_t v = par[0] * v1 * v2;
17 
18  if (x[0] < par[1])
19  v = 0;
20 
21  return v;
22 }
float x
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29