ATLAS Offline Software
Loading...
Searching...
No Matches
BPhysPVTools.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef DERIVATIONFRAMEWORK_PVTOOLS_H
6#define DERIVATIONFRAMEWORK_PVTOOLS_H
7
8#include "GaudiKernel/ToolHandle.h"
11#include <vector>
13
14// Author: Adam Barton <abarton@SPAMMENOTTtttcern.ch>
15namespace Trk {
16 class V0Tools;
17}
18namespace Analysis{
20}
21
22
23namespace DerivationFramework {
24
25 class BPhysPVTools : public AthMessaging {
26
27 private:
30
33
35
36 public:
37
38 BPhysPVTools(const Trk::V0Tools *v0Tools);
39 BPhysPVTools(const Trk::V0Tools *v0Tools, const xAOD::EventInfo*);
40 void SetSave3d(bool v) { m_3dCalc =v; }
41 StatusCode FillCandExistingVertices(xAOD::VertexContainer* vtxContainer, const xAOD::VertexContainer* pvContainer, int DoVertexType);
42
44 xAOD::BPhysHelper::pv_type pvtype, bool do3d = false) const;
45
46 StatusCode FillCandwithRefittedVertices(xAOD::VertexContainer* vtxContainer, const xAOD::VertexContainer* pvContainer,xAOD::VertexContainer* refPvContainer, const Analysis::PrimaryVertexRefitter* , size_t in_PV_max, int DoVertexType);
47
48 void DecorateWithNULL(xAOD::VertexContainer* vtxContainer,const xAOD::VertexContainer* pvContainer, int DoVertexType) const;
49
50 void DecorateWithDummyVertex(xAOD::VertexContainer* vtxContainer, const xAOD::VertexContainer* pvContainer, const xAOD::Vertex* Dummy, int DoVertexType, bool SetOrignal) const;
51
53 void FillBPhysHelper(xAOD::BPhysHelper &vtx, const xAOD::Vertex* refPV,const xAOD::VertexContainer* refPvContainer,
54 xAOD::BPhysHelper::pv_type pvtype, int) const;
55
57 size_t FindLowZIndex(const xAOD::BPhysHelper &Obj,
58 const std::vector<const xAOD::Vertex*> &PVlist,
59 const size_t PV_minNTracks=0) const;
61 size_t FindLowA0Index(const xAOD::BPhysHelper &Obj,
62 const std::vector<const xAOD::Vertex*> &PVlist,
63 const size_t PV_minNTracks=0) const;
64
65 size_t FindHighPtIndex(const std::vector<const xAOD::Vertex*> &PVlist) const;
66
71 static std::vector<const xAOD::Vertex*> GetGoodPV(const xAOD::VertexContainer* pvContainer);
72
79 void SetMinNTracksInPV(size_t PV_minNTracks);
80
85 [[nodiscard]] Amg::Vector3D GetBeamSpot() const;
86
90 const std::vector<const xAOD::Vertex*> &PVlist,
91 const size_t PV_minNTracks=0) const;
95 const xAOD::Vertex* vertex) const;
99
100 static void PrepareVertexLinks(xAOD::Vertex* theResult,
101 const xAOD::TrackParticleContainer* importedTrackCollection);
102 }; // class BPhysPVTools
103
104} // namespace DerivationFramework
105
106
107#endif // DERIVATIONFRAMEWORK_PVTOOLS_H
: B-physics xAOD helpers.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
const xAOD::EventInfo * m_EvtData
size_t FindLowZ0BAIndex(xAOD::BPhysHelper &obj, const std::vector< const xAOD::Vertex * > &PVlist, const size_t PV_minNTracks=0) const
Find the index for the PV with the lowest distance in z of the SV's DOCA point w.r....
size_t m_PV_minNTracks
minimum number of tracks required in PVs considered
double DistInZtoDOCA(xAOD::BPhysHelper &obj, const xAOD::Vertex *vertex) const
Calculate the distance along z axis between the PV and SV's DOCA point w.r.t.
Amg::Vector3D DocaExtrapToBeamSpot(xAOD::BPhysHelper &obj) const
Point of DOCA w.r.t.
size_t FindLowZIndex(const xAOD::BPhysHelper &Obj, const std::vector< const xAOD::Vertex * > &PVlist, const size_t PV_minNTracks=0) const
Returns the index integer of the vertex with the lowest Z in relation to the given vertex.
BPhysPVTools(const Trk::V0Tools *v0Tools)
StatusCode FillCandExistingVertices(xAOD::VertexContainer *vtxContainer, const xAOD::VertexContainer *pvContainer, int DoVertexType)
size_t FindLowA0Index(const xAOD::BPhysHelper &Obj, const std::vector< const xAOD::Vertex * > &PVlist, const size_t PV_minNTracks=0) const
Returns the index integer of the vertex with the lowest A0 in relation to the given vertex.
StatusCode FillCandwithRefittedVertices(xAOD::VertexContainer *vtxContainer, const xAOD::VertexContainer *pvContainer, xAOD::VertexContainer *refPvContainer, const Analysis::PrimaryVertexRefitter *, size_t in_PV_max, int DoVertexType)
void FillBPhysHelperNULL(xAOD::BPhysHelper &vtx, const xAOD::VertexContainer *PvContainer, xAOD::BPhysHelper::pv_type pvtype, bool do3d=false) const
const Trk::V0Tools * m_v0Tools
Amg::Vector3D GetBeamSpot() const
Get the current beamspot position either from cache or from BeamCondSvc.
void SetMinNTracksInPV(size_t PV_minNTracks)
Set the minimum number of tracks required for primary vertices to be considered for primary vertex as...
void DecorateWithNULL(xAOD::VertexContainer *vtxContainer, const xAOD::VertexContainer *pvContainer, int DoVertexType) const
static void PrepareVertexLinks(xAOD::Vertex *theResult, const xAOD::TrackParticleContainer *importedTrackCollection)
size_t FindHighPtIndex(const std::vector< const xAOD::Vertex * > &PVlist) const
void FillBPhysHelper(xAOD::BPhysHelper &vtx, const xAOD::Vertex *refPV, const xAOD::VertexContainer *refPvContainer, xAOD::BPhysHelper::pv_type pvtype, int) const
Fills the BPhysHelper object with the standard parameters.
void DecorateWithDummyVertex(xAOD::VertexContainer *vtxContainer, const xAOD::VertexContainer *pvContainer, const xAOD::Vertex *Dummy, int DoVertexType, bool SetOrignal) const
static std::vector< const xAOD::Vertex * > GetGoodPV(const xAOD::VertexContainer *pvContainer)
Static method call with DerivationFramework::BPhysDerHelpers::GetGoodPV Returns a std::vector contain...
pv_type
: Enum type of the PV
Eigen::Matrix< double, 3, 1 > Vector3D
The namespace of all packages in PhysicsAnalysis/JetTagging.
THE reconstruction tool.
Ensure that the ATLAS eigen extensions are properly loaded.
EventInfo_v1 EventInfo
Definition of the latest event info version.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".