ATLAS Offline Software
FlowElementPrepAlg.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 FlowElementPrepAlg
8  *
9  * @brief Algorithm to prepare Flow Elements for the PUSplit pufit alg
10  * @author Jon Burr
11  *****************************************************************************/
12 
13 #ifndef TRIGEFMISSINGET_FLOWELEMENTPREPALG_H
14 #define TRIGEFMISSINGET_FLOWELEMENTPREPALG_H 1
15 
22 #include "AsgTools/ToolHandle.h"
25 #include <utility>
26 
27 namespace HLT
28 {
29  namespace MET
30  {
31  /**************************************************************************
32  * @class FlowElementPrepAlg
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  **************************************************************************/
45  class FlowElementPrepAlg : public AthReentrantAlgorithm
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  FlowElementPrepAlg(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"};
65  this, "InputChargedKey", "", "Input charged container"};
68  this, "InputVertexKey", "",
69  "Input vertex container (only needed if TVA tool is supplied."};
72  this, "OutputKey", "", "Output combined container"};
75  this, "OutputCategoryKey", "", "Output category name"};
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."};
82  ToolHandle<InDet::IInDetTrackSelectionTool> m_trackSelTool{
83  this, "TrackSelTool", "",
84  "The track selection tool (optional). Only used if a TVA tool is provided"};
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_FLOWELEMENTPREPALG
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
HLT::MET::FlowElementPrepAlg::FlowElementPrepAlg
FlowElementPrepAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: FlowElementPrepAlg.cxx:22
HLT::MET::FlowElementPrepAlg::m_decCategory
deferred_t< SG::AuxElement::Decorator< int > > m_decCategory
Definition: FlowElementPrepAlg.h:129
FlowElementContainer.h
HLT::MET::FlowElementPrepAlg::execute
virtual StatusCode execute(const EventContext &context) const override
Run the algorithm.
Definition: FlowElementPrepAlg.cxx:53
HLT::MET::FlowElementPrepAlg::m_outputKey
SG::WriteHandleKey< xAOD::FlowElementContainer > m_outputKey
The output combined container.
Definition: FlowElementPrepAlg.h:102
HLT::MET::FlowElementPrepAlg::m_inputVertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_inputVertexKey
The input vertex container.
Definition: FlowElementPrepAlg.h:98
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
HLT::MET::FlowElementPrepAlg::m_outputCategoryKey
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_outputCategoryKey
The output classification.
Definition: FlowElementPrepAlg.h:105
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HLT::MET::FlowElementPrepAlg::m_manualTVA
bool m_manualTVA
Whether to perform track -> vertex matching manually.
Definition: FlowElementPrepAlg.h:126
TCS::MET
@ MET
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:16
HLT::MET::FlowElementPrepAlg::initialize
virtual StatusCode initialize() override
Definition: FlowElementPrepAlg.cxx:27
ITrackVertexAssociationTool.h
IInDetTrackSelectionTool.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
VertexContainer.h
HLT::MET::FlowElementPrepAlg::m_trackSelTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelTool
Track selection tool.
Definition: FlowElementPrepAlg.h:113
HLT::MET::FlowElementPrepAlg::m_inputChargedKey
SG::ReadHandleKey< xAOD::FlowElementContainer > m_inputChargedKey
The input charged container.
Definition: FlowElementPrepAlg.h:95
ToolHandle.h
HLT::MET::FlowElementPrepAlg::m_inputNeutralKey
SG::ReadHandleKey< xAOD::FlowElementContainer > m_inputNeutralKey
The input neutral container.
Definition: FlowElementPrepAlg.h:92
HLT::MET::FlowElementPrepAlg::deferred_t
std::optional< T > deferred_t
Definition: FlowElementPrepAlg.h:80
HLT::MET::FlowElementPrepAlg::m_tvaTool
ToolHandle< CP::ITrackVertexAssociationTool > m_tvaTool
Track -> vertex association.
Definition: FlowElementPrepAlg.h:108
HLT::MET::FlowElementPrepAlg::m_useCompatible
Gaudi::Property< bool > m_useCompatible
Choose between the unique (many-to-one) track->vertex association and just checking compatibility wit...
Definition: FlowElementPrepAlg.h:120