ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigJiveXML
src
xAODJetROIRetriever.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigJiveXML/xAODJetROIRetriever.h
"
6
7
#include <string>
8
9
#include "CLHEP/Units/SystemOfUnits.h"
10
11
#include "
xAODTrigger/JetRoIContainer.h
"
12
13
namespace
JiveXML
{
14
15
//--------------------------------------------------------------------------
16
17
xAODJetROIRetriever::xAODJetROIRetriever
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent):
18
AthAlgTool
(
type
, name, parent),
m_typeName
(
"JetROI"
)
19
{
20
21
declareInterface<IDataRetriever>(
this
);
22
}
23
24
//--------------------------------------------------------------------------
25
26
StatusCode
xAODJetROIRetriever::retrieve
(ToolHandle<IFormatTool> &FormatTool) {
27
28
DataVect
phi
;
29
DataVect
eta
;
30
DataVect
energy;
31
DataVect
roiWord;
32
DataVect
thrPattern;
33
35
36
const
xAOD::JetRoIContainer
* jetROIs = 0;
37
38
39
// L1JetObject -not- available
40
m_sgKey
=
"LVL1JetRoIs"
;
41
if
(
evtStore
()->
retrieve
(jetROIs,
m_sgKey
).isFailure() ) {
42
if
(
msgLvl
(MSG::DEBUG))
msg
(MSG::DEBUG) <<
"No LVL1JetROIs found in SG "
<<
endmsg
;
43
return
StatusCode::SUCCESS;
44
}
45
if
(
msgLvl
(MSG::DEBUG))
msg
(MSG::DEBUG) <<
"Found LVL1JetROIs in SG ! "
<<
endmsg
;
46
47
xAOD::JetRoIContainer::const_iterator
itJET = jetROIs->
begin
();
48
xAOD::JetRoIContainer::const_iterator
itJETe = jetROIs->
end
();
49
50
51
int
counter = 0;
52
for
(; itJET != itJETe; ++itJET)
53
{
54
phi
.push_back(
DataType
( (*itJET)->phi()) );
55
eta
.push_back(
DataType
( (*itJET)->eta()) );
56
57
if
(
msgLvl
(MSG::DEBUG))
msg
(MSG::DEBUG) <<
"xAOD JetROI #"
<< counter++
58
<<
", eta: "
<< (*itJET)->eta() <<
", phi: "
<< (*itJET)->phi() <<
endmsg
;
59
60
// Placeholders ! No direct access to those in Run-2
61
// Reference:
62
// Event/xAOD/xAODTrigger/trunk/Root/JetRoI_v2.cxx
63
// jpt 9Jan15:
64
energy.push_back(
DataType
( 0. ));
65
roiWord.push_back(
DataType
( 0. ));
66
thrPattern.push_back(
DataType
( 0. ));
67
68
// Run-1: info from Alan Watson: pT is getET8x8();
69
// energy.push_back(DataType( itJET->pt()/1000. ));
71
// energy.push_back(DataType( (*itJET)->getET4x4()/1000. ));
72
// roiWord.push_back(DataType( (*itJET)->getRoI()));
73
// thrPattern.push_back(DataType( (*itJET)->getThrPattern()));
74
75
}
76
77
DataMap
myDataMap;
78
const
auto
nPhi =
phi
.size();
79
myDataMap[
"phi"
] = std::move(
phi
);
80
myDataMap[
"eta"
] = std::move(
eta
);
81
myDataMap[
"energy"
] = std::move(energy);
82
myDataMap[
"roiWord"
] = std::move(roiWord);
83
myDataMap[
"thrPattern"
] = std::move(thrPattern);
84
85
if
(
msgLvl
(MSG::DEBUG))
msg
(MSG::DEBUG) <<
dataTypeName
() <<
": "
<< nPhi
86
<<
" from: "
<<
m_sgKey
<<
endmsg
;
87
88
//forward data to formating tool
89
return
FormatTool->AddToEvent(
dataTypeName
(),
m_sgKey
, &myDataMap);
90
}
91
}
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
DataType
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
Definition
CTPResultByteStreamTool.cxx:22
JetRoIContainer.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition
AthCommonMsg.h:30
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition
AthCommonMsg.h:24
DataVector< xAOD::JetRoI_v2 >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Definition
DataVector.h:838
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
JiveXML::xAODJetROIRetriever::retrieve
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
Definition
xAODJetROIRetriever.cxx:26
JiveXML::xAODJetROIRetriever::m_sgKey
std::string m_sgKey
Definition
xAODJetROIRetriever.h:50
JiveXML::xAODJetROIRetriever::dataTypeName
virtual std::string dataTypeName() const
Return the name of the data type.
Definition
xAODJetROIRetriever.h:43
JiveXML::xAODJetROIRetriever::m_typeName
const std::string m_typeName
The data type that is generated by this retriever.
Definition
xAODJetROIRetriever.h:48
JiveXML::xAODJetROIRetriever::xAODJetROIRetriever
xAODJetROIRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
Definition
xAODJetROIRetriever.cxx:17
JiveXML
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
Definition
BadLArRetriever.cxx:22
JiveXML::DataMap
std::map< std::string, DataVect > DataMap
Definition
DataType.h:59
JiveXML::DataVect
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
Definition
DataType.h:58
xAOD::JetRoIContainer
JetRoIContainer_v2 JetRoIContainer
Definition
JetRoIContainer.h:17
type
xAODJetROIRetriever.h
Generated on
for ATLAS Offline Software by
1.17.0