ATLAS Offline Software
Loading...
Searching...
No Matches
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
18
19class CaloPhiRange;
20class ITBCaloPosTool;
21class IMessageSvc;
23
24//done in the interface : #include "CLHEP/Geometry/Transform3D.h"
25
26//<<<<<< INCLUDES >>>>>>
27
66
67class TBCaloCoordinate : public extends<AthAlgTool, ICaloCoordinateTool>
68{
69public:
70
71 // Constructors:
72
73 TBCaloCoordinate(const std::string& type,
74 const std::string& name,
75 const IInterface* parent);
76
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
113
114 void print_transform(Amg::Transform3D& htrans);
115
116private:
117 // Avoid coverity warnings
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)
133 // 2) distance between the table axis and projective point (oral tradition)
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"
140
141 // Another layer on top, "in case" the user wants to add an
142 // extra HepTransform on top of these known moovements :
149
150 // these will be read in the DB :
152 double m_table_z;
154 // this is calculated from the DB info :
157
158 // these properties define what we are reading (see jobOpt)
161
162 // keep the 2 steps separated : table rotation, then translation
163 //HepGeom::Rotate3D* m_table_rotate;
165 //HepGeom::Translate3D* m_table_shift;
167
168 // the user defined one on top :
169
174
175 // the final transform from local to ctb :
178
179 // Run number
181
182 // to limit the printout
184
188};
189
190
191#endif // TBCALOGEOMETRY_TBCALOCOORDINATE_H
ICaloCoordinateTool interface declaration 30.9.2004 Creation of the class TBCalocoordinate by claire....
This class defines the phi convention for Calorimeters.
Class ITBCaloPosTool.
Amg::RotationMatrix3D * m_table_rotate
void print_transform(Amg::Transform3D &htrans)
Amg::Transform3D m_translxyz_extra_calo_to_ctb
StatusCode initialize()
Amg::Transform3D * m_transform_calo_to_ctb
void ctb_to_local(Amg::Vector3D &pt_ctb, Amg::Vector3D &pt_local)
Amg::Transform3D * transform_ctb_to_calo()
ITBCaloPosTool * m_postool
Amg::Transform3D m_roty_extra_calo_to_ctb
virtual void read_table_position()
Amg::Translation3D * m_table_shift
virtual void read_fake_table_position()
Amg::Transform3D * transform_calo_to_ctb()
TBCaloCoordinate(const TBCaloCoordinate &)
void local_to_ctb(Amg::Vector3D &pt_local, Amg::Vector3D &pt_ctb)
CaloPhiRange * m_range
TBCaloCoordinate(const std::string &type, const std::string &name, const IInterface *parent)
Amg::Transform3D m_rotx_extra_calo_to_ctb
Amg::Transform3D m_rotz_extra_calo_to_ctb
Amg::Transform3D * m_transform_ctb_to_calo
const TBDetDescrManager * m_MCmgr
TBCaloCoordinate & operator=(const TBCaloCoordinate &)
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D