Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
cortes_c
src
Commits
77566f77
Commit
77566f77
authored
Aug 14, 2018
by
frey_m
Browse files
Gauss-Matched: Add option to match single sector or full machine (all sectors)
parent
7359476d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
src/Distribution/Distribution.cpp
src/Distribution/Distribution.cpp
+13
-3
src/Distribution/Distribution.h
src/Distribution/Distribution.h
+2
-1
No files found.
src/Distribution/Distribution.cpp
View file @
77566f77
...
...
@@ -1282,6 +1282,8 @@ void Distribution::createMatchedGaussDistribution(size_t numberOfParticles, doub
"didn't find any Cyclotron element in line"
);
}
const
Cyclotron
*
CyclotronElement
=
CyclotronVisitor
.
front
();
bool
full
=
!
Attributes
::
getBool
(
itsAttr
[
Attrib
::
Distribution
::
SECTOR
]);
*
gmsg
<<
"* ----------------------------------------------------"
<<
endl
;
*
gmsg
<<
"* About to find closed orbit and matched distribution "
<<
endl
;
...
...
@@ -1290,8 +1292,12 @@ void Distribution::createMatchedGaussDistribution(size_t numberOfParticles, doub
<<
" EY= "
<<
Attributes
::
getReal
(
itsAttr
[
Attrib
::
Distribution
::
EY
])
<<
" ET= "
<<
Attributes
::
getReal
(
itsAttr
[
Attrib
::
Distribution
::
ET
])
<<
endl
<<
"* FMAPFN= "
<<
Attributes
::
getString
(
itsAttr
[
Attrib
::
Distribution
::
FMAPFN
])
<<
endl
//CyclotronElement->getFieldMapFN() << endl
<<
"* FMSYM= "
<<
(
int
)
Attributes
::
getReal
(
itsAttr
[
Attrib
::
Distribution
::
MAGSYM
])
<<
" HN= "
<<
CyclotronElement
->
getCyclHarm
()
<<
"* FMSYM= "
<<
(
int
)
Attributes
::
getReal
(
itsAttr
[
Attrib
::
Distribution
::
MAGSYM
]);
if
(
full
)
*
gmsg
<<
"* SECTOR: "
<<
"match using all sectors"
<<
endl
;
else
*
gmsg
<<
"* SECTOR: "
<<
"match using single sector"
<<
endl
;
*
gmsg
<<
" HN= "
<<
CyclotronElement
->
getCyclHarm
()
<<
" PHIINIT= "
<<
CyclotronElement
->
getPHIinit
()
<<
endl
;
*
gmsg
<<
"* ----------------------------------------------------"
<<
endl
;
...
...
@@ -1337,7 +1343,7 @@ void Distribution::createMatchedGaussDistribution(size_t numberOfParticles, doub
CyclotronElement
->
getPHIinit
(),
Attributes
::
getReal
(
itsAttr
[
Attrib
::
Distribution
::
RGUESS
]),
Attributes
::
getString
(
itsAttr
[
Attrib
::
Distribution
::
FMTYPE
]),
false
,
f
alse
))
{
false
,
f
ull
))
{
std
::
array
<
double
,
3
>
Emit
=
siggen
->
getEmittances
();
...
...
@@ -3501,6 +3507,10 @@ void Distribution::setAttributes() {
=
Attributes
::
makeReal
(
"ORDERMAPS"
,
"Order used in the field expansion "
,
7
);
itsAttr
[
Attrib
::
Distribution
::
MAGSYM
]
=
Attributes
::
makeReal
(
"MAGSYM"
,
"Number of sector magnets "
,
0
);
itsAttr
[
Attrib
::
Distribution
::
SECTOR
]
=
Attributes
::
makeBool
(
"SECTOR"
,
"Match using single sector (true)"
"(false: using all sectors) (default: true)"
,
true
);
itsAttr
[
Attrib
::
Distribution
::
RGUESS
]
=
Attributes
::
makeReal
(
"RGUESS"
,
"Guess value of radius (m) for closed orbit finder "
,
-
1
);
...
...
src/Distribution/Distribution.h
View file @
77566f77
...
...
@@ -185,7 +185,8 @@ namespace Attrib
EX
,
// below is for the matched distribution
EY
,
ET
,
MAGSYM
,
// number of sector magnets
MAGSYM
,
// Matched-Gauss: number of sector magnets
SECTOR
,
// Matched-Gauss: single sector or full machine
LINE
,
FMAPFN
,
FMTYPE
,
// field map type used in matched gauss distribution
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment