OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
MapAnalyser.h
Go to the documentation of this file.
1 //
2 // Class: MapAnalyser
3 // Organizes the function for a linear map analysis from
4 // ThickTracker.
5 // Transfer map -> tunes, symplecticity and stability
6 // Sigma Matrix -> (not projected) beam emittance
7 //
8 // This class is in an unfinished state.
9 // For some dicussion see https://gitlab.psi.ch/OPAL/src/issues/464
10 // Some cleanup was done in https://gitlab.psi.ch/OPAL/src/merge_requests/294
11 //
12 // Copyright (c) 2018, Philippe Ganz, ETH Zürich
13 // All rights reserved
14 //
15 // Implemented as part of the Master thesis
16 // "s-based maps from TPS & Lie-Series applied to Proton-Therapy Gantries"
17 //
18 // This file is part of OPAL.
19 //
20 // OPAL is free software: you can redistribute it and/or modify
21 // it under the terms of the GNU General Public License as published by
22 // the Free Software Foundation, either version 3 of the License, or
23 // (at your option) any later version.
24 //
25 // You should have received a copy of the GNU General Public License
26 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
27 //
28 
29 #ifndef MAP_ANALYSER_H
30 #define MAP_ANALYSER_H
31 
33 
34 #include "Utility/IpplTimings.h"
35 
36 #include <array>
37 #include <complex>
38 
40 {
41 public:
44 
45  MapAnalyser();
46 
52  void linTAnalyze(const fMatrix_t& /*tMatrix*/) {};
53 
54 
60  void linSigAnalyze(fMatrix_t& /*sigMatrix*/) {};
61 private:
62 
75  void eigenDecomp_m(const fMatrix_t& M, cfMatrix_t& eigenVal, cfMatrix_t& eigenVec, cfMatrix_t& invEigenVec);
76 
101  cfMatrix_t getBlockDiagonal_m(const fMatrix_t& M, cfMatrix_t& eigenVecM, cfMatrix_t& invEigenVecM);
102 
110  void printPhaseShift_m(fMatrix_t& Sigma, fMatrix_t tM, cfMatrix_t& oldN);
111 
120  void setNMatrix_m(fMatrix_t& M, cfMatrix_t& N, cfMatrix_t& invN);
121 
122 
123  fMatrix_t createRotMatrix_m(std::array<double, 3> phi);
124 
126 
128 
130 
132 
134 
135  void rearrangeEigen_m(cfMatrix_t& /*EigenVal*/, cfMatrix_t& /*EigenVec*/) {};
136 
137  void normalizeEigen_m(cfMatrix_t& eigenVec, cfMatrix_t& invEigenVec);
138 
139 private:
142 };
143 
144 #endif
IpplTimings::TimerRef mapAnalysis_m
Definition: MapAnalyser.h:140
cfMatrix_t invertMatrix_m(const cfMatrix_t &M)
void rearrangeEigen_m(cfMatrix_t &, cfMatrix_t &)
Definition: MapAnalyser.h:135
fMatrix_t createSkewMatrix_m()
cfMatrix_t complexTypeMatrix_m(fMatrix_t M)
void printPhaseShift_m(fMatrix_t &Sigma, fMatrix_t tM, cfMatrix_t &oldN)
void normalizeEigen_m(cfMatrix_t &eigenVec, cfMatrix_t &invEigenVec)
cfMatrix_t getBlockDiagonal_m(const fMatrix_t &M, cfMatrix_t &eigenVecM, cfMatrix_t &invEigenVecM)
void linSigAnalyze(fMatrix_t &)
Definition: MapAnalyser.h:60
IpplTimings::TimerRef bunchAnalysis_m
Definition: MapAnalyser.h:141
fMatrix_t realPartOfMatrix_m(cfMatrix_t cM)
void eigenDecomp_m(const fMatrix_t &M, cfMatrix_t &eigenVal, cfMatrix_t &eigenVec, cfMatrix_t &invEigenVec)
Definition: MapAnalyser.cpp:46
fMatrix_t imagPartOfMatrix_m(cfMatrix_t cM)
void setNMatrix_m(fMatrix_t &M, cfMatrix_t &N, cfMatrix_t &invN)
FMatrix< std::complex< double >, 6, 6 > cfMatrix_t
Definition: MapAnalyser.h:43
void linTAnalyze(const fMatrix_t &)
Definition: MapAnalyser.h:52
fMatrix_t createRotMatrix_m(std::array< double, 3 > phi)
FMatrix< double, 6, 6 > fMatrix_t
Definition: MapAnalyser.h:42
Timing::TimerRef TimerRef
Definition: IpplTimings.h:176