ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
GlobalSim::SimpleCone Class Reference

#include <SimpleCone.h>

Collaboration diagram for GlobalSim::SimpleCone:

Public Member Functions

 SimpleCone (const std::string &name, unsigned int InputWidth, unsigned int MaxRSqr, unsigned int MinET, const std::vector< unsigned int > &MinSumET)
 
virtual ~SimpleCone ()=default
 
StatusCode run (GenericTOBArray const &input, std::vector< GenericTOBArray > &output, Decision &)
 
std::string toString () const
 
const std::vector< double > & ETPassByBit (std::size_t bit) const
 
const std::vector< double > & ETFailByBit (std::size_t bit) const
 

Private Attributes

std::string m_name {}
 
unsigned int m_InputWidth {0}
 
unsigned int m_MaxRSqr {0}
 
unsigned int m_MinET {0}
 
std::vector< unsigned int > m_MinSumET {}
 
std::vector< std::vector< double > > m_ETPassByBit
 
std::vector< std::vector< double > > m_ETFailByBit
 

Detailed Description

Definition at line 19 of file Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.h.

Constructor & Destructor Documentation

◆ SimpleCone()

GlobalSim::SimpleCone::SimpleCone ( const std::string &  name,
unsigned int  InputWidth,
unsigned int  MaxRSqr,
unsigned int  MinET,
const std::vector< unsigned int > &  MinSumET 
)

Definition at line 29 of file Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.cxx.

29  {InputWidth},
30  m_MaxRSqr{MaxRSqr},
31  m_MinET{MinET},
32  m_MinSumET{MinSumET} {
33  }
34 
37  std::vector<GenericTOBArray>& output,
38  Decision& decision) {
39 

◆ ~SimpleCone()

virtual GlobalSim::SimpleCone::~SimpleCone ( )
virtualdefault

Member Function Documentation

◆ ETFailByBit()

const std::vector< double > & GlobalSim::SimpleCone::ETFailByBit ( std::size_t  bit) const

Definition at line 113 of file Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.cxx.

113  : " << m_name << '\n'
114  << " InputWidth: " << m_InputWidth
115  << " MaxRSqr " << m_MaxRSqr

◆ ETPassByBit()

const std::vector< double > & GlobalSim::SimpleCone::ETPassByBit ( std::size_t  bit) const

Definition at line 109 of file Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.cxx.

111  {

◆ run()

StatusCode GlobalSim::SimpleCone::run ( GenericTOBArray const input,
std::vector< GenericTOBArray > &  output,
Decision decision 
)

Definition at line 42 of file Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.cxx.

45  {
46  std::stringstream ss;
47  ss << "SimpleCone bit " << i;
48  output.push_back(GenericTOBArray(ss.str()));
49  }
50 
51  decision.setNBits(numberOutputBits);
52 
53  unsigned int leadingET = 0;
54 
55  auto end = std::min(input.begin() + m_InputWidth, input.end());
56  for( GenericTOBArray::const_iterator itr0 = input.begin();
57  itr0 != end;
58  ++itr0) {
59 
60  if((*itr0)->Et() <= m_MinET ) continue; // E_T cut
61 
62  unsigned int tmp_SumET = (*itr0)->Et();
63 
64  for(GenericTOBArray::const_iterator itr1 = input.begin();
65  itr1 != end;
66  ++itr1) {
67 
68  if( itr1 == itr0 ) {
69  continue; // Avoid double counting of central jet
70  }
71  if((*itr1)->Et() <= m_MinET) continue; // E_T cut
72 
73  unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW(*itr1, *itr0);
74 
75  if (deltaR2 > m_MaxRSqr) {
76  continue; // Exclude jets outside cone
77  }
78 
79  tmp_SumET += (*itr1)->Et();
80  }
81 
82  if (tmp_SumET > leadingET) {
83  leadingET = tmp_SumET;
84  }
85  }
86 
87  for(unsigned int i=0; i< numberOutputBits; ++i) {
88 
89  bool accept = leadingET > m_MinSumET[i];
90  decision.setBit(i, accept);
91 
92  if(accept) {
94  m_ETPassByBit[i].push_back(leadingET);
95  } else{
96  m_ETFailByBit[i].push_back(leadingET);
97  }
98  }
99 
100  return StatusCode::SUCCESS;
101  }
102 
103  const std::vector<double>& SimpleCone::ETPassByBit(std::size_t i) const {
104  return m_ETPassByBit.at(i);
105  }
106 
107  const std::vector<double>& SimpleCone::ETFailByBit(std::size_t i) const {

◆ toString()

std::string GlobalSim::SimpleCone::toString ( ) const

Definition at line 117 of file Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.cxx.

117  : ";
118 
119 
120  for (const auto& et : m_MinSumET) {
121  ss << et << " ";
122  }
123 
124  return ss.str();
125  };
126 
127 }

