ATLAS Offline Software
IEMExtrapolationTools.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EGAMMAINTERFACES_IEMEXTRAPOLATIONTOOLS_H
6 #define EGAMMAINTERFACES_IEMEXTRAPOLATIONTOOLS_H
7 
8 #include "GaudiKernel/AlgTool.h"
9 #include "GaudiKernel/EventContext.h"
16 #include "xAODTracking/VertexFwd.h"
17 
18 #include <array>
19 #include <memory>
20 #include <unordered_map>
21 
23 static const InterfaceID IID_IEMExtrapolationTools("IEMExtrapolationTools",
24  1,
25  0);
26 
27 class IEMExtrapolationTools : virtual public IAlgTool
28 {
29 
30 public:
33  {
42  };
43 
45 
47  static const InterfaceID& interfaceID();
48 
50  virtual StatusCode initialize() = 0;
51 
52  virtual std::pair<std::vector<CaloSampling::CaloSample>,
53  std::vector<std::unique_ptr<Trk::Surface>>>
55  const CaloDetDescrManager& caloDD) const = 0;
56 
62  const EventContext& ctx,
63  const xAOD::CaloCluster& cluster,
64  const xAOD::TrackParticle& trkPB,
65  const std::vector<CaloSampling::CaloSample>& samples,
66  const std::vector<std::unique_ptr<Trk::Surface>>& surfaces,
67  std::array<double, 4>& eta,
68  std::array<double, 4>& phi,
69  std::array<double, 4>& deltaEta,
70  std::array<double, 4>& deltaPhi,
71  unsigned int extrapFrom = fromPerigee) const = 0;
72 
75  virtual bool matchesAtCalo(const xAOD::CaloCluster* cluster,
76  const xAOD::Vertex* vertex,
77  float etaAtCalo,
78  float phiAtCalo) const = 0;
79 
82  virtual bool getEtaPhiAtCalo(const EventContext& ctx,
83  const xAOD::Vertex* vertex,
84  float* etaAtCalo,
85  float* phiAtCalo) const = 0;
86 
89  virtual bool getEtaPhiAtCalo(const EventContext& ctx,
90  const Trk::TrackParameters* trkPar,
91  float* etaAtCalo,
92  float* phiAtCalo) const = 0;
93 
96  virtual Amg::Vector3D getMomentumAtVertex(const EventContext& ctx,
97  const xAOD::Vertex&,
98  unsigned int) const = 0;
99 
102  virtual Amg::Vector3D getMomentumAtVertex(const EventContext& ctx,
103  const xAOD::Vertex&,
104  bool reuse = true) const = 0;
105 };
106 
107 inline const InterfaceID&
109 {
110  return IID_IEMExtrapolationTools;
111 }
112 
113 #endif
IEMExtrapolationTools::getEtaPhiAtCalo
virtual bool getEtaPhiAtCalo(const EventContext &ctx, const xAOD::Vertex *vertex, float *etaAtCalo, float *phiAtCalo) const =0
get eta, phi at EM2 given a vertex which is converted to NeutralParameters.
IEMExtrapolationTools::TrkExtrapDef
TrkExtrapDef
Enum for track extrapolation to calo.
Definition: IEMExtrapolationTools.h:33
IEMExtrapolationTools::fromCaloToPerigee
@ fromCaloToPerigee
from the calo to the perigee - fast extrapolation
Definition: IEMExtrapolationTools.h:41
TrackParameters.h
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
CaloExtension.h
PropDirection.h
NeutralParameters.h
IEMExtrapolationTools::fromPerigee
@ fromPerigee
from the perigee of TrackParticle
Definition: IEMExtrapolationTools.h:37
IEMExtrapolationTools::getMomentumAtVertex
virtual Amg::Vector3D getMomentumAtVertex(const EventContext &ctx, const xAOD::Vertex &, unsigned int) const =0
get the momentum of the i-th trackParticle attached to the vertex at the vertex (designed for convers...
IEMExtrapolationTools::~IEMExtrapolationTools
virtual ~IEMExtrapolationTools()
Definition: IEMExtrapolationTools.h:44
IEMExtrapolationTools::getEtaPhiAtCalo
virtual bool getEtaPhiAtCalo(const EventContext &ctx, const Trk::TrackParameters *trkPar, float *etaAtCalo, float *phiAtCalo) const =0
get eta, phi at EM2 given NeutralParameters.
IEMExtrapolationTools::getMatchAtCalo
virtual StatusCode getMatchAtCalo(const EventContext &ctx, const xAOD::CaloCluster &cluster, const xAOD::TrackParticle &trkPB, const std::vector< CaloSampling::CaloSample > &samples, const std::vector< std::unique_ptr< Trk::Surface >> &surfaces, std::array< double, 4 > &eta, std::array< double, 4 > &phi, std::array< double, 4 > &deltaEta, std::array< double, 4 > &deltaPhi, unsigned int extrapFrom=fromPerigee) const =0
get eta, phi, deltaEta, and deltaPhi at the four calorimeter layers given the Trk::ParametersBase.
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:53
CaloCluster.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
IEMExtrapolationTools::getMomentumAtVertex
virtual Amg::Vector3D getMomentumAtVertex(const EventContext &ctx, const xAOD::Vertex &, bool reuse=true) const =0
get sum of the momenta at the vertex (designed for conversions).
IEMExtrapolationTools::fromPerigeeRescaled
@ fromPerigeeRescaled
from the perigee of TrackParticle recaled by Ecluster
Definition: IEMExtrapolationTools.h:39
Trk::ParametersBase
Definition: ParametersBase.h:55
IEMExtrapolationTools::getClusterLayerSurfaces
virtual std::pair< std::vector< CaloSampling::CaloSample >, std::vector< std::unique_ptr< Trk::Surface > > > getClusterLayerSurfaces(const xAOD::CaloCluster &cluster, const CaloDetDescrManager &caloDD) const =0
IEMExtrapolationTools::matchesAtCalo
virtual bool matchesAtCalo(const xAOD::CaloCluster *cluster, const xAOD::Vertex *vertex, float etaAtCalo, float phiAtCalo) const =0
test for vertex-to-cluster match given also the positions at the calorimeter from the vertex extrapol...
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
VertexFwd.h
IEMExtrapolationTools
Definition: IEMExtrapolationTools.h:28
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
IEMExtrapolationTools::interfaceID
static const InterfaceID & interfaceID()
AlgTool interface methods.
Definition: IEMExtrapolationTools.h:108
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
TrackParticleFwd.h
IEMExtrapolationTools::initialize
virtual StatusCode initialize()=0
initialize method
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
IEMExtrapolationTools::fromLastMeasurement
@ fromLastMeasurement
from the last measurement of TrackParticle
Definition: IEMExtrapolationTools.h:35