ATLAS Offline Software
jFEXtauAlgo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 //***************************************************************************
5 // jFEXtauAlgo - Algorithm for Tau Algorithm in jFEX
6 // -------------------
7 // begin : 18 02 2021
8 // email : Sergi.Rodriguez@cern.ch
9 //***************************************************************************
10 
11 #ifndef jFEXtauAlgo_H
12 #define jFEXtauAlgo_H
13 
14 
17 #include "AthenaKernel/CLASS_DEF.h"
23 #include "StoreGate/StoreGateSvc.h"
25 
26 
27 namespace LVL1 {
28 
29  class jFEXtauAlgo : public AthAlgTool, virtual public IjFEXtauAlgo{
30 
31  public:
33  jFEXtauAlgo(const std::string& type, const std::string& name, const IInterface* parent);
34 
36  virtual StatusCode initialize() override;
37 
39  virtual ~jFEXtauAlgo();
40 
41  virtual StatusCode safetyTest() override;
42  virtual void setup(int seed[3][3]) override;
43 
44 
45  virtual bool isSeedLocalMaxima() override;
46  virtual bool isSeedLocalMaxima_fwd(unsigned int TTID) override;
47  virtual void setFirstEtRing(int First_ETring[36]) override;
48  virtual int getClusterEt() const override;
49  virtual int getFirstEtRing() const override;
50  virtual bool getTauSat() const override;
51  virtual void setFPGAEnergy(std::unordered_map<int,std::vector<int> > et_map) override;
52 
53 protected:
54 
55  private:
56  SG::ReadHandleKey<LVL1::jTowerContainer> m_jTowerContainerKey {this, "MyjTowers", "jTowerContainer", "Input container for jTowers"};
58 
59  Gaudi::Property<std::string> m_IsoRingStr {this, "IsolationRingMap" , "Run3L1CaloSimulation/JetMaps/2023_02_10/jFEX_FWD_1stRing.dat" , "Contains Trigger tower for the isolation"};
60  Gaudi::Property<std::string> m_SearchGStr {this, "SearchGTauMap" , "Run3L1CaloSimulation/JetMaps/2023_02_10/jFEX_FWD_searchGTau.dat" , "Contains Trigger tower to find local max (greater than)"};
61  Gaudi::Property<std::string> m_SearchGeStr {this, "SearchGeTauMap" , "Run3L1CaloSimulation/JetMaps/2023_02_10/jFEX_FWD_searchGeTau.dat", "Contains Trigger tower to find local max (greater or equal than)"};
62 
63  std::unordered_map<unsigned int, std::vector<unsigned int> > m_IsoRingMap;
64  std::unordered_map<unsigned int, std::vector<unsigned int> > m_SearchGMap;
65  std::unordered_map<unsigned int, std::vector<unsigned int> > m_SearchGeMap;
66 
67  StatusCode ReadfromFile(const std::string& , std::unordered_map<unsigned int, std::vector<unsigned int> >&);
68  int getTTowerET(unsigned int TTID );
69  bool getTTowerSat(unsigned int TTID );
70 
71  int m_TTwindow[3][3]={{0}};
72  int m_ClusterEt = 0;
73  int m_TauIsolation = 0;
74  bool m_TauSaturation = false;
75 
76  std::unordered_map<int,std::vector<int> > m_map_Etvalues;
77 
78  struct color {
79  std::string RED ="\033[1;31m";
80  std::string ORANGE ="\033[1;38;5;208m";
81  std::string YELLOW ="\033[1;33m";
82  std::string GREEN ="\033[1;32m";
83  std::string BLUE ="\033[1;34m";
84  std::string PURPLE ="\033[1;35m";
85  std::string END ="\033[0m";
86  std::string B_BLUE ="\033[1;44m";
87  std::string B_PURPLE ="\033[1;45m";
88  std::string B_ORANGE ="\033[1;48;5;208;30m";
89  std::string B_GRAY ="\033[1;100m";
90  std::string B_RED ="\033[1;41m";
91  std::string B_GREEN ="\033[1;42m";
93 
94 
95 
96  };
97 
98 
99 
100 }//end of namespace
101 
102 
103 CLASS_DEF( LVL1::jFEXtauAlgo , 121222945 , 1 )
104 
105 #endif
LVL1::jFEXtauAlgo::m_SearchGStr
Gaudi::Property< std::string > m_SearchGStr
Definition: jFEXtauAlgo.h:60
LVL1::jFEXtauAlgo::getTauSat
virtual bool getTauSat() const override
Definition: jFEXtauAlgo.cxx:203
LVL1::jFEXtauAlgo::m_color
struct LVL1::jFEXtauAlgo::color m_color
LVL1::jFEXtauAlgo::m_map_Etvalues
std::unordered_map< int, std::vector< int > > m_map_Etvalues
Definition: jFEXtauAlgo.h:76
LVL1::jFEXtauAlgo::color::YELLOW
std::string YELLOW
Definition: jFEXtauAlgo.h:81
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
LVL1::jFEXtauAlgo::color::END
std::string END
Definition: jFEXtauAlgo.h:85
LVL1::jFEXtauAlgo::m_IsoRingMap
std::unordered_map< unsigned int, std::vector< unsigned int > > m_IsoRingMap
Definition: jFEXtauAlgo.h:63
LVL1::jFEXtauAlgo::m_TauIsolation
int m_TauIsolation
Definition: jFEXtauAlgo.h:73
LVL1::jFEXtauAlgo::setFirstEtRing
virtual void setFirstEtRing(int First_ETring[36]) override
Definition: jFEXtauAlgo.cxx:188
SG::ReadHandleKey< LVL1::jTowerContainer >
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::jFEXtauAlgo::m_SearchGMap
std::unordered_map< unsigned int, std::vector< unsigned int > > m_SearchGMap
Definition: jFEXtauAlgo.h:64
LVL1::jFEXtauAlgo::color::B_PURPLE
std::string B_PURPLE
Definition: jFEXtauAlgo.h:87
LVL1::jFEXtauAlgo::getTTowerSat
bool getTTowerSat(unsigned int TTID)
Definition: jFEXtauAlgo.cxx:159
AthAlgorithm.h
LVL1::jFEXtauAlgo::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition: jFEXtauAlgo.cxx:36
LVL1::jFEXtauAlgo::color::BLUE
std::string BLUE
Definition: jFEXtauAlgo.h:83
LVL1::jFEXtauAlgo::color::ORANGE
std::string ORANGE
Definition: jFEXtauAlgo.h:80
LVL1::jFEXtauAlgo::color::B_GREEN
std::string B_GREEN
Definition: jFEXtauAlgo.h:91
LVL1::jFEXtauAlgo::color::RED
std::string RED
Definition: jFEXtauAlgo.h:79
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::jFEXtauAlgo::jFEXtauAlgo
jFEXtauAlgo(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
Definition: jFEXtauAlgo.cxx:28
IjFEXtauAlgo.h
LVL1::jFEXtauAlgo::color
Definition: jFEXtauAlgo.h:78
LVL1::jFEXtauAlgo::color::B_GRAY
std::string B_GRAY
Definition: jFEXtauAlgo.h:89
AthAlgTool.h
LVL1::jFEXtauAlgo::getFirstEtRing
virtual int getFirstEtRing() const override
Definition: jFEXtauAlgo.cxx:199
LVL1::jFEXtauAlgo::isSeedLocalMaxima
virtual bool isSeedLocalMaxima() override
Definition: jFEXtauAlgo.cxx:73
LVL1::jFEXtauAlgo::getClusterEt
virtual int getClusterEt() const override
Definition: jFEXtauAlgo.cxx:182
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloCell_SuperCell_ID.h
Helper class for offline supercell identifiers.
LVL1::jFEXtauAlgo::setFPGAEnergy
virtual void setFPGAEnergy(std::unordered_map< int, std::vector< int > > et_map) override
Definition: jFEXtauAlgo.cxx:207
LVL1::jFEXtauAlgo::m_ClusterEt
int m_ClusterEt
Definition: jFEXtauAlgo.h:72
LVL1::jFEXtauAlgo::m_jTowerContainer
SG::ReadHandle< jTowerContainer > m_jTowerContainer
Definition: jFEXtauAlgo.h:57
LVL1::jFEXtauAlgo::setup
virtual void setup(int seed[3][3]) override
Definition: jFEXtauAlgo.cxx:58
LVL1::jFEXtauAlgo::m_SearchGeStr
Gaudi::Property< std::string > m_SearchGeStr
Definition: jFEXtauAlgo.h:61
LVL1::jFEXtauAlgo::color::PURPLE
std::string PURPLE
Definition: jFEXtauAlgo.h:84
TrigConf::name
Definition: HLTChainList.h:35
LVL1::jFEXtauAlgo::safetyTest
virtual StatusCode safetyTest() override
Definition: jFEXtauAlgo.cxx:47
jTowerContainer.h
LVL1::jFEXtauAlgo::ReadfromFile
StatusCode ReadfromFile(const std::string &, std::unordered_map< unsigned int, std::vector< unsigned int > > &)
Definition: jFEXtauAlgo.cxx:212
LVL1::jFEXtauAlgo::m_SearchGeMap
std::unordered_map< unsigned int, std::vector< unsigned int > > m_SearchGeMap
Definition: jFEXtauAlgo.h:65
PathResolver.h
LVL1::jFEXtauAlgo::m_TauSaturation
bool m_TauSaturation
Definition: jFEXtauAlgo.h:74
LVL1::jFEXtauAlgo::~jFEXtauAlgo
virtual ~jFEXtauAlgo()
Destructor.
Definition: jFEXtauAlgo.cxx:33
LVL1::IjFEXtauAlgo
Definition: IjFEXtauAlgo.h:21
LVL1::jFEXtauAlgo::color::B_BLUE
std::string B_BLUE
Definition: jFEXtauAlgo.h:86
CaloCellContainer.h
LVL1::jFEXtauAlgo::m_IsoRingStr
Gaudi::Property< std::string > m_IsoRingStr
Definition: jFEXtauAlgo.h:59
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
LVL1::jFEXtauAlgo::m_TTwindow
int m_TTwindow[3][3]
Definition: jFEXtauAlgo.h:71
LVL1::jFEXtauAlgo
Definition: jFEXtauAlgo.h:29
LVL1::jFEXtauAlgo::isSeedLocalMaxima_fwd
virtual bool isSeedLocalMaxima_fwd(unsigned int TTID) override
Definition: jFEXtauAlgo.cxx:104
CaloIdManager.h
LVL1::jFEXtauAlgo::m_jTowerContainerKey
SG::ReadHandleKey< LVL1::jTowerContainer > m_jTowerContainerKey
Definition: jFEXtauAlgo.h:56
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::jFEXtauAlgo::color::B_ORANGE
std::string B_ORANGE
Definition: jFEXtauAlgo.h:88
LVL1::jFEXtauAlgo::color::B_RED
std::string B_RED
Definition: jFEXtauAlgo.h:90
StoreGateSvc.h
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::jFEXtauAlgo::getTTowerET
int getTTowerET(unsigned int TTID)
Definition: jFEXtauAlgo.cxx:169
LVL1::jFEXtauAlgo::color::GREEN
std::string GREEN
Definition: jFEXtauAlgo.h:82