#include "CondFormats/JetMETObjects/interface/JetResolution.h"
#include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h"
#include <TMath.h>
#include <iostream>
#include <sstream>
#include <cassert>
Go to the source code of this file.
Functions | |
double | fnc_dscb (double *xx, double *pp) |
double | fnc_gaussalpha (double *xx, double *pp) |
double | fnc_gaussalpha1alpha2 (double *xx, double *pp) |
double fnc_dscb | ( | double * | xx, |
double * | pp | ||
) |
Definition at line 185 of file JetResolution.cc.
References RPCpg::mu, N, p1, p2, query::result, and x.
{ double x = xx[0]; double N = pp[0]; double mu = pp[1]; double sig = pp[2]; double a1 = pp[3]; double p1 = pp[4]; double a2 = pp[5]; double p2 = pp[6]; double u = (x-mu)/sig; double A1 = TMath::Power(p1/TMath::Abs(a1),p1)*TMath::Exp(-a1*a1/2); double A2 = TMath::Power(p2/TMath::Abs(a2),p2)*TMath::Exp(-a2*a2/2); double B1 = p1/TMath::Abs(a1) - TMath::Abs(a1); double B2 = p2/TMath::Abs(a2) - TMath::Abs(a2); double result(N); if (u<-a1) result *= A1*TMath::Power(B1-u,-p1); else if (u<a2) result *= TMath::Exp(-u*u/2); else result *= A2*TMath::Power(B2+u,-p2); return result; }
double fnc_gaussalpha | ( | double * | xx, |
double * | pp | ||
) |
Definition at line 211 of file JetResolution.cc.
References alpha, align_tpl::cut, timingPdfMaker::mean, N, and lumiQTWidget::t.
double fnc_gaussalpha1alpha2 | ( | double * | xx, |
double * | pp | ||
) |
Definition at line 224 of file JetResolution.cc.
References align_tpl::cut, timingPdfMaker::mean, N, and lumiQTWidget::t.
{ double N =par[0]; double mean =par[1]; double sigma =par[2]; double alpha1=par[3]; double alpha2=par[4]; double t =TMath::Abs((v[0]-mean)/sigma); double cut = 1.0; return (t<=cut) ? N*TMath::Exp(-0.5*t*t) : ((v[0]-mean)>=0) ? N*TMath::Exp(-0.5*(alpha1*(t-cut)+cut*cut)) : N*TMath::Exp(-0.5*(alpha2*(t-cut)+cut*cut)); }