ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
HGTD::StraightLineTOFcorrectionTool Class Reference

#include <StraightLineTOFcorrectionTool.h>

Inheritance diagram for HGTD::StraightLineTOFcorrectionTool:
Collaboration diagram for HGTD::StraightLineTOFcorrectionTool:

Public Member Functions

 StraightLineTOFcorrectionTool (const std::string &, const std::string &, const IInterface *)
 
virtual StatusCode initialize () override final
 
virtual std::pair< float, float > correctTimeAndResolution (const Trk::Track &track, const HGTD_Cluster &cluster, const float time_of_arrival, const float time_of_arrival_err) const override final
 

Private Attributes

const HGTD_DetectorManagerm_hgtd_det_mgr {nullptr}
 

Detailed Description

Definition at line 33 of file StraightLineTOFcorrectionTool.h.

Constructor & Destructor Documentation

◆ StraightLineTOFcorrectionTool()

HGTD::StraightLineTOFcorrectionTool::StraightLineTOFcorrectionTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 18 of file StraightLineTOFcorrectionTool.cxx.

20  : base_class(t, n, p) {}

Member Function Documentation

◆ correctTimeAndResolution()

std::pair< float, float > HGTD::StraightLineTOFcorrectionTool::correctTimeAndResolution ( const Trk::Track track,
const HGTD_Cluster cluster,
const float  time_of_arrival,
const float  time_of_arrival_err 
) const
finaloverridevirtual

Definition at line 32 of file StraightLineTOFcorrectionTool.cxx.

34  {
35 
36  ATH_MSG_DEBUG("Correcting input time: " << time_of_arrival);
37 
38  // FIXME: This should work with 'globalPosition' of the cluster alone, but no
39  // det element set during P->T conversion!
40  const InDetDD::HGTD_DetectorElement* det_el =
42 
43  // get the distance between the track origin and the hit position
44  const Trk::Perigee* perigee = track.perigeeParameters();
45  Amg::Vector3D glob_hit_pos = det_el->globalPosition(cluster.localPosition());
46 
47  float dx = glob_hit_pos.x() - perigee->position().x();
48  float dy = glob_hit_pos.y() - perigee->position().y();
49  float dz = glob_hit_pos.z() - perigee->position().z();
50 
51  // compute TOF between origin and hit position
52  // FIXME define 1/c somewhere as constexpr?
53  // FIXME since this is an approximation anyway, can we use a fast sqrt?
54  float tof = std::sqrt(dx * dx + dy * dy + dz * dz) / Gaudi::Units::c_light;
55  float corrected_toa = time_of_arrival - tof;
56 
57  ATH_MSG_DEBUG("Corrected time: " << corrected_toa);
58 
59  // TODO
60  // the intrinsic resolution on the time of arrival needs to be combined
61  // with the impact parameter resolution and the spatial resolution of the
62  // cluster. no large impact is expected though
63 
64  return {corrected_toa, time_of_arrival_err};
65 }

◆ initialize()

StatusCode HGTD::StraightLineTOFcorrectionTool::initialize ( )
finaloverridevirtual

Definition at line 22 of file StraightLineTOFcorrectionTool.cxx.

22  {
23 
25 
27 
28  return StatusCode::SUCCESS;
29 }

Member Data Documentation

◆ m_hgtd_det_mgr

const HGTD_DetectorManager* HGTD::StraightLineTOFcorrectionTool::m_hgtd_det_mgr {nullptr}
private

Definition at line 48 of file StraightLineTOFcorrectionTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
HGTD::StraightLineTOFcorrectionTool::m_hgtd_det_mgr
const HGTD_DetectorManager * m_hgtd_det_mgr
Definition: StraightLineTOFcorrectionTool.h:48
initialize
void initialize()
Definition: run_EoverP.cxx:894
InDetDD::HGTD_DetectorElement
Definition: HGTD_DetectorElement.h:40
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
python.PhysicalConstants.c_light
float c_light
Definition: PhysicalConstants.py:63
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
HGTD_DetectorManager::getDetectorElement
InDetDD::HGTD_DetectorElement * getDetectorElement(const Identifier &id) const
access to individual elements : via Identifier
Definition: HGTD_DetectorManager.cxx:57
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
InDetDD::SolidStateDetectorElementBase::globalPosition
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
xAOD::track
@ track
Definition: TrackingPrimitives.h:512