ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::jFEXFPGA Class Reference

The jFEXFPGA class defines the structure of a single jFEX FPGA Its purpose is: More...

#include <jFEXFPGA.h>

Inheritance diagram for LVL1::jFEXFPGA:
Collaboration diagram for LVL1::jFEXFPGA:

Public Member Functions

 jFEXFPGA (const std::string &type, const std::string &name, const IInterface *parent)
 Constructors.
virtual StatusCode initialize () override
 standard Athena-Algorithm method
virtual ~jFEXFPGA ()
 Destructor.
virtual StatusCode init (int id, int efexid) override
virtual StatusCode execute (jFEXOutputCollection *inputOutputCollection, const std::pair< unsigned int, const std::vector< int > & > &jetCalibrationParameters) override
virtual void reset () override
virtual int ID () const override
virtual void SetTowersAndCells_SG (int[][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width]) override
virtual void SetTowersAndCells_SG (int[][FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width]) override
virtual std::vector< std::unique_ptr< jFEXTOB > > getSmallRJetTOBs () override
 Form a tob word out of the potential candidate SmallRJet tob.
virtual std::vector< std::unique_ptr< jFEXTOB > > getLargeRJetTOBs () override
virtual std::vector< std::vector< uint32_t > > getFwdElTOBs () override
 sorted Electron tobs
virtual std::vector< std::unique_ptr< jFEXTOB > > getTauTOBs () override
virtual std::vector< std::unique_ptr< jFEXTOB > > getSumEtTOBs () override
 Form a tob word out of the potential candidate SumET tob.
virtual std::vector< std::unique_ptr< jFEXTOB > > getMetTOBs () override
 Form a tob word out of the potential candidate MET tob.
int getTTowerET_EM (unsigned int TTID) const override
int getTTowerET_HAD (unsigned int TTID) const override
int getTTowerET (unsigned int TTID) const override
int getTTowerET_forMET (unsigned int TTID) const override
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

int getTTowerET_SG (unsigned int TTID)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Static Private Member Functions

template<class TOBObjectClass>
static bool TOBetSort (const TOBObjectClass &i, const TOBObjectClass &j, uint bits, uint mask)
 Internal data.
static bool etFwdElSort (const std::vector< uint32_t > &i, const std::vector< uint32_t > &j)

Private Attributes

