Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
MagneticField
ParametrizedEngine
src
rz_poly.h
Go to the documentation of this file.
1
#ifndef rz_poly_h
2
#define rz_poly_h
3
10
#include <vector>
11
12
namespace
magfieldparam {
13
14
//_______________________________________________________________________________
15
struct
poly_term
{
16
double
coeff
;
17
int
np
[2];
18
};
19
20
//_______________________________________________________________________________
21
typedef
std::vector<poly_term>
poly_vect
;
22
//_______________________________________________________________________________
23
typedef
std::vector<poly_vect>
poly_arr
;
24
25
//_______________________________________________________________________________
26
class
rz_poly
{
// represent a set of homogeneous polynomials
27
28
private
:
29
30
poly_arr
data
;
31
int
max_nr
,
max_nz
,
n_active
;
32
double
*
r_pow
;
33
double
*
z_pow
;
34
bool
*
is_off
;
35
36
public
:
37
38
rz_poly
() :
data
(),
max_nr
(0),
max_nz
(0),
n_active
(0),
39
r_pow
(0),
z_pow
(0),
is_off
(0) {};
40
41
rz_poly
(
int
N
);
42
rz_poly
(
const
rz_poly
&
S
);
43
~rz_poly
();
44
45
void
SetOFF
(
int
npoly);
46
void
SetON
(
int
npoly);
47
void
SetAllON
(
int
npoly) {
if
(
is_off
)
std::fill
(
is_off
,
is_off
+
data
.size(),
false
);}
48
49
rz_poly
Diff
(
int
nvar,
bool
keep_empty =
false
);
50
rz_poly
Int
(
int
nvar);
51
52
rz_poly
&
operator*=
(
double
C
);
53
rz_poly
&
operator*=
(
double
*
C
);
54
55
double
GetSVal
(
double
r
,
double
z,
const
double
*
C
)
const
;
56
double
*
GetVVal
(
double
r
,
double
z,
double
*rez_out = 0);
57
58
int
GetMaxRPow
()
const
{
return
max_nr
-1;}
59
int
GetMaxZPow
()
const
{
return
max_nz
-1;}
60
int
GetLength
()
const
{
return
(
int
)
data
.size();}
61
int
GetNActive
()
const
{
return
n_active
;}
62
63
double
*
Expand
(
double
*
C
);
64
65
void
Print
();
66
67
};
68
}
69
70
#endif
magfieldparam::poly_vect
std::vector< poly_term > poly_vect
Definition:
rz_poly.h:21
lumiContext.fill
string fill
Definition:
lumiContext.py:319
magfieldparam::rz_poly::GetNActive
int GetNActive() const
Definition:
rz_poly.h:61
magfieldparam::rz_poly
Definition:
rz_poly.h:26
magfieldparam::rz_poly::max_nz
int max_nz
Definition:
rz_poly.h:31
magfieldparam::poly_term::coeff
double coeff
Definition:
rz_poly.h:16
magfieldparam::rz_poly::~rz_poly
~rz_poly()
Definition:
rz_poly.cc:80
funct::C
C
Definition:
Factorize.h:141
magfieldparam::rz_poly::rz_poly
rz_poly()
Definition:
rz_poly.h:38
magfieldparam::rz_poly::SetAllON
void SetAllON(int npoly)
Definition:
rz_poly.h:47
magfieldparam::poly_term
Definition:
rz_poly.h:15
magfieldparam::poly_arr
std::vector< poly_vect > poly_arr
Definition:
rz_poly.h:23
magfieldparam::rz_poly::SetOFF
void SetOFF(int npoly)
Definition:
rz_poly.cc:88
magfieldparam::poly_term::np
int np[2]
Definition:
rz_poly.h:17
magfieldparam::rz_poly::Print
void Print()
Definition:
rz_poly.cc:107
magfieldparam::rz_poly::SetON
void SetON(int npoly)
Definition:
rz_poly.cc:97
magfieldparam::rz_poly::max_nr
int max_nr
Definition:
rz_poly.h:31
magfieldparam::rz_poly::operator*=
rz_poly & operator*=(double C)
Definition:
rz_poly.cc:217
magfieldparam::rz_poly::GetSVal
double GetSVal(double r, double z, const double *C) const
Definition:
rz_poly.cc:246
magfieldparam::rz_poly::GetMaxZPow
int GetMaxZPow() const
Definition:
rz_poly.h:59
N
#define N
Definition:
blowfish.cc:9
magfieldparam::rz_poly::GetVVal
double * GetVVal(double r, double z, double *rez_out=0)
Definition:
rz_poly.cc:274
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition:
Particle.cc:99
magfieldparam::rz_poly::z_pow
double * z_pow
Definition:
rz_poly.h:33
magfieldparam::rz_poly::GetMaxRPow
int GetMaxRPow() const
Definition:
rz_poly.h:58
magfieldparam::rz_poly::data
poly_arr data
Definition:
rz_poly.h:30
magfieldparam::rz_poly::Diff
rz_poly Diff(int nvar, bool keep_empty=false)
Definition:
rz_poly.cc:128
magfieldparam::rz_poly::n_active
int n_active
Definition:
rz_poly.h:31
alignCSCRings.r
list r
Definition:
alignCSCRings.py:92
magfieldparam::rz_poly::Expand
double * Expand(double *C)
Definition:
rz_poly.cc:311
magfieldparam::rz_poly::Int
rz_poly Int(int nvar)
Definition:
rz_poly.cc:184
magfieldparam::rz_poly::GetLength
int GetLength() const
Definition:
rz_poly.h:60
magfieldparam::rz_poly::r_pow
double * r_pow
Definition:
rz_poly.h:32
magfieldparam::rz_poly::is_off
bool * is_off
Definition:
rz_poly.h:34
Generated for CMSSW Reference Manual by
1.8.5