ATLAS Offline Software
Global/GlobalSimulation/src/L1TopoAlgs/jJetSelect.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 //
5 // algorithm to create abbreviated jJet lists
6 //
7 #include "jJetSelect.h"
8 
9 #include "../IO/jJetTOBArray.h"
10 #include "../IO/GenericTOBArray.h"
11 
12 #include <sstream>
13 
14 namespace GlobalSim {
15 
16  jJetSelect::jJetSelect(const std::string& name,
17  unsigned int InputWidth,
18  unsigned int MinET,
19  unsigned int MinEta,
20  unsigned int MaxEta):
21  m_name{name},
22  m_InputWidth{InputWidth},
23  m_MinET{MinET},
24  m_MinEta{MinEta},
25  m_MaxEta{MaxEta}{
26  }
27 
30  GenericTOBArray & output) const {
31 
32 
33 
34  // fill output array with GenericTOBs builds from jets
35 
36  std::size_t njets{0};
37  for (const auto& jet : jets) {
38  unsigned int Et = jet->Et();
39  unsigned int eta = std::abs(jet-> eta());
40  if(Et <= m_MinET or eta < m_MinEta or eta > m_MaxEta){
41  continue;
42  }
43 
44  output.push_back(TCS::GenericTOB(*jet));
45  if (++njets > m_InputWidth) {break;}
46  }
47 
48  return StatusCode::SUCCESS;
49  }
50 
51  std::string jJetSelect::toString() const {
52  std::stringstream ss;
53  ss << "jJetSelect. name: " << m_name << '\n'
54  << " maxJets: " << m_InputWidth
55  << " minET " << m_MinET
56  << " minEta " << m_MinEta
57  << " maxEta " << m_MaxEta;
58 
59  return ss.str();
60  }
61 }
62 
GlobalSim::jJetSelect::m_MaxEta
unsigned int m_MaxEta
Definition: Global/GlobalSimulation/src/L1TopoAlgs/jJetSelect.h:41
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
GlobalSim::jJetSelect::m_name
std::string m_name
Definition: Global/GlobalSimulation/src/L1TopoAlgs/jJetSelect.h:34
GlobalSim::jJetSelect::m_InputWidth
unsigned int m_InputWidth
Definition: Global/GlobalSimulation/src/L1TopoAlgs/jJetSelect.h:38
jJetSelect.h
GlobalSim
AlgTool to obtain a selection of eFex RoIs read in from the event store.
Definition: dump.h:8
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
GlobalSim::jJetTOBArray
Definition: Global/GlobalSimulation/src/IO/jJetTOBArray.h:21
GlobalSim::jJetSelect::jJetSelect
jJetSelect(const std::string &name, unsigned int InputWidth, unsigned int MinET, unsigned int MinEta, unsigned int MaxEta)
Definition: Global/GlobalSimulation/src/L1TopoAlgs/jJetSelect.cxx:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GlobalSim::GenericTOBArray
Definition: GenericTOBArray.h:32
merge.output
output
Definition: merge.py:17
TCS::GenericTOB
Definition: GenericTOB.h:35
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
GlobalSim::jJetSelect::m_MinEta
unsigned int m_MinEta
Definition: Global/GlobalSimulation/src/L1TopoAlgs/jJetSelect.h:40
GlobalSim::jJetSelect::toString
std::string toString() const
Definition: Global/GlobalSimulation/src/L1TopoAlgs/jJetSelect.cxx:51
GlobalSim::jJetSelect::run
StatusCode run(const jJetTOBArray &, GenericTOBArray &) const
Definition: Global/GlobalSimulation/src/L1TopoAlgs/jJetSelect.cxx:29
GlobalSim::jJetSelect::m_MinET
unsigned int m_MinET
Definition: Global/GlobalSimulation/src/L1TopoAlgs/jJetSelect.h:39
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24