ATLAS Offline Software
IVertexMapper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // IVertexMapper.h, (c) ATLAS Detector software
8 
9 #ifndef TRKDETDESCRINTERFACES_IVERTEXMAPPER_H
10 #define TRKDETDESCRINTERFACES_IVERTEXMAPPER_H
11 
12 // Gaudi
13 #include "GaudiKernel/IAlgTool.h"
14 
16 #include "TrkSurfaces/Surface.h"
17 #include "TrkGeometry/Layer.h"
18 
19 namespace Trk {
20 
21  class TrackingVolume;
22 
23  struct MappedVertex {
24 
26  const Surface* surface;
28 
29  const Layer* layer;
31 
33 
34  bool valid;
35 
37  MappedVertex(const Amg::Vector3D& lPosition,
38  const Surface& mSurface,
39  const Layer& mLayer,
40  const TrackingVolume& mVolume) :
41  localPosition(lPosition),
42  surface(&mSurface),
43  identifierHash(mSurface.associatedDetectorElement() ? int(mSurface.associatedDetectorElement()->identifyHash()) : -1),
44  layer(&mLayer),
45  layerIndex(mLayer.layerIndex().value()),
46  trackingVolume(&mVolume),
47  valid(true)
48  {}
49 
52  localPosition(0.,0.,0.),
53  surface(nullptr),
54  identifierHash(-1),
55  layer(nullptr),
56  layerIndex(-1),
57  trackingVolume(nullptr),
58  valid(false)
59  {}
60 
61 
62  };
63 
64 
75  class IVertexMapper : virtual public IAlgTool {
76 
77  public:
80 
82  virtual ~IVertexMapper(){}
83 
85  virtual MappedVertex mapToLocal(const Amg::Vector3D& vertex) const = 0;
86 
87  };
88 
89 } // end of namespace
90 
91 #endif // TRKDETDESCRINTERFACES_IVERTEXMAPPER_H
Trk::IVertexMapper::mapToLocal
virtual MappedVertex mapToLocal(const Amg::Vector3D &vertex) const =0
Record the vertex into the local frame of the closest module
Surface.h
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Trk::IVertexMapper::~IVertexMapper
virtual ~IVertexMapper()
Virtual destructor.
Definition: IVertexMapper.h:82
Trk::MappedVertex::identifierHash
int identifierHash
Definition: IVertexMapper.h:27
Trk::MappedVertex
Definition: IVertexMapper.h:23
athena.value
value
Definition: athena.py:124
Layer.h
Trk::IVertexMapper
Definition: IVertexMapper.h:75
Trk::MappedVertex::layer
const Layer * layer
Definition: IVertexMapper.h:29
Trk::MappedVertex::trackingVolume
const TrackingVolume * trackingVolume
Definition: IVertexMapper.h:32
Trk::IVertexMapper::DeclareInterfaceID
DeclareInterfaceID(IVertexMapper, 1, 0)
Creates the InterfaceID and interfaceID() method.
Trk::MappedVertex::layerIndex
int layerIndex
Definition: IVertexMapper.h:30
GeoPrimitives.h
Trk::MappedVertex::MappedVertex
MappedVertex(const Amg::Vector3D &lPosition, const Surface &mSurface, const Layer &mLayer, const TrackingVolume &mVolume)
valid constructor
Definition: IVertexMapper.h:37
Trk::MappedVertex::surface
const Surface * surface
Definition: IVertexMapper.h:26
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
Trk::MappedVertex::valid
bool valid
Definition: IVertexMapper.h:34
Trk::MappedVertex::MappedVertex
MappedVertex()
invalid constructor
Definition: IVertexMapper.h:51
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::TrackingVolume
Definition: TrackingVolume.h:121
Trk::MappedVertex::localPosition
Amg::Vector3D localPosition
Definition: IVertexMapper.h:25
Trk::Layer
Definition: Layer.h:73