ATLAS Offline Software
Loading...
Searching...
No Matches
TrackAnalysisInfoWriteTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETTRACKPERFMON_TRACKANALYSISINFOWRITETOOL_H
6#define INDETTRACKPERFMON_TRACKANALYSISINFOWRITETOOL_H
7
14
16#include "AsgTools/AsgTool.h"
18
21
23#include <string>
24#include <vector>
25
28
29
30namespace IDTPM {
31
33 template< typename coll_t >
35
36 template< typename coll_t >
37 using VecEL_t = std::vector< EL_t< coll_t > >;
38
39 template< typename coll_t >
40 using Vec_t = std::vector< typename coll_t::const_value_type >;
41
42 using VecF_t = std::vector< float >;
43
44 template< typename Tcoll_t, typename Rcoll_t >
45 using MatchInfo_t = std::tuple< VecEL_t<Tcoll_t>, VecEL_t<Rcoll_t>, VecF_t >;
46
50
51
53 public virtual asg::IAsgTool,
54 public asg::AsgTool {
55
57
58 public:
59
61 TrackAnalysisInfoWriteTool( const std::string& name );
62
64 virtual ~TrackAnalysisInfoWriteTool() = default;
65
67 virtual StatusCode initialize() override;
68
70 StatusCode write(
72 TrackAnalysisCollections& trkAnaColls,
73 const std::string& chain = "",
74 unsigned int roiIdx = 0,
75 const std::string& roiStr = "" ) const;
76
78 std::string printInfo(
80
81 private:
82
84 template< typename Tcoll_t, typename Rcoll_t >
86 const Vec_t< Tcoll_t >& Tvec,
87 const Vec_t< Rcoll_t >& Rvec,
88 const Tcoll_t* Tcoll,
89 const Rcoll_t* Rcoll,
90 const ITrackMatchingLookup* matches ) const;
91
93 template< typename Tcoll_t, typename Rcoll_t >
94 std::string printMatchInfo(
95 const VecEL_t< Tcoll_t >& testVec,
96 const VecEL_t< Rcoll_t >& refVec,
97 const VecF_t& distVec ) const;
98
99 StringProperty m_anaTag{ this, "AnaTag", "", "Track analysis tag" };
100
101 SmartIF<ITrackAnalysisDefinitionSvc> m_trkAnaDefSvc;
102
103 }; // class TrackAnalysisInfoWriteTool
104
105} // namespace IDTPM
106
108
109#endif // > !INDETTRACKPERFMON_TRACKANALYSISINFOWRITETOOL_H
Service interface to hold (and propagate) the basic properties of each defined TrackAnalysis and of t...
Handle class for recording to StoreGate.
std::string printMatchInfo(const VecEL_t< Tcoll_t > &testVec, const VecEL_t< Rcoll_t > &refVec, const VecF_t &distVec) const
Print match info (for debug)
std::string printInfo(SG::WriteHandle< xAOD::BaseContainer > &wh) const
Print info (for debug)
TrackAnalysisInfoWriteTool(const std::string &name)
Constructor.
virtual ~TrackAnalysisInfoWriteTool()=default
Destructor.
ASG_TOOL_CLASS(TrackAnalysisInfoWriteTool, IAsgTool)
virtual StatusCode initialize() override
RoiSelectionTool methods.
SmartIF< ITrackAnalysisDefinitionSvc > m_trkAnaDefSvc
MatchInfo_t< Tcoll_t, Rcoll_t > getMatchInfo(const Vec_t< Tcoll_t > &Tvec, const Vec_t< Rcoll_t > &Rvec, const Tcoll_t *Tcoll, const Rcoll_t *Rcoll, const ITrackMatchingLookup *matches) const
getMatchInfo
StatusCode write(SG::WriteHandle< xAOD::BaseContainer > &wh, TrackAnalysisCollections &trkAnaColls, const std::string &chain="", unsigned int roiIdx=0, const std::string &roiStr="") const
Main writing function.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Base class for the dual-use tool interface classes.
Definition IAsgTool.h:41
Athena include(s).
std::vector< typename coll_t::const_value_type > Vec_t
std::vector< EL_t< coll_t > > VecEL_t
std::tuple< VecEL_t< Tcoll_t >, VecEL_t< Rcoll_t >, VecF_t > MatchInfo_t
std::vector< float > VecF_t
ElementLink< coll_t > EL_t
useful typedefs