Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
TRACY3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Optics
TRACY3
Commits
0a73a88a
Commit
0a73a88a
authored
14 years ago
by
nadolski
Browse files
Options
Downloads
Patches
Plain Diff
add feature
parent
547e397a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tracy/tools/soltracy.cc
+45
-30
45 additions, 30 deletions
tracy/tools/soltracy.cc
tracy/tools/testtracy.cc
+1
-1
1 addition, 1 deletion
tracy/tools/testtracy.cc
with
46 additions
and
31 deletions
tracy/tools/soltracy.cc
+
45
−
30
View file @
0a73a88a
...
...
@@ -71,6 +71,12 @@ extern bool freq_map;
ReadCh
(
chamber_file
);
/* read vacuum chamber from a file "Apertures.dat" , soleil version*/
PrintCh
();
// print chamber into chamber.out
//get_matching_params_scl(); // get tunes and beta functions at entrance
get_alphac2
();
// compute up to 3rd order mcf
//cout << endl << "computing tune shifts" << endl;
//dnu_dA(10e-3, 5e-3, 0.002);
//get_ksi2(0.0); // this gets the chromas and writes them into chrom2.out
// compute tunes by tracking (should be the same as by DA)
if
(
TuneTracFlag
==
true
)
{
...
...
@@ -102,13 +108,12 @@ extern bool freq_map;
printglob
();
/* print parameter list */
}
//SetKLpar(ElemIndex("QT"), 1, 2L, 0.001026770838382);
// coupling calculation
if
(
CouplingFlag
==
true
){
Ring_GetTwiss
(
chroma
=
true
,
0.0
);
/* Compute and get Twiss parameters */
printlatt
();
/* dump linear lattice functions into "linlat.dat" */
// Coupling_Edwards_Teng();
GetEmittance
(
ElemIndex
(
"cav"
),
true
);
Coupling_Edwards_Teng
();
printglob
();
/* print parameter list */
}
...
...
@@ -117,7 +122,8 @@ extern bool freq_map;
SetErr
();
Ring_GetTwiss
(
chroma
=
true
,
0.0
);
/* Compute and get Twiss parameters */
printlatt
();
/* dump linear lattice functions into "linlat.dat" */
// Coupling_Edwards_Teng();
Coupling_Edwards_Teng
();
GetEmittance
(
ElemIndex
(
"cav"
),
true
);
printglob
();
/* print parameter list */
}
...
...
@@ -137,6 +143,40 @@ extern bool freq_map;
printglob
();
}
}
/******************************************************************************************/
// COMPUTATION PART after setting the model
/******************************************************************************************/
//first print the full lattice with error as a flat file
prtmfile
(
"flat_file_error.dat"
);
// writes flat file /* very important file for debug*/
// computes TuneShift with amplitudes
if
(
AmplitudeTuneShiftFlag
==
true
){
if
(
ChamberFlag
==
true
){
NuDx
(
_AmplitudeTuneShift_nxpoint
,
_AmplitudeTuneShift_nypoint
,
_AmplitudeTuneShift_nturn
,
_AmplitudeTuneShift_xmax
,
_AmplitudeTuneShift_ymax
,
_AmplitudeTuneShift_delta
);
//NuDx(31L,21L,516L,0.025,0.005,dP);
}
else
{
// Utility ?
NuDx
(
50L
,
30L
,
516L
,
0.035
,
0.02
,
dP
);
}
}
if
(
EnergyTuneShiftFlag
==
true
){
if
(
ChamberFlag
==
true
){
NuDp
(
_EnergyTuneShift_npoint
,
_EnergyTuneShift_nturn
,
_EnergyTuneShift_deltamax
);
//NuDp(31L,1026L,0.06);
}
else
{
// utility ?
NuDp
(
31L
,
1026L
,
0.06
);
}
}
// Computes FMA
if
(
FmapFlag
==
true
){
if
(
ChamberFlag
==
true
){
...
...
@@ -148,7 +188,7 @@ extern bool freq_map;
if
(
DetailedFMAFlag
==
true
)
fmap
(
100
,
50
,
1026
,
20e-3
,
5e-3
,
0.0
,
true
);
}
else
{
else
{
// Utility
if
(
ExperimentFMAFlag
==
true
)
fmap
(
40
,
12
,
258
,
-
32e-3
,
5e-3
,
0.0
,
true
);
if
(
DetailedFMAFlag
==
true
)
...
...
@@ -169,31 +209,6 @@ extern bool freq_map;
// MomentumAcceptance(1L, 108L, 0.01, 0.05, 100L, -0.01, -0.05, 100L);
}
// computes TuneShift with amplitudes
if
(
AmplitudeTuneShiftFlag
==
true
){
if
(
ChamberFlag
==
true
){
NuDx
(
_AmplitudeTuneShift_nxpoint
,
_AmplitudeTuneShift_nypoint
,
_AmplitudeTuneShift_nturn
,
_AmplitudeTuneShift_xmax
,
_AmplitudeTuneShift_ymax
,
_AmplitudeTuneShift_delta
);
//NuDx(31L,21L,516L,0.025,0.005,dP);
}
else
{
NuDx
(
50L
,
30L
,
516L
,
0.035
,
0.02
,
dP
);
}
}
if
(
EnergyTuneShiftFlag
==
true
){
if
(
ChamberFlag
==
true
){
NuDp
(
_EnergyTuneShift_npoint
,
_EnergyTuneShift_nturn
,
_EnergyTuneShift_deltamax
);
//NuDp(31L,1026L,0.06);
}
else
{
NuDp
(
31L
,
1026L
,
0.06
);
}
}
// induced amplitude
if
(
InducedAmplitudeFlag
==
true
){
...
...
This diff is collapsed.
Click to expand it.
tracy/tools/testtracy.cc
+
1
−
1
View file @
0a73a88a
...
...
@@ -450,7 +450,7 @@ prtmfile("flat_file.dat"); // writes flat file /* very important file for debu
if
(
false
)
{
cout
<<
endl
;
cout
<<
"computing tune shifts"
<<
endl
;
dnu_dA
(
2
0
e-3
,
10
e-3
,
0.0
);
dnu_dA
(
2
5
e-3
,
5
e-3
,
0.0
);
get_ksi2
(
delta
);
// this gets the chromas and writes them into chrom2.out
// get_ksi2(5.0e-2); // this gets the chromas and writes them into chrom2.out
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment