CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ThirdOrderDelayODE Class Reference

#include <ThirdOrderDelayODE.h>

Public Member Functions

void calculate (double tau, double inputCurrent, double dIdt, double d2Id2t, const double *x, unsigned lenX, unsigned firstNode, double *derivative) const
 
unsigned getPadeColumn () const
 
unsigned getPadeRow () const
 
unsigned nParameters () const
 
void setParameters (const double *pars, unsigned nPars)
 
 ThirdOrderDelayODE (unsigned, unsigned)
 

Private Attributes

double a_
 
double b_
 
double c_
 

Detailed Description

Definition at line 9 of file ThirdOrderDelayODE.h.

Constructor & Destructor Documentation

◆ ThirdOrderDelayODE()

ThirdOrderDelayODE::ThirdOrderDelayODE ( unsigned  ,
unsigned   
)
inline

Definition at line 11 of file ThirdOrderDelayODE.h.

11 : a_(1.0) {}

Member Function Documentation

◆ calculate()

void ThirdOrderDelayODE::calculate ( double  tau,
double  inputCurrent,
double  dIdt,
double  d2Id2t,
const double *  x,
unsigned  lenX,
unsigned  firstNode,
double *  derivative 
) const

Definition at line 7 of file ThirdOrderDelayODE.cc.

14  {
15  // Check input sanity
16  if (lenX < firstNode + 3U)
17  throw cms::Exception("In ThirdOrderDelayODE::calculate: insufficient number of variables");
18  if (tau <= 0.0)
19  throw cms::Exception("In ThirdOrderDelayODE::calculate: delay time is not positive");
20  assert(x);
22 
23  derivative[firstNode] = x[firstNode + 1];
24  derivative[firstNode + 1] = x[firstNode + 2];
25  derivative[firstNode + 2] =
26  6.0 / a_ * (currentIn - x[firstNode] - c_ * tau * x[firstNode + 1] - b_ / 2.0 * tau * tau * x[firstNode + 2]) /
27  tau / tau / tau;
28 }

References a_, cms::cuda::assert(), b_, c_, funct::derivative(), Exception, metsig::tau, mitigatedMETSequence_cff::U, and x.

◆ getPadeColumn()

unsigned ThirdOrderDelayODE::getPadeColumn ( ) const
inline

Definition at line 23 of file ThirdOrderDelayODE.h.

23 { return 3U; }

References mitigatedMETSequence_cff::U.

◆ getPadeRow()

unsigned ThirdOrderDelayODE::getPadeRow ( ) const
inline

Definition at line 22 of file ThirdOrderDelayODE.h.

22 { return 0U; }

References mitigatedMETSequence_cff::U.

◆ nParameters()

unsigned ThirdOrderDelayODE::nParameters ( ) const
inline

Definition at line 24 of file ThirdOrderDelayODE.h.

24 { return 3U; }

References mitigatedMETSequence_cff::U.

◆ setParameters()

void ThirdOrderDelayODE::setParameters ( const double *  pars,
unsigned  nPars 
)

Definition at line 30 of file ThirdOrderDelayODE.cc.

30  {
31  assert(nPars == 3U);
32  assert(pars);
33  a_ = exp(pars[0]);
34  b_ = exp(pars[1]);
35  c_ = exp(pars[2]);
36 }

References a_, cms::cuda::assert(), b_, c_, JetChargeProducer_cfi::exp, and mitigatedMETSequence_cff::U.

Member Data Documentation

◆ a_

double ThirdOrderDelayODE::a_
private

Definition at line 30 of file ThirdOrderDelayODE.h.

Referenced by calculate(), and setParameters().

◆ b_

double ThirdOrderDelayODE::b_
private

Definition at line 31 of file ThirdOrderDelayODE.h.

Referenced by calculate(), and setParameters().

◆ c_

double ThirdOrderDelayODE::c_
private

Definition at line 32 of file ThirdOrderDelayODE.h.

Referenced by calculate(), and setParameters().

metsig::tau
Definition: SignAlgoResolutions.h:49
ThirdOrderDelayODE::a_
double a_
Definition: ThirdOrderDelayODE.h:30
cms::cuda::assert
assert(be >=bs)
funct::derivative
Derivative< X, A >::type derivative(const A &_)
Definition: Derivative.h:18
DDAxes::x
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
ThirdOrderDelayODE::b_
double b_
Definition: ThirdOrderDelayODE.h:31
Exception
Definition: hltDiff.cc:245
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
ThirdOrderDelayODE::c_
double c_
Definition: ThirdOrderDelayODE.h:32