ATLAS Offline Software
eFEXegAlgo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //***************************************************************************
6 // eFEXegAlgo.h -
7 // -------------------
8 // begin : 24 02 2020
9 // email : antonio.jacques.costa@cern.ch ulla.blumenschein@cern.ch tong.qiu@cern.ch
10 // ***************************************************************************/
11 
12 
13 #ifndef eFEXegAlgo_H
14 #define eFEXegAlgo_H
15 
17 #include "AthenaKernel/CLASS_DEF.h"
18 #include "L1CaloFEXSim/eFEXegTOB.h"
20 
22 
23 namespace LVL1 {
24 
25  //Doxygen class description below:
29  static const InterfaceID IID_IeFEXegAlgo("LVL1::eFEXegAlgo", 1, 0);
30 
31  class eFEXegAlgo : public AthAlgTool {
32 
33  public:
35  eFEXegAlgo(const std::string& type, const std::string& name, const IInterface* parent);
36 
37  static const InterfaceID& interfaceID() { return IID_IeFEXegAlgo; };
39  virtual StatusCode initialize();
40 
42  virtual ~eFEXegAlgo();
43 
44  virtual StatusCode safetyTest() const;
45  virtual void setup(int inputTable[3][3], int efex_id, int fpga_id, int central_eta);
46 
47  virtual void getReta(std::vector<unsigned int> & );
48  virtual void getRhad(std::vector<unsigned int> & );
49  virtual void getWstot(std::vector<unsigned int> & );
50  virtual void getRealPhi(float & phi);
51  virtual void getRealEta(float & eta);
52  virtual std::unique_ptr<eFEXegTOB> geteFEXegTOB();
53  virtual void getClusterCells(std::vector<unsigned int> &cellETs);
54  virtual unsigned int getET();
55  virtual unsigned int dmCorrection(unsigned int ET, unsigned int layer);
56  virtual void getWindowET(int layer, int jPhi, int SCID, unsigned int &);
57  virtual bool hasSeed() const {return m_hasSeed;};
58  virtual unsigned int getSeed() const {return m_seedID;};
59  virtual unsigned int getUnD() const {return m_seed_UnD;};
60  virtual void getCoreEMTowerET(unsigned int & et);
61  virtual void getCoreHADTowerET(unsigned int & et);
62  virtual void getSums(unsigned int seed, bool UnD,
63  std::vector<unsigned int> & RetaSums,
64  std::vector<unsigned int> & RhadSums,
65  std::vector<unsigned int> & WstotSums);
66  private:
67  void setSeed();
68  bool m_seed_UnD = false;
69  unsigned int m_seedID = 999;
70  int m_eFEXegAlgoTowerID[3][3]{};
71  int m_efexid{};
72  int m_fpgaid{};
74  bool m_hasSeed{};
75 
77  {
78  public:
79  Corrections() = default;
80  Corrections (const CondAttrListCollection& dmCorrections, MsgStream& msg);
81  int corr (unsigned int layer, unsigned int ieta) const
82  { return m_corrections[layer][ieta]; }
83  private:
84  int m_corrections[3][25] = {
85  {0,0,0,0,0,0,0,0x8,0,0,0xb,0x4,0x8,0x9,0x34,0x7e,0x7b,0x6b,0,0,0,0,0,0,0xc},
86  {0xe,0x12,0x12,0x12,0x12,0x13,0x18,0x17,0x42,0x40,0x38,0x3d,0x3b,0x4e,0x2d,0xc,0x10,0x4,0x27,0x19,0x19,0x16,0x12,0x10,0xc},
87  {0xb,0x8,0x8,0x8,0x8,0x8,0x7,0x9,0x8,0x8,0x8,0x7,0x8,0x8,0x21,0x2,0x2,0x4,0x6,0x8,0x8,0x8,0x9,0x10,0x12}
88  };
89  };
90  mutable Corrections m_corrections ATLAS_THREAD_SAFE;
91 
92  // Enable dead material corrections
93  Gaudi::Property<bool> m_dmCorr {this, "dmCorr", false, "Enable dead material correctionst"};
94  Gaudi::Property<int> m_algoVersion {this, "algoVersion", 0, "AlgoVersion, part of the L1Menu spec"};
95 
96  // Key for input towers
97  SG::ReadHandleKey<LVL1::eTowerContainer> m_eTowerContainerKey {this, "MyETowers", "eTowerContainer", "Input container for eTowers"};
98 
99  // Key for reading dm corrections
101  "Key to dead material corrections (AttrListCollection)"};
102 
103  };
104 
105 } // end of namespace
106 
107 //CLASS_DEF( LVL1::eFEXegAlgo, 32202260 , 1 )
108 
109 #endif
LVL1::eFEXegAlgo::m_hasSeed
bool m_hasSeed
Definition: eFEXegAlgo.h:74
LVL1::eFEXegAlgo::getUnD
virtual unsigned int getUnD() const
Definition: eFEXegAlgo.h:59
LVL1::eFEXegAlgo::Corrections
Definition: eFEXegAlgo.h:77
et
Extra patterns decribing particle interation process.
LVL1::eFEXegAlgo::m_efexid
int m_efexid
Definition: eFEXegAlgo.h:71
eTowerContainer.h
LVL1::eFEXegAlgo::m_seed_UnD
bool m_seed_UnD
Definition: eFEXegAlgo.h:68
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
LVL1::eFEXegAlgo::m_eTowerContainerKey
SG::ReadHandleKey< LVL1::eTowerContainer > m_eTowerContainerKey
Definition: eFEXegAlgo.h:97
LVL1::eFEXegAlgo::hasSeed
virtual bool hasSeed() const
Definition: eFEXegAlgo.h:57
LVL1::eFEXegAlgo::setup
virtual void setup(int inputTable[3][3], int efex_id, int fpga_id, int central_eta)
Definition: eFEXegAlgo.cxx:54
LVL1::eFEXegAlgo::getSums
virtual void getSums(unsigned int seed, bool UnD, std::vector< unsigned int > &RetaSums, std::vector< unsigned int > &RhadSums, std::vector< unsigned int > &WstotSums)
Definition: eFEXegAlgo.cxx:494
LVL1::eFEXegAlgo::getET
virtual unsigned int getET()
Definition: eFEXegAlgo.cxx:304
LVL1::eFEXegAlgo::initialize
virtual StatusCode initialize()
standard Athena-Algorithm method
Definition: eFEXegAlgo.cxx:34
LVL1::eFEXegAlgo::m_central_eta
int m_central_eta
Definition: eFEXegAlgo.h:73
LVL1::eFEXegAlgo::geteFEXegTOB
virtual std::unique_ptr< eFEXegTOB > geteFEXegTOB()
Definition: eFEXegAlgo.cxx:426
SG::ReadHandleKey< LVL1::eTowerContainer >
LVL1::eFEXegAlgo::getClusterCells
virtual void getClusterCells(std::vector< unsigned int > &cellETs)
Return cell ET values used in cluster.
Definition: eFEXegAlgo.cxx:269
LVL1::eFEXegAlgo::m_seedID
unsigned int m_seedID
Definition: eFEXegAlgo.h:69
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::eFEXegAlgo::m_algoVersion
Gaudi::Property< int > m_algoVersion
Definition: eFEXegAlgo.h:94
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
LVL1::eFEXegAlgo::ATLAS_THREAD_SAFE
Corrections m_corrections ATLAS_THREAD_SAFE
Definition: eFEXegAlgo.h:90
LVL1::eFEXegAlgo::eFEXegAlgo
eFEXegAlgo(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
Definition: eFEXegAlgo.cxx:23
LVL1::eFEXegAlgo::setSeed
void setSeed()
Definition: eFEXegAlgo.cxx:513
LVL1::eFEXegAlgo::getReta
virtual void getReta(std::vector< unsigned int > &)
Definition: eFEXegAlgo.cxx:97
LVL1::eFEXegAlgo::m_dmCorr
Gaudi::Property< bool > m_dmCorr
Definition: eFEXegAlgo.h:93
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::eFEXegAlgo::m_eFEXegAlgoTowerID
int m_eFEXegAlgoTowerID[3][3]
Definition: eFEXegAlgo.h:70
eFEXegTOB.h
TrigConf::name
Definition: HLTChainList.h:35
LVL1::eFEXegAlgo::m_dmCorrectionsKey
SG::ReadCondHandleKey< CondAttrListCollection > m_dmCorrectionsKey
Definition: eFEXegAlgo.h:100
LVL1::eFEXegAlgo::getSeed
virtual unsigned int getSeed() const
Definition: eFEXegAlgo.h:58
LVL1::eFEXegAlgo::getRhad
virtual void getRhad(std::vector< unsigned int > &)
Definition: eFEXegAlgo.cxx:146
LVL1::eFEXegAlgo::getCoreEMTowerET
virtual void getCoreEMTowerET(unsigned int &et)
Definition: eFEXegAlgo.cxx:66
LVL1::eFEXegAlgo
Definition: eFEXegAlgo.h:31
LVL1::eFEXegAlgo::~eFEXegAlgo
virtual ~eFEXegAlgo()
Destructor.
Definition: eFEXegAlgo.cxx:30
LVL1::eFEXegAlgo::safetyTest
virtual StatusCode safetyTest() const
Definition: eFEXegAlgo.cxx:43
SG::ReadCondHandleKey< CondAttrListCollection >
LVL1::eFEXegAlgo::Corrections::Corrections
Corrections()=default
LVL1::eFEXegAlgo::getCoreHADTowerET
virtual void getCoreHADTowerET(unsigned int &et)
Definition: eFEXegAlgo.cxx:74
LVL1::eFEXegAlgo::interfaceID
static const InterfaceID & interfaceID()
Definition: eFEXegAlgo.h:37
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LVL1::eFEXegAlgo::Corrections::corr
int corr(unsigned int layer, unsigned int ieta) const
Definition: eFEXegAlgo.h:81
LVL1::eFEXegAlgo::dmCorrection
virtual unsigned int dmCorrection(unsigned int ET, unsigned int layer)
Definition: eFEXegAlgo.cxx:365
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::eFEXegAlgo::m_fpgaid
int m_fpgaid
Definition: eFEXegAlgo.h:72
LVL1::eFEXegAlgo::getRealPhi
virtual void getRealPhi(float &phi)
Definition: eFEXegAlgo.cxx:82
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::eFEXegAlgo::Corrections::m_corrections
int m_corrections[3][25]
Definition: eFEXegAlgo.h:84
LVL1::eFEXegAlgo::getRealEta
virtual void getRealEta(float &eta)
Definition: eFEXegAlgo.cxx:89
LVL1::eFEXegAlgo::getWindowET
virtual void getWindowET(int layer, int jPhi, int SCID, unsigned int &)
Definition: eFEXegAlgo.cxx:449
LVL1::eFEXegAlgo::getWstot
virtual void getWstot(std::vector< unsigned int > &)
Definition: eFEXegAlgo.cxx:234