OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Algorithms
bet
profile.h
Go to the documentation of this file.
1
/* profile.h
2
profile class definition
3
- calculates a functional profile from a mapping
4
5
Project: Beam Envelope Tracker (BET)
6
7
Revision history
8
Date Description Programmer
9
------------ -------------------------------------------- --------------
10
07-03-06 Created Rene Bakker
11
12
Last Revision:
13
$Id: profile.h 103 2007-05-08 16:21:44Z bakker $
14
*/
15
16
17
#ifndef _PROFILE_DEF
18
#define _PROFILE_DEF
19
20
#include <stdio.h>
21
22
#include <vector>
23
24
enum
Interpol_type
{
25
itype_spline
,
// spline interpolation
26
itype_lin
,
// linearl interpolation
27
};
28
29
class
Profile
{
30
int
31
n
;
32
double
33
yMax
,
// maximum of array
34
yMin
,
// minimum of array
35
sf
;
// scaling factor (1.0 by default)
36
std::vector<double>
x
,
y
,
y2
;
37
38
private
:
39
void
create
();
// general creator routine
40
41
public
:
42
Profile
(
double
);
// dummy creator (returns given value on all requests)
43
Profile
(
// creator from array
44
double
*,
// x
45
double
*,
// y
46
int
);
// number of points
47
Profile
(
// creator from file
48
char
*,
// filename
49
double
= 0.0);
// cutoff value
50
51
void
normalize
();
// set max of profile to 1.0
52
void
scale
(
double
);
// scale the amplitude
53
double
set
(
double
);
/* set the amplitude
54
returns the new scaling factor sf */
55
void
setSF
(
double
);
// set sf
56
double
getSF
();
// get sf
57
58
double
get
(
// get a value
59
double,
// x
60
Interpol_type
=
itype_spline
);
61
62
int
getN
();
// get number of points
63
64
double
max
();
// get maximum y-value
65
double
min
();
// get minimum y-value
66
double
xMax
();
// get maximum x-value
67
double
xMin
();
// get minimum x-value
68
69
double
Leff
();
// get effective length
70
double
Leff2
();
// get effective length of y^2
71
double
Labs
();
// get effective length from absolute value of field
72
73
void
dump
(FILE * = stdout,
double
= 0.0);
74
void
dump
(
// dump the profile in a SDDS file (ascii)
75
char
*,
// filename
76
double
= 0.0);
// offset
77
78
};
79
80
#endif
Profile::y
std::vector< double > y
Definition:
profile.h:36
Profile::getSF
double getSF()
Definition:
profile.cpp:202
itype_spline
Definition:
profile.h:25
Profile::create
void create()
Definition:
profile.cpp:106
Profile::max
double max()
Definition:
profile.cpp:252
Profile::n
int n
Definition:
profile.h:31
Profile::getN
int getN()
Definition:
profile.cpp:244
Profile::x
std::vector< double > x
Definition:
profile.h:36
Profile::yMin
double yMin
Definition:
profile.h:33
Profile::yMax
double yMax
Definition:
profile.h:33
Profile::scale
void scale(double)
Definition:
profile.cpp:185
itype_lin
Definition:
profile.h:26
Profile::Labs
double Labs()
Definition:
profile.cpp:282
Profile::min
double min()
Definition:
profile.cpp:248
Profile::Profile
Profile(double)
Definition:
profile.cpp:43
Profile::normalize
void normalize()
Definition:
profile.cpp:179
Profile::set
double set(double)
Definition:
profile.cpp:189
Profile::sf
double sf
Definition:
profile.h:33
Profile::setSF
void setSF(double)
Definition:
profile.cpp:198
Profile::dump
void dump(FILE *=stdout, double=0.0)
Definition:
profile.cpp:218
Profile::xMin
double xMin()
Definition:
profile.cpp:260
Profile::Leff2
double Leff2()
Definition:
profile.cpp:273
Interpol_type
Interpol_type
Definition:
profile.h:24
Profile
Definition:
profile.h:29
Profile::Leff
double Leff()
Definition:
profile.cpp:264
Profile::xMax
double xMax()
Definition:
profile.cpp:256
Profile::y2
std::vector< double > y2
Definition:
profile.h:36
Generated on Sat Jan 4 2020 14:47:44 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5