EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ThreeDeePolynomial.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ThreeDeePolynomial.h
1 /* -------------------------------------------------------------------------- */
2 /* ThreeDeePolynomial.h */
3 /* */
4 /* 3D polynomial basic routines header file. */
5 /* */
6 /* A.Kisselev, PNPI, St.Petersburg, Russia. */
7 /* e-mail: kisselev@hermes.desy.de */
8 /* -------------------------------------------------------------------------- */
9 
10 #ifndef _THREE_DEE_POLYNOMIAL_H
11 #define _THREE_DEE_POLYNOMIAL_H
12 
13 class ThreeDeePolySpace;
14 
16  friend class ThreeDeePolySpace;
17 
18  public:
19  // Constructor;
21 
22  // Polynomial value at a given point;
23  double value(double xx[3]);
24 
25  // Calculate polynomial gradient;
26  int calculateGradient(ThreeDeePolynomial *gradient[3]);
27 
28  private:
29  // Polynomial may be turned off alltogether; really used?;
30  int off;
31 
32  // Back door; in principle one could use a declared polynomial
33  // on top of some other (parameter-compatible) ThreeDeePolySpace object;
34  // to this point I just do not want to overload the code; should
35  // check however that some functionality of mgrid routines (the
36  // only ones which are actually using this stuff) is not lost
37  // after moving this pointer from parameters to ThreeDeePolynomial class
38  // variable;
40 
41  // 'linear' means 'dim' coefficients with respect to the
42  // basis vectors; 'cff' are 3-dim array of coefficients
43  // to polynomials like 'x2yz';
44  double ***cff, *linear;
45 
46  // Get polynomial value at a given 3D space point;
47  double linearValue(double xx[3]);
48 
49  // Normalization, rescaling, increment; do not bother to create
50  // overloaded operators, sorry;
51  int normalize();
52  void multiply(double _cff);
53  void increment(ThreeDeePolynomial *incr);
54 
55  // Recalculate basis representation to cff[] array;
56  void convertLinearToCff();
57 } ;
58 
59 #endif