From 2702c2e967ac49c7caa3b606a73f09d641130b4b Mon Sep 17 00:00:00 2001
From: Philippe Ganz <gp@student.ethz.ch>
Date: Thu, 9 Aug 2018 14:42:04 +0200
Subject: [PATCH] simplified unit transformation in
 ThickTracker::updateParticle_m

---
 src/Algorithms/MapAnalyser.cpp      | 21 ++++++++++++++++++---
 tests/Maps/FODO/FODO.in             |  3 ++-
 tests/Maps/FODODipole/FODODipole.in |  2 +-
 3 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/src/Algorithms/MapAnalyser.cpp b/src/Algorithms/MapAnalyser.cpp
index 9f12d78fc..faf34d0a5 100644
--- a/src/Algorithms/MapAnalyser.cpp
+++ b/src/Algorithms/MapAnalyser.cpp
@@ -1,3 +1,20 @@
+// ------------------------------------------------------------------------
+// Copyright: see Copyright.readme
+// ------------------------------------------------------------------------
+//
+// Class: MapAnalyser
+//   Organizes the function for a linear map analysis from
+//   ThickTracker.
+//   Transfer map -> tunes, symplecticity and stability
+//   Sigma Matrix -> (not projected) beam emittance
+//
+// ------------------------------------------------------------------------
+//
+// $Author: ganz $
+//
+// ------------------------------------------------------------------------
+
+
 #include "MapAnalyser.h"
 
 #include <fstream>
@@ -31,7 +48,7 @@ void MapAnalyser::linTAnalyze(const fMatrix_t& tMatrix){
     cfMatrix_t eigenValM, eigenVecM, invEigenVecM;
 	eigenDecomp_m(tMatrix, eigenValM, eigenVecM, invEigenVecM);
         
-	//normaize eigen Vectors
+	//normalize eigen Vectors
 	for (int i=0; i <6 ; i++){
 	    double temp=0;
 
@@ -443,8 +460,6 @@ MapAnalyser::cfMatrix_t MapAnalyser::complexTypeMatrix_m(fMatrix_t M){
 
 MapAnalyser::cfMatrix_t MapAnalyser::invertMatrix_m(const cfMatrix_t& M){
     
-
-
     gsl_set_error_handler_off();
     //gsl_vector_complex *m = gsl_vector_complex_alloc(6);
     gsl_matrix_complex *m = gsl_matrix_complex_alloc(6, 6);
diff --git a/tests/Maps/FODO/FODO.in b/tests/Maps/FODO/FODO.in
index 1d3e31869..0edaa0ee1 100644
--- a/tests/Maps/FODO/FODO.in
+++ b/tests/Maps/FODO/FODO.in
@@ -25,6 +25,7 @@ DG2: DRIFT, 		L=0.3, 				 ELEMEDGE=1.900, NSLICES=10;
 QP3: QUADRUPOLE, 	L=0.3, 	K1= 8.64195, ELEMEDGE=2.200, NSLICES=15;
 D3:  DRIFT, 		L=.9, 				 ELEMEDGE=2.500, NSLICES=5;
 D4:  DRIFT, 		L=.3, 				 ELEMEDGE=3.400, NSLICES=20;
+
 //QUADTEST: LINE=(D1);
 QUADTEST: LINE=( D1, QP1 , DG1, QP2, DG2, QP3, D3, D4);
 
@@ -47,7 +48,7 @@ BEAM1: BEAM, PARTICLE=PROTON, PC=P0, NPART=200, BCURRENT=2.0e-03, BFREQ=rf, CHAR
 SELECT, LINE=QUADTEST;
 
 
-TRACK, LINE= QUADTEST, BEAM=BEAM1, MAXSTEPS=10000, DT=1.0e-10, ZSTOP=4.0, MAP_ORDER=8;
+TRACK, LINE= QUADTEST, BEAM=BEAM1, MAXSTEPS=10000, DT=1.0e-10, ZSTOP=4.0, MAP_ORDER=2;
 
 RUN, METHOD = "THICK", BEAM=BEAM1, FIELDSOLVER=FS1, DISTRIBUTION=DIST1;
 
diff --git a/tests/Maps/FODODipole/FODODipole.in b/tests/Maps/FODODipole/FODODipole.in
index e4f833c2e..95f95405d 100644
--- a/tests/Maps/FODODipole/FODODipole.in
+++ b/tests/Maps/FODODipole/FODODipole.in
@@ -57,7 +57,7 @@ BEAM1: BEAM, PARTICLE=ELECTRON, PC=P0, NPART=200, BCURRENT=2.0e-03, BFREQ=rf, CH
 SELECT, LINE=FODOCELL;
 
 
-TRACK, LINE= FODOCELL, BEAM=BEAM1, MAXSTEPS=10000, DT=1.0e-10, ZSTOP=4.4, MAP_ORDER=8;
+TRACK, LINE= FODOCELL, BEAM=BEAM1, MAXSTEPS=10000, DT=1.0e-10, ZSTOP=4.4, MAP_ORDER=3;
 
 RUN, METHOD = "THICK", BEAM=BEAM1, FIELDSOLVER=FS1, DISTRIBUTION=DIST;
 
-- 
GitLab