CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
PhysicsTools::Spline::Segment Struct Reference

internal class describing a "segment" (between two x points) More...

Public Member Functions

float deriv (float x) const
 
float eval (float x) const
 
float integral (float x) const
 

Public Attributes

float area
 
float coeffs [4]
 

Detailed Description

internal class describing a "segment" (between two x points)

Definition at line 56 of file Spline.h.

Member Function Documentation

float PhysicsTools::Spline::Segment::deriv ( float  x) const

Definition at line 32 of file Spline.cc.

References ztail::d, tmp, and x.

Referenced by PhysicsTools::Spline::deriv().

33 {
34  float tmp;
35  float d = 0.0;
36  d += coeffs[1]; tmp = x;
37  d += coeffs[2] * tmp * 2.0; tmp *= x;
38  d += coeffs[3] * tmp * 3.0;
39  return d;
40 }
tuple d
Definition: ztail.py:151
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
Definition: DDAxes.h:10
float PhysicsTools::Spline::Segment::eval ( float  x) const

Definition at line 21 of file Spline.cc.

References coeffs, tmp, x, and detailsBasic3DVector::y.

Referenced by PhysicsTools::Spline::eval().

22 {
23  float tmp;
24  float y = 0.0;
25  y += coeffs[0]; tmp = x;
26  y += coeffs[1] * tmp; tmp *= x;
27  y += coeffs[2] * tmp; tmp *= x;
28  y += coeffs[3] * tmp;
29  return y;
30 }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
Definition: DDAxes.h:10
float PhysicsTools::Spline::Segment::integral ( float  x) const

Definition at line 42 of file Spline.cc.

References PhysicsTools::Spline::area, tmp, and x.

Referenced by PhysicsTools::Spline::set().

43 {
44  float tmp = x;
45  float area = this->area;
46  area += coeffs[0] * tmp; tmp *= x;
47  area += coeffs[1] * tmp * (1.0 / 2.0); tmp *= x;
48  area += coeffs[2] * tmp * (1.0 / 3.0); tmp *= x;
49  area += coeffs[3] * tmp * (1.0 / 4.0);
50  return area;
51 }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
Definition: DDAxes.h:10

Member Data Documentation

float PhysicsTools::Spline::Segment::area

Definition at line 58 of file Spline.h.

Referenced by PhysicsTools::Spline::set().

float PhysicsTools::Spline::Segment::coeffs[4]

Definition at line 57 of file Spline.h.

Referenced by eval(), and PhysicsTools::Spline::set().