ATLAS Offline Software
jFEXForwardJetsAlgo.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 // jFEXForwardJetsAlgo - Algorithm for small R jet Algorithm in jFEX
6 // -------------------
7 // begin : 07 06 2021
8 // email : varsiha.sothilingam@cern.ch
9 //***************************************************************************
10 
11 #ifndef jFEXForwardJetsAlgo_H
12 #define jFEXForwardJetsAlgo_H
13 
16 #include "AthenaKernel/CLASS_DEF.h"
24 #include "StoreGate/StoreGateSvc.h"
26 
27 
28 namespace LVL1 {
29 
30  class jFEXForwardJetsAlgo : public AthAlgTool, virtual public IjFEXForwardJetsAlgo {
31 
32  public:
34  jFEXForwardJetsAlgo(const std::string& type, const std::string& name, const IInterface* parent);
35 
37  virtual StatusCode initialize() override;
38 
40  virtual ~jFEXForwardJetsAlgo();
41 
42  virtual StatusCode safetyTest() override;
43  virtual StatusCode reset() override;
44 
45  virtual void setup(int inputTable[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width], int jfex) override;
46  virtual std::unordered_map<int, jFEXForwardJetsInfo> FcalJetsTowerIDLists(int seedThreshold) override;
47  virtual std::unordered_map<int, jFEXForwardJetsInfo> calculateJetETs(int seedThreshold) override;
48  virtual void setFPGAEnergy(std::unordered_map<int,std::vector<int> > et_map) override;
49 
50  virtual int SumEtSeed(unsigned int TTID) override;
51 
52  protected:
53 
54  private:
55  SG::ReadHandleKey<LVL1::jTowerContainer> m_jFEXForwardJetsAlgo_jTowerContainerKey {this, "MyjTowers", "jTowerContainer", "Input container for jTowers"};
58  std::unordered_map<int,std::vector<int> > m_map_Etvalues;
61  int m_jfex;
62 
63  //This flag determines if the TT ID which are in the first and second energy rings are stored
64  //in the jFEXForwardJetsInfo class. It is set to false to reduce quantity data stored in class
65  bool m_storeEnergyRingTTIDs = true;
66 
67  //FWD CVMFS files
68  Gaudi::Property<std::string> m_SeedRingStr {this, "SeedRingMap", "Run3L1CaloSimulation/JetMaps/2024_04_09/jFEX_FWD_seed.dat" , "Contains Trigger tower in seed"};
69  Gaudi::Property<std::string> m_1stRingStr {this, "Energy1stRingMap" , "Run3L1CaloSimulation/JetMaps/2024_04_09/jFEX_FWD_1stRing.dat" , "Contains Trigger tower in 1st Energy ring"};
70  Gaudi::Property<std::string> m_2ndRingStr {this, "Energy2ndRingMap" , "Run3L1CaloSimulation/JetMaps/2024_04_09/jFEX_FWD_2ndRing.dat" , "Contains Trigger tower in 2nd energy ring"};
71  Gaudi::Property<std::string> m_CorrStr {this, "CorrMap" , "Run3L1CaloSimulation/JetMaps/2024_04_09/jFEX_FWD_corr.dat" , "Contains Trigger tower to correct displacement (greater than)"};
72  Gaudi::Property<std::string> m_Corr2Str {this, "Corr2Map" , "Run3L1CaloSimulation/JetMaps/2024_04_09/jFEX_FWD_corr2.dat" , "Contains Trigger tower to correct displacement (greater or equal than)"};
73  Gaudi::Property<std::string> m_SearchGStr {this, "SearchGMap" , "Run3L1CaloSimulation/JetMaps/2024_04_09/jFEX_FWD_searchG.dat" , "Contains Trigger tower to find local max (greater than)"};
74  Gaudi::Property<std::string> m_SearchGeStr {this, "SearchGeMap", "Run3L1CaloSimulation/JetMaps/2024_04_09/jFEX_FWD_searchGe.dat", "Contains Trigger tower to find local max (greater or equal than)"};
75 
76  std::unordered_map<unsigned int, std::vector<unsigned int> > m_SeedRingMap;
77  std::unordered_map<unsigned int, std::vector<unsigned int> > m_1stRingMap;
78  std::unordered_map<unsigned int, std::vector<unsigned int> > m_2ndRingMap;
79  std::unordered_map<unsigned int, std::vector<unsigned int> > m_CorrMap;
80  std::unordered_map<unsigned int, std::vector<unsigned int> > m_Corr2Map;
81  std::unordered_map<unsigned int, std::vector<unsigned int> > m_SearchGMap;
82  std::unordered_map<unsigned int, std::vector<unsigned int> > m_SearchGeMap;
83 
84  StatusCode ReadfromFile(const std::string& , std::unordered_map<unsigned int, std::vector<unsigned int> >&);
85 
86 
87  int getEt(unsigned int TTID);
88  bool isLM(unsigned int TTID);
89  bool isLMabove(unsigned int TTID);
90  bool getTTowerSat(unsigned int TTID );
91 
92  //Conditions for greater
93  unsigned int elementsCorr(unsigned int TTID);
94  bool condCorr(unsigned int TTID);
95  //Conditions for greater or equal
96  unsigned int elementsCorr2(unsigned int TTID);
97  bool condCorr2(unsigned int TTID);
98 
99  std::array<float,2> globalEtaPhi(int TTID);
100 
101  };
102 }//end of namespace
103 #endif
LVL1::jFEXForwardJetsAlgo::getTTowerSat
bool getTTowerSat(unsigned int TTID)
Definition: jFEXForwardJetsAlgo.cxx:427
LVL1::IjFEXForwardJetsAlgo
Definition: IjFEXForwardJetsAlgo.h:24
LVL1::jFEXForwardJetsAlgo::jFEXForwardJetsAlgo
jFEXForwardJetsAlgo(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
Definition: jFEXForwardJetsAlgo.cxx:30
LVL1::jFEXForwardJetsAlgo::isLM
bool isLM(unsigned int TTID)
Definition: jFEXForwardJetsAlgo.cxx:274
LVL1::jFEXForwardJetsAlgo::m_SearchGMap
std::unordered_map< unsigned int, std::vector< unsigned int > > m_SearchGMap
Definition: jFEXForwardJetsAlgo.h:81
LVL1::jFEXForwardJetsAlgo::m_1stRingStr
Gaudi::Property< std::string > m_1stRingStr
Definition: jFEXForwardJetsAlgo.h:69
LVL1::jFEXForwardJetsAlgo::setup
virtual void setup(int inputTable[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width], int jfex) override
Definition: jFEXForwardJetsAlgo.cxx:72
LVL1::jFEXForwardJetsAlgo::setFPGAEnergy
virtual void setFPGAEnergy(std::unordered_map< int, std::vector< int > > et_map) override
Definition: jFEXForwardJetsAlgo.cxx:422
LVL1::jFEXForwardJetsAlgo::m_SearchGStr
Gaudi::Property< std::string > m_SearchGStr
Definition: jFEXForwardJetsAlgo.h:73
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
LVL1::jFEXForwardJetsAlgo::getEt
int getEt(unsigned int TTID)
Definition: jFEXForwardJetsAlgo.cxx:88
LVL1::jFEXForwardJetsAlgo::m_CorrStr
Gaudi::Property< std::string > m_CorrStr
Definition: jFEXForwardJetsAlgo.h:71
LVL1::jFEXForwardJetsAlgo::m_jFEXalgoTowerID
int m_jFEXalgoTowerID[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width]
Definition: jFEXForwardJetsAlgo.h:57
LVL1::jFEXForwardJetsAlgo::SumEtSeed
virtual int SumEtSeed(unsigned int TTID) override
Definition: jFEXForwardJetsAlgo.cxx:258
LVL1::jFEXForwardJetsAlgo::m_SearchGeStr
Gaudi::Property< std::string > m_SearchGeStr
Definition: jFEXForwardJetsAlgo.h:74
LVL1::jFEXForwardJetsAlgo::m_jfex
int m_jfex
Definition: jFEXForwardJetsAlgo.h:61
LVL1::jFEXForwardJetsAlgo::m_2ndRingStr
Gaudi::Property< std::string > m_2ndRingStr
Definition: jFEXForwardJetsAlgo.h:70
LVL1::FEXAlgoSpaceDefs::jFEX_algoSpace_height
constexpr static int jFEX_algoSpace_height
Definition: FEXAlgoSpaceDefs.h:27
LVL1::jFEXForwardJetsAlgo::ReadfromFile
StatusCode ReadfromFile(const std::string &, std::unordered_map< unsigned int, std::vector< unsigned int > > &)
Definition: jFEXForwardJetsAlgo.cxx:436
SG::ReadHandleKey< LVL1::jTowerContainer >
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::jFEXForwardJetsAlgo::m_lowerEM_eta
int m_lowerEM_eta
Definition: jFEXForwardJetsAlgo.h:59
LVL1::jFEXForwardJetsAlgo::isLMabove
bool isLMabove(unsigned int TTID)
Definition: jFEXForwardJetsAlgo.cxx:324
LVL1::jFEXForwardJetsAlgo::m_SearchGeMap
std::unordered_map< unsigned int, std::vector< unsigned int > > m_SearchGeMap
Definition: jFEXForwardJetsAlgo.h:82
LVL1::jFEXForwardJetsAlgo::m_upperEM_eta
int m_upperEM_eta
Definition: jFEXForwardJetsAlgo.h:60
AthAlgorithm.h
LVL1::jFEXForwardJetsAlgo::globalEtaPhi
std::array< float, 2 > globalEtaPhi(int TTID)
Definition: jFEXForwardJetsAlgo.cxx:79
LVL1::jFEXForwardJetsAlgo::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition: jFEXForwardJetsAlgo.cxx:40
LVL1::jFEXForwardJetsAlgo::~jFEXForwardJetsAlgo
virtual ~jFEXForwardJetsAlgo()
Destructor.
Definition: jFEXForwardJetsAlgo.cxx:37
LVL1::jFEXForwardJetsAlgo::elementsCorr2
unsigned int elementsCorr2(unsigned int TTID)
Definition: jFEXForwardJetsAlgo.cxx:379
LVL1::jFEXForwardJetsAlgo::FcalJetsTowerIDLists
virtual std::unordered_map< int, jFEXForwardJetsInfo > FcalJetsTowerIDLists(int seedThreshold) override
Definition: jFEXForwardJetsAlgo.cxx:102
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::jFEXForwardJetsAlgo::safetyTest
virtual StatusCode safetyTest() override
Definition: jFEXForwardJetsAlgo.cxx:57
LVL1::FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width
constexpr static int jFEX_wide_algoSpace_width
Definition: FEXAlgoSpaceDefs.h:25
AthAlgTool.h
LVL1::jFEXForwardJetsAlgo::m_2ndRingMap
std::unordered_map< unsigned int, std::vector< unsigned int > > m_2ndRingMap
Definition: jFEXForwardJetsAlgo.h:78
LVL1::jFEXForwardJetsAlgo::m_SeedRingStr
Gaudi::Property< std::string > m_SeedRingStr
Definition: jFEXForwardJetsAlgo.h:68
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloCell_SuperCell_ID.h
Helper class for offline supercell identifiers.
LVL1::jFEXForwardJetsAlgo::m_Corr2Str
Gaudi::Property< std::string > m_Corr2Str
Definition: jFEXForwardJetsAlgo.h:72
LVL1::jFEXForwardJetsAlgo::m_1stRingMap
std::unordered_map< unsigned int, std::vector< unsigned int > > m_1stRingMap
Definition: jFEXForwardJetsAlgo.h:77
FEXAlgoSpaceDefs.h
LVL1::jFEXForwardJetsAlgo::m_map_Etvalues
std::unordered_map< int, std::vector< int > > m_map_Etvalues
Definition: jFEXForwardJetsAlgo.h:58
TrigConf::name
Definition: HLTChainList.h:35
IjFEXForwardJetsAlgo.h
jTowerContainer.h
jFEXForwardJetsInfo.h
PathResolver.h
LVL1::jFEXForwardJetsAlgo::condCorr
bool condCorr(unsigned int TTID)
Definition: jFEXForwardJetsAlgo.cxx:349
CaloCellContainer.h
LVL1::jFEXForwardJetsAlgo::m_SeedRingMap
std::unordered_map< unsigned int, std::vector< unsigned int > > m_SeedRingMap
Definition: jFEXForwardJetsAlgo.h:76
LVL1::jFEXForwardJetsAlgo::m_storeEnergyRingTTIDs
bool m_storeEnergyRingTTIDs
Definition: jFEXForwardJetsAlgo.h:65
LVL1::jFEXForwardJetsAlgo::reset
virtual StatusCode reset() override
Definition: jFEXForwardJetsAlgo.cxx:68
LVL1::jFEXForwardJetsAlgo::calculateJetETs
virtual std::unordered_map< int, jFEXForwardJetsInfo > calculateJetETs(int seedThreshold) override
Definition: jFEXForwardJetsAlgo.cxx:415
LVL1::jFEXForwardJetsAlgo::m_jFEXForwardJetsAlgo_jTowerContainerKey
SG::ReadHandleKey< LVL1::jTowerContainer > m_jFEXForwardJetsAlgo_jTowerContainerKey
Definition: jFEXForwardJetsAlgo.h:55
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloIdManager.h
LVL1::jFEXForwardJetsAlgo::elementsCorr
unsigned int elementsCorr(unsigned int TTID)
Definition: jFEXForwardJetsAlgo.cxx:339
LVL1::jFEXForwardJetsAlgo::m_Corr2Map
std::unordered_map< unsigned int, std::vector< unsigned int > > m_Corr2Map
Definition: jFEXForwardJetsAlgo.h:80
LVL1::jFEXForwardJetsAlgo::m_jTowerContainer
SG::ReadHandle< jTowerContainer > m_jTowerContainer
Definition: jFEXForwardJetsAlgo.h:56
LVL1::jFEXForwardJetsAlgo::condCorr2
bool condCorr2(unsigned int TTID)
Definition: jFEXForwardJetsAlgo.cxx:389
LVL1::jFEXForwardJetsAlgo::m_CorrMap
std::unordered_map< unsigned int, std::vector< unsigned int > > m_CorrMap
Definition: jFEXForwardJetsAlgo.h:79
AthAlgTool
Definition: AthAlgTool.h:26
StoreGateSvc.h
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::jFEXForwardJetsAlgo
Definition: jFEXForwardJetsAlgo.h:30