ATLAS Offline Software
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 
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 
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 
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 
116 private:
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"
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 :
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)
159  int m_DBRead;
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
TBCaloCoordinate::m_table_theta
double m_table_theta
Definition: TBCaloCoordinate.h:151
TBCaloCoordinate::m_table_axis_data
double m_table_axis_data
Definition: TBCaloCoordinate.h:131
TBCaloCoordinate::m_table_axis_MC
double m_table_axis_MC
Definition: TBCaloCoordinate.h:132
TBCaloCoordinate::local_to_ctb
void local_to_ctb(Amg::Vector3D &pt_local, Amg::Vector3D &pt_ctb)
TBCaloCoordinate::m_table_delta
double m_table_delta
Definition: TBCaloCoordinate.h:153
CaloPhiRange
This class defines the phi convention for Calorimeters.
Definition: CaloPhiRange.h:28
TBCaloCoordinate::m_table_calc_theta
double m_table_calc_theta
Definition: TBCaloCoordinate.h:155
TBCaloCoordinate::m_calo_y_shift
double m_calo_y_shift
Definition: TBCaloCoordinate.h:147
TBCaloCoordinate::TBCaloCoordinate
TBCaloCoordinate(const TBCaloCoordinate &)
TBCaloCoordinate::transform_ctb_to_calo
Amg::Transform3D * transform_ctb_to_calo()
Definition: TBCaloCoordinate.cxx:250
TBCaloCoordinate::m_rotz_extra_calo_to_ctb
Amg::Transform3D m_rotz_extra_calo_to_ctb
Definition: TBCaloCoordinate.h:170
TBCaloCoordinate::m_table_z
double m_table_z
Definition: TBCaloCoordinate.h:152
TBCaloCoordinate::m_transform_ctb_to_calo
Amg::Transform3D * m_transform_ctb_to_calo
Definition: TBCaloCoordinate.h:177
TBCaloCoordinate::TBCaloCoordinate
TBCaloCoordinate(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TBCaloCoordinate.cxx:42
TBCaloCoordinate::m_calo_x_shift
double m_calo_x_shift
Definition: TBCaloCoordinate.h:146
TBCaloCoordinate::~TBCaloCoordinate
~TBCaloCoordinate()
Definition: TBCaloCoordinate.cxx:124
TBCaloCoordinate::read_table_position
virtual void read_table_position()
Definition: TBCaloCoordinate.cxx:211
TBCaloCoordinate::m_transform_calo_to_ctb
Amg::Transform3D * m_transform_calo_to_ctb
Definition: TBCaloCoordinate.h:176
TBCaloCoordinate::m_calo_theta_shift
double m_calo_theta_shift
Definition: TBCaloCoordinate.h:144
TBCaloCoordinate::m_table_rotate
Amg::RotationMatrix3D * m_table_rotate
Definition: TBCaloCoordinate.h:164
TBCaloCoordinate::m_translxyz_extra_calo_to_ctb
Amg::Transform3D m_translxyz_extra_calo_to_ctb
Definition: TBCaloCoordinate.h:173
TBCaloCoordinate::m_postool
ITBCaloPosTool * m_postool
Definition: TBCaloCoordinate.h:185
TBCaloCoordinate::m_calo_psi_shift
double m_calo_psi_shift
Definition: TBCaloCoordinate.h:145
TBCaloCoordinate::beam_local_phi
double beam_local_phi()
Definition: TBCaloCoordinate.cxx:202
TBCaloCoordinate::m_calo_phi_shift
double m_calo_phi_shift
Definition: TBCaloCoordinate.h:143
TBCaloCoordinate::read_fake_table_position
virtual void read_fake_table_position()
Definition: TBCaloCoordinate.cxx:232
TBCaloCoordinate::m_table_eta
double m_table_eta
Definition: TBCaloCoordinate.h:139
TBCaloCoordinate::m_roty_extra_calo_to_ctb
Amg::Transform3D m_roty_extra_calo_to_ctb
Definition: TBCaloCoordinate.h:171
TBCaloCoordinate::m_runNumber
long m_runNumber
Definition: TBCaloCoordinate.h:180
TBCaloCoordinate::print_transform
void print_transform(Amg::Transform3D &htrans)
Definition: TBCaloCoordinate.cxx:256
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TBCaloCoordinate::m_table_calc_x
double m_table_calc_x
Definition: TBCaloCoordinate.h:156
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AthAlgTool.h
TBCaloCoordinate::m_firstevt
int m_firstevt
Definition: TBCaloCoordinate.h:183
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TBCaloCoordinate::transform_calo_to_ctb
Amg::Transform3D * transform_calo_to_ctb()
Definition: TBCaloCoordinate.cxx:244
ITBCaloPosTool
Class ITBCaloPosTool.
Definition: ITBCaloPosTool.h:22
TBCaloCoordinate::read_user_position
void read_user_position()
Definition: TBCaloCoordinate.cxx:428
TBCaloCoordinate::m_table_proj_data
double m_table_proj_data
Definition: TBCaloCoordinate.h:134
TBCaloCoordinate::m_DBRead
int m_DBRead
Definition: TBCaloCoordinate.h:159
TBCaloCoordinate::operator=
TBCaloCoordinate & operator=(const TBCaloCoordinate &)
ICaloCoordinateTool.h
ICaloCoordinateTool interface declaration 30.9.2004 Creation of the class TBCalocoordinate by claire....
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TBCaloCoordinate::finalize
StatusCode finalize()
Definition: TBCaloCoordinate.cxx:134
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TBCaloCoordinate::m_calo_z_shift
double m_calo_z_shift
Definition: TBCaloCoordinate.h:148
TBCaloCoordinate::ctb_to_local
void ctb_to_local(Amg::Vector3D &pt_ctb, Amg::Vector3D &pt_local)
TBCaloCoordinate::read_neutral_position
void read_neutral_position()
Definition: TBCaloCoordinate.cxx:499
TBDetDescrManager
Definition: TBDetDescrManager.h:21
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
TBCaloCoordinate::m_rotx_extra_calo_to_ctb
Amg::Transform3D m_rotx_extra_calo_to_ctb
Definition: TBCaloCoordinate.h:172
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
TBCaloCoordinate::beam_local_eta
double beam_local_eta()
Definition: TBCaloCoordinate.cxx:195
TBCaloCoordinate
This class implements the CaloDetDescr/ICaloCoordinateTool and handles the translation between :
Definition: TBCaloCoordinate.h:68
TBCaloCoordinate::initialize
StatusCode initialize()
Definition: TBCaloCoordinate.cxx:98
TBCaloCoordinate::m_PoolRead
int m_PoolRead
Definition: TBCaloCoordinate.h:160
TBCaloCoordinate::read_MC_position
bool read_MC_position()
Definition: TBCaloCoordinate.cxx:378
TBCaloCoordinate::read_data_position
bool read_data_position()
Definition: TBCaloCoordinate.cxx:278
TBCaloCoordinate::m_table_shift
Amg::Translation3D * m_table_shift
Definition: TBCaloCoordinate.h:166
TBCaloCoordinate::m_table_proj_MC
double m_table_proj_MC
Definition: TBCaloCoordinate.h:135
TBCaloCoordinate::m_range
CaloPhiRange * m_range
Definition: TBCaloCoordinate.h:187
TBCaloCoordinate::m_MCmgr
const TBDetDescrManager * m_MCmgr
Definition: TBCaloCoordinate.h:186