#include <vector>
#include <cstring>
#include <iostream>
#include <sstream>
#include <string>
#include "TH1.h"
#include "TF1.h"
#include "TMath.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
Go to the source code of this file.
|
double | Gauss (double *x, double *par) |
|
double | langaufun (double *x, double *par) |
|
int32_t | langaupro (double *params, double &maxx, double &FWHM) |
|
double Gauss |
( |
double * |
x, |
|
|
double * |
par |
|
) |
| |
Definition at line 225 of file fitUtilities.h.
Referenced by fitUtilities::doGaussFit().
230 if (par[2]) arg = (
x[0] - par[1])/par[2];
232 double noise = par[0]*TMath::Exp(-0.5*arg*arg);
T x() const
Cartesian x coordinate.
double langaufun |
( |
double * |
x, |
|
|
double * |
par |
|
) |
| |
@ class fitUtilities @ fit Landau distributions to historic monitoring elements @ fits from Susy's analysis (DQM/SiStripHistoricInfoClient/test/TrendsWithFits)
Definition at line 66 of file fitUtilities.h.
References i, np, and SimDataFormats::CaloAnalysis::sc.
79 double invsq2pi = 0.3989422804014;
80 double mpshift = -0.22278298;
97 mpc = par[1] - mpshift * par[0];
100 xlow =
x[0] - sc * par[3];
101 xupp =
x[0] + sc * par[3];
103 step = (xupp-xlow) / np;
106 for(i=1.0; i<=np/2; i++) {
107 xx = xlow + (i-.5) *
step;
108 fland = TMath::Landau(xx,mpc,par[0]) / par[0];
109 sum += fland * TMath::Gaus(
x[0],xx,par[3]);
111 xx = xupp - (i-.5) *
step;
112 fland = TMath::Landau(xx,mpc,par[0]) / par[0];
113 sum += fland * TMath::Gaus(
x[0],xx,par[3]);
116 return (par[2] *
step * sum * invsq2pi / par[3]);
T x() const
Cartesian x coordinate.
int32_t langaupro |
( |
double * |
params, |
|
|
double & |
maxx, |
|
|
double & |
FWHM |
|
) |
| |
Definition at line 120 of file fitUtilities.h.
References Abs(), alignCSCRings::e, i, cmsLHEtoEOSManager::l, langaufun(), AlCaHLTBitMon_ParallelJobs::p, and x().
Referenced by MuonTestSummary::doEnergyTests(), and fitUtilities::doLanGaussFit().
121 edm::LogInfo(
"fitUtility") <<
"inside langaupro " << std::endl;
127 double p,
x,fy,fxr,fxl;
131 const int32_t MAXCALLS = 10000;
132 const double dlStop = 1
e-3;
135 p = params[1] - 0.1 * params[0];
136 step = 0.05 * params[0];
141 while ( (
TMath::Abs(dl)>dlStop ) && (i < MAXCALLS) ) {
164 p = maxx + params[0];
171 while ( (
TMath::Abs(dl)>dlStop ) && (i < MAXCALLS) ) {
192 p = maxx - 0.5 * params[0];
199 while ( (
TMath::Abs(dl)>dlStop ) && (i < MAXCALLS) ) {
T x() const
Cartesian x coordinate.
Double_t langaufun(Double_t *x, Double_t *par)