ATLAS Offline Software
jFEXDBCondData.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 // Interface for jFEXDBCondData - Tool to read the COOL DB for jFEX
6 // -------------------
7 // begin : 01 08 2023
8 // email : Sergi.Rodriguez@cern.ch
9 //***************************************************************************
10 
11 #ifndef jFEXDBCondData_H
12 #define jFEXDBCondData_H
13 
14 #include "AthenaKernel/CLASS_DEF.h"
15 #include "AthenaKernel/CondCont.h"
16 #include <unordered_map>
17 
18 namespace LVL1 {
19 
21 {
22 
23  public:
24  /* Main constructor */
26  /* Main desconstructor */
28 
30  int get_jJCalibParam(int module, int range) const;
31  const std::vector<int> & get_jJCalibParams(int module) const;
32  bool get_doPileUpJet() const;
33  bool get_doPileUpMet() const;
34  int get_PUThrLowEm() const;
35  int get_PUThrHighEm() const;
36  int get_PUThrLowHadLar() const;
37  int get_PUThrHighHadLar() const;
38  int get_PUThrLowHadHecOverlap() const;
39  int get_PUThrHighHadHecOverlap() const;
40  int get_PUThrLowHadTrex() const;
41  int get_PUThrHighHadTrex() const;
42  int get_PUThrLowFcal() const;
43  int get_PUThrHighFcal() const;
44  std::array<uint16_t,4> get_NoiseCuts(uint16_t onlineID) const;
45  std::array<uint16_t,4> get_PileUpValues(uint16_t onlineID) const;
46 
48  void set_jJCalibParam(const std::vector<std::vector<int>>& params);
49  void set_doPileUpJet(bool PileUpCorrectionJet);
50  void set_doPileUpMet(bool PileUpCorrectionMET);
51  void set_PUThrLowEm(int PileUpThresholdLowEm);
52  void set_PUThrHighEm(int PileUpThresholdHighEm);
53  void set_PUThrLowHadLar(int PileUpThresholdLowHadLar);
54  void set_PUThrHighHadLar(int PileUpThresholdHighHadLar);
55  void set_PUThrLowHadHecOverlap(int PileUpThresholdLowHadHecOverlap);
56  void set_PUThrHighHadHecOverlap(int PileUpThresholdHighHadHecOverlap);
57  void set_PUThrLowHadTrex(int PileUpThresholdLowHadTrex);
58  void set_PUThrHighHadTrex(int PileUpThresholdHighHadTrex);
59  void set_PUThrLowFcal(int PileUpThresholdLowFcal);
60  void set_PUThrHighFcal(int PileUpThresholdHighFcal);
61  void set_NoiseCuts(const std::unordered_map< uint16_t, std::array<uint16_t,4> >& NoiseCuts);
62  void set_PileUpValues(const std::unordered_map< uint16_t, std::array<uint16_t,4> >& PileUpWeight);
63  void set_sendDefaults(bool sendDefaults);
64 
65 
66  private:
67 
68  bool m_sendDefaults = true;
69 
70  // Values for jJ Calibration
71  std::vector<std::vector<int>> m_jJCalibParams =
72  { //for ET based calibration : <20 <30 <40 <50 <65 <80 <110 <150 <inf GeV (9 bins)
73  //for eta based calibration: based on per-FPGA local eta indices (up to 25 bins)
74  std::vector<int>(25,0),// jFEX 0 FCal
75  std::vector<int>(25,0),// jFEX 1 Central
76  std::vector<int>(25,0),// jFEX 2 Central
77  std::vector<int>(25,0),// jFEX 3 Central
78  std::vector<int>(25,0),// jFEX 4 Central
79  std::vector<int>(25,0) // jFEX 5 FCal
80  };
81 
82  // Apply pileup on met or jet?
83  bool m_PileUpCorrectionJet = false;
84  bool m_PileUpCorrectionMET = false;
85 
86  // upper/lower thresholds to calculate pile-up
97 
98  // Noise values for EM and HAD
99  // the map contains: key: OnlineID and the array contains {CutJetEM, CutJetHad, CutMetEM, CutMetHad} in that order!
100  std::unordered_map< uint16_t, std::array<uint16_t,4> > m_NoiseCuts;
101  std::array<uint16_t,4> m_NoiseCuts_default= {0,0,0,0};
102 
103  // PileUp values for EM and HAD
104  // the map contains: key: OnlineID and the array contains {CutJetEM, CutJetHad, CutMetEM, CutMetHad} in that order!
105  std::unordered_map< uint16_t, std::array<uint16_t,4> > m_PileUpWeight;
106  std::array<uint16_t,4> m_PileUpWeight_default= {0,0,0,0};
107 
108  std::array<int,2> DecodeOnlineID(uint16_t onlineID) const;
109 
110 };
111 
112 
113 
114 }//end of namespace
115 
116 CLASS_DEF ( LVL1::jFEXDBCondData , 264634186 , 1 )
117 CONDCONT_DEF( LVL1::jFEXDBCondData , 39175606 );
118 
119 #endif
LVL1::jFEXDBCondData::get_PUThrHighHadLar
int get_PUThrHighHadLar() const
Definition: jFEXDBCondData.cxx:43
LVL1::jFEXDBCondData::m_NoiseCuts_default
std::array< uint16_t, 4 > m_NoiseCuts_default
Definition: jFEXDBCondData.h:101
CONDCONT_DEF
CONDCONT_DEF(LVL1::jFEXDBCondData, 39175606)
LVL1::jFEXDBCondData::m_PileUpThresholdLowHadTrex
int m_PileUpThresholdLowHadTrex
Definition: jFEXDBCondData.h:93
LVL1::jFEXDBCondData::m_PileUpCorrectionMET
bool m_PileUpCorrectionMET
Definition: jFEXDBCondData.h:84
LVL1::jFEXDBCondData::get_PUThrHighHadHecOverlap
int get_PUThrHighHadHecOverlap() const
Definition: jFEXDBCondData.cxx:51
LVL1::jFEXDBCondData::m_PileUpThresholdHighEm
int m_PileUpThresholdHighEm
Definition: jFEXDBCondData.h:88
LVL1::jFEXDBCondData::get_PUThrHighHadTrex
int get_PUThrHighHadTrex() const
Definition: jFEXDBCondData.cxx:59
CondCont.h
Hold mappings of ranges to condition objects.
LVL1::jFEXDBCondData::m_PileUpWeight
std::unordered_map< uint16_t, std::array< uint16_t, 4 > > m_PileUpWeight
Definition: jFEXDBCondData.h:105
LVL1::jFEXDBCondData::get_PUThrHighEm
int get_PUThrHighEm() const
Definition: jFEXDBCondData.cxx:35
LVL1::jFEXDBCondData::get_PUThrLowEm
int get_PUThrLowEm() const
Definition: jFEXDBCondData.cxx:31
LVL1::jFEXDBCondData::m_PileUpThresholdLowEm
int m_PileUpThresholdLowEm
Definition: jFEXDBCondData.h:87
LVL1::jFEXDBCondData::set_jJCalibParam
void set_jJCalibParam(const std::vector< std::vector< int >> &params)
Setters.
Definition: jFEXDBCondData.cxx:114
LVL1::jFEXDBCondData::m_PileUpThresholdLowHadLar
int m_PileUpThresholdLowHadLar
Definition: jFEXDBCondData.h:89
LVL1::jFEXDBCondData::set_PUThrHighEm
void set_PUThrHighEm(int PileUpThresholdHighEm)
Definition: jFEXDBCondData.cxx:130
LVL1::jFEXDBCondData::set_PUThrHighFcal
void set_PUThrHighFcal(int PileUpThresholdHighFcal)
Definition: jFEXDBCondData.cxx:162
LVL1::jFEXDBCondData::set_PUThrHighHadHecOverlap
void set_PUThrHighHadHecOverlap(int PileUpThresholdHighHadHecOverlap)
Definition: jFEXDBCondData.cxx:146
LVL1::jFEXDBCondData::set_PUThrLowHadLar
void set_PUThrLowHadLar(int PileUpThresholdLowHadLar)
Definition: jFEXDBCondData.cxx:134
LVL1::jFEXDBCondData::m_PileUpWeight_default
std::array< uint16_t, 4 > m_PileUpWeight_default
Definition: jFEXDBCondData.h:106
LVL1::jFEXDBCondData::m_PileUpCorrectionJet
bool m_PileUpCorrectionJet
Definition: jFEXDBCondData.h:83
LVL1::jFEXDBCondData::get_PUThrLowHadTrex
int get_PUThrLowHadTrex() const
Definition: jFEXDBCondData.cxx:55
LVL1::jFEXDBCondData::set_doPileUpMet
void set_doPileUpMet(bool PileUpCorrectionMET)
Definition: jFEXDBCondData.cxx:122
LVL1::jFEXDBCondData::DecodeOnlineID
std::array< int, 2 > DecodeOnlineID(uint16_t onlineID) const
Definition: jFEXDBCondData.cxx:184
LVL1::jFEXDBCondData::set_PUThrLowHadHecOverlap
void set_PUThrLowHadHecOverlap(int PileUpThresholdLowHadHecOverlap)
Definition: jFEXDBCondData.cxx:142
LVL1::jFEXDBCondData::get_PileUpValues
std::array< uint16_t, 4 > get_PileUpValues(uint16_t onlineID) const
Definition: jFEXDBCondData.cxx:98
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::jFEXDBCondData::get_PUThrLowHadLar
int get_PUThrLowHadLar() const
Definition: jFEXDBCondData.cxx:39
LVL1::jFEXDBCondData::set_PUThrHighHadTrex
void set_PUThrHighHadTrex(int PileUpThresholdHighHadTrex)
Definition: jFEXDBCondData.cxx:154
LVL1::jFEXDBCondData::m_PileUpThresholdHighHadLar
int m_PileUpThresholdHighHadLar
Definition: jFEXDBCondData.h:90
LVL1::jFEXDBCondData::m_PileUpThresholdLowFcal
int m_PileUpThresholdLowFcal
Definition: jFEXDBCondData.h:95
LVL1::jFEXDBCondData::m_PileUpThresholdHighHadTrex
int m_PileUpThresholdHighHadTrex
Definition: jFEXDBCondData.h:94
python.PyAthena.module
module
Definition: PyAthena.py:131
LVL1::jFEXDBCondData::set_PileUpValues
void set_PileUpValues(const std::unordered_map< uint16_t, std::array< uint16_t, 4 > > &PileUpWeight)
Definition: jFEXDBCondData.cxx:172
LVL1::jFEXDBCondData::get_doPileUpJet
bool get_doPileUpJet() const
Definition: jFEXDBCondData.cxx:23
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
LVL1::jFEXDBCondData::set_PUThrLowFcal
void set_PUThrLowFcal(int PileUpThresholdLowFcal)
Definition: jFEXDBCondData.cxx:158
LVL1::jFEXDBCondData::get_doPileUpMet
bool get_doPileUpMet() const
Definition: jFEXDBCondData.cxx:27
LVL1::jFEXDBCondData::m_jJCalibParams
std::vector< std::vector< int > > m_jJCalibParams
Definition: jFEXDBCondData.h:71
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
LVL1::jFEXDBCondData::set_PUThrHighHadLar
void set_PUThrHighHadLar(int PileUpThresholdHighHadLar)
Definition: jFEXDBCondData.cxx:138
LVL1::jFEXDBCondData
Definition: jFEXDBCondData.h:21
LVL1::jFEXDBCondData::get_jJCalibParams
const std::vector< int > & get_jJCalibParams(int module) const
Definition: jFEXDBCondData.cxx:19
LVL1::jFEXDBCondData::~jFEXDBCondData
~jFEXDBCondData()
Definition: jFEXDBCondData.h:27
LVL1::jFEXDBCondData::m_NoiseCuts
std::unordered_map< uint16_t, std::array< uint16_t, 4 > > m_NoiseCuts
Definition: jFEXDBCondData.h:100
LVL1::jFEXDBCondData::set_PUThrLowEm
void set_PUThrLowEm(int PileUpThresholdLowEm)
Definition: jFEXDBCondData.cxx:126
LVL1::jFEXDBCondData::get_NoiseCuts
std::array< uint16_t, 4 > get_NoiseCuts(uint16_t onlineID) const
Definition: jFEXDBCondData.cxx:71
LVL1::jFEXDBCondData::set_sendDefaults
void set_sendDefaults(bool sendDefaults)
Definition: jFEXDBCondData.cxx:179
LVL1::jFEXDBCondData::set_doPileUpJet
void set_doPileUpJet(bool PileUpCorrectionJet)
Definition: jFEXDBCondData.cxx:118
LVL1::jFEXDBCondData::get_jJCalibParam
int get_jJCalibParam(int module, int range) const
Getters.
Definition: jFEXDBCondData.cxx:15
LVL1::jFEXDBCondData::m_PileUpThresholdHighFcal
int m_PileUpThresholdHighFcal
Definition: jFEXDBCondData.h:96
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::jFEXDBCondData::m_PileUpThresholdHighHadHecOverlap
int m_PileUpThresholdHighHadHecOverlap
Definition: jFEXDBCondData.h:92
LVL1::jFEXDBCondData::get_PUThrLowHadHecOverlap
int get_PUThrLowHadHecOverlap() const
Definition: jFEXDBCondData.cxx:47
LVL1::jFEXDBCondData::m_sendDefaults
bool m_sendDefaults
Definition: jFEXDBCondData.h:68
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
LVL1::jFEXDBCondData::set_NoiseCuts
void set_NoiseCuts(const std::unordered_map< uint16_t, std::array< uint16_t, 4 > > &NoiseCuts)
Definition: jFEXDBCondData.cxx:166
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::jFEXDBCondData::set_PUThrLowHadTrex
void set_PUThrLowHadTrex(int PileUpThresholdLowHadTrex)
Definition: jFEXDBCondData.cxx:150
LVL1::jFEXDBCondData::get_PUThrHighFcal
int get_PUThrHighFcal() const
Definition: jFEXDBCondData.cxx:67
LVL1::jFEXDBCondData::get_PUThrLowFcal
int get_PUThrLowFcal() const
Definition: jFEXDBCondData.cxx:63
LVL1::jFEXDBCondData::m_PileUpThresholdLowHadHecOverlap
int m_PileUpThresholdLowHadHecOverlap
Definition: jFEXDBCondData.h:91
LVL1::jFEXDBCondData::jFEXDBCondData
jFEXDBCondData()
Definition: jFEXDBCondData.h:25