CMS 3D CMS Logo

Macros | Functions
LowPassFilterTiming.cc File Reference
#include <cmath>
#include <cassert>
#include "FWCore/Utilities/interface/Exception.h"
#include "CalibCalorimetry/HcalAlgos/interface/LowPassFilterTiming.h"

Go to the source code of this file.

Macros

#define NPARAMETERS   6U
 

Functions

static double two_joined_lines (const double x_in, const double aleft, const double bleft, const double aright, const double bright, const double join_location, const double h)
 

Macro Definition Documentation

#define NPARAMETERS   6U

Function Documentation

static double two_joined_lines ( const double  x_in,
const double  aleft,
const double  bleft,
const double  aright,
const double  bright,
const double  join_location,
const double  h 
)
static

Definition at line 14 of file LowPassFilterTiming.cc.

References a, b, EnergyCorrector::c, edmIntegrityCheck::d, h, and genVertex_cff::x.

Referenced by LowPassFilterTiming::operator()().

18 {
19  assert(h >= 0.0);
20  const double x = x_in - join_location;
21  if (x <= -h)
22  return aleft*x + bleft;
23  else if (x >= h)
24  return aright*x + bright;
25  else
26  {
27  const double vleft = -h*aleft + bleft;
28  const double vright = aright*h + bright;
29  const double b = (aright - aleft)/4.0/h;
30  const double d = (vright + vleft - 2*b*h*h)/2.0;
31  const double a = (d + aright*h - b*h*h - vright)/(2.0*h*h*h);
32  const double c = -(3*d + aright*h + b*h*h - 3*vright)/(2.0*h);
33  return ((a*x + b)*x + c)*x + d;
34  }
35 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121