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

Double_t fitf ( Double_t *  x,
Double_t *  par 
)

Definition at line 11 of file ESRecHitFitAlgo.cc.

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

Referenced by ESRecHitFitAlgo::ESRecHitFitAlgo().

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