Member Data Documentation

◆ m_ETFailByBit

std::vector<std::vector<double> > GlobalSim::SimpleCone::m_ETFailByBit
private
Initial value:
{
m_MinSumET.size(),
std::vector<double>{}
}

Definition at line 56 of file Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.h.

◆ m_ETPassByBit

std::vector<std::vector<double> > GlobalSim::SimpleCone::m_ETPassByBit
private
Initial value:
{
m_MinSumET.size(),
std::vector<double>{}
}

Definition at line 51 of file Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.h.

◆ m_InputWidth

unsigned int GlobalSim::SimpleCone::m_InputWidth {0}
private

◆ m_MaxRSqr

unsigned int GlobalSim::SimpleCone::m_MaxRSqr {0}
private

◆ m_MinET

unsigned int GlobalSim::SimpleCone::m_MinET {0}
private

◆ m_MinSumET

std::vector<unsigned int> GlobalSim::SimpleCone::m_MinSumET {}
private

◆ m_name

std::string GlobalSim::SimpleCone::m_name {}
private

The documentation for this class was generated from the following files:
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
TCS::DataArrayImpl< TCS::GenericTOB >::const_iterator
data_t::const_iterator const_iterator
Definition: DataArrayImpl.h:18
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
GlobalSim::SimpleCone::m_MinET
unsigned int m_MinET
Definition: Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.h:47
TSU::Kinematics::calcDeltaR2BW
static unsigned int calcDeltaR2BW(const TCS::GenericTOB *tob1, const TCS::GenericTOB *tob2)
Definition: Kinematics.cxx:131
xAOD::P4Helpers::deltaR2
double deltaR2(double rapidity1, double phi1, double rapidity2, double phi2)
from bare rapidity,phi
Definition: xAODP4Helpers.h:111
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
GlobalSim::SimpleCone::m_MaxRSqr
unsigned int m_MaxRSqr
Definition: Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.h:46
TCS::GenericTOB::createOnHeap
static GenericTOB * createOnHeap(const GenericTOB &)
Definition: GenericTOB.cxx:264
GlobalSim::SimpleCone::m_MinSumET
std::vector< unsigned int > m_MinSumET
Definition: Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.h:48
GlobalSim::SimpleCone::m_InputWidth
unsigned int m_InputWidth
Definition: Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.h:45
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TCS::CompositeTOB
Definition: CompositeTOB.h:16
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
GlobalSim::SimpleCone::run
StatusCode run(GenericTOBArray const &input, std::vector< GenericTOBArray > &output, Decision &)
Definition: Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.cxx:42
GlobalSim::GenericTOBArray
Definition: GenericTOBArray.h:32
min
#define min(a, b)
Definition: cfImp.cxx:40
GlobalSim::SimpleCone::m_ETPassByBit
std::vector< std::vector< double > > m_ETPassByBit
Definition: Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.h:51
merge.output
output
Definition: merge.py:17
TCS::GenericTOB
Definition: GenericTOB.h:35
GlobalSim::SimpleCone::m_ETFailByBit
std::vector< std::vector< double > > m_ETFailByBit
Definition: Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.h:56
TrigCompositeUtils::Decision
xAOD::TrigComposite Decision
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:20
GlobalSim::SimpleCone::ETPassByBit
const std::vector< double > & ETPassByBit(std::size_t bit) const
Definition: Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.cxx:109
GlobalSim::SimpleCone::ETFailByBit
const std::vector< double > & ETFailByBit(std::size_t bit) const
Definition: Global/GlobalSimulation/src/L1TopoAlgs/SimpleCone.cxx:113