Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
xAODJetRetriever.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JIVEXML_XAODJETRETRIEVER_H
6 #define JIVEXML_XAODJETRETRIEVER_H
7 
8 #include <string>
9 #include <vector>
10 #include <map>
11 
12 #include "JiveXML/IDataRetriever.h"
14 #include "xAODJet/JetContainer.h"
15 #include "AsgTools/AnaToolHandle.h"
17 
18 
19 namespace JiveXML{
20 
40  class xAODJetRetriever : virtual public IDataRetriever,
41  public AthAlgTool {
42 
43  public:
44 
46  xAODJetRetriever(const std::string& type,const std::string& name,const IInterface* parent);
47 
48  virtual StatusCode retrieve(ToolHandle<IFormatTool> &FormatTool);
50  const DataMap getData(const xAOD::JetContainer*, const std::string &jetkey);
52  const std::vector<std::string> getKeys();
54  virtual std::string dataTypeName() const { return m_typeName; };
55 
56  virtual StatusCode initialize();
57 
58  private:
59 
61  const std::string m_typeName = "Jet";
62 
63  Gaudi::Property<bool> m_doWriteHLT {this, "DoWriteHLT", false, "Write out other collections that have HLT in the name"};
64  Gaudi::Property<bool> m_doWriteAllCollections {this, "DoWriteAllCollections", false, "Write out all Jet collections"};
65 
66 
67  Gaudi::Property<std::vector<std::string>> m_otherKeys {this, "OtherJetCollections", {"AntiKt4EMTopoJets", "AntiKt4LCTopoJets", "AntiKt10LCTopoJets", "AntiKt10UFOCSSKJets"}, "Other collections to be retrieved. If DoWriteAllCollections is set to true all available Jet collections will be retrieved"};
68  Gaudi::Property<std::string> m_priorityKey {this,"PriorityJetCollection","AntiKt4TopoEMJets", "Name of the priority Jet container that will be written out first"};
69  Gaudi::Property<bool> m_writeJetQuality{
70  this, "WriteJetQuality", false, "Write out extended jet quality information. False by default."};
71  Gaudi::Property<std::string> m_tracksName{
72  this, "TracksName", "InDetTrackParticles_xAOD", "Name of the track container to be retrieved"};
73  Gaudi::Property<std::vector<std::string>> m_bTaggerNames{
74  this, "BTaggerNames", {"DL1dv01", "GN2v01"}, "Names of the b-taggers to be retrieved"};
75  Gaudi::Property<std::vector<std::string>> m_CDIPaths{
76  this, "CDIPaths", {"xAODBTaggingEfficiency/13p6TeV/2023-22-13p6TeV-MC21-CDI_Test_2023-08-1_v1.root", "xAODBTaggingEfficiency/13p6TeV/2023-02_MC23_CDI_GN2v01-noSF.root"}, "Paths to the CDI files storing the b-tagger properties"};
77 
78  std::unordered_map<std::string, asg::AnaToolHandle<IBTaggingSelectionTool>> m_btagSelTools;
79  unsigned int m_nTaggers=0;
80 
81  };
82 }
83 #endif
JiveXML::xAODJetRetriever::m_nTaggers
unsigned int m_nTaggers
Definition: xAODJetRetriever.h:79
JiveXML::xAODJetRetriever::m_btagSelTools
std::unordered_map< std::string, asg::AnaToolHandle< IBTaggingSelectionTool > > m_btagSelTools
Definition: xAODJetRetriever.h:78
JiveXML::xAODJetRetriever::getData
const DataMap getData(const xAOD::JetContainer *, const std::string &jetkey)
Puts the variables into a DataMap.
Definition: xAODJetRetriever.cxx:89
JiveXML::xAODJetRetriever::m_doWriteHLT
Gaudi::Property< bool > m_doWriteHLT
Definition: xAODJetRetriever.h:63
JiveXML::xAODJetRetriever::m_typeName
const std::string m_typeName
The data type that is generated by this retriever.
Definition: xAODJetRetriever.h:61
JiveXML::DataMap
std::map< std::string, DataVect > DataMap
Definition: DataType.h:59
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
JiveXML::xAODJetRetriever
Retrieves all Jet objects (JetAODCollection etc.)
Definition: xAODJetRetriever.h:41
JiveXML::xAODJetRetriever::initialize
virtual StatusCode initialize()
Definition: xAODJetRetriever.cxx:28
JiveXML::xAODJetRetriever::xAODJetRetriever
xAODJetRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
Definition: xAODJetRetriever.cxx:25
JiveXML::xAODJetRetriever::m_writeJetQuality
Gaudi::Property< bool > m_writeJetQuality
Definition: xAODJetRetriever.h:69
IBTaggingSelectionTool.h
JiveXML::xAODJetRetriever::retrieve
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
For each jet collections retrieve basic parameters.
Definition: xAODJetRetriever.cxx:55
JiveXML::xAODJetRetriever::getKeys
const std::vector< std::string > getKeys()
Gets the StoreGate keys for the desired containers.
Definition: xAODJetRetriever.cxx:329
JiveXML::xAODJetRetriever::m_tracksName
Gaudi::Property< std::string > m_tracksName
Definition: xAODJetRetriever.h:71
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JiveXML::xAODJetRetriever::m_otherKeys
Gaudi::Property< std::vector< std::string > > m_otherKeys
Definition: xAODJetRetriever.h:67
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
JiveXML::IDataRetriever
Interface for all DataRetriever classes, that extract event data from StoreGate and pass them on to a...
Definition: IDataRetriever.h:25
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
AnaToolHandle.h
JiveXML
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
Definition: BadLArRetriever.cxx:22
JiveXML::xAODJetRetriever::dataTypeName
virtual std::string dataTypeName() const
Return the name of the data type that is generated by this retriever.
Definition: xAODJetRetriever.h:54
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
JetContainer.h
JiveXML::xAODJetRetriever::m_CDIPaths
Gaudi::Property< std::vector< std::string > > m_CDIPaths
Definition: xAODJetRetriever.h:75
JiveXML::xAODJetRetriever::m_doWriteAllCollections
Gaudi::Property< bool > m_doWriteAllCollections
Definition: xAODJetRetriever.h:64
AthAlgTool
Definition: AthAlgTool.h:26
JiveXML::xAODJetRetriever::m_bTaggerNames
Gaudi::Property< std::vector< std::string > > m_bTaggerNames
Definition: xAODJetRetriever.h:73
JiveXML::xAODJetRetriever::m_priorityKey
Gaudi::Property< std::string > m_priorityKey
Definition: xAODJetRetriever.h:68
IDataRetriever.h