ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TestBeam
TBCaloGeometry
TBCaloGeometry
TBCaloCoordinate.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// ***************************************************************************
6
// Liquid Argon H8 Combined TestBeam Geometry
7
// -----------------------------------------
8
//
9
// 30.9.2004 Creation of the class by claire.bourdarios@cern.ch
10
//
11
// ***************************************************************************
12
13
#ifndef TBCALOGEOMETRY_TBCALOCOORDINATE_H
14
#define TBCALOGEOMETRY_TBCALOCOORDINATE_H
15
16
#include "
CaloDetDescr/ICaloCoordinateTool.h
"
17
#include "
AthenaBaseComps/AthAlgTool.h
"
18
19
class
CaloPhiRange
;
20
class
ITBCaloPosTool
;
21
class
IMessageSvc;
22
class
TBDetDescrManager
;
23
24
//done in the interface : #include "CLHEP/Geometry/Transform3D.h"
25
26
//<<<<<< INCLUDES >>>>>>
27
66
67
class
TBCaloCoordinate
:
public
extends<AthAlgTool, ICaloCoordinateTool>
68
{
69
public
:
70
71
// Constructors:
72
73
TBCaloCoordinate
(
const
std::string&
type
,
74
const
std::string& name,
75
const
IInterface* parent);
76
77
~TBCaloCoordinate
();
78
StatusCode
initialize
();
79
StatusCode
finalize
();
80
81
// Methods for general use:
82
83
// 1) basic translation between the 2 cartesian coordinate systems:
84
85
void
ctb_to_local
(
Amg::Vector3D
& pt_ctb,
86
Amg::Vector3D
& pt_local);
87
void
local_to_ctb
(
Amg::Vector3D
& pt_local,
88
Amg::Vector3D
& pt_ctb);
89
90
void
ctb_to_local
(
double
& x_ctb,
double
& y_ctb,
double
& z_ctb,
91
double
& x_local,
double
& y_local,
double
& z_local);
92
void
local_to_ctb
(
double
& x_local,
double
& y_local,
double
& z_local,
93
double
& x_ctb,
double
& y_ctb,
double
& z_ctb);
94
95
// 2) the most common use-case :
96
// the H8 beam goes along the x axis -> that are the local
97
// eta and phi seen by the calorimeter ?
98
99
double
beam_local_eta
();
100
double
beam_local_phi
();
101
102
103
// Methods of less general interest : ( see ICaloCoordinate.h for comments )
104
105
// real table reading :
106
virtual
void
read_table_position
();
107
108
// hand-coded value :
109
virtual
void
read_fake_table_position
();
110
111
Amg::Transform3D
*
transform_calo_to_ctb
();
112
Amg::Transform3D
*
transform_ctb_to_calo
();
113
114
void
print_transform
(
Amg::Transform3D
& htrans);
115
116
private
:
117
// Avoid coverity warnings
118
TBCaloCoordinate
(
const
TBCaloCoordinate
&);
119
TBCaloCoordinate
&
operator=
(
const
TBCaloCoordinate
&);
120
121
// these methods are used by read_table_position to get numbers :
122
123
bool
read_data_position
();
// for H8 data
124
bool
read_MC_position
();
// for H8 MC where numbers are in POOL
125
void
read_user_position
();
// for H8 MC where numbers are not avail
126
void
read_neutral_position
();
// for Atlas
127
128
// these are the famous key numbers :
129
130
// 1) position of the table axis (oral tradition)
131
double
m_table_axis_data
;
132
double
m_table_axis_MC
;
133
// 2) distance between the table axis and projective point (oral tradition)
134
double
m_table_proj_data
;
135
double
m_table_proj_MC
;
136
// 3) angle of rotation : default is set in jobOpt (property)
137
// + will be overwritten if DB/Pool is used
138
// + will be ignored "if atlas"
139
double
m_table_eta
;
140
141
// Another layer on top, "in case" the user wants to add an
142
// extra HepTransform on top of these known moovements :
143
double
m_calo_phi_shift
;
144
double
m_calo_theta_shift
;
145
double
m_calo_psi_shift
;
146
double
m_calo_x_shift
;
147
double
m_calo_y_shift
;
148
double
m_calo_z_shift
;
149
150
// these will be read in the DB :
151
double
m_table_theta
;
152
double
m_table_z
;
153
double
m_table_delta
;
154
// this is calculated from the DB info :
155
double
m_table_calc_theta
;
156
double
m_table_calc_x
;
157
158
// these properties define what we are reading (see jobOpt)
159
int
m_DBRead
;
160
int
m_PoolRead
;
161
162
// keep the 2 steps separated : table rotation, then translation
163
//HepGeom::Rotate3D* m_table_rotate;
164
Amg::RotationMatrix3D
*
m_table_rotate
;
165
//HepGeom::Translate3D* m_table_shift;
166
Amg::Translation3D
*
m_table_shift
;
167
168
// the user defined one on top :
169
170
Amg::Transform3D
m_rotz_extra_calo_to_ctb
;
171
Amg::Transform3D
m_roty_extra_calo_to_ctb
;
172
Amg::Transform3D
m_rotx_extra_calo_to_ctb
;
173
Amg::Transform3D
m_translxyz_extra_calo_to_ctb
;
174
175
// the final transform from local to ctb :
176
Amg::Transform3D
*
m_transform_calo_to_ctb
;
177
Amg::Transform3D
*
m_transform_ctb_to_calo
;
178
179
// Run number
180
long
m_runNumber
;
181
182
// to limit the printout
183
int
m_firstevt
;
184
185
ITBCaloPosTool
*
m_postool
;
186
const
TBDetDescrManager
*
m_MCmgr
;
187
CaloPhiRange
*
m_range
;
188
};
189
190
191
#endif
// TBCALOGEOMETRY_TBCALOCOORDINATE_H
AthAlgTool.h
ICaloCoordinateTool.h
ICaloCoordinateTool interface declaration 30.9.2004 Creation of the class TBCalocoordinate by claire....
CaloPhiRange
This class defines the phi convention for Calorimeters.
Definition
CaloPhiRange.h:28
ITBCaloPosTool
Class ITBCaloPosTool.
Definition
ITBCaloPosTool.h:22
TBCaloCoordinate::m_calo_y_shift
double m_calo_y_shift
Definition
TBCaloCoordinate.h:147
TBCaloCoordinate::m_table_eta
double m_table_eta
Definition
TBCaloCoordinate.h:139
TBCaloCoordinate::m_PoolRead
int m_PoolRead
Definition
TBCaloCoordinate.h:160
TBCaloCoordinate::m_table_rotate
Amg::RotationMatrix3D * m_table_rotate
Definition
TBCaloCoordinate.h:164
TBCaloCoordinate::finalize
StatusCode finalize()
Definition
TBCaloCoordinate.cxx:134
TBCaloCoordinate::m_table_delta
double m_table_delta
Definition
TBCaloCoordinate.h:153
TBCaloCoordinate::print_transform
void print_transform(Amg::Transform3D &htrans)
Definition
TBCaloCoordinate.cxx:256
TBCaloCoordinate::m_translxyz_extra_calo_to_ctb
Amg::Transform3D m_translxyz_extra_calo_to_ctb
Definition
TBCaloCoordinate.h:173
TBCaloCoordinate::beam_local_eta
double beam_local_eta()
Definition
TBCaloCoordinate.cxx:195
TBCaloCoordinate::initialize
StatusCode initialize()
Definition
TBCaloCoordinate.cxx:98
TBCaloCoordinate::m_transform_calo_to_ctb
Amg::Transform3D * m_transform_calo_to_ctb
Definition
TBCaloCoordinate.h:176
TBCaloCoordinate::ctb_to_local
void ctb_to_local(Amg::Vector3D &pt_ctb, Amg::Vector3D &pt_local)
Definition
TBCaloCoordinate.cxx:141
TBCaloCoordinate::transform_ctb_to_calo
Amg::Transform3D * transform_ctb_to_calo()
Definition
TBCaloCoordinate.cxx:250
TBCaloCoordinate::m_calo_psi_shift
double m_calo_psi_shift
Definition
TBCaloCoordinate.h:145
TBCaloCoordinate::m_table_proj_MC
double m_table_proj_MC
Definition
TBCaloCoordinate.h:135
TBCaloCoordinate::m_postool
ITBCaloPosTool * m_postool
Definition
TBCaloCoordinate.h:185
TBCaloCoordinate::m_roty_extra_calo_to_ctb
Amg::Transform3D m_roty_extra_calo_to_ctb
Definition
TBCaloCoordinate.h:171
TBCaloCoordinate::m_table_theta
double m_table_theta
Definition
TBCaloCoordinate.h:151
TBCaloCoordinate::read_table_position
virtual void read_table_position()
Definition
TBCaloCoordinate.cxx:211
TBCaloCoordinate::m_table_shift
Amg::Translation3D * m_table_shift
Definition
TBCaloCoordinate.h:166
TBCaloCoordinate::read_fake_table_position
virtual void read_fake_table_position()
Definition
TBCaloCoordinate.cxx:232
TBCaloCoordinate::m_table_axis_data
double m_table_axis_data
Definition
TBCaloCoordinate.h:131
TBCaloCoordinate::m_table_proj_data
double m_table_proj_data
Definition
TBCaloCoordinate.h:134
TBCaloCoordinate::read_user_position
void read_user_position()
Definition
TBCaloCoordinate.cxx:428
TBCaloCoordinate::m_DBRead
int m_DBRead
Definition
TBCaloCoordinate.h:159
TBCaloCoordinate::read_data_position
bool read_data_position()
Definition
TBCaloCoordinate.cxx:278
TBCaloCoordinate::transform_calo_to_ctb
Amg::Transform3D * transform_calo_to_ctb()
Definition
TBCaloCoordinate.cxx:244
TBCaloCoordinate::TBCaloCoordinate
TBCaloCoordinate(const TBCaloCoordinate &)
TBCaloCoordinate::m_table_calc_theta
double m_table_calc_theta
Definition
TBCaloCoordinate.h:155
TBCaloCoordinate::local_to_ctb
void local_to_ctb(Amg::Vector3D &pt_local, Amg::Vector3D &pt_ctb)
Definition
TBCaloCoordinate.cxx:149
TBCaloCoordinate::m_table_z
double m_table_z
Definition
TBCaloCoordinate.h:152
TBCaloCoordinate::m_range
CaloPhiRange * m_range
Definition
TBCaloCoordinate.h:187
TBCaloCoordinate::TBCaloCoordinate
TBCaloCoordinate(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TBCaloCoordinate.cxx:42
TBCaloCoordinate::m_rotx_extra_calo_to_ctb
Amg::Transform3D m_rotx_extra_calo_to_ctb
Definition
TBCaloCoordinate.h:172
TBCaloCoordinate::m_rotz_extra_calo_to_ctb
Amg::Transform3D m_rotz_extra_calo_to_ctb
Definition
TBCaloCoordinate.h:170
TBCaloCoordinate::m_transform_ctb_to_calo
Amg::Transform3D * m_transform_ctb_to_calo
Definition
TBCaloCoordinate.h:177
TBCaloCoordinate::m_table_axis_MC
double m_table_axis_MC
Definition
TBCaloCoordinate.h:132
TBCaloCoordinate::m_calo_theta_shift
double m_calo_theta_shift
Definition
TBCaloCoordinate.h:144
TBCaloCoordinate::m_MCmgr
const TBDetDescrManager * m_MCmgr
Definition
TBCaloCoordinate.h:186
TBCaloCoordinate::read_neutral_position
void read_neutral_position()
Definition
TBCaloCoordinate.cxx:499
TBCaloCoordinate::m_calo_phi_shift
double m_calo_phi_shift
Definition
TBCaloCoordinate.h:143
TBCaloCoordinate::m_firstevt
int m_firstevt
Definition
TBCaloCoordinate.h:183
TBCaloCoordinate::read_MC_position
bool read_MC_position()
Definition
TBCaloCoordinate.cxx:378
TBCaloCoordinate::m_calo_z_shift
double m_calo_z_shift
Definition
TBCaloCoordinate.h:148
TBCaloCoordinate::m_runNumber
long m_runNumber
Definition
TBCaloCoordinate.h:180
TBCaloCoordinate::m_table_calc_x
double m_table_calc_x
Definition
TBCaloCoordinate.h:156
TBCaloCoordinate::operator=
TBCaloCoordinate & operator=(const TBCaloCoordinate &)
TBCaloCoordinate::beam_local_phi
double beam_local_phi()
Definition
TBCaloCoordinate.cxx:202
TBCaloCoordinate::~TBCaloCoordinate
~TBCaloCoordinate()
Definition
TBCaloCoordinate.cxx:124
TBCaloCoordinate::m_calo_x_shift
double m_calo_x_shift
Definition
TBCaloCoordinate.h:146
TBDetDescrManager
Definition
TBDetDescrManager.h:21
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition
GeoPrimitives.h:49
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition
GeoPrimitives.h:46
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition
GeoPrimitives.h:44
type
Generated on
for ATLAS Offline Software by
1.17.0