ATLAS Offline Software
Loading...
Searching...
No Matches
PFOPrepAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4
5/******************************************************************************
6 * @package Trigger/TrigAlgorithms/TrigEFMissingET
7 * @class PFOPrepAlg
8 *
9 * @brief Algorithm to prepare PFOs for the PUSplit pufit alg
10 * @author Jon Burr
11 *****************************************************************************/
12
13#ifndef TRIGEFMISSINGET_PFOPREPALG_H
14#define TRIGEFMISSINGET_PFOPREPALG_H 1
15
22#include "AsgTools/ToolHandle.h"
25#include <utility>
26
27namespace HLT
28{
29 namespace MET
30 {
31 /**************************************************************************
32 * @class PFOPrepAlg
33 *
34 * Class to prepare the PFOs for the PUSplit pufit alg.
35 *
36 * The PUSplit alg expects a single input container, which has a decoration
37 * classifying each object according to the @see PUClassification enum. This
38 * algorithm reads in the input charged and neutral PFO containers and
39 * combines them.
40 *
41 * The classification either uses the 'matchedToPV' decoration from the cPFO
42 * creation, or a TVA tool, (optional) track selection tool and vertex
43 * container to determine the classification.
44 **************************************************************************/
46 {
47 // Alias optional to make it clear how we're using it
48 template <typename T>
49 using deferred_t = std::optional<T>;
50
51 public:
53 PFOPrepAlg(const std::string &name, ISvcLocator *pSvcLocator);
54
55 virtual StatusCode initialize() override;
57 virtual StatusCode execute(const EventContext &context) const override;
58
59 private:
62 this, "InputNeutralKey", "", "Input neutral container"};
63
65 this, "InputChargedKey", "", "Input charged container"};
66
68 this, "InputVertexKey", "",
69 "Input vertex container (only needed if TVA tool is supplied."};
70
72 this, "OutputKey", "", "Output combined container"};
73
75 this, "OutputCategoryKey", "", "Output category name"};
76
77 ToolHandle<CP::ITrackVertexAssociationTool> m_tvaTool{
78 this, "TVATool", "",
79 "Track -> vertex association tool for the cPFOS. "
80 "If not provided the matchedToPV decoration is used."};
81
82 ToolHandle<InDet::IInDetTrackSelectionTool> m_trackSelTool{
83 this, "TrackSelTool", "",
84 "The track selection tool (optional). Only used if a TVA tool is provided"};
85
89 Gaudi::Property<bool> m_useCompatible{
90 this, "UseCompatible", true,
91 "Use the track -> vertex compatibility over unique matching. "
92 "This only takes effect if a TVA tool is supplied"};
93
95 bool m_manualTVA{false};
96
97 // Internal
99 };
100 } // namespace MET
101} // namespace HLT
102
103#endif //> !TRIGEFMISSINGET_PFOPREPALG
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadHandleKey< xAOD::VertexContainer > m_inputVertexKey
The input vertex container.
Definition PFOPrepAlg.h:67
bool m_manualTVA
Whether to perform track -> vertex matching manually.
Definition PFOPrepAlg.h:95
virtual StatusCode initialize() override
SG::WriteHandleKey< xAOD::PFOContainer > m_outputKey
The output combined container.
Definition PFOPrepAlg.h:71
SG::WriteDecorHandleKey< xAOD::PFOContainer > m_outputCategoryKey
The output classification.
Definition PFOPrepAlg.h:74
PFOPrepAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
std::optional< T > deferred_t
Definition PFOPrepAlg.h:49
ToolHandle< CP::ITrackVertexAssociationTool > m_tvaTool
Track -> vertex association.
Definition PFOPrepAlg.h:77
SG::ReadHandleKey< xAOD::PFOContainer > m_inputChargedKey
The input charged container.
Definition PFOPrepAlg.h:64
SG::ReadHandleKey< xAOD::PFOContainer > m_inputNeutralKey
The input neutral container.
Definition PFOPrepAlg.h:61
deferred_t< SG::AuxElement::Decorator< int > > m_decCategory
Definition PFOPrepAlg.h:98
Gaudi::Property< bool > m_useCompatible
Choose between the unique (many-to-one) track->vertex association and just checking compatibility wit...
Definition PFOPrepAlg.h:89
virtual StatusCode execute(const EventContext &context) const override
Run the algorithm.
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelTool
Track selection tool.
Definition PFOPrepAlg.h:82
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...