ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagTools
src
SVForIPTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
JetTagTools/SVForIPTool.h
"
6
7
#include "
GeoPrimitives/GeoPrimitivesHelpers.h
"
8
9
namespace
Analysis
{
10
11
12
SVForIPTool::SVForIPTool
(
const
std::string& name,
13
const
std::string& n,
const
IInterface* p):
14
AthAlgTool
(name, n,p)
15
{
16
declareInterface<SVForIPTool>(
this
);
17
}
18
19
void
SVForIPTool::getDirectionFromSecondaryVertexInfo
(
Amg::Vector3D
& SvxDirection,
20
bool
& canUseSvxDirection,
21
xAOD::BTagging
* BTag,
22
const
std::string & secVxFinderName,
23
const
xAOD::Vertex
& priVtx)
const
24
{
25
std::vector< ElementLink< xAOD::VertexContainer > > myVertices;
26
BTag->variable<std::vector<ElementLink<xAOD::VertexContainer> > >(secVxFinderName,
"vertices"
, myVertices);
27
28
if
(myVertices.empty()) {
29
ATH_MSG_DEBUG
(
" No secondary vertex found for getting the B flight direction (for the IP sign calculation)"
);
30
}
else
{
31
if
(myVertices[0].
isValid
()) {
32
canUseSvxDirection=
true
;
33
SvxDirection=(*myVertices[0])->position()-priVtx.
position
();
34
ATH_MSG_VERBOSE
(
" Get direction from InDetVKalVertex: phi: "
<< SvxDirection.phi() <<
35
" theta: "
<< SvxDirection.theta() );
36
}
else
{
37
ATH_MSG_WARNING
(
"SVX info seems usable, but no SVX available !!!"
);
38
}
39
}
40
}
41
42
43
void
SVForIPTool::getTrkFromV0FromSecondaryVertexInfo
(std::vector<const xAOD::TrackParticle*> & TrkFromV0,
44
xAOD::BTagging
* BTag,
45
const
std::string & secVxFinderName)
const
46
{
47
std::vector<ElementLink<xAOD::TrackParticleContainer> > TrkFromV0_ELs;
48
BTag->variable<std::vector<ElementLink<xAOD::TrackParticleContainer> > >(secVxFinderName,
"badTracksIP"
, TrkFromV0_ELs);
49
for
(
const
auto
& link : TrkFromV0_ELs) {
50
if
(link.isValid()) TrkFromV0.push_back(*link);
51
}
52
}
53
54
}
//end namespace
55
isValid
bool isValid() const
Test to see if the link can be dereferenced.
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
GeoPrimitivesHelpers.h
SVForIPTool.h
Analysis::SVForIPTool::getTrkFromV0FromSecondaryVertexInfo
void getTrkFromV0FromSecondaryVertexInfo(std::vector< const xAOD::TrackParticle * > &TrkFromV0, xAOD::BTagging *BTag, const std::string &secVxFinderName) const
Method to get the tracks from V0 from the secondary vertex info.
Definition
SVForIPTool.cxx:43
Analysis::SVForIPTool::SVForIPTool
SVForIPTool(const std::string &name, const std::string &n, const IInterface *p)
Definition
SVForIPTool.cxx:12
Analysis::SVForIPTool::getDirectionFromSecondaryVertexInfo
void getDirectionFromSecondaryVertexInfo(Amg::Vector3D &SvxDirection, bool &canUseSvxDirection, xAOD::BTagging *BTag, const std::string &secVxFinderName, const xAOD::Vertex &priVtx) const
Method to get the B flight direction from the secondary vertex info.
Definition
SVForIPTool.cxx:19
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
Definition
Vertex_v1.cxx:106
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition
IConstituent.h:25
xAOD::BTagging
BTagging_v1 BTagging
Definition of the current "BTagging version".
Definition
BTagging.h:17
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition
Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
Generated on
for ATLAS Offline Software by
1.17.0