ATLAS Offline Software
Loading...
Searching...
No Matches
AFP_VertexRecoBasic.h
Go to the documentation of this file.
1/*
2Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef AFP_VERTEXRECO_AFP_TIMERECOTOOL_H
6#define AFP_VERTEXRECO_AFP_TIMERECOTOOL_H
7
9
10// FrameWork includes
12#include "GaudiKernel/ServiceHandle.h"
13#include "Gaudi/Property.h"
16
17// xAOD includes
29
30#include "nlohmann/json.hpp"
31#include <string>
32#include <vector>
33#include <memory>
34#include <iterator>
35#include <algorithm>
36
37
39class AFP_VertexRecoBasic : public extends<AthAlgTool, IAFP_TimeRecoTool> {
40
41 public:
43 AFP_VertexRecoBasic(const std::string& type, const std::string& name, const IInterface* parent);
44
45 virtual ~AFP_VertexRecoBasic() = default;
46
48 virtual StatusCode initialize() override;
49
50 // return name of the output container; needed by AFP_VertexRecoTool to make write handle keys
51 const std::string& outputContainerName () const override {return m_vertexContainerName;}
52
53 // TODO: put doVertexReco() in a separate "base" class
54 StatusCode doVertexReco(std::unique_ptr<xAOD::AFPVertexContainer>& outputContainer, const EventContext& ctx) const override;
55
56
57 private:
58
60 StatusCode configInfo() const;
61
62
71 xAOD::AFPVertex * reco(const double distA, const double distC, const xAOD::AFPToFTrack* toFTrackA, const xAOD::AFPToFTrack* toFTrackC,const xAOD::AFPProton* protonA, const xAOD::AFPProton* protonC, const AFP::ToFVtxParamData& TVP_A, const AFP::ToFVtxParamData& TVP_C, std::unique_ptr<xAOD::AFPVertexContainer>& outputContainer) const;
72
73
75 ToolHandle<AFP::IToFVtxParamDBTool> m_tofVtxParamDBTool {this, "tofVtxParamDBTool", "AFP__ToFLocParamDBTool", "Tool to access DB to get the vertex ToF parameters"};
76
77 Gaudi::Property<double> m_trackDistance{this, "TrackDistance", 0.5, "Maximum distance between ToF train edge and proton"};
78
79 SG::ReadHandleKey<xAOD::AFPToFTrackContainer> m_tofTrackContainerKey{this, "AFPToFTrackContainerKey", "AFPToFTrackContainer", "Name of the container with ToF tracks from which vertices are to be reconstructed"};
80
81 SG::ReadHandleKey<xAOD::AFPProtonContainer> m_protonContainerKey{this, "AFPProtonContainerKey", "AFPProtonContainer", "Name of the container with protons from which vertices are to be reconstructed"};
82
83 Gaudi::Property<std::string> m_vertexContainerName{this, "verticesContainerName", "AFPVertexContainer", "Name of the container in which vertices are saved"};
84
86 xAOD::AFPVertex * createVertex (const double position, const double distA, const double distC, std::unique_ptr<xAOD::AFPVertexContainer>& outputContainer) const;
87
89 void linkToFTracksToVertex (const xAOD::AFPToFTrack* toFTrack, SG::ReadHandle<xAOD::AFPToFTrackContainer>& tofTrackContainer, xAOD::AFPVertex * vertex) const;
90
92 void linkProtonsToVertex (const xAOD::AFPProton* proton, SG::ReadHandle<xAOD::AFPProtonContainer>& protonContainer, xAOD::AFPVertex * vertex) const;
93
94};
95
96
97#endif
Header file for interface IAFP_TimeRecoTool.
Property holding a SG store/key/clid from which a ReadHandle is made.
Class storing information about alignment.
xAOD::AFPVertex * createVertex(const double position, const double distA, const double distC, std::unique_ptr< xAOD::AFPVertexContainer > &outputContainer) const
Creates and sets up a vertex.
StatusCode configInfo() const
void linkProtonsToVertex(const xAOD::AFPProton *proton, SG::ReadHandle< xAOD::AFPProtonContainer > &protonContainer, xAOD::AFPVertex *vertex) const
Links proton pair to reconstructed vertex.
virtual StatusCode initialize() override
Loads parameterization.
StatusCode doVertexReco(std::unique_ptr< xAOD::AFPVertexContainer > &outputContainer, const EventContext &ctx) const override
virtual ~AFP_VertexRecoBasic()=default
SG::ReadHandleKey< xAOD::AFPProtonContainer > m_protonContainerKey
xAOD::AFPVertex * reco(const double distA, const double distC, const xAOD::AFPToFTrack *toFTrackA, const xAOD::AFPToFTrack *toFTrackC, const xAOD::AFPProton *protonA, const xAOD::AFPProton *protonC, const AFP::ToFVtxParamData &TVP_A, const AFP::ToFVtxParamData &TVP_C, std::unique_ptr< xAOD::AFPVertexContainer > &outputContainer) const
Reconstructs single vertex from pair of ToFTracks and a pair of protons.
SG::ReadHandleKey< xAOD::AFPToFTrackContainer > m_tofTrackContainerKey
const std::string & outputContainerName() const override
AFP_VertexRecoBasic(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
Gaudi::Property< std::string > m_vertexContainerName
void linkToFTracksToVertex(const xAOD::AFPToFTrack *toFTrack, SG::ReadHandle< xAOD::AFPToFTrackContainer > &tofTrackContainer, xAOD::AFPVertex *vertex) const
Links ToF track pair to reconstructed vertex.
ToolHandle< AFP::IToFVtxParamDBTool > m_tofVtxParamDBTool
@ brief Tool for accessing DB to get the vertex ToF parameters
Gaudi::Property< double > m_trackDistance
Property holding a SG store/key/clid from which a ReadHandle is made.
AFPToFTrack_v1 AFPToFTrack
Definition AFPToFTrack.h:12
AFPProton_v1 AFPProton
Definition AFPProton.h:11
AFPVertex_v1 AFPVertex
Definition AFPVertex.h:12