std::vector< std::unique_ptr< jFEXTOB > > m_tau_tobwords
std::vector< std::unique_ptr< jFEXTOB > > m_SRJet_tobwords
std::vector< std::unique_ptr< jFEXTOB > > m_LRJet_tobwords
std::vector< std::unique_ptr< jFEXTOB > > m_sumET_tobwords
std::vector< std::unique_ptr< jFEXTOB > > m_Met_tobwords
int m_id {}
int m_jfexid {}
std::vector< std::vector< uint32_t > > m_FwdEl_tobwords
int m_jTowersIDs_Wide [FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width] = {{0}}
int m_jTowersIDs_Thin [FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width] = {{0}}
std::unordered_map< int, std::vector< int > > m_map_HAD_Etvalues_FPGA
std::unordered_map< int, std::vector< int > > m_map_EM_Etvalues_FPGA
SG::ReadHandleKey< LVL1::jTowerContainerm_jTowerContainerKey {this, "MyETowers", "jTowerContainer", "Input container for jTowers"}
SG::ReadHandleKey< TrigConf::L1Menum_l1MenuKey {this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu","Name of the L1Menu object to read configuration from"}
ToolHandle< IjFEXSmallRJetAlgom_jFEXSmallRJetAlgoTool {this, "jFEXSmallRJetAlgoTool", "LVL1::jFEXSmallRJetAlgo", "Tool that runs the jFEX Small R Jet algorithm"}
ToolHandle< IjFEXLargeRJetAlgom_jFEXLargeRJetAlgoTool {this, "jFEXLargeRJetAlgoTool", "LVL1::jFEXLargeRJetAlgo", "Tool that runs the jFEX Large R Jet algorithm"}
ToolHandle< IjFEXtauAlgom_jFEXtauAlgoTool {this, "jFEXtauAlgoTool" , "LVL1::jFEXtauAlgo" , "Tool that runs the jFEX tau algorithm"}
ToolHandle< IjFEXsumETAlgom_jFEXsumETAlgoTool {this, "jFEXsumETAlgoTool" , "LVL1::jFEXsumETAlgo" , "Tool that runs the jFEX sumET algorithm"}
ToolHandle< IjFEXmetAlgom_jFEXmetAlgoTool {this, "jFEXmetAlgoTool" , "LVL1::jFEXmetAlgo" , "Tool that runs the jFEX met algorithm"}
ToolHandle< IjFEXForwardJetsAlgom_jFEXForwardJetsAlgoTool {this, "jFEXForwardJetsAlgoTool" , "LVL1::jFEXForwardJetsAlgo" , "Tool that runs the jFEX FCAL Jets algorithm"}
ToolHandle< IjFEXForwardElecAlgom_jFEXForwardElecAlgoTool {this, "jFEXForwardElecAlgoTool" , "LVL1::jFEXForwardElecAlgo" , "Tool that runs the jFEX FCAL Electrons algorithm"}
ToolHandle< IjFEXPileupAndNoisem_jFEXPileupAndNoiseTool {this, "jFEXPileupAndNoiseTool", "LVL1::jFEXPileupAndNoise", "Tool that applies Pileup and Noise"}
ToolHandle< IjFEXFormTOBsm_IjFEXFormTOBsTool {this, "IjFEXFormTOBsTool", "LVL1::jFEXFormTOBs", "Tool that forms TOB words"}
std::string m_jfex_string [6] = {"1C","2C","3C","3A","2A","1A"}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

The jFEXFPGA class defines the structure of a single jFEX FPGA Its purpose is:

  • to emulate the steps taken in processing data for a single jFEX FPGA in hardware and firmware
  • It will need to interact with jTowers and produce the jTOBs. It will be created and handed data by jFEXSim

Definition at line 50 of file jFEXFPGA.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ jFEXFPGA()

LVL1::jFEXFPGA::jFEXFPGA ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructors.

Definition at line 36 of file jFEXFPGA.cxx.

36 : AthAlgTool(type,name,parent) {
37 declareInterface<IjFEXFPGA>(this);
38}
AthAlgTool()
Default constructor:

◆ ~jFEXFPGA()

LVL1::jFEXFPGA::~jFEXFPGA ( )
virtual

Destructor.

Definition at line 41 of file jFEXFPGA.cxx.

42{
43}

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ etFwdElSort()

bool LVL1::jFEXFPGA::etFwdElSort ( const std::vector< uint32_t > & i,
const std::vector< uint32_t > & j )
inlinestaticprivate

Definition at line 100 of file jFEXFPGA.h.

100{ return (((i.at(0) >> FEXAlgoSpaceDefs::jEM_etBit ) & 0x7ff )> ((j.at(0) >> FEXAlgoSpaceDefs::jEM_etBit) & 0x7ff ));}
static constexpr int jEM_etBit
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode LVL1::jFEXFPGA::execute ( jFEXOutputCollection * inputOutputCollection,
const std::pair< unsigned int, const std::vector< int > & > & jetCalibrationParameters )
overridevirtual

Retrieve the L1 menu configuration

Implements LVL1::IjFEXFPGA.

Definition at line 77 of file jFEXFPGA.cxx.

77 {
78
79 // Retrieve the L1 menu configuration
80 SG::ReadHandle<TrigConf::L1Menu> l1Menu (m_l1MenuKey/*, ctx*/);
81
82 const TrigConf::L1ThrExtraInfo_jTAU & thr_jTAU = l1Menu->thrExtraInfo().jTAU();
83 const TrigConf::L1ThrExtraInfo_jJ & thr_jJ = l1Menu->thrExtraInfo().jJ();
84 const TrigConf::L1ThrExtraInfo_jLJ & thr_jLJ = l1Menu->thrExtraInfo().jLJ();
85 const TrigConf::L1ThrExtraInfo_jTE & thr_jTE = l1Menu->thrExtraInfo().jTE();
86 const TrigConf::L1ThrExtraInfo_jXE & thr_jXE = l1Menu->thrExtraInfo().jXE();
87
88 SG::ReadHandle<jTowerContainer> jTowerContainer(m_jTowerContainerKey/*,ctx*/);
89 if(!jTowerContainer.isValid()) {
90 ATH_MSG_ERROR("Could not retrieve container " << m_jTowerContainerKey.key() );
91 return StatusCode::FAILURE;
92 }
93
94 ATH_CHECK( m_jFEXPileupAndNoiseTool->safetyTest());
96 if(m_jfexid == 0 || m_jfexid == 5) {
98 }
99 else {
101 }
102
103 //Calculating and sustracting pileup
104 const std::vector<int> pileup_rho = m_jFEXPileupAndNoiseTool->CalculatePileup();
105
106 //From the DB
107 ATH_CHECK(m_jFEXPileupAndNoiseTool->ApplyPileup());
108
109 //Noise should be always applied
110 m_jFEXPileupAndNoiseTool->ApplyNoise2Jets(true);
111 m_jFEXPileupAndNoiseTool->ApplyNoise2Met(true);
112 //Getting the values
115 std::unordered_map<int,std::vector<int> > map_Etvalues_FPGA = m_jFEXPileupAndNoiseTool->GetEt_values();
116 std::vector<int> pileup_ID;
117 std::vector<int> pileup_HAD_jet;
118 std::vector<int> pileup_EM_jet;
119 std::vector<int> pileup_Total_jet;
120 std::vector<int> pileup_HAD_met;
121 std::vector<int> pileup_EM_met;
122 std::vector<int> pileup_Total_met;
123 for (auto const& [key, val] : m_map_HAD_Etvalues_FPGA)
124 {
125 pileup_ID.push_back(key);
126 pileup_HAD_jet.push_back(val[0]);
127 pileup_EM_jet.push_back(m_map_EM_Etvalues_FPGA[key][0]);
128 pileup_Total_jet.push_back(map_Etvalues_FPGA[key][0]);
129 pileup_HAD_met.push_back(val[1]);
130 pileup_EM_met.push_back(m_map_EM_Etvalues_FPGA[key][1]);
131 pileup_Total_met.push_back(map_Etvalues_FPGA[key][1]);
132 }
133
134 //saving pileup information
135 inputOutputCollection->addValue_pileup("pileup_FPGAid", m_id);
136 inputOutputCollection->addValue_pileup("pileup_jFEXid", m_jfexid);
137 inputOutputCollection->addValue_pileup("pileup_rho_EM", pileup_rho[0]);
138 inputOutputCollection->addValue_pileup("pileup_rho_HAD1", pileup_rho[1]);
139 inputOutputCollection->addValue_pileup("pileup_rho_HAD2", pileup_rho[2]);
140 inputOutputCollection->addValue_pileup("pileup_rho_HAD3", pileup_rho[3]);
141 inputOutputCollection->addValue_pileup("pileup_rho_FCAL", pileup_rho[4]);
142 inputOutputCollection->addValue_pileup("pileup_map_ID" , std::move(pileup_ID));
143 inputOutputCollection->addValue_pileup("pileup_map_Et_values_HAD_jet" , std::move(pileup_HAD_jet));
144 inputOutputCollection->addValue_pileup("pileup_map_Et_values_EM_jet" , std::move(pileup_EM_jet));
145 inputOutputCollection->addValue_pileup("pileup_map_Et_values_Total_jet", std::move(pileup_Total_jet));
146 inputOutputCollection->addValue_pileup("pileup_map_Et_values_HAD_met" , std::move(pileup_HAD_met));
147 inputOutputCollection->addValue_pileup("pileup_map_Et_values_EM_met" , std::move(pileup_EM_met));
148 inputOutputCollection->addValue_pileup("pileup_map_Et_values_Total_met", std::move(pileup_Total_met));
149 inputOutputCollection->fill_pileup();
150
151 if(m_id==0 || m_id==3) {
152 ATH_CHECK( m_jFEXsumETAlgoTool->safetyTest());
154 ATH_CHECK( m_jFEXmetAlgoTool->safetyTest());
155 ATH_CHECK( m_jFEXmetAlgoTool->reset());
156
157 m_jFEXsumETAlgoTool->setFPGAEnergy(map_Etvalues_FPGA);
158 m_jFEXmetAlgoTool->setFPGAEnergy(map_Etvalues_FPGA);
159
160 unsigned int bin_pos = thr_jTE.etaBoundary_fw(m_jfex_string[m_jfexid]);
161
162 std::unique_ptr<jFEXTOB> jXE_tob = std::make_unique<jFEXTOB>();
163 uint32_t jXE_tobword = 0;
164
165 std::unique_ptr<jFEXTOB> jTE_tob = std::make_unique<jFEXTOB>();
166 uint32_t jTE_tobword = 0;
167
168
169 int hemisphere = m_id == 0 ? 1 : -1;
170
171 if(m_jfexid > 0 && m_jfexid < 5) {
172
173 //-----------------jFEXsumETAlgo-----------------
175 m_jFEXsumETAlgoTool->buildBarrelSumET();
176
177 //-----------------jFEXmetAlgo-----------------
178 m_jFEXmetAlgoTool->setup(m_jTowersIDs_Thin, hemisphere);
179 m_jFEXmetAlgoTool->buildBarrelmet();
180 }
181 else if(m_jfexid == 0 ) {
182
186 for(int mphi = 0; mphi <= max_phi_it; mphi++) {
187 for(int meta = 0; meta <= max_eta_it; meta++) {
188 flipped_jTowersIDs[mphi][meta]=m_jTowersIDs_Wide[mphi][max_eta_it-meta];
189 }
190 }
191 //-----------------jFEXsumETAlgo-----------------
192 m_jFEXsumETAlgoTool->setup(flipped_jTowersIDs);
193 m_jFEXsumETAlgoTool->buildFWDSumET();
194
195 //-----------------jFEXmetAlgo-----------------
196 m_jFEXmetAlgoTool->setup(flipped_jTowersIDs, hemisphere);
197 m_jFEXmetAlgoTool->buildFWDmet();
198 }
199 else if(m_jfexid == 5) {
200
201 //-----------------jFEXsumETAlgo-----------------
203 m_jFEXsumETAlgoTool->buildFWDSumET();
204
205 //-----------------jFEXmetAlgo-----------------
206 m_jFEXmetAlgoTool->setup(m_jTowersIDs_Wide, hemisphere);
207 m_jFEXmetAlgoTool->buildFWDmet();
208 }
209
210 jXE_tobword = m_IjFEXFormTOBsTool->formMetTOB(m_jFEXmetAlgoTool->GetMetXComponent(), m_jFEXmetAlgoTool->GetMetYComponent(),m_jFEXmetAlgoTool->getjXESat(),thr_jXE.resolutionMeV());
211 jXE_tob->initialize(m_id,m_jfexid,jXE_tobword,thr_jXE.resolutionMeV(),0);
212 m_Met_tobwords.push_back(std::move(jXE_tob));
213
214 std::tuple<int,bool> jTElow;
215 std::tuple<int,bool> jTEhigh;
216
217 // NOTE: Foward FPGA in the C-side is already flipped, however we still need to flip the jFEX module 1 and 2
218 if(m_jfexid == 1 || m_jfexid == 2){
219 jTElow = m_jFEXsumETAlgoTool->getETupperEta(bin_pos);
220 jTEhigh = m_jFEXsumETAlgoTool->getETlowerEta(bin_pos);
221 }
222 else{
223 jTElow = m_jFEXsumETAlgoTool->getETlowerEta(bin_pos);
224 jTEhigh = m_jFEXsumETAlgoTool->getETupperEta(bin_pos);
225 }
226
227 jTE_tobword = m_IjFEXFormTOBsTool->formSumETTOB(jTElow,jTEhigh,thr_jTE.resolutionMeV());
228 jTE_tob->initialize(m_id,m_jfexid,jTE_tobword,thr_jTE.resolutionMeV(),0);
229 m_sumET_tobwords.push_back(std::move(jTE_tob));
230 }
231
232 //-----------jFEXSmallRJet & Large R Jet Algo-----------------
233 ATH_MSG_DEBUG("================ Central Algorithms ================");
234
235 int srJet_seedThresholdMeV = thr_jJ.seedThresholdMeV(m_jfex_string[m_jfexid]); //jFEX internal granularity, i.e., 25 MeV/count
236
237
238 //Central region algorithms
239 if(m_jfexid > 0 && m_jfexid < 5) {
240 m_jFEXSmallRJetAlgoTool->setFPGAEnergy(map_Etvalues_FPGA);
241 if(!m_jFEXLargeRJetAlgoTool.empty()) m_jFEXLargeRJetAlgoTool->setFPGAEnergy(map_Etvalues_FPGA);
242 m_jFEXtauAlgoTool->setFPGAEnergy(map_Etvalues_FPGA);
243
244 for(int mphi = 8; mphi < FEXAlgoSpaceDefs::jFEX_algoSpace_height-8; mphi++) {
245 for(int meta = 8; meta < FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width-8; meta++) {
246
247 //definition of arrays
248 int TT_seed_ID[3][3]= {{0}};
249 int TT_First_ETring[36]= {0};
250 int First_ETring_it = 0;
251
252 int Jet_SearchWindow[7][7] = {{0}};
253 int Jet_SearchWindowDisplaced[7][7] = {{0}};
254 int largeRCluster_IDs[15][15]= {{0}};
255
256 //filling up array to send them to the algorithms
257 for(int i = -7; i< 8; i++ ) {
258 for(int j = -7; j< 8; j++) {
259
260 if(std::abs(i)<4 && std::abs(j)<4) {
261 Jet_SearchWindow[3 + i][3 + j] = m_jTowersIDs_Thin[mphi + i][meta +j];
262 Jet_SearchWindowDisplaced[3 + i][3 + j] = m_jTowersIDs_Thin[mphi+i+1][meta+j+1];
263 }
264
265 uint deltaR = std::sqrt(std::pow(i,2)+std::pow(j,2));
266
267 if(deltaR<2) {
268 TT_seed_ID[i+1][j+1] = m_jTowersIDs_Thin[mphi +i][meta +j]; // Seed 0.3x0.3 in phi-eta plane
269 }
270 else if(deltaR<4) {
271 TT_First_ETring[First_ETring_it]= m_jTowersIDs_Thin[mphi +i][meta +j]; // First energy ring, will be used as tau ISO
272 ++First_ETring_it;
273
274 }
275 else if(deltaR<8) {
276 largeRCluster_IDs[7 +i][7 +j] = m_jTowersIDs_Thin[mphi + i][meta +j];
277 }
278 }
279 }
280
281 // ******** jJ and jLJ algorithms ********
282 ATH_CHECK( m_jFEXSmallRJetAlgoTool->safetyTest());
283 if(!m_jFEXLargeRJetAlgoTool.empty()) ATH_CHECK( m_jFEXLargeRJetAlgoTool->safetyTest());
284 m_jFEXSmallRJetAlgoTool->setup(Jet_SearchWindow, Jet_SearchWindowDisplaced);
285 if(!m_jFEXLargeRJetAlgoTool.empty()) m_jFEXLargeRJetAlgoTool->setupCluster(largeRCluster_IDs);
286 m_jFEXSmallRJetAlgoTool->buildSeeds();
287
288 bool is_Jet_LM = m_jFEXSmallRJetAlgoTool->isSeedLocalMaxima(srJet_seedThresholdMeV);
289
290 if(is_Jet_LM) {
291
292 //getting the energies
293 int SRj_Et = m_jFEXSmallRJetAlgoTool->getSmallClusterET();
294 int LRj_Et = (m_jFEXLargeRJetAlgoTool.empty()) ? 0 : m_jFEXLargeRJetAlgoTool->getLargeClusterET(SRj_Et,m_jFEXLargeRJetAlgoTool->getRingET());
295 int seed_Et = m_jFEXSmallRJetAlgoTool->getSeedET();
296
297 bool SRj_Sat = m_jFEXSmallRJetAlgoTool->getSRjetSat();
298 bool LRj_Sat = (m_jFEXLargeRJetAlgoTool.empty()) ? false : (SRj_Sat || m_jFEXLargeRJetAlgoTool->getLRjetSat());
299
300 int meta_LM = meta;
301 int mphi_LM = mphi;
302
303
304 //Creating SR TOB
305 uint32_t SRJet_tobword = m_IjFEXFormTOBsTool->formSRJetTOB(m_jfexid, mphi_LM, meta_LM, SRj_Et, SRj_Sat, thr_jJ.resolutionMeV(), thr_jJ.ptMinToTopoMeV(m_jfex_string[m_jfexid]), jetCalibrationParameters);
306
307 std::unique_ptr<jFEXTOB> jJ_tob = std::make_unique<jFEXTOB>();
308 jJ_tob->initialize(m_id,m_jfexid,SRJet_tobword,thr_jJ.resolutionMeV(),m_jTowersIDs_Thin[mphi_LM][meta_LM],seed_Et);
309 if ( SRJet_tobword != 0 ){
310 m_SRJet_tobwords.push_back(std::move(jJ_tob));
311 }
312
313 //Creating LR TOB
314 if(!m_jFEXLargeRJetAlgoTool.empty()) {
315 uint32_t LRJet_tobword = m_IjFEXFormTOBsTool->formLRJetTOB(m_jfexid, mphi_LM, meta_LM, LRj_Et,
316 LRj_Sat, thr_jLJ.resolutionMeV(),
317 thr_jLJ.ptMinToTopoMeV(
319
320 std::unique_ptr <jFEXTOB> jLJ_tob = std::make_unique<jFEXTOB>();
321 jLJ_tob->initialize(m_id, m_jfexid, LRJet_tobword, thr_jLJ.resolutionMeV(),
322 m_jTowersIDs_Thin[mphi_LM][meta_LM], seed_Et);
323 if (LRJet_tobword != 0) m_LRJet_tobwords.push_back(std::move(jLJ_tob));
324 }
325 }
326 // ******** jTau algorithm ********
327
328 ATH_CHECK( m_jFEXtauAlgoTool->safetyTest());
329 m_jFEXtauAlgoTool->setup(TT_seed_ID);
330 bool is_tau_LocalMax = m_jFEXtauAlgoTool->isSeedLocalMaxima();
331
332 // Save TOB is tau is a local maxima
333 if ( is_tau_LocalMax ) {
334
335 //calculates the 1st energy ring
336 m_jFEXtauAlgoTool->setFirstEtRing(TT_First_ETring);
337
338
339 uint32_t jTau_tobword = m_IjFEXFormTOBsTool->formTauTOB(m_jfexid,mphi,meta,m_jFEXtauAlgoTool->getClusterEt(),m_jFEXtauAlgoTool->getFirstEtRing(),m_jFEXtauAlgoTool->getTauSat(),thr_jTAU.resolutionMeV(),thr_jTAU.ptMinToTopoMeV(m_jfex_string[m_jfexid]));
340
341 std::unique_ptr<jFEXTOB> jTau_tob = std::make_unique<jFEXTOB>();
342 jTau_tob->initialize(m_id,m_jfexid,jTau_tobword,thr_jTAU.resolutionMeV(),m_jTowersIDs_Thin[mphi][meta]);
343
344 if ( jTau_tobword != 0 ){
345 m_tau_tobwords.push_back(std::move(jTau_tob));
346 }
347 }
348 }
349 }
350 } //end of if statement for checking if in central jfex modules
351
352 //FCAL region algorithm
353 if(m_jfexid ==0 || m_jfexid ==5) {
354
355 //**********Forward Jets***********************
357 m_jFEXForwardJetsAlgoTool->setFPGAEnergy(map_Etvalues_FPGA);
359
360 std::unordered_map<int, jFEXForwardJetsInfo> FCALJets = m_jFEXForwardJetsAlgoTool->calculateJetETs(srJet_seedThresholdMeV);
361 for(std::unordered_map<int, jFEXForwardJetsInfo>::iterator it = FCALJets.begin(); it!=FCALJets.end(); ++it) {
362
363 uint32_t TTID = it->first;
364 jFEXForwardJetsInfo FCALJets = it->second;
365
366 int iphi = FCALJets.getCentreLocalTTPhi();
367 int ieta = FCALJets.getCentreLocalTTEta();
368 int SRJetET = FCALJets.getSeedET() + FCALJets.getFirstEnergyRingET();
369 int LRJetET = SRJetET + FCALJets.getSecondEnergyRingET();
370 int seedET = FCALJets.getSeedET();
371
372 bool SRJ_sat = FCALJets.getSRjetSat();
373
374 uint32_t SRFCAL_Jet_tobword = m_IjFEXFormTOBsTool->formSRJetTOB(m_jfexid, iphi, ieta, SRJetET, SRJ_sat, thr_jJ.resolutionMeV(), thr_jJ.ptMinToTopoMeV(m_jfex_string[m_jfexid]), jetCalibrationParameters);
375
376 std::unique_ptr<jFEXTOB> jJ_tob = std::make_unique<jFEXTOB>();
377 jJ_tob->initialize(m_id,m_jfexid,SRFCAL_Jet_tobword,thr_jJ.resolutionMeV(),TTID,seedET);
378
379 if ( SRFCAL_Jet_tobword != 0 ){
380 m_SRJet_tobwords.push_back(std::move(jJ_tob));
381 }
382
383 if(std::fabs(FCALJets.getCentreTTEta())<2.51 && !m_jFEXLargeRJetAlgoTool.empty()){
384 bool LRJ_sat = FCALJets.getLRjetSat();
385 uint32_t LRFCAL_Jet_tobword = m_IjFEXFormTOBsTool->formLRJetTOB(m_jfexid, iphi, ieta, LRJetET, LRJ_sat, thr_jLJ.resolutionMeV(),thr_jLJ.ptMinToTopoMeV(m_jfex_string[m_jfexid]));
386
387 std::unique_ptr<jFEXTOB> jLJ_tob = std::make_unique<jFEXTOB>();
388 jLJ_tob->initialize(m_id,m_jfexid,LRFCAL_Jet_tobword,thr_jLJ.resolutionMeV(),TTID);
389 if ( LRFCAL_Jet_tobword != 0 ) m_LRJet_tobwords.push_back(std::move(jLJ_tob));
390 }
391
392 }
393 //********** Forward Electrons ***********************
397 std::unordered_map<uint, jFEXForwardElecInfo> ForwardElecs = m_jFEXForwardElecAlgoTool->calculateEDM();
398
400 SG::ReadHandle<TrigConf::L1Menu> l1Menu (m_l1MenuKey/*, ctx*/);
401 const TrigConf::L1ThrExtraInfo_jEM & thr_jEM = l1Menu->thrExtraInfo().jEM();
402 const uint jFEXETResolution = thr_jEM.resolutionMeV();//200
403 std::string str_jfexname = m_jfex_string[m_jfexid];
404 uint minEtThreshold = thr_jEM.ptMinToTopoMeV(str_jfexname)/jFEXETResolution;
405 //uint Cval[9] = {1,2,3,20,30,40,20,30,40};//C values for iso, emfr1 and emfr2
406 std::vector<int> Ciso;
407 std::vector<int> Chad1;
408 std::vector<int> Chad2;
409
410 for(std::unordered_map<uint, jFEXForwardElecInfo>::iterator itel = ForwardElecs.begin(); itel!=ForwardElecs.end(); ++itel) {
411 uint32_t TTID = itel->first;
412 jFEXForwardElecInfo elCluster = itel->second;
413 uint meta = elCluster.getCoreIeta();//check whether this is the one used by the Trigger conf
414
415 //retrieve jet rejection thresholds from trigger configuration
416 const auto & wp_loose = thr_jEM.isolation(TrigConf::Selection::WP::LOOSE, meta);
417 const auto & wp_medium = thr_jEM.isolation(TrigConf::Selection::WP::MEDIUM, meta);
418 const auto & wp_tight = thr_jEM.isolation(TrigConf::Selection::WP::TIGHT, meta);
419 Ciso.clear();
420 Chad1.clear();
421 Chad2.clear();
422 Ciso.push_back(wp_loose.iso_fw());
423 Ciso.push_back(wp_medium.iso_fw());
424 Ciso.push_back(wp_tight.iso_fw());
425 Chad1.push_back(wp_loose.frac_fw());
426 Chad1.push_back(wp_medium.frac_fw());
427 Chad1.push_back(wp_tight.frac_fw());
428 Chad2.push_back(wp_loose.frac2_fw());
429 Chad2.push_back(wp_medium.frac2_fw());
430 Chad2.push_back(wp_tight.frac2_fw());
431 int Cval[9] = {Ciso[0], Ciso[1], Ciso[2], Chad1[0], Chad1[1], Chad1[2], Chad2[0], Chad2[1], Chad2[2]};
432
433 elCluster.setup(Cval,jFEXETResolution);
434 elCluster.calcFwdElEDM();
435
436 uint etEM = elCluster.getEt();
437 uint32_t FwdEl_tobword = elCluster.getTobWord();
438
439
440 std::vector<uint32_t> FwdEltob_aux{FwdEl_tobword,TTID};
441 if ( FwdEl_tobword != 0 && etEM>minEtThreshold) m_FwdEl_tobwords.push_back(std::move(FwdEltob_aux));
442 }
443
444 //******************************** TAU **********************************************
446 int max_meta=17;
447
448 if(m_jfexid ==0) {
450 for(int j=28; j<(FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width-6); j++) { //lower values of j (j<28) are the Fcals not entering in the jFEX tau range
451 jTowersIDs[i][j-28+8]=m_jTowersIDs_Wide[i][j]; // second argument in m_jTowersIDs is to center the FPGA core area in te same region as the central FPGAs
452 }
453 }
454
455 }
456 else if(m_jfexid ==5 ) {
457
458 // Filling m_jTowersIDs with the m_jTowersIDs_Wide ID values up to 2.5 eta
460 for(int j=4; j<17; j++) { //higher values of j (j>16) are the Fcals not entering in the jFEX tau range
461 jTowersIDs[i][j]=m_jTowersIDs_Wide[i][j];
462 }
463 }
464 }
465 ATH_MSG_DEBUG("============================ jFEXtauAlgo ============================");
466 ATH_CHECK( m_jFEXtauAlgoTool->safetyTest());
467 m_jFEXtauAlgoTool->setFPGAEnergy(map_Etvalues_FPGA);
468 for(int mphi = 8; mphi < 24; mphi++) {
469 for(int meta = 8; meta < max_meta; meta++) {
470
471 bool is_tau_LocalMax = m_jFEXtauAlgoTool->isSeedLocalMaxima_fwd(jTowersIDs[mphi][meta]);
472
473 // Save TOB is tau is a local maxima
474 if ( is_tau_LocalMax ) {
475
476 uint32_t jTau_tobword = m_IjFEXFormTOBsTool->formTauTOB(m_jfexid,mphi,meta,m_jFEXtauAlgoTool->getClusterEt(),m_jFEXtauAlgoTool->getFirstEtRing(),m_jFEXtauAlgoTool->getTauSat(),thr_jTAU.resolutionMeV(),thr_jTAU.ptMinToTopoMeV(m_jfex_string[m_jfexid]));
477
478 std::unique_ptr<jFEXTOB> jTau_tob = std::make_unique<jFEXTOB>();
479 jTau_tob->initialize(m_id,m_jfexid,jTau_tobword,thr_jTAU.resolutionMeV(),jTowersIDs[mphi][meta]);
480 if ( jTau_tobword != 0 ){
481 m_tau_tobwords.push_back(std::move(jTau_tob));
482 }
483 }
484 }
485 }
486 } //end of if statement for checking if in central jfex modules
487 return StatusCode::SUCCESS;
488} //end of the execute function
Scalar deltaR(const MatrixBase< Derived > &vec) const
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
unsigned int uint
static constexpr int jFEX_wide_algoSpace_width
static constexpr int jFEX_thin_algoSpace_width
static constexpr int jFEX_algoSpace_height
std::vector< std::vector< uint32_t > > m_FwdEl_tobwords
Definition jFEXFPGA.h:111
ToolHandle< IjFEXSmallRJetAlgo > m_jFEXSmallRJetAlgoTool
Definition jFEXFPGA.h:121
std::string m_jfex_string[6]
Definition jFEXFPGA.h:132
std::unordered_map< int, std::vector< int > > m_map_EM_Etvalues_FPGA
Definition jFEXFPGA.h:117
ToolHandle< IjFEXPileupAndNoise > m_jFEXPileupAndNoiseTool
Definition jFEXFPGA.h:128
ToolHandle< IjFEXForwardJetsAlgo > m_jFEXForwardJetsAlgoTool
Definition jFEXFPGA.h:126
ToolHandle< IjFEXmetAlgo > m_jFEXmetAlgoTool
Definition jFEXFPGA.h:125
std::vector< std::unique_ptr< jFEXTOB > > m_tau_tobwords
Definition jFEXFPGA.h:102
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
Definition jFEXFPGA.h:120
std::unordered_map< int, std::vector< int > > m_map_HAD_Etvalues_FPGA
Definition jFEXFPGA.h:116
int m_jTowersIDs_Thin[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width]
Definition jFEXFPGA.h:114
ToolHandle< IjFEXFormTOBs > m_IjFEXFormTOBsTool
Definition jFEXFPGA.h:129
std::vector< std::unique_ptr< jFEXTOB > > m_sumET_tobwords
Definition jFEXFPGA.h:105
std::vector< std::unique_ptr< jFEXTOB > > m_SRJet_tobwords
Definition jFEXFPGA.h:103
ToolHandle< IjFEXsumETAlgo > m_jFEXsumETAlgoTool
Definition jFEXFPGA.h:124
ToolHandle< IjFEXtauAlgo > m_jFEXtauAlgoTool
Definition jFEXFPGA.h:123
std::vector< std::unique_ptr< jFEXTOB > > m_Met_tobwords
Definition jFEXFPGA.h:106
std::vector< std::unique_ptr< jFEXTOB > > m_LRJet_tobwords
Definition jFEXFPGA.h:104
SG::ReadHandleKey< LVL1::jTowerContainer > m_jTowerContainerKey
Definition jFEXFPGA.h:119
ToolHandle< IjFEXLargeRJetAlgo > m_jFEXLargeRJetAlgoTool
Definition jFEXFPGA.h:122
int m_jTowersIDs_Wide[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width]
Definition jFEXFPGA.h:113
ToolHandle< IjFEXForwardElecAlgo > m_jFEXForwardElecAlgoTool
Definition jFEXFPGA.h:127
unsigned int resolutionMeV() const
const WorkingPoints_jEM & isolation(TrigConf::Selection::WP wp, int eta) const
unsigned int ptMinToTopoMeV(const std::string &module) const
unsigned int ptMinToTopoMeV(const std::string &module) const
unsigned int seedThresholdMeV(const std::string &module) const
unsigned int ptMinToTopoMeV(const std::string &module) const
unsigned int ptMinToTopoMeV(const std::string &module) const
unsigned int etaBoundary_fw(const std::string &module) const
setEventNumber uint32_t

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getFwdElTOBs()

std::vector< std::vector< uint32_t > > LVL1::jFEXFPGA::getFwdElTOBs ( )
overridevirtual

sorted Electron tobs

Implements LVL1::IjFEXFPGA.

Definition at line 562 of file jFEXFPGA.cxx.

563 {
564 auto tobsSort = m_FwdEl_tobwords;
565
566 ATH_MSG_DEBUG("number of Forward Elec tobs: " << tobsSort.size() << " in FPGA: " << m_id<< " before truncation");
567 //sort tobs by their et
568 std::sort (tobsSort.begin(), tobsSort.end(), etFwdElSort);
569
570 return tobsSort;
571 }
static bool etFwdElSort(const std::vector< uint32_t > &i, const std::vector< uint32_t > &j)
Definition jFEXFPGA.h:100
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ getLargeRJetTOBs()

std::vector< std::unique_ptr< jFEXTOB > > LVL1::jFEXFPGA::getLargeRJetTOBs ( )
overridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 548 of file jFEXFPGA.cxx.

549{
550 std::vector<std::unique_ptr<jFEXTOB>> tobsSort;
551
552 // We need the copy since we cannot move a member of the class, since it will not be part of it anymore
553 for(auto &j : m_LRJet_tobwords) {
554 tobsSort.push_back(std::move(j));
555 }
556 std::sort (tobsSort.begin(), tobsSort.end(), std::bind(TOBetSort<std::unique_ptr<jFEXTOB>>, std::placeholders::_1, std::placeholders::_2, FEXAlgoSpaceDefs::jLJ_etBit, 0x1fff));
557
558 return tobsSort;
559}
static constexpr int jLJ_etBit
static bool TOBetSort(const TOBObjectClass &i, const TOBObjectClass &j, uint bits, uint mask)
Internal data.
Definition jFEXFPGA.h:96

◆ getMetTOBs()

std::vector< std::unique_ptr< jFEXTOB > > LVL1::jFEXFPGA::getMetTOBs ( )
overridevirtual

Form a tob word out of the potential candidate MET tob.

Implements LVL1::IjFEXFPGA.

Definition at line 601 of file jFEXFPGA.cxx.

601 {
602
603 std::vector<std::unique_ptr<jFEXTOB>> tobsSort;
604
605 // We need the copy since we cannot move a member of the class, since it will not be part of it anymore
606 for(auto &j : m_Met_tobwords) {
607 tobsSort.push_back(std::move(j));
608 }
609
610 return tobsSort;
611}

◆ getSmallRJetTOBs()

std::vector< std::unique_ptr< jFEXTOB > > LVL1::jFEXFPGA::getSmallRJetTOBs ( )
overridevirtual

Form a tob word out of the potential candidate SmallRJet tob.

Implements LVL1::IjFEXFPGA.

Definition at line 535 of file jFEXFPGA.cxx.

536{
537 std::vector<std::unique_ptr<jFEXTOB>> tobsSort;
538
539 // We need the copy since we cannot move a member of the class, since it will not be part of it anymore
540 for(auto &j : m_SRJet_tobwords) {
541 tobsSort.push_back(std::move(j));
542 }
543 std::sort (tobsSort.begin(), tobsSort.end(), std::bind(TOBetSort<std::unique_ptr<jFEXTOB>>, std::placeholders::_1, std::placeholders::_2, FEXAlgoSpaceDefs::jJ_etBit, 0x7ff));
544
545 return tobsSort;
546}
static constexpr int jJ_etBit

◆ getSumEtTOBs()

std::vector< std::unique_ptr< jFEXTOB > > LVL1::jFEXFPGA::getSumEtTOBs ( )
overridevirtual

Form a tob word out of the potential candidate SumET tob.

Implements LVL1::IjFEXFPGA.

Definition at line 587 of file jFEXFPGA.cxx.

587 {
588
589 std::vector<std::unique_ptr<jFEXTOB>> tobsSort;
590
591 // We need the copy since we cannot move a member of the class, since it will not be part of it anymore
592 for(auto &j : m_sumET_tobwords) {
593 tobsSort.push_back(std::move(j));
594 }
595
596 return tobsSort;
597}

◆ getTauTOBs()

std::vector< std::unique_ptr< jFEXTOB > > LVL1::jFEXFPGA::getTauTOBs ( )
overridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 574 of file jFEXFPGA.cxx.

574 {
575
576 std::vector<std::unique_ptr<jFEXTOB>> tobsSort;
577
578 // We need the copy since we cannot move a member of the class, since it will not be part of it anymore
579 for(auto &j : m_tau_tobwords) {
580 tobsSort.push_back(std::move(j));
581 }
582 std::sort (tobsSort.begin(), tobsSort.end(), std::bind(TOBetSort<std::unique_ptr<jFEXTOB>>, std::placeholders::_1, std::placeholders::_2, FEXAlgoSpaceDefs::jTau_etBit, 0x7ff));
583
584 return tobsSort;
585}
static constexpr int jTau_etBit

◆ getTTowerET()

int LVL1::jFEXFPGA::getTTowerET ( unsigned int TTID) const
overridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 639 of file jFEXFPGA.cxx.

639 {
640
641 return getTTowerET_EM(TTID)+getTTowerET_HAD(TTID);
642}
int getTTowerET_HAD(unsigned int TTID) const override
Definition jFEXFPGA.cxx:627
int getTTowerET_EM(unsigned int TTID) const override
Definition jFEXFPGA.cxx:615

◆ getTTowerET_EM()

int LVL1::jFEXFPGA::getTTowerET_EM ( unsigned int TTID) const
overridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 615 of file jFEXFPGA.cxx.

615 {
616
617 if(m_map_EM_Etvalues_FPGA.find(TTID) != m_map_EM_Etvalues_FPGA.end()){
618 return m_map_EM_Etvalues_FPGA.at(TTID)[0];
619 }
620
621 ATH_MSG_DEBUG("In jFEXFPGA::getTTowerET_EM, TTower ID not found in map: " << TTID );
622 return -99999;
623}

◆ getTTowerET_forMET()

int LVL1::jFEXFPGA::getTTowerET_forMET ( unsigned int TTID) const
overridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 646 of file jFEXFPGA.cxx.

646 {
647
648 int tmp_EM = 0;
649 if(m_map_EM_Etvalues_FPGA.find(TTID) != m_map_EM_Etvalues_FPGA.end()){
650 tmp_EM = m_map_EM_Etvalues_FPGA.at(TTID)[1];
651 }
652 else{
653 ATH_MSG_DEBUG("In jFEXFPGA::getTTowerET_forMET (EM energy), TTower ID not found in map: " << TTID );
654 tmp_EM = -99999;
655 }
656
657
658 int tmp_HAD = 0;
659 if(m_map_HAD_Etvalues_FPGA.find(TTID) != m_map_HAD_Etvalues_FPGA.end()){
660 tmp_HAD = m_map_HAD_Etvalues_FPGA.at(TTID)[1];
661 }
662 else{
663 ATH_MSG_DEBUG("In jFEXFPGA::getTTowerET_forMET (HAD energy), TTower ID not found in map: " << TTID );
664 tmp_HAD = -99999;
665 }
666
667
668 return tmp_EM + tmp_HAD;
669}

◆ getTTowerET_HAD()

int LVL1::jFEXFPGA::getTTowerET_HAD ( unsigned int TTID) const
overridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 627 of file jFEXFPGA.cxx.

627 {
628
629 if(m_map_HAD_Etvalues_FPGA.find(TTID) != m_map_HAD_Etvalues_FPGA.end()){
630 return m_map_HAD_Etvalues_FPGA.at(TTID)[0];
631 }
632
633 ATH_MSG_DEBUG("In jFEXFPGA::getTTowerET_HAD, TTower ID not found in map: " << TTID );
634 return -99999;
635}

◆ getTTowerET_SG()

int LVL1::jFEXFPGA::getTTowerET_SG ( unsigned int TTID)
private

Definition at line 673 of file jFEXFPGA.cxx.

673 {
674
675 if(TTID == 0){
676 return -999;
677 }
678 SG::ReadHandle<jTowerContainer> jTowerContainer(m_jTowerContainerKey);
679 const LVL1::jTower * tmpTower = jTowerContainer->findTower(TTID);
680 return tmpTower->getTotalET();
681}
int getTotalET() const
Get ET sum of all cells in the jTower in MeV.
Definition jTower.cxx:199

◆ ID()

virtual int LVL1::jFEXFPGA::ID ( ) const
inlineoverridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 67 of file jFEXFPGA.h.

67{return m_id;}

◆ init()

StatusCode LVL1::jFEXFPGA::init ( int id,
int efexid )
overridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 55 of file jFEXFPGA.cxx.

55 {
56 m_id = id;
57 m_jfexid = jfexid;
58
59 return StatusCode::SUCCESS;
60
61}

◆ initialize()

StatusCode LVL1::jFEXFPGA::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 47 of file jFEXFPGA.cxx.

47 {
48
49 ATH_CHECK(m_jTowerContainerKey.initialize());
50 ATH_CHECK(m_l1MenuKey.initialize());
51 ATH_CHECK(m_jFEXtauAlgoTool.retrieve());
52 return StatusCode::SUCCESS;
53}

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & LVL1::IjFEXFPGA::interfaceID ( )
inlinestaticinherited

Definition at line 70 of file IjFEXFPGA.h.

71 {
72 return IID_IjFEXFPGA;
73 }
static const InterfaceID IID_IjFEXFPGA("LVL1::IjFEXFPGA", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ reset()

void LVL1::jFEXFPGA::reset ( )
overridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 63 of file jFEXFPGA.cxx.

63 {
64
65 m_id = -1;
66 m_jfexid = -1;
67 m_tau_tobwords.clear();
68 m_SRJet_tobwords.clear();
69 m_LRJet_tobwords.clear();
70 m_sumET_tobwords.clear();
71 m_Met_tobwords.clear();
74 m_FwdEl_tobwords.clear();
75}

◆ SetTowersAndCells_SG() [1/2]

void LVL1::jFEXFPGA::SetTowersAndCells_SG ( int tmp_jTowersIDs_subset[][FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width])
overridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 510 of file jFEXFPGA.cxx.

510 {
511
513 const int cols = sizeof tmp_jTowersIDs_subset[0] / sizeof tmp_jTowersIDs_subset[0][0];
514
515 std::copy(&tmp_jTowersIDs_subset[0][0], &tmp_jTowersIDs_subset[0][0]+(rows*cols),&m_jTowersIDs_Thin[0][0]);
516
517 if (msgLvl(MSG::DEBUG)) {
518 //this prints out the jTower IDs that each FPGA is responsible for
519 ATH_MSG_DEBUG("\n==== jFEXFPGA ========= FPGA (" << m_id << ") [on jFEX " << m_jfexid << "] IS RESPONSIBLE FOR jTOWERS :");
520
521 for (int thisRow=rows-1; thisRow>=0; thisRow--) {
522 for (int thisCol=0; thisCol<cols; thisCol++) {
523 if(thisCol != cols-1) {
524 ATH_MSG_DEBUG("| " << m_jTowersIDs_Thin[thisRow][thisCol] << " ");
525 }
526 else {
527 ATH_MSG_DEBUG("| " << m_jTowersIDs_Thin[thisRow][thisCol] << " |");
528 }
529 }
530 }
531 }
532
533}
bool msgLvl(const MSG::Level lvl) const

◆ SetTowersAndCells_SG() [2/2]

void LVL1::jFEXFPGA::SetTowersAndCells_SG ( int tmp_jTowersIDs_subset[][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width])
overridevirtual

Implements LVL1::IjFEXFPGA.

Definition at line 490 of file jFEXFPGA.cxx.

490 {
491
493 const int cols = sizeof tmp_jTowersIDs_subset[0] / sizeof tmp_jTowersIDs_subset[0][0];
494
495 std::copy(&tmp_jTowersIDs_subset[0][0], &tmp_jTowersIDs_subset[0][0]+(rows*cols),&m_jTowersIDs_Wide[0][0]);
496
497 if (msgLvl(MSG::DEBUG)) {
498 ATH_MSG_DEBUG("\n==== jFEXFPGA ========= FPGA (" << m_id << ") [on jFEX " << m_jfexid << "] IS RESPONSIBLE FOR jTOWERS :");
499
500 for (int thisRow=rows-1; thisRow>=0; thisRow--){
501 for (int thisCol=0; thisCol<cols; thisCol++){
502 if(thisCol != cols-1){ ATH_MSG_DEBUG("| " << m_jTowersIDs_Wide[thisRow][thisCol] << " "); }
503 else { ATH_MSG_DEBUG("| " << m_jTowersIDs_Wide[thisRow][thisCol] << " |"); }
504 }
505 }
506 }
507
508}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ TOBetSort()

template<class TOBObjectClass>
bool LVL1::jFEXFPGA::TOBetSort ( const TOBObjectClass & i,
const TOBObjectClass & j,
uint bits,
uint mask )
inlinestaticprivate

Internal data.

Definition at line 96 of file jFEXFPGA.h.

96 {
97 return (((i->getWord() >> bits ) & mask)>((j->getWord() >> bits ) & mask));
98 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_FwdEl_tobwords

std::vector<std::vector<uint32_t> > LVL1::jFEXFPGA::m_FwdEl_tobwords
private

Definition at line 111 of file jFEXFPGA.h.

◆ m_id

int LVL1::jFEXFPGA::m_id {}
private

Definition at line 108 of file jFEXFPGA.h.

108{};

◆ m_IjFEXFormTOBsTool

ToolHandle<IjFEXFormTOBs> LVL1::jFEXFPGA::m_IjFEXFormTOBsTool {this, "IjFEXFormTOBsTool", "LVL1::jFEXFormTOBs", "Tool that forms TOB words"}
private

Definition at line 129 of file jFEXFPGA.h.

129{this, "IjFEXFormTOBsTool", "LVL1::jFEXFormTOBs", "Tool that forms TOB words"};

◆ m_jfex_string

std::string LVL1::jFEXFPGA::m_jfex_string[6] = {"1C","2C","3C","3A","2A","1A"}
private

Definition at line 132 of file jFEXFPGA.h.

132{"1C","2C","3C","3A","2A","1A"};

◆ m_jFEXForwardElecAlgoTool

ToolHandle<IjFEXForwardElecAlgo> LVL1::jFEXFPGA::m_jFEXForwardElecAlgoTool {this, "jFEXForwardElecAlgoTool" , "LVL1::jFEXForwardElecAlgo" , "Tool that runs the jFEX FCAL Electrons algorithm"}
private

Definition at line 127 of file jFEXFPGA.h.

127{this, "jFEXForwardElecAlgoTool" , "LVL1::jFEXForwardElecAlgo" , "Tool that runs the jFEX FCAL Electrons algorithm"};

◆ m_jFEXForwardJetsAlgoTool

ToolHandle<IjFEXForwardJetsAlgo> LVL1::jFEXFPGA::m_jFEXForwardJetsAlgoTool {this, "jFEXForwardJetsAlgoTool" , "LVL1::jFEXForwardJetsAlgo" , "Tool that runs the jFEX FCAL Jets algorithm"}
private

Definition at line 126 of file jFEXFPGA.h.

126{this, "jFEXForwardJetsAlgoTool" , "LVL1::jFEXForwardJetsAlgo" , "Tool that runs the jFEX FCAL Jets algorithm"};

◆ m_jfexid

int LVL1::jFEXFPGA::m_jfexid {}
private

Definition at line 109 of file jFEXFPGA.h.

109{};

◆ m_jFEXLargeRJetAlgoTool

ToolHandle<IjFEXLargeRJetAlgo> LVL1::jFEXFPGA::m_jFEXLargeRJetAlgoTool {this, "jFEXLargeRJetAlgoTool", "LVL1::jFEXLargeRJetAlgo", "Tool that runs the jFEX Large R Jet algorithm"}
private

Definition at line 122 of file jFEXFPGA.h.

122{this, "jFEXLargeRJetAlgoTool", "LVL1::jFEXLargeRJetAlgo", "Tool that runs the jFEX Large R Jet algorithm"};

◆ m_jFEXmetAlgoTool

ToolHandle<IjFEXmetAlgo> LVL1::jFEXFPGA::m_jFEXmetAlgoTool {this, "jFEXmetAlgoTool" , "LVL1::jFEXmetAlgo" , "Tool that runs the jFEX met algorithm"}
private

Definition at line 125 of file jFEXFPGA.h.

125{this, "jFEXmetAlgoTool" , "LVL1::jFEXmetAlgo" , "Tool that runs the jFEX met algorithm"};

◆ m_jFEXPileupAndNoiseTool

ToolHandle<IjFEXPileupAndNoise> LVL1::jFEXFPGA::m_jFEXPileupAndNoiseTool {this, "jFEXPileupAndNoiseTool", "LVL1::jFEXPileupAndNoise", "Tool that applies Pileup and Noise"}
private

Definition at line 128 of file jFEXFPGA.h.

128{this, "jFEXPileupAndNoiseTool", "LVL1::jFEXPileupAndNoise", "Tool that applies Pileup and Noise"};

◆ m_jFEXSmallRJetAlgoTool

ToolHandle<IjFEXSmallRJetAlgo> LVL1::jFEXFPGA::m_jFEXSmallRJetAlgoTool {this, "jFEXSmallRJetAlgoTool", "LVL1::jFEXSmallRJetAlgo", "Tool that runs the jFEX Small R Jet algorithm"}
private

Definition at line 121 of file jFEXFPGA.h.

121{this, "jFEXSmallRJetAlgoTool", "LVL1::jFEXSmallRJetAlgo", "Tool that runs the jFEX Small R Jet algorithm"};

◆ m_jFEXsumETAlgoTool

ToolHandle<IjFEXsumETAlgo> LVL1::jFEXFPGA::m_jFEXsumETAlgoTool {this, "jFEXsumETAlgoTool" , "LVL1::jFEXsumETAlgo" , "Tool that runs the jFEX sumET algorithm"}
private

Definition at line 124 of file jFEXFPGA.h.

124{this, "jFEXsumETAlgoTool" , "LVL1::jFEXsumETAlgo" , "Tool that runs the jFEX sumET algorithm"};

◆ m_jFEXtauAlgoTool

ToolHandle<IjFEXtauAlgo> LVL1::jFEXFPGA::m_jFEXtauAlgoTool {this, "jFEXtauAlgoTool" , "LVL1::jFEXtauAlgo" , "Tool that runs the jFEX tau algorithm"}
private

Definition at line 123 of file jFEXFPGA.h.

123{this, "jFEXtauAlgoTool" , "LVL1::jFEXtauAlgo" , "Tool that runs the jFEX tau algorithm"};

◆ m_jTowerContainerKey

SG::ReadHandleKey<LVL1::jTowerContainer> LVL1::jFEXFPGA::m_jTowerContainerKey {this, "MyETowers", "jTowerContainer", "Input container for jTowers"}
private

Definition at line 119 of file jFEXFPGA.h.

119{this, "MyETowers", "jTowerContainer", "Input container for jTowers"};

◆ m_jTowersIDs_Thin

int LVL1::jFEXFPGA::m_jTowersIDs_Thin[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width] = {{0}}
private

Definition at line 114 of file jFEXFPGA.h.

114{{0}};

◆ m_jTowersIDs_Wide

int LVL1::jFEXFPGA::m_jTowersIDs_Wide[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width] = {{0}}
private

Definition at line 113 of file jFEXFPGA.h.

113{{0}};

◆ m_l1MenuKey

SG::ReadHandleKey<TrigConf::L1Menu> LVL1::jFEXFPGA::m_l1MenuKey {this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu","Name of the L1Menu object to read configuration from"}
private

Definition at line 120 of file jFEXFPGA.h.

120{this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu","Name of the L1Menu object to read configuration from"};

◆ m_LRJet_tobwords

std::vector<std::unique_ptr<jFEXTOB> > LVL1::jFEXFPGA::m_LRJet_tobwords
private

Definition at line 104 of file jFEXFPGA.h.

◆ m_map_EM_Etvalues_FPGA

std::unordered_map<int,std::vector<int> > LVL1::jFEXFPGA::m_map_EM_Etvalues_FPGA
private

Definition at line 117 of file jFEXFPGA.h.

◆ m_map_HAD_Etvalues_FPGA

std::unordered_map<int,std::vector<int> > LVL1::jFEXFPGA::m_map_HAD_Etvalues_FPGA
private

Definition at line 116 of file jFEXFPGA.h.

◆ m_Met_tobwords

std::vector<std::unique_ptr<jFEXTOB> > LVL1::jFEXFPGA::m_Met_tobwords
private

Definition at line 106 of file jFEXFPGA.h.

◆ m_SRJet_tobwords

std::vector<std::unique_ptr<jFEXTOB> > LVL1::jFEXFPGA::m_SRJet_tobwords
private

Definition at line 103 of file jFEXFPGA.h.

◆ m_sumET_tobwords

std::vector<std::unique_ptr<jFEXTOB> > LVL1::jFEXFPGA::m_sumET_tobwords
private

Definition at line 105 of file jFEXFPGA.h.

◆ m_tau_tobwords

std::vector<std::unique_ptr<jFEXTOB> > LVL1::jFEXFPGA::m_tau_tobwords
private

Definition at line 102 of file jFEXFPGA.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: