CMS 3D CMS Logo

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

Definition at line 28 of file poly2d_base.h.

28  {
29  coeff = C;
30  np[0] = nr;
31  np[1] = nz;
32  }

References gen::C, coeff, np, and EgHLTOffHistBins_cfi::nr.

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.

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 }

References coeff, np, and MillePedeFileConverter_cfg::out.

Member Data Documentation

◆ coeff

double magfieldparam::poly2d_term::coeff

◆ np

unsigned magfieldparam::poly2d_term::np[2]
magfieldparam::poly2d_term::coeff
double coeff
Definition: poly2d_base.h:24
magfieldparam::poly2d_term::np
unsigned np[2]
Definition: poly2d_base.h:25
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
gen::C
C
Definition: PomwigHadronizer.cc:78
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31