ATLAS Offline Software
InDetJetFitterUtils.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  InDetJetFitterUtils.cxx - Description
7  -------------------
8 
9  begin : December 2007
10  authors: Giacinto Piacquadio (University of Freiburg)
11  email : nicola.giacinto.piacquadio@cern.ch
12  changes: new!
13 
14  2007 (c) Atlas Detector Software
15 
16  This class implements the some utilities for creating neutral tracks
17  from conversion, KS, Lambdas. Treatment of covariance matrices, jacobians,
18  ... is all correctly included.
19 
20  ***************************************************************************/
21 
22 #ifndef TrkJetVxFitter_InDetJetFitterUtils_H
23 #define TrkJetVxFitter_InDetJetFitterUtils_H
24 
26 #include "GaudiKernel/ToolHandle.h"
27 #include "CLHEP/Matrix/SymMatrix.h"
28 #include "CLHEP/Matrix/Matrix.h"
29 #include "CLHEP/Vector/LorentzVector.h"
30 //#include "TrkParticleBase/LinkToTrackParticleBase.h"
31 //#include "TrkParticleBase/TrackParticleBaseCollection.h"
32 //#include "TrkParticleBase/TrackParticleBase.h"
33 //#include "TrkNeutralParameters/NeutralParameters.h"
35 #include "xAODTracking/Vertex.h"
36 
39 
40 namespace Trk {
41  class VxCandidate;
42  class LinearizedTrack;
43  class RecVertex;
44  class Vertex;
45  class LinkToTrackParticleBase;
46  class ITrackLink;
47  class TrackParticleBase;
48  class VxVertexOnJetAxis;
49 }
50 
51 namespace InDet {
52 
53  static const InterfaceID IID_InDetJetFitterUtils("InDetJetFitterUtils", 1, 0);
54 
56  {
57 
58  public:
59 
60  static const InterfaceID& interfaceID() {
61  return IID_InDetJetFitterUtils;
62  }
63 
64 
65  virtual StatusCode initialize() override;
66 
67  InDetJetFitterUtils(const std::string& t, const std::string& n, const IInterface* p);
68 
70 
71  //std::pair<double,double> compatibility(const Trk::ParametersBase<5,Trk::Charged> & measPerigee,
72  // const Trk::RecVertex & vertex) const;
73  //std::pair<double,double> compatibility(const Trk::ParametersBase<5,Trk::Neutral> & measPerigee,
74  // const Trk::RecVertex & vertex) const;
75 
76  std::pair<double,double> compatibility(const Trk::TrackParameters & measPerigee,
77  const Trk::RecVertex & vertex) const;
78  std::pair<double,double> compatibility(const Trk::ParametersBase<5,Trk::Neutral> & measPerigee,
79  const Trk::RecVertex & vertex) const;
80 
82  const Amg::Vector3D & jetMomentum,
83  const Trk::RecVertex & primaryVertex) ;
84 
85  int getTwoTrackVtxCharge(const Trk::VxCandidate & myVxCandidate) const;
86  int getTwoTrackVtxCharge(const xAOD::Vertex & myVxCandidate) const;
87 
88  double getTwoTrackVtxMass(const Trk::VxCandidate & myVxCandidate,
89  double highestMomMass,
90  double lowestMomMass) const;
91 
92  double getTwoTrackVtxMass(const xAOD::Vertex & myVxCandidate,
93  double highestMomMass,
94  double lowestMomMass) const;
95 
96 
97  std::pair<double,double> getDistanceAndErrorBetweenTwoVertices(const xAOD::Vertex &,
98  const Trk::RecVertex &) const;
99 
100  std::pair<double,double> getD0andZ0IP(const Trk::TrackParameters & trackPerigee,
101  const Trk::Vertex & vertexToExtrapolateTo) const;
102 
103  std::pair<double,double> getD0andZ0IPSig(const Trk::TrackParameters & trackPerigee,
104  const Trk::RecVertex & vertex) const;
105 
106  const Trk::LinkToTrackParticleBase* findNeutralTrackParticleBase(const std::vector<const Trk::LinkToTrackParticleBase*> &,
107  const Trk::VxCandidate &) const;
108 
109  static const Trk::LinkToTrackParticleBase* findNeutralTrackParticleBase(const std::vector<const Trk::LinkToTrackParticleBase*> &,
110  const xAOD::Vertex &) ;
111 
112  static bool checkIfTrackIsInVector(const Trk::ITrackLink * trackToCheck,
113  const std::vector<const Trk::ITrackLink*> & vectorOfTracks) ;
114 
115  static bool checkIfTrackIsInVector(const Trk::ITrackLink * trackToCheck,
116  const std::vector<const Trk::LinkToTrackParticleBase*> & vectorOfTracks) ;
117 
118  static bool checkIfTrackIsInNeutralTrackVector(const Trk::ITrackLink * trackToCheck,
119  const std::vector<const Trk::LinkToTrackParticleBase*> & vectorOfNeutrals) ;
120 
121  static bool checkIfTrackIsInV0CandidatesVector(const Trk::ITrackLink * trackToCheck,
122  const std::vector<const xAOD::Vertex*> & vectorOfVxCandidates) ;
123 
124  static bool checkIfVxCandidateIsInVector(const xAOD::Vertex * vertexToCheck,
125  const std::vector<const xAOD::Vertex*> & vectorOfCandidates) ;
126 
127  static CLHEP::HepLorentzVector fourMomentumAtVertex(const Trk::VxVertexOnJetAxis &) ;
128 
129 
130 
131  private:
132 
134  const AmgSymMatrix(3) & vrt_cov,
135  const AmgSymMatrix(3) & vrt_weight) const;
136 
137 
138 
139  ToolHandle<Trk::IVertexLinearizedTrackFactory> m_LinearizedTrackFactory {this,"LinearizedTrackFactory","Trk::FullLinearizedTrackFactory/FullLinearizedTrackFactory",""};
140  ToolHandle<Trk::IExtrapolator> m_extrapolator {this,"Extrapolator","Trk::Extrapolator/InDetExtrapolator",""};
141 
143 
144  };//end class declaration
145 
146 }//end namespace Rec
147 
148 
149 #endif
150 
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
InDet::InDetJetFitterUtils
Definition: InDetJetFitterUtils.h:56
TrackParameters.h
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
InDet::InDetJetFitterUtils::initialize
virtual StatusCode initialize() override
Definition: InDetJetFitterUtils.cxx:95
InDet::InDetJetFitterUtils::compatibility
std::pair< double, double > compatibility(const Trk::TrackParameters &measPerigee, const Trk::RecVertex &vertex) const
Definition: InDetJetFitterUtils.cxx:148
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetJetFitterUtils::checkIfTrackIsInVector
static bool checkIfTrackIsInVector(const Trk::ITrackLink *trackToCheck, const std::vector< const Trk::ITrackLink * > &vectorOfTracks)
Definition: InDetJetFitterUtils.cxx:573
Trk::VxVertexOnJetAxis
VxVertexOnJetAxis inherits from Vertex.
Definition: VxVertexOnJetAxis.h:79
IExtrapolator.h
InDet::InDetJetFitterUtils::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: InDetJetFitterUtils.h:140
InDet::InDetJetFitterUtils::~InDetJetFitterUtils
~InDetJetFitterUtils()
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDet::InDetJetFitterUtils::checkIfTrackIsInNeutralTrackVector
static bool checkIfTrackIsInNeutralTrackVector(const Trk::ITrackLink *trackToCheck, const std::vector< const Trk::LinkToTrackParticleBase * > &vectorOfNeutrals)
Definition: InDetJetFitterUtils.cxx:609
InDet::InDetJetFitterUtils::checkIfVxCandidateIsInVector
static bool checkIfVxCandidateIsInVector(const xAOD::Vertex *vertexToCheck, const std::vector< const xAOD::Vertex * > &vectorOfCandidates)
Definition: InDetJetFitterUtils.cxx:661
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
AmgMatrix
#define AmgMatrix(rows, cols)
Definition: EventPrimitives.h:49
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition: RecVertex.h:44
InDet::InDetJetFitterUtils::m_LinearizedTrackFactory
ToolHandle< Trk::IVertexLinearizedTrackFactory > m_LinearizedTrackFactory
Definition: InDetJetFitterUtils.h:139
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::InDetJetFitterUtils::getDistanceAndErrorBetweenTwoVertices
std::pair< double, double > getDistanceAndErrorBetweenTwoVertices(const xAOD::Vertex &, const Trk::RecVertex &) const
Definition: InDetJetFitterUtils.cxx:432
AthAlgTool.h
InDet::InDetJetFitterUtils::getD0andZ0IP
std::pair< double, double > getD0andZ0IP(const Trk::TrackParameters &trackPerigee, const Trk::Vertex &vertexToExtrapolateTo) const
Definition: InDetJetFitterUtils.cxx:478
InDet::InDetJetFitterUtils::getTwoTrackVtxCharge
int getTwoTrackVtxCharge(const Trk::VxCandidate &myVxCandidate) const
Definition: InDetJetFitterUtils.cxx:259
InDet::InDetJetFitterUtils::interfaceID
static const InterfaceID & interfaceID()
Definition: InDetJetFitterUtils.h:60
Trk::ParametersBase
Definition: ParametersBase.h:55
Vertex.h
InDet::InDetJetFitterUtils::m_linearizedTrackFactoryIsAvailable
bool m_linearizedTrackFactoryIsAvailable
Definition: InDetJetFitterUtils.h:142
InDet::InDetJetFitterUtils::InDetJetFitterUtils
InDetJetFitterUtils(const std::string &t, const std::string &n, const IInterface *p)
Definition: InDetJetFitterUtils.cxx:82
Trk::LinkToTrackParticleBase
Definition: LinkToTrackParticleBase.h:17
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::InDetJetFitterUtils::fourMomentumAtVertex
static CLHEP::HepLorentzVector fourMomentumAtVertex(const Trk::VxVertexOnJetAxis &)
Definition: InDetJetFitterUtils.cxx:708
InDet::InDetJetFitterUtils::get3DLifetimeSignOfTrack
static double get3DLifetimeSignOfTrack(const Trk::TrackParameters &track, const Amg::Vector3D &jetMomentum, const Trk::RecVertex &primaryVertex)
Definition: InDetJetFitterUtils.cxx:243
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
InDet::InDetJetFitterUtils::getTwoTrackVtxMass
double getTwoTrackVtxMass(const Trk::VxCandidate &myVxCandidate, double highestMomMass, double lowestMomMass) const
Definition: InDetJetFitterUtils.cxx:329
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
InDet::InDetJetFitterUtils::getD0andZ0IPSig
std::pair< double, double > getD0andZ0IPSig(const Trk::TrackParameters &trackPerigee, const Trk::RecVertex &vertex) const
Definition: InDetJetFitterUtils.cxx:512
Trk::VxCandidate
Definition: VxCandidate.h:27
InDet::InDetJetFitterUtils::getPosMomentumAndMomentumCovMatrix
std::pair< AmgMatrix(3, 3), AmgSymMatrix(3)> getPosMomentumAndMomentumCovMatrix(const Trk::LinearizedTrack *linTrack, const AmgSymMatrix(3) &vrt_cov, const AmgSymMatrix(3) &vrt_weight) const
Definition: InDetJetFitterUtils.cxx:124
IVertexLinearizedTrackFactory.h
InDet::InDetJetFitterUtils::checkIfTrackIsInV0CandidatesVector
static bool checkIfTrackIsInV0CandidatesVector(const Trk::ITrackLink *trackToCheck, const std::vector< const xAOD::Vertex * > &vectorOfVxCandidates)
Definition: InDetJetFitterUtils.cxx:680
InDet::InDetJetFitterUtils::findNeutralTrackParticleBase
const Trk::LinkToTrackParticleBase * findNeutralTrackParticleBase(const std::vector< const Trk::LinkToTrackParticleBase * > &, const Trk::VxCandidate &) const
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
AthAlgTool
Definition: AthAlgTool.h:26
Trk::LinearizedTrack
Definition: LinearizedTrack.h:43