Project
Loading...
Searching...
No Matches
Cartesian.cxx
Go to the documentation of this file.
1
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3
// All rights not expressly granted are reserved.
4
//
5
// This software is distributed under the terms of the GNU General Public
6
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7
//
8
// In applying this license CERN does not waive the privileges and immunities
9
// granted to it by virtue of its status as an Intergovernmental Organization
10
// or submit itself to any jurisdiction.
11
12
#include <iostream>
13
#include "
MathUtils/Cartesian.h
"
14
15
ClassImp
(
o2::math_utils::Transform3D
);
16
ClassImp
(
o2::math_utils::Rotation2Df_t
);
17
ClassImp
(
o2::math_utils::Rotation2Dd_t
);
18
19
namespace
o2
20
{
21
namespace
math_utils
22
{
23
24
//_________________________________________________
25
Transform3D::Transform3D
(
const
TGeoMatrix&
m
)
26
{
27
/*
28
* Construct from TGeoMatrix or its derived classes
29
*/
30
set
(
m
);
31
}
32
33
//_________________________________________________
34
void
Transform3D::set
(
const
TGeoMatrix&
m
)
35
{
36
/*
37
* Set parameters from TGeoMatrix
38
*/
39
const
double
*
t
=
m
.GetTranslation();
40
const
double
*
r
=
m
.GetRotationMatrix();
41
SetComponents(
r
[0],
r
[1],
r
[2],
t
[0],
r
[3],
r
[4],
r
[5],
t
[1],
r
[6],
r
[7],
r
[8],
t
[2]);
42
}
43
44
//_________________________________________________
45
void
Transform3D::print
()
const
46
{
47
/*
48
* print itself
49
*/
50
std::cout << *
this
<< std::endl;
51
}
52
53
}
// namespace math_utils
54
}
// namespace o2
55
56
//_________________________________________________
57
std::ostream&
operator<<
(std::ostream& os,
const
o2::math_utils::Rotation2Df_t
&
t
)
58
{
59
float
cs, sn;
60
t
.getComponents(cs, sn);
61
os <<
"cos: "
<< cs <<
" sin: "
<< sn;
62
return
os;
63
}
64
65
//_________________________________________________
66
std::ostream&
operator<<
(std::ostream& os,
const
o2::math_utils::Rotation2Dd_t
&
t
)
67
{
68
double
cs, sn;
69
t
.getComponents(cs, sn);
70
os <<
"cos: "
<< cs <<
" sin: "
<< sn;
71
return
os;
72
}
ClassImp
ClassImp(o2::math_utils::Transform3D)
operator<<
std::ostream & operator<<(std::ostream &os, const o2::math_utils::Rotation2Df_t &t)
Definition
Cartesian.cxx:57
Cartesian.h
t
t
Definition
GPUSettingsListStandalone.h:20
o2::math_utils::Rotation2D
transformation types
Definition
Cartesian.h:63
o2::math_utils::Transform3D
Definition
Cartesian.h:160
o2::math_utils::Transform3D::Transform3D
Transform3D()=default
o2::math_utils::Transform3D::print
void print() const
Definition
Cartesian.cxx:45
o2::math_utils::Transform3D::set
void set(const TGeoMatrix &m)
Definition
Cartesian.cxx:34
unsigned char
m
const GLfloat * m
Definition
glcorearb.h:4066
o2::its::math_utils
Definition
MathUtils.h:26
o2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Definition
FlattenRestore.h:23
Common
MathUtils
src
Cartesian.cxx
Generated on Tue Nov 17 2026 08:58:16 for Project by
1.9.8