ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Global
GlobalSimulation
src
PU1
PU1Suppression.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
// PU1suppression.cxx
5
#include "
PU1Suppression.h
"
6
7
#include "GaudiKernel/MsgStream.h"
8
#include "GaudiKernel/StatusCode.h"
9
#include "
PU1SuppPortsIn.h
"
10
#include "
PU1SuppPortsOut.h
"
11
12
#include "
PU1SuppLUT.h
"
//MED_LUT
13
#include <bitset>
14
#include <string>
15
#include <sstream>
16
#include <ios>
//std::hex
17
#include <iomanip>
//std::setfill
18
#include <utility>
//std::move
19
20
namespace
GlobalSim
{
21
22
StatusCode
runPU1Suppression
(
const
PU1SuppPortsIn
& input,
23
PU1SuppPortsOut
& output, MsgStream&
msg
) {
24
25
// Create our four 64-bit TOBs from the input array
26
std::vector<std::bitset<64>> tobBits(4);
27
for
(
int
i = 0; i < 4; ++i) {
28
tobBits[i] = std::bitset<64>(input.m_I_PU1TobData[i]);
29
}
30
31
// Pass to the core suppression logic with the LUT and rho value
32
const
StatusCode runOK =
runSimulation
(tobBits,
MED_LUT
, input.m_rho,
msg
);
33
if
(runOK.isFailure()) {
34
msg
<< MSG::WARNING <<
"runPU1Suppression: runSimulation failed"
<<
endmsg
;
35
return
StatusCode::FAILURE;
36
}
37
38
// Store the processed output TOB as a single 256-bit hex string
39
output.m_outputTobs.clear();
40
std::string remadeHex =
remakeFullNumberToHex
(tobBits,
msg
);
41
42
// Add in catch to pass on the default TOB back into the event store rather
43
// than empty string
44
if
(remadeHex.empty()) {
45
msg
<< MSG::WARNING
46
<<
"runPU1Suppression: issue with input TOB - pushing back input TOB"
47
<<
endmsg
;
48
std::stringstream
ss
;
49
ss
<< std::hex << std::setfill(
'0'
);
50
for
(
int
i = 0; i < 4; ++i) {
51
ss
<< std::setw(16) << input.m_I_PU1TobData[i];
52
}
53
output.m_outputTobs.push_back(
ss
.str());
54
return
StatusCode::SUCCESS;
// After this, downstream gets at least some
55
// TOB back
56
}
57
output.m_outputTobs.push_back(std::move(remadeHex));
58
return
StatusCode::SUCCESS;
59
}
60
}
// namespace GlobalSim
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
PU1SuppLUT.h
PU1SuppPortsIn.h
Defines the data structure for PU1 Suppression algorithm inputs.
PU1SuppPortsOut.h
Defines the output structure for PU1 suppression results.
PU1Suppression.h
Interface for the PU1 suppression algorithm logic.
GlobalSim
AlgTool to read in LArStripNeighborhoods, and run the BDT Algorithm.
Definition
Trigger/TrigT1/Global/GlobalSimulation/src/Egamma1BDT/Egamma1BDT/BDT.h:11
GlobalSim::remakeFullNumberToHex
std::string remakeFullNumberToHex(const std::vector< std::bitset< 64 > > &number, MsgStream &msg)
Converts a vector of 4x 64-bit TOBs to a 64-character hex string.
Definition
PU1SuppTools.cxx:40
GlobalSim::MED_LUT
const std::vector< std::vector< et_type > > MED_LUT
Definition
PU1SuppLUT.h:21
GlobalSim::runPU1Suppression
StatusCode runPU1Suppression(const PU1SuppPortsIn &input, PU1SuppPortsOut &output, MsgStream &msg)
Runs PU1 suppression algorithm on a single event.
Definition
PU1Suppression.cxx:22
GlobalSim::runSimulation
StatusCode runSimulation(std::vector< std::bitset< 64 > > &entry, const std::vector< std::vector< et_type > > &lut, rho_type rho_data, MsgStream &msg)
Applies LUT-based suppression logic to a vector of TOBs.
Definition
PU1SuppTools.cxx:107
GlobalSim::PU1SuppPortsIn
Data structure representing a single PU1 suppression input.
Definition
PU1SuppPortsIn.h:33
GlobalSim::PU1SuppPortsOut
Output data structure for PU1 suppression.
Definition
PU1SuppPortsOut.h:28
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0