ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetRec
Root
JetPseudojetRetriever.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// JetPseudojetRetriever.cxx
6
7
#include "
JetRec/JetPseudojetRetriever.h
"
8
#include "
JetEDM/FastJetLink.h
"
9
#include "
JetEDM/PseudoJetMap.h
"
10
#include "
xAODJet/Jet_PseudoJet.icc
"
11
12
using
jet::PseudoJetMap
;
13
14
//**********************************************************************
15
16
JetPseudojetRetriever::JetPseudojetRetriever
(
const
std::string& name)
17
:
AsgTool
(name) {
18
//declareProperty("Attributes", m_atts);
19
}
20
21
//**********************************************************************
22
23
StatusCode
JetPseudojetRetriever::initialize
() {
24
return
StatusCode::SUCCESS;
25
}
26
27
28
//**********************************************************************
29
30
const
fastjet::PseudoJet*
JetPseudojetRetriever::
31
pseudojet
(
const
xAOD::Jet
&
jet
)
const
{
32
const
fastjet::PseudoJet* ppj =
nullptr
;
33
ppj =
jet
.getPseudoJet();
34
if
( ppj !=
nullptr
)
return
ppj;
35
PseudoJetMap
* ppjmap;
36
std::string pjmapname =
label
();
37
if
(
evtStore
()->
contains<PseudoJetMap>
(pjmapname) ) {
38
if
(
evtStore
()->retrieve(ppjmap, pjmapname).isSuccess() ) {
39
PseudoJetMap::const_iterator ipj = ppjmap->find(&
jet
);
40
if
( ipj != ppjmap->end() ) ppj = ipj->second;
41
}
else
{
42
ATH_MSG_WARNING
(
"Unable to retrieve pseudojet map."
);
43
}
44
}
45
ATH_MSG_VERBOSE
(
"Retrieved pseudojet @"
<<
long
(ppj)
46
<<
" for jet @"
<<
long
(&
jet
)
47
<<
" from "
<< pjmapname);
48
return
ppj;
49
}
50
51
//**********************************************************************
52
53
std::string
JetPseudojetRetriever::label
()
const
{
54
return
"JetPseudojetMap"
;
55
}
56
57
//**********************************************************************
58
59
void
JetPseudojetRetriever::print
()
const
{
60
ATH_MSG_INFO
(
"JetPseudojetRetriever"
);
61
}
62
63
//**********************************************************************
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
FastJetLink.h
JetPseudojetRetriever.h
Jet_PseudoJet.icc
PseudoJetMap.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
JetPseudojetRetriever::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition
JetPseudojetRetriever.cxx:23
JetPseudojetRetriever::label
std::string label() const
Return the label.
Definition
JetPseudojetRetriever.cxx:53
JetPseudojetRetriever::pseudojet
const fastjet::PseudoJet * pseudojet(const xAOD::Jet &jet) const
Retrieve the pseudojet associate with a jet.
Definition
JetPseudojetRetriever.cxx:31
JetPseudojetRetriever::JetPseudojetRetriever
JetPseudojetRetriever(const std::string &name)
Definition
JetPseudojetRetriever.cxx:16
JetPseudojetRetriever::print
void print() const
Print the state of the tool.
Definition
JetPseudojetRetriever.cxx:59
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
contains
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
Definition
hcg.cxx:116
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
jet::PseudoJetMap
std::map< const xAOD::Jet *, const fastjet::PseudoJet * > PseudoJetMap
Definition
PseudoJetMap.h:22
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
Generated on
for ATLAS Offline Software by
1.17.0