CMS 3D CMS Logo

List of all members | Public Member Functions
LowPassFilterTiming Class Reference

#include <LowPassFilterTiming.h>

Public Member Functions

unsigned nParameters () const
 
double operator() (double currentIn, const double *params, unsigned nParams) const
 

Detailed Description

Definition at line 4 of file LowPassFilterTiming.h.

Member Function Documentation

unsigned LowPassFilterTiming::nParameters ( ) const

Definition at line 37 of file LowPassFilterTiming.cc.

References NPARAMETERS.

38 {
39  return NPARAMETERS;
40 }
#define NPARAMETERS
double LowPassFilterTiming::operator() ( double  currentIn,
const double *  params,
unsigned  nParams 
) const

Definition at line 50 of file LowPassFilterTiming.cc.

References delta, JetChargeProducer_cfi::exp, cmsBatch::log, NPARAMETERS, mps_fire::result, and two_joined_lines().

53 {
54  assert(nParams == NPARAMETERS);
55  assert(pars);
56  unsigned ipar = 0;
57  const double logVbias = pars[ipar++];
58  const double logTauMin = pars[ipar++];
59 
60  // The middle of the join region. Not a log actually,
61  // it is simple in the log space.
62  const double logV0 = pars[ipar++];
63 
64  // Log of the width of the join region
65  const double logDelta = pars[ipar++];
66 
67  // Log of the minus negative slope
68  const double slopeLog = pars[ipar++];
69 
70  // Log of the maximum delay time (cutoff)
71  const double tauMax = pars[ipar++];
72  assert(ipar == NPARAMETERS);
73 
74  // What happens for large (in magnitude) negative voltage inputs?
75  const double Vbias = exp(logVbias);
76  const double shiftedV = v + Vbias;
77  if (shiftedV <= 0.0)
78  return tauMax;
79 
80  const double lg = log(shiftedV);
81  const double delta = exp(logDelta);
82  const double tauMin = exp(logTauMin);
83  double result = two_joined_lines(lg, -exp(slopeLog), tauMin,
84  0.0, tauMin, logV0, delta);
85  if (result > tauMax)
86  result = tauMax;
87  return result;
88 }
dbl * delta
Definition: mlp_gen.cc:36
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)
#define NPARAMETERS