CMS 3D CMS Logo

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

#include <poly2d_base.h>

Public Member Functions

 poly2d_term ()
 
 poly2d_term (double C, unsigned nr, unsigned nz)
 
void Print (std::ostream &out=std::cout, bool first_term=true)
 

Public Attributes

double coeff
 
unsigned np [2]
 

Detailed Description

Definition at line 23 of file poly2d_base.h.

Constructor & Destructor Documentation

◆ poly2d_term() [1/2]

magfieldparam::poly2d_term::poly2d_term ( )
inline

Definition at line 27 of file poly2d_base.h.

27 { memset(this, 0, sizeof(*this)); }

◆ poly2d_term() [2/2]

magfieldparam::poly2d_term::poly2d_term ( double  C,
unsigned  nr,
unsigned  nz 
)
inline

Member Function Documentation

◆ Print()

void poly2d_term::Print ( std::ostream &  out = std::cout,
bool  first_term = true 
)

Definition at line 12 of file poly2d_base.cc.

References coeff, np, and MillePedeFileConverter_cfg::out.

12  {
13  if (first_term)
14  out << coeff;
15  else if (coeff > 0.)
16  out << " + " << coeff;
17  else
18  out << " - " << -coeff;
19  if (np[0] != 0) {
20  out << "*r";
21  if (np[0] != 1)
22  out << "^" << np[0];
23  }
24  if (np[1] != 0) {
25  out << "*z";
26  if (np[1] != 1)
27  out << "^" << np[1];
28  }
29 }

Member Data Documentation

◆ coeff

double magfieldparam::poly2d_term::coeff

◆ np

unsigned magfieldparam::poly2d_term::np[2]