CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ( unsigned  ,
unsigned   
)
inline

Definition at line 12 of file ThirdOrderDelayODE.h.

12 : a_(1.0) {}

Member Function Documentation

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.

References a_, assert(), b_, c_, and edm::hlt::Exception.

12 {
13  // Check input sanity
14  if (lenX < firstNode + 3U) throw cms::Exception(
15  "In ThirdOrderDelayODE::calculate: insufficient number of variables");
16  if (tau <= 0.0) throw cms::Exception(
17  "In ThirdOrderDelayODE::calculate: delay time is not positive");
18  assert(x);
20 
21  derivative[firstNode] = x[firstNode+1];
22  derivative[firstNode+1] = x[firstNode+2];
23  derivative[firstNode+2] = 6.0/a_*(currentIn - x[firstNode] -
24  c_*tau*x[firstNode+1] -
25  b_/2.0*tau*tau*x[firstNode+2])/tau/tau/tau;
26 }
Derivative< X, A >::type derivative(const A &_)
Definition: Derivative.h:18
assert(m_qm.get())
Definition: DDAxes.h:10
unsigned ThirdOrderDelayODE::getPadeColumn ( ) const
inline

Definition at line 20 of file ThirdOrderDelayODE.h.

20 {return 3U;}
unsigned ThirdOrderDelayODE::getPadeRow ( ) const
inline

Definition at line 19 of file ThirdOrderDelayODE.h.

19 {return 0U;}
unsigned ThirdOrderDelayODE::nParameters ( ) const
inline

Definition at line 21 of file ThirdOrderDelayODE.h.

21 {return 3U;}
void ThirdOrderDelayODE::setParameters ( const double *  pars,
unsigned  nPars 
)

Definition at line 28 of file ThirdOrderDelayODE.cc.

References a_, assert(), b_, c_, and create_public_lumi_plots::exp.

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

Member Data Documentation

double ThirdOrderDelayODE::a_
private

Definition at line 27 of file ThirdOrderDelayODE.h.

Referenced by calculate(), and setParameters().

double ThirdOrderDelayODE::b_
private

Definition at line 28 of file ThirdOrderDelayODE.h.

Referenced by calculate(), and setParameters().

double ThirdOrderDelayODE::c_
private

Definition at line 29 of file ThirdOrderDelayODE.h.

Referenced by calculate(), and setParameters().