ATLAS Offline Software
gFEXJetAlgo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 //***************************************************************************
5 // gFEXJetAlgo - JetFinder algorithm for gFEX
6 // -------------------
7 // begin : 01 04 2021
8 // email : cecilia.tosciri@cern.ch
9 //***************************************************************************
10 
11 #ifndef gFEXJetAlgo_H
12 #define gFEXJetAlgo_H
13 
16 #include "AthenaKernel/CLASS_DEF.h"
20 #include <vector>
21 #include <memory>
22 #include <array>
23 
24 
25 
26 namespace LVL1 {
27 
28  typedef std::array<std::array<int, 6>, 32> gTowersJetEngine;
29  typedef std::array<std::array<int, 4>, 32> gTowersPartialSums;
30 
31  class gFEXJetAlgo : public AthAlgTool, virtual public IgFEXJetAlgo {
32 
33  public:
35  gFEXJetAlgo(const std::string& type, const std::string& name, const IInterface* parent);
36 
38  virtual StatusCode initialize() override;
39 
40  virtual void pileUpCalculation(gTowersType &twrs, int rhoThreshold_Max, int inputScale, int &PUCp) const override;
41 
42  virtual std::vector<std::unique_ptr<gFEXJetTOB>> largeRfinder(const gTowersType& Atwr,
43  const gTowersType& Btwr,
44  const gTowersType& CNtwr,
45  const gTowersType& Asat,
46  const gTowersType& Bsat,
47  const gTowersType& CNsat,
48  int pucA, int pucB, int pucC, int gLJ_seedThrA, int gLJ_seedThrB, int gLJ_seedThrC,
49  int gJ_ptMinToTopoCounts1, int gJ_ptMinToTopoCounts2,
50  int jetThreshold, int gLJ_ptMinToTopoCounts1, int gLJ_ptMinToTopoCounts2,
51  std::array<uint32_t, 7> & ATOB1_dat, std::array<uint32_t, 7> & ATOB2_dat,
52  std::array<uint32_t, 7> & BTOB1_dat, std::array<uint32_t, 7> & BTOB2_dat,
53  std::array<uint32_t, 7> & CTOB1_dat, std::array<uint32_t, 7> & CTOB2_dat) const override;
54 
55  private:
56 
57  virtual void singleHalf(const gTowersType & twrs, gTowersType & FPGAsum) const;
58 
59  virtual void InternalPartialAB(const gTowersType & twrs, gTowersPartialSums & lps, gTowersPartialSums & rps) const;
60 
61  virtual void addInternalLin(gTowersType & jets, gTowersPartialSums & partial) const;
62 
63  virtual void addInternalRin(gTowersType & jets, gTowersPartialSums & partial) const;
64 
65  virtual void pileUpCorrectionAB(gTowersType &jets, int puc) const;
66 
67  virtual void ZeroNegative( gTowersType & jets ) const;
68 
69  virtual void SaturateJets( gTowersType & jets, const gTowersType & sat ) const;
70 
71  virtual void SaturateBlocks( gTowersType & gBlkSum, const gTowersType & sat ) const;
72 
73  virtual void gBlockAB(const gTowersType& twrs, gTowersType & gBlkSum, gTowersType & hasSeed, int seedThreshold) const;
74 
75  virtual void blkOutAB(gTowersType & blocks, std::array<int, 32> & jetOutL, std::array<int, 32> & etaIndL, std::array<int, 32> & jetOutR, std::array<int, 32> & etaIndR) const;
76 
77  virtual void gBlockMax2(const gTowersType & gBlkSum, int BjetColumn, int localColumn, std::array<int, 3> & gBlockV, std::array<int, 3> & gBlockEta, std::array<int, 3> & gBlockPhi) const;
78 
79  virtual void gBlockMax192(const gTowersJetEngine& gBlkSum, std::array<int, 3> & gBlockVp, std::array<int, 3> & gBlockEtap, std::array<int, 3> & gBlockPhip, int index) const;
80 
81  virtual void gBlockVetoAB(gTowersType &jets, gTowersType& hasSeed) const;
82 
83  virtual void RemotePartialAB(const gTowersType& twrs, gTowersPartialSums & lps, gTowersPartialSums & rps) const;
84 
85  virtual void RemotePartialCN(const gTowersJetEngine& twrs, gTowersPartialSums & rps ) const;
86 
87  virtual void RemotePartialCP(const gTowersJetEngine& twrs, gTowersPartialSums & lps ) const;
88 
89  virtual void addRemoteRin(gTowersType & jets, const gTowersPartialSums & partial, int ps_upper, int ps_lower, int ps_shift) const;
90 
91  virtual void addRemoteLin(gTowersType & jets, const gTowersPartialSums & partial, int ps_upper, int ps_lower, int ps_shift) const;
92 
93  virtual void addRemoteCNin(gTowersType & jets, const gTowersPartialSums & partial, int ps_upper, int ps_lower, int ps_shift ) const;
94 
95  virtual void addRemoteCPin(gTowersType & jets, const gTowersPartialSums & partial, int ps_upper, int ps_lower, int ps_shift ) const;
96 
97  virtual void gJetVetoAB( gTowersType & twrs ,int jet_threshold ) const;
98 
99  virtual void jetOutAB(const gTowersType & jets,
100  std::array<int, 32> & jetOutL, std::array<int, 32> & etaIndL,
101  std::array<int, 32> & jetOutR, std::array<int, 32> & etaIndR) const;
102 
103  virtual void gJetTOBgen(const std::array<int, FEXAlgoSpaceDefs::ABCrows>& jetOut,
104  const std::array<int, FEXAlgoSpaceDefs::ABCrows>& etaInd,
105  int TOBnum, int jetThreshold, std::array<int, FEXAlgoSpaceDefs::gJetTOBfib> & gJetTOBs,
106  std::array<int, FEXAlgoSpaceDefs::gJetTOBfib> & gJetTOBv,
107  std::array<int, FEXAlgoSpaceDefs::gJetTOBfib> & gJetTOBeta,
108  std::array<int, FEXAlgoSpaceDefs::gJetTOBfib> & gJetTOBphi ) const;
109 
110  // virtual void singleAB(const gTowers& twrs, gTowersType & FPGAsum) const;
111 
112  SG::ReadHandleKey<LVL1::gTowerContainer> m_gFEXJetAlgo_gTowerContainerKey {this, "MyGTowers", "gTowerContainer", "Input container for gTowers"};
113 
114  };
115 
116 } // end of namespace
117 
118 
119 #endif
LVL1::gFEXJetAlgo::ZeroNegative
virtual void ZeroNegative(gTowersType &jets) const
Definition: gFEXJetAlgo.cxx:911
LVL1::gFEXJetAlgo::pileUpCorrectionAB
virtual void pileUpCorrectionAB(gTowersType &jets, int puc) const
Definition: gFEXJetAlgo.cxx:900
gFEXJetTOB.h
LVL1::gFEXJetAlgo::InternalPartialAB
virtual void InternalPartialAB(const gTowersType &twrs, gTowersPartialSums &lps, gTowersPartialSums &rps) const
Definition: gFEXJetAlgo.cxx:813
index
Definition: index.py:1
LVL1::gFEXJetAlgo::singleHalf
virtual void singleHalf(const gTowersType &twrs, gTowersType &FPGAsum) const
Definition: gFEXJetAlgo.cxx:763
gTowerContainer.h
LVL1::gFEXJetAlgo::gBlockMax2
virtual void gBlockMax2(const gTowersType &gBlkSum, int BjetColumn, int localColumn, std::array< int, 3 > &gBlockV, std::array< int, 3 > &gBlockEta, std::array< int, 3 > &gBlockPhi) const
Definition: gFEXJetAlgo.cxx:1016
LVL1::gFEXJetAlgo::SaturateJets
virtual void SaturateJets(gTowersType &jets, const gTowersType &sat) const
Definition: gFEXJetAlgo.cxx:921
LVL1::gFEXJetAlgo::RemotePartialAB
virtual void RemotePartialAB(const gTowersType &twrs, gTowersPartialSums &lps, gTowersPartialSums &rps) const
Definition: gFEXJetAlgo.cxx:652
LVL1::gFEXJetAlgo::RemotePartialCP
virtual void RemotePartialCP(const gTowersJetEngine &twrs, gTowersPartialSums &lps) const
Definition: gFEXJetAlgo.cxx:737
SG::ReadHandleKey< LVL1::gTowerContainer >
LVL1::gFEXJetAlgo::addRemoteLin
virtual void addRemoteLin(gTowersType &jets, const gTowersPartialSums &partial, int ps_upper, int ps_lower, int ps_shift) const
Definition: gFEXJetAlgo.cxx:1223
LVL1::gFEXJetAlgo::addRemoteCNin
virtual void addRemoteCNin(gTowersType &jets, const gTowersPartialSums &partial, int ps_upper, int ps_lower, int ps_shift) const
Definition: gFEXJetAlgo.cxx:1250
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::gFEXJetAlgo::gJetVetoAB
virtual void gJetVetoAB(gTowersType &twrs, int jet_threshold) const
Definition: gFEXJetAlgo.cxx:1304
LVL1::gFEXJetAlgo::pileUpCalculation
virtual void pileUpCalculation(gTowersType &twrs, int rhoThreshold_Max, int inputScale, int &PUCp) const override
Definition: gFEXJetAlgo.cxx:1360
LVL1::gFEXJetAlgo::addInternalRin
virtual void addInternalRin(gTowersType &jets, gTowersPartialSums &partial) const
Definition: gFEXJetAlgo.cxx:890
LVL1::gTowersPartialSums
std::array< std::array< int, 4 >, 32 > gTowersPartialSums
Definition: gFEXJetAlgo.h:29
LVL1::gFEXJetAlgo::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition: gFEXJetAlgo.cxx:28
LVL1::gFEXJetAlgo::m_gFEXJetAlgo_gTowerContainerKey
SG::ReadHandleKey< LVL1::gTowerContainer > m_gFEXJetAlgo_gTowerContainerKey
Definition: gFEXJetAlgo.h:112
LVL1::gFEXJetAlgo::gFEXJetAlgo
gFEXJetAlgo(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
Definition: gFEXJetAlgo.cxx:21
LVL1::gFEXJetAlgo::gJetTOBgen
virtual void gJetTOBgen(const std::array< int, FEXAlgoSpaceDefs::ABCrows > &jetOut, const std::array< int, FEXAlgoSpaceDefs::ABCrows > &etaInd, int TOBnum, int jetThreshold, std::array< int, FEXAlgoSpaceDefs::gJetTOBfib > &gJetTOBs, std::array< int, FEXAlgoSpaceDefs::gJetTOBfib > &gJetTOBv, std::array< int, FEXAlgoSpaceDefs::gJetTOBfib > &gJetTOBeta, std::array< int, FEXAlgoSpaceDefs::gJetTOBfib > &gJetTOBphi) const
Definition: gFEXJetAlgo.cxx:1405
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::gFEXJetAlgo
Definition: gFEXJetAlgo.h:31
LVL1::gFEXJetAlgo::blkOutAB
virtual void blkOutAB(gTowersType &blocks, std::array< int, 32 > &jetOutL, std::array< int, 32 > &etaIndL, std::array< int, 32 > &jetOutR, std::array< int, 32 > &etaIndR) const
Definition: gFEXJetAlgo.cxx:991
LVL1::gFEXJetAlgo::jetOutAB
virtual void jetOutAB(const gTowersType &jets, std::array< int, 32 > &jetOutL, std::array< int, 32 > &etaIndL, std::array< int, 32 > &jetOutR, std::array< int, 32 > &etaIndR) const
Definition: gFEXJetAlgo.cxx:1317
LVL1::gFEXJetAlgo::gBlockAB
virtual void gBlockAB(const gTowersType &twrs, gTowersType &gBlkSum, gTowersType &hasSeed, int seedThreshold) const
Definition: gFEXJetAlgo.cxx:944
FEXAlgoSpaceDefs.h
TrigConf::name
Definition: HLTChainList.h:35
LVL1::gFEXJetAlgo::gBlockVetoAB
virtual void gBlockVetoAB(gTowersType &jets, gTowersType &hasSeed) const
Definition: gFEXJetAlgo.cxx:1180
LVL1::gFEXJetAlgo::largeRfinder
virtual std::vector< std::unique_ptr< gFEXJetTOB > > largeRfinder(const gTowersType &Atwr, const gTowersType &Btwr, const gTowersType &CNtwr, const gTowersType &Asat, const gTowersType &Bsat, const gTowersType &CNsat, int pucA, int pucB, int pucC, int gLJ_seedThrA, int gLJ_seedThrB, int gLJ_seedThrC, int gJ_ptMinToTopoCounts1, int gJ_ptMinToTopoCounts2, int jetThreshold, int gLJ_ptMinToTopoCounts1, int gLJ_ptMinToTopoCounts2, std::array< uint32_t, 7 > &ATOB1_dat, std::array< uint32_t, 7 > &ATOB2_dat, std::array< uint32_t, 7 > &BTOB1_dat, std::array< uint32_t, 7 > &BTOB2_dat, std::array< uint32_t, 7 > &CTOB1_dat, std::array< uint32_t, 7 > &CTOB2_dat) const override
Definition: gFEXJetAlgo.cxx:38
LVL1::gFEXJetAlgo::SaturateBlocks
virtual void SaturateBlocks(gTowersType &gBlkSum, const gTowersType &sat) const
Definition: gFEXJetAlgo.cxx:932
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::gFEXJetAlgo::addRemoteRin
virtual void addRemoteRin(gTowersType &jets, const gTowersPartialSums &partial, int ps_upper, int ps_lower, int ps_shift) const
Definition: gFEXJetAlgo.cxx:1195
LVL1::gTowersJetEngine
std::array< std::array< int, 6 >, 32 > gTowersJetEngine
Definition: gFEXJetAlgo.h:28
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
LVL1::gTowersType
std::array< std::array< int, 12 >, 32 > gTowersType
Definition: IgFEXFPGA.h:25
LVL1::gFEXJetAlgo::RemotePartialCN
virtual void RemotePartialCN(const gTowersJetEngine &twrs, gTowersPartialSums &rps) const
Definition: gFEXJetAlgo.cxx:712
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::gFEXJetAlgo::addInternalLin
virtual void addInternalLin(gTowersType &jets, gTowersPartialSums &partial) const
Definition: gFEXJetAlgo.cxx:880
IgFEXJetAlgo.h
LVL1::IgFEXJetAlgo
Definition: IgFEXJetAlgo.h:22
LVL1::gFEXJetAlgo::addRemoteCPin
virtual void addRemoteCPin(gTowersType &jets, const gTowersPartialSums &partial, int ps_upper, int ps_lower, int ps_shift) const
Definition: gFEXJetAlgo.cxx:1277
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::gFEXJetAlgo::gBlockMax192
virtual void gBlockMax192(const gTowersJetEngine &gBlkSum, std::array< int, 3 > &gBlockVp, std::array< int, 3 > &gBlockEtap, std::array< int, 3 > &gBlockPhip, int index) const
Definition: gFEXJetAlgo.cxx:1055