CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_5_2_9/src/RecoLocalCalo/EcalRecAlgos/src/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

Double_t fitf ( Double_t *  x,
Double_t *  par 
)

Definition at line 11 of file ESRecHitFitAlgo.cc.

References n, funct::pow(), and v.

                                          {

  Double_t wc = 0.07291;
  Double_t n  = 1.798; // n-1 (in fact)
  Double_t v1 = pow(wc/n*(x[0]-par[1]), n);
  Double_t v2 = TMath::Exp(n-wc*(x[0]-par[1]));
  Double_t v  = par[0]*v1*v2;

  if (x[0] < par[1]) v = 0;

  return v;
}