ATLAS Offline Software
Loading...
Searching...
No Matches
TransportJacobian.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6// Implementation file for class Trk::TransportJacobian
8// (c) ATLAS Detector software
11// Version 1.0 08/03/2007 I.Gavrilenko
14
16#include "GaudiKernel/MsgStream.h"
17#include <iomanip>
18#include <iostream>
19
21// Constructors
23
25 : AmgMatrix(5, 5)()
26{
27 (*this)(0, 0) = J[0];
28 (*this)(0, 1) = J[1];
29 (*this)(0, 2) = J[2];
30 (*this)(0, 3) = J[3];
31 (*this)(0, 4) = J[4];
32 (*this)(1, 0) = J[5];
33 (*this)(1, 1) = J[6];
34 (*this)(1, 2) = J[7];
35 (*this)(1, 3) = J[8];
36 (*this)(1, 4) = J[9];
37 (*this)(2, 0) = J[10];
38 (*this)(2, 1) = J[11];
39 (*this)(2, 2) = J[12];
40 (*this)(2, 3) = J[13];
41 (*this)(2, 4) = J[14];
42 (*this)(3, 0) = J[15];
43 (*this)(3, 1) = J[16];
44 (*this)(3, 2) = J[17];
45 (*this)(3, 3) = J[18];
46 (*this)(3, 4) = J[19];
47 (*this)(4, 0) = J[20];
48 (*this)(4, 1) = J[21];
49 (*this)(4, 2) = J[22];
50 (*this)(4, 3) = J[23];
51 (*this)(4, 4) = J[24];
52}
53
57
59// Dumps event information into the MsgStream
61
62MsgStream&
63Trk::operator<<(MsgStream& sl, const Trk::TransportJacobian& J)
64{
65 sl << "|-------------|-------------|-------------|-------------|-------------"
66 "|-------------|"
67 << std::endl;
68 sl << "| Jacobian(A) | Old /dL1 | /dL2 | /dPhi | /dThe "
69 "| /dCM |"
70 << std::endl;
71 sl << "|-------------|-------------|-------------|-------------|-------------"
72 "|-------------|"
73 << std::endl;
74
75 sl << "| New dL1 / |" << std::setw(12) << std::setprecision(5) << J(0, 0)
76 << " |" << std::setw(12) << std::setprecision(5) << J(0, 1) << " |"
77 << std::setw(12) << std::setprecision(5) << J(0, 2) << " |"
78 << std::setw(12) << std::setprecision(5) << J(0, 3) << " |"
79 << std::setw(12) << std::setprecision(5) << J(0, 4) << " |" << std::endl;
80 sl << "| dL2 / |" << std::setw(12) << std::setprecision(5) << J(1, 0)
81 << " |" << std::setw(12) << std::setprecision(5) << J(1, 1) << " |"
82 << std::setw(12) << std::setprecision(5) << J(1, 2) << " |"
83 << std::setw(12) << std::setprecision(5) << J(1, 3) << " |"
84 << std::setw(12) << std::setprecision(5) << J(1, 4) << " |" << std::endl;
85 sl << "| dPhi/ |" << std::setw(12) << std::setprecision(5) << J(2, 0)
86 << " |" << std::setw(12) << std::setprecision(5) << J(2, 1) << " |"
87 << std::setw(12) << std::setprecision(5) << J(2, 2) << " |"
88 << std::setw(12) << std::setprecision(5) << J(2, 3) << " |"
89 << std::setw(12) << std::setprecision(5) << J(2, 4) << " |" << std::endl;
90 sl << "| dThe/ |" << std::setw(12) << std::setprecision(5) << J(3, 0)
91 << " |" << std::setw(12) << std::setprecision(5) << J(3, 1) << " |"
92 << std::setw(12) << std::setprecision(5) << J(3, 2) << " |"
93 << std::setw(12) << std::setprecision(5) << J(3, 3) << " |"
94 << std::setw(12) << std::setprecision(5) << J(3, 4) << " |" << std::endl;
95 sl << "| dCM / |"
96
97 << std::setw(12) << std::setprecision(5) << J(4, 0) << " |"
98 << std::setw(12) << std::setprecision(5) << J(4, 1) << " |"
99 << std::setw(12) << std::setprecision(5) << J(4, 2) << " |"
100 << std::setw(12) << std::setprecision(5) << J(4, 3) << " |"
101 << std::setw(12) << std::setprecision(5) << J(4, 4) << " |" << std::endl;
102 sl << "|-------------|-------------|-------------|-------------|-------------"
103 "|-------------|"
104 << std::endl;
105 return sl;
106}
107
109// Dumps relevant information into the ostream
111
112std::ostream&
113Trk::operator<<(std::ostream& sl, const Trk::TransportJacobian& J)
114{
115 sl << "|-------------|-------------|-------------|-------------|-------------"
116 "|-------------|"
117 << std::endl;
118 sl << "| Jacobian(A) | Old /dL1 | /dL2 | /dPhi | /dThe "
119 "| /dCM |"
120 << std::endl;
121 sl << "|-------------|-------------|-------------|-------------|-------------"
122 "|-------------|"
123 << std::endl;
124
125 sl << "| New dL1 / |" << std::setw(12) << std::setprecision(5) << J(0, 0)
126 << " |" << std::setw(12) << std::setprecision(5) << J(0, 1) << " |"
127 << std::setw(12) << std::setprecision(5) << J(0, 2) << " |"
128 << std::setw(12) << std::setprecision(5) << J(0, 3) << " |"
129 << std::setw(12) << std::setprecision(5) << J(0, 4) << " |" << std::endl;
130 sl << "| dL2 / |" << std::setw(12) << std::setprecision(5) << J(1, 0)
131 << " |" << std::setw(12) << std::setprecision(5) << J(1, 1) << " |"
132 << std::setw(12) << std::setprecision(5) << J(1, 2) << " |"
133 << std::setw(12) << std::setprecision(5) << J(1, 3) << " |"
134 << std::setw(12) << std::setprecision(5) << J(1, 4) << " |" << std::endl;
135 sl << "| dPhi/ |" << std::setw(12) << std::setprecision(5) << J(2, 0)
136 << " |" << std::setw(12) << std::setprecision(5) << J(2, 1) << " |"
137 << std::setw(12) << std::setprecision(5) << J(2, 2) << " |"
138 << std::setw(12) << std::setprecision(5) << J(2, 3) << " |"
139 << std::setw(12) << std::setprecision(5) << J(2, 4) << " |" << std::endl;
140 sl << "| dThe/ |" << std::setw(12) << std::setprecision(5) << J(3, 0)
141 << " |" << std::setw(12) << std::setprecision(5) << J(3, 1) << " |"
142 << std::setw(12) << std::setprecision(5) << J(3, 2) << " |"
143 << std::setw(12) << std::setprecision(5) << J(3, 3) << " |"
144 << std::setw(12) << std::setprecision(5) << J(3, 4) << " |" << std::endl;
145 sl << "| dCM / |"
146
147 << std::setw(12) << std::setprecision(5) << J(4, 0) << " |"
148 << std::setw(12) << std::setprecision(5) << J(4, 1) << " |"
149 << std::setw(12) << std::setprecision(5) << J(4, 2) << " |"
150 << std::setw(12) << std::setprecision(5) << J(4, 3) << " |"
151 << std::setw(12) << std::setprecision(5) << J(4, 4) << " |" << std::endl;
152 sl << "|-------------|-------------|-------------|-------------|-------------"
153 "|-------------|"
154 << std::endl;
155 return sl;
156}
157
#define AmgMatrix(rows, cols)
This class represents the jacobian for transforming initial track parameters to new track parameters ...
TransportJacobian()=default
default all calling AmgMatrix methods
AmgMatrix(3, 3) NeutralParticleParameterCalculator
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output