![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
13 #include "GaudiKernel/Bootstrap.h"
14 #include "Gaudi/Property.h"
15 #include "GaudiKernel/IService.h"
16 #include "GaudiKernel/IToolSvc.h"
17 #include "GaudiKernel/ISvcLocator.h"
18 #include "GaudiKernel/IMessageSvc.h"
30 #include "GaudiKernel/ThreadLocalContext.h"
42 static const InterfaceID IID_TBCaloCoordinate(
"TBCaloCoordinate", 1, 0);
45 {
return IID_TBCaloCoordinate; }
48 const std::string&
name,
49 const IInterface*
parent) :
51 m_table_axis_data(0.), m_table_axis_MC(0.),
52 m_table_proj_data(0.), m_table_proj_MC(0.),
54 m_calo_phi_shift(0.), m_calo_theta_shift(0.),
55 m_calo_psi_shift(0.), m_calo_x_shift(0.),
56 m_calo_y_shift(0.), m_calo_z_shift(0.),
57 m_table_theta(0.), m_table_z(0.), m_table_delta(0.),
58 m_table_calc_theta(0.), m_table_calc_x(0.),
59 m_DBRead(-1), m_PoolRead(-1), m_runNumber(0), m_firstevt(0)
61 declareInterface<TBCaloCoordinate>(
this );
110 (
" Numbers used for Calo geometry : "
151 pt_local = (*m_transform_ctb_to_calo)*pt_ctb;
159 pt_ctb = (*m_transform_calo_to_ctb)*pt_local;
164 double& x_local,
double& y_local,
double& z_local)
171 x_local = pt_local.x();
172 y_local = pt_local.y();
173 z_local = pt_local.z();
183 double& x_ctb,
double& y_ctb,
double& z_ctb)
185 Vector3D pt_local(x_local,y_local,z_local);
220 const EventContext& ctx = Gaudi::Hive::currentContext();
265 double alpha = Eigen::AngleAxisd(junkrot).angle();
266 Eigen::Vector3d junkaxis = Eigen::AngleAxisd(junkrot).axis();
301 IToolSvc* p_toolSvc = 0;
303 if (
sc.isFailure()) {
309 sc = p_toolSvc->retrieveTool(
"TBCaloPosTool",
m_postool);
312 (
"Cannot get Calo table position from DB : keep default" );
330 if ( m_table_eta < 0. || m_table_eta > 1.5 ) {
331 ATH_MSG_INFO (
" ==> Calorimeter table position read from DB makes no sense, DB updates will be overwitten " );
338 ATH_MSG_INFO (
" --------------------------------------------------------------------- " );
345 ATH_MSG_INFO (
" If it does not match the LAr logbook, inform LAr people " );
350 ATH_MSG_INFO (
" --------------------------------------------------------------------- " );
421 if(m_table_eta<0. || m_table_eta > 1.5) {
422 ATH_MSG_INFO (
" m_table_eta is not in [0,1.5] -> will set it to 0. " );
466 ATH_MSG_DEBUG (
" --------------------------------------------------------------------- " );
468 ATH_MSG_DEBUG (
" Calorimeter table DCS either OFF of not used, position is hardcoded : for run "
471 ATH_MSG_DEBUG (
" If it does not match the LAr logbook, inform LAr people " );
473 ATH_MSG_DEBUG (
" --------------------------------------------------------------------- " );
492 ATH_MSG_DEBUG (
" Moovement defined by hardcoded numbers : eta was set to "
def retrieve(aClass, aKey=None)
void local_to_ctb(Amg::Vector3D &pt_local, Amg::Vector3D &pt_ctb)
General use method: basic translation between the 2 cartesian coordinate systems:
This class defines the phi convention for Calorimeters.
Eigen::Quaternion< double > Rotation3D
double m_table_calc_theta
Amg::Transform3D * transform_ctb_to_calo()
method accessing the transformations
virtual double eta()=0
access eta value
Amg::Transform3D m_rotz_extra_calo_to_ctb
Amg::Transform3D * m_transform_ctb_to_calo
Scalar eta() const
pseudorapidity method
static const InterfaceID & interfaceID()
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
TBCaloCoordinate(const std::string &type, const std::string &name, const IInterface *parent)
virtual void read_table_position()
clients who want the real position must call this
const TBElement & getElement(TBElementID::TBElementID id) const
Amg::Transform3D * m_transform_calo_to_ctb
double m_calo_theta_shift
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Amg::RotationMatrix3D * m_table_rotate
Amg::Transform3D m_translxyz_extra_calo_to_ctb
ITBCaloPosTool * m_postool
double beam_local_phi()
the most common use-case : the H8 beam goes along the x axis -> that are the local calorimeters eta a...
virtual void read_fake_table_position()
clients who want to avoid the DB-decoding, and force a fixed eta must call this :
virtual double delta()=0
access delta value
Amg::Transform3D m_roty_extra_calo_to_ctb
void print_transform(Amg::Transform3D &htrans)
printout method
::StatusCode StatusCode
StatusCode definition for legacy code.
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Eigen::Affine3d Transform3D
Amg::Transform3D * transform_calo_to_ctb()
method accessing the transformations
CaloPhiRange class declaration.
void read_user_position()
Amg::Vector3D position() const
Amg::RotationMatrix3D rotation() const
virtual double theta()=0
access eta value
virtual double z()=0
access eta value
Eigen::Matrix< double, 3, 1 > Vector3D
void ctb_to_local(Amg::Vector3D &pt_ctb, Amg::Vector3D &pt_local)
General use method: basic translation between the 2 cartesian coordinate systems:
void read_neutral_position()
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Amg::Transform3D m_rotx_extra_calo_to_ctb
Eigen::Translation< double, 3 > Translation3D
double beam_local_eta()
the most common use-case : the H8 beam goes along the x axis -> that are the local calorimeters eta a...
Eigen::AngleAxisd AngleAxis3D
bool read_data_position()
Amg::Translation3D * m_table_shift
TBElementID::TBElementID id() const
const TBDetDescrManager * m_MCmgr