ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LVL1::jFEXFormTOBs Class Reference

#include <jFEXFormTOBs.h>

Inheritance diagram for LVL1::jFEXFormTOBs:
Collaboration diagram for LVL1::jFEXFormTOBs:

Public Member Functions

 jFEXFormTOBs (const std::string &type, const std::string &name, const IInterface *parent)
 Constructors. More...
 
virtual StatusCode initialize () override
 standard Athena-Algorithm method More...
 
virtual ~jFEXFormTOBs ()
 Destructor. More...
 
virtual uint32_t formTauTOB (int, int, int, int, int, bool, int, int) override
 
virtual uint32_t formSRJetTOB (int, int, int, int, bool, int, int, const std::pair< unsigned int, const std::vector< int > & > &) override
 
virtual uint32_t formLRJetTOB (int, int, int, int, bool, int, int) override
 
virtual uint32_t formSumETTOB (std::tuple< int, bool > &, std::tuple< int, bool > &, int) override
 
virtual uint32_t formMetTOB (int, int, bool, int) override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) 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 More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

int Get_calibrated_SRj_ET (int, int, const std::vector< int > &)
 
int Get_eta_calibrated_SRj_ET (int, int, unsigned int, int, const std::vector< int > &)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

Gaudi::Property< bool > m_isMC {this, "IsMC", false, "For MC, always access the DB"}
 Internal data. More...
 
UnsignedIntegerProperty m_jetEtaCalibrationBeginTimestamp {this, "JetEtaCalibrationBeginTimestamp", 1704063600 , "Earliest timestamp from which jet calibrations are binned in eta instead of ET"}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 26 of file jFEXFormTOBs.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

◆ jFEXFormTOBs()

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

Constructors.

Definition at line 19 of file jFEXFormTOBs.cxx.

19  :
21 {
22  declareInterface<IjFEXFormTOBs>(this);
23 }

◆ ~jFEXFormTOBs()

LVL1::jFEXFormTOBs::~jFEXFormTOBs ( )
virtual

Destructor.

Desctructor.

Definition at line 26 of file jFEXFormTOBs.cxx.

26 {}

Member Function Documentation

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ 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.

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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

◆ formLRJetTOB()

uint32_t LVL1::jFEXFormTOBs::formLRJetTOB ( int  jFEX,
int  iPhi,
int  iEta,
int  EtClus,
bool  sat,
int  Resolution,
int  ptMinToTopo 
)
overridevirtual

Implements LVL1::IjFEXFormTOBs.

Definition at line 193 of file jFEXFormTOBs.cxx.

193  {
194 
195  uint32_t tobWord = 0;
196  unsigned int eta = 0;
197  unsigned int phi = 0;
198  unsigned int jFEXLargeRJetTOBEt = 0;
199  int Res = 0; // 9 bits reserved
200  int Sat = sat;
201 
202  if(jFEX == 1 || jFEX == 2) {
203 
204  eta = 15 - iEta;
205  phi = iPhi - 8;
206  }
207  if(jFEX == 3 || jFEX == 4) {
208 
209  eta = iEta - 8;
210  phi = iPhi - 8;
211  }
212  else if(jFEX == 5) {
213  eta = iEta -8;
214 
215  if(iEta < FEXAlgoSpaceDefs::jFEX_algoSpace_A_EMIE_eta) { // iEta lower than EMIE stats -> belong to EMB
216  phi = iPhi-8;
217  }
218  else if(iEta < FEXAlgoSpaceDefs::jFEX_algoSpace_A_FCAL_start_eta) { // iEta lower than FCAL stats -> belong to EMIE
219  phi = iPhi -4;
220  }
221  else { // rest iEta belongs to FCAL
222  phi = iPhi -2;
223  }
224  }
225  else if(jFEX == 0) {
226  eta = 36 - iEta;
227 
228  if(iEta < FEXAlgoSpaceDefs::jFEX_algoSpace_C_FCAL_end_eta) { // iEta lower than FCal ends -> FCAL
229  phi = iPhi -2 ;
230  }
231  else if(iEta < FEXAlgoSpaceDefs::jFEX_algoSpace_C_EMIE_end_eta) {// iEta lower than EMIE ends -> EMIE
232  phi = iPhi -4 ;
233  }
234  else {// rest of iEta -> EMB
235  phi = iPhi -8 ;
236  }
237  }
238 
239  jFEXLargeRJetTOBEt = EtClus/Resolution;
240  if (jFEXLargeRJetTOBEt > 0x1fff) {
241  jFEXLargeRJetTOBEt = 0x1fff; //0x1fff is 13 bits
242  }
243  //create basic tobword with 32 bits
244  tobWord = tobWord + (Res << FEXAlgoSpaceDefs::jLJ_resBit) + (jFEXLargeRJetTOBEt << FEXAlgoSpaceDefs::jLJ_etBit) + (eta << FEXAlgoSpaceDefs::jLJ_etaBit) + (phi << FEXAlgoSpaceDefs::jLJ_phiBit) + (Sat);
245  ATH_MSG_DEBUG("tobword largeRJet with res, et, eta, phi: " << std::bitset<32>(tobWord) );
246 
247 
248  unsigned int minEtThreshold = ptMinToTopo/Resolution;
249 
250  if (jFEXLargeRJetTOBEt <= minEtThreshold) return 0;
251  else return tobWord;
252 }

◆ formMetTOB()

uint32_t LVL1::jFEXFormTOBs::formMetTOB ( int  METX,
int  METY,
bool  sat,
int  Resolution 
)
overridevirtual

Implements LVL1::IjFEXFormTOBs.

Definition at line 283 of file jFEXFormTOBs.cxx.

283  {
284  uint32_t tobWord = 0;
285 
286  bool Sat = sat;
287  unsigned int res = 0;
288 
289  int metX = std::floor(1.0*METX/Resolution);
290  int metY = std::floor(1.0*METY/Resolution);
291 
292  //0x7fff is 15 bits (decimal value 32767), however as MET is a signed value (can be negative) only 14 bits are allowed (16383) the MSB is the sign
293  if (std::abs(metX) > 0x3fff) {
294  ATH_MSG_DEBUG("sumEtlow saturated: " << metX );
295  if (metX < 0) {
296  metX = 0x4000; //most negative value for 15b signed two's complement
297  } else {
298  metX = 0x3fff;
299  }
300  }
301 
302 
303  if (std::abs(metY) > 0x3fff) { //0x7fff is 15 bits (decimal value 32767), however as MET is a signed value (can be negative) only 14 bits are allowed (16383)
304  ATH_MSG_DEBUG("sumEthigh saturated: " << metY );
305  if (metY < 0) {
306  metY = 0x4000; //most negative value for 15b signed two's complement
307  } else {
308  metY = 0x3fff;
309  }
310  }
311 
312  //create basic tobword with 32 bits
313  //note that the bit-wise and with the 15bit mask (0x7fff) inherently accounts for the conversion of negative values from 32b signed (int) to 15b signed
314  tobWord = tobWord + (res << FEXAlgoSpaceDefs::jXE_ResBit) + ((metY & 0x7fff) << FEXAlgoSpaceDefs::jXE_Ey_Bit) + ((metX & 0x7fff) << FEXAlgoSpaceDefs::jXE_Ex_Bit) + (Sat << FEXAlgoSpaceDefs::jXE_SatBit) ;
315  ATH_MSG_DEBUG("tobword MET with Res, MET_Y, MET_X, Sat: " << std::bitset<32>(tobWord) );
316 
317  return tobWord;
318 
319 }

◆ formSRJetTOB()

uint32_t LVL1::jFEXFormTOBs::formSRJetTOB ( int  jFEX,
int  iPhi,
int  iEta,
int  EtClus,
bool  sat,
int  Resolution,
int  ptMinToTopo,
const std::pair< unsigned int, const std::vector< int > & > &  calibParameters 
)
overridevirtual

Implements LVL1::IjFEXFormTOBs.

Definition at line 125 of file jFEXFormTOBs.cxx.

125  {
126  uint32_t tobWord = 0;
127  unsigned int eta = 0;
128  unsigned int phi = 0;
129  unsigned int jFEXSmallRJetTOBEt = 0;
130  int Res = 0; // 11 bits reserved
131  int Sat = sat;
132 
133  if(jFEX == 1 || jFEX == 2) {
134 
135  eta = 15 - iEta;
136  phi = iPhi - 8;
137  }
138  if(jFEX == 3 || jFEX == 4) {
139 
140  eta = iEta - 8;
141  phi = iPhi - 8;
142  }
143  else if(jFEX == 5) {
144 
145  eta = iEta - 8;
146  if(iEta < FEXAlgoSpaceDefs::jFEX_algoSpace_A_EMIE_eta) { // ieta lower than EMIE stats -> belong to EMB
147  phi = iPhi - 8;
148  }
149  else if(iEta < FEXAlgoSpaceDefs::jFEX_algoSpace_A_FCAL_start_eta) { // ieta lower than FCAL stats -> belong to EMIE
150  phi = iPhi - 4;
151  }
152  else { // rest ieta belongs to FCAL
153  phi = iPhi - 2;
154  }
155  }
156  else if(jFEX == 0) {
157 
158  eta = 36 - iEta;
159  if(iEta < FEXAlgoSpaceDefs::jFEX_algoSpace_C_FCAL_end_eta) { // ieta lower than FCal ends -> FCAL
160  phi = iPhi -2 ;
161  }
162  else if(iEta < FEXAlgoSpaceDefs::jFEX_algoSpace_C_EMIE_end_eta) {// ieta lower than EMIE ends -> EMIE
163  phi = iPhi -4 ;
164  }
165  else {// rest of ieta -> EMB
166  phi = iPhi -8 ;
167  }
168  }
169 
170  // Appliying jet calibration
171  if (calibParameters.first > m_jetEtaCalibrationBeginTimestamp || m_isMC) {
172  jFEXSmallRJetTOBEt = Get_eta_calibrated_SRj_ET(EtClus, jFEX, eta, Resolution, calibParameters.second);
173  } else {
174  jFEXSmallRJetTOBEt = Get_calibrated_SRj_ET(EtClus, Resolution, calibParameters.second);
175  }
176 
177  if(jFEXSmallRJetTOBEt > 0x7ff) {
178  jFEXSmallRJetTOBEt = 0x7ff;
179  }
180  //create basic tobword with 32 bits
181  tobWord = tobWord + (Res << FEXAlgoSpaceDefs::jJ_resBit) + (jFEXSmallRJetTOBEt << FEXAlgoSpaceDefs::jJ_etBit) + (eta << FEXAlgoSpaceDefs::jJ_etaBit) + (phi << FEXAlgoSpaceDefs::jJ_phiBit) + (Sat);
182  ATH_MSG_DEBUG("tobword smallRJet with res, et, eta and phi: " << std::bitset<32>(tobWord) );
183 
184  // retrieving the threshold for the TOB Et
185  unsigned int minEtThreshold = ptMinToTopo/Resolution;
186 
187  if (jFEXSmallRJetTOBEt <= minEtThreshold) return 0;
188  else return tobWord;
189 }

◆ formSumETTOB()

uint32_t LVL1::jFEXFormTOBs::formSumETTOB ( std::tuple< int, bool > &  ETlow,
std::tuple< int, bool > &  EThigh,
int  Resolution 
)
overridevirtual

Implements LVL1::IjFEXFormTOBs.

Definition at line 255 of file jFEXFormTOBs.cxx.

256 {
257  uint32_t tobWord = 0;
258 
259  bool satlow = std::get<1>(ETlow);
260  bool sathigh = std::get<1>(EThigh);
261 
262  unsigned int etlow = std::get<0>(ETlow)/Resolution;
263  if (etlow > 0x7fff) { //0x7fff is 15 bits
264  ATH_MSG_DEBUG("sumEtlow saturated: " << etlow );
265  etlow = 0x7fff;
266  }
267 
268  unsigned int ethigh = std::get<0>(EThigh)/Resolution;
269  if (ethigh > 0x7fff) { //0x7fff is 15 bits
270  ATH_MSG_DEBUG("sumEthigh saturated: " << ethigh );
271  ethigh = 0x7fff;
272  }
273 
274  //create basic tobword with 32 bits
276  ATH_MSG_DEBUG("tobword SumET with Sathigh, EThigh, ETlow and Satlow : " << std::bitset<32>(tobWord) );
277 
278  return tobWord;
279 
280 }

◆ formTauTOB()

uint32_t LVL1::jFEXFormTOBs::formTauTOB ( int  jFEX,
int  iPhi,
int  iEta,
int  EtClus,
int  IsoRing,
bool  satTau,
int  Resolution,
int  ptMinToTopo 
)
overridevirtual

Implements LVL1::IjFEXFormTOBs.

Definition at line 34 of file jFEXFormTOBs.cxx.

35 {
36  uint32_t tobWord = 0;
37 
38  int eta = iEta-8; // needed to substract 8 to be in the FPGA core area
39  int phi = iPhi-8; // needed to substract 8 to be in the FPGA core area
40  bool sat = satTau;
41 
42  // correcting C-side. mirror symmetry
43  if(jFEX == 1 || jFEX == 2){
44  eta = 15 - iEta;
45  }
46  else if(jFEX == 0){
47  eta = 16 - iEta ;
48  }
49 
50  unsigned int et = EtClus/Resolution;
51  if (et > 0x7ff) { //0x7ff is 11 bits
52  ATH_MSG_DEBUG("Et saturated: " << et );
53  et = 0x7ff;
54  }
55 
56  unsigned int iso = IsoRing/Resolution;
57  if (iso > 0x7ff) iso = 0x7ff; //0x7ff is 11 bits
58 
59  //create basic tobword with 32 bits
61 
62  ATH_MSG_DEBUG("tobword tau with iso, et, eta and phi: " << std::bitset<32>(tobWord) );
63 
64 
65  unsigned int minEtThreshold = ptMinToTopo/Resolution;
66 
67  if (et <= minEtThreshold) return 0;
68  else return tobWord;
69 
70 }

◆ Get_calibrated_SRj_ET()

int LVL1::jFEXFormTOBs::Get_calibrated_SRj_ET ( int  Energy,
int  res,
const std::vector< int > &  calibFactors 
)
private

Definition at line 72 of file jFEXFormTOBs.cxx.

72  {
73  // This is for data taken before the end of 2023
74  // ET binned calibration factors (in practice all set to the same value)
75  int Et_edge[8] = {20,30,40,50,65,80,110,150};
76  int et_range = -1;
77 
78  //checking upper threshold for SRjet energy
79  for(int i=0;i<8; i++){
80  if(Energy < Et_edge[i] * 1e3){
81  et_range = i;
82  break;
83  }
84  }
85 
86  //the last threshold is inf therefore, if non of the other thresholds is satisfied, the calibration parameter is set to the maximum
87  if(et_range<0){
88  et_range = 8;
89  }
90 
91  int calib = calibFactors[et_range];
92 
93  //Converting into 200MeV scale
94  int et_200Mev = std::floor(1.0*Energy/res);
95 
96  //Applying the calibration
97  int et = std::floor( (1.0*et_200Mev*calib)/(1<<7) );
98 
99  return et;
100 }

◆ Get_eta_calibrated_SRj_ET()

int LVL1::jFEXFormTOBs::Get_eta_calibrated_SRj_ET ( int  Energy,
int  jfex,
unsigned int  coreEta,
int  res,
const std::vector< int > &  calibFactors 
)
private

Definition at line 102 of file jFEXFormTOBs.cxx.

102  {
103  // This is for data taken starting from 2024
104  // eta binned calibration factors for improved calibration w.r.t. offline jets
105 
106  //checking upper threshold for SRjet energy
107  if (jfex != 0 && jfex != 5) {
108  coreEta = std::min(coreEta,7u); // 8 core eta bins for central modules
109  } else {
110  coreEta = std::min(coreEta,24u); // 25 core eta bins for forward modules
111  }
112 
113  int calib = calibFactors[coreEta];
114 
115  //Converting into 200MeV scale
116  int et_200Mev = std::floor(1.0*Energy/res);
117 
118  //Applying the calibration
119  int et = std::floor( (1.0*et_200Mev*calib)/(1<<7) );
120 
121  return et;
122 }

◆ initialize()

StatusCode LVL1::jFEXFormTOBs::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 28 of file jFEXFormTOBs.cxx.

29 {
30  return StatusCode::SUCCESS;
31 }

◆ 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::IjFEXFormTOBs::interfaceID ( )
inlinestaticinherited

Definition at line 40 of file IjFEXFormTOBs.h.

41  {
42  return IID_IjFEXFormTOBs;
43  }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
366  }

◆ 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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ 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.

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

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_isMC

Gaudi::Property<bool> LVL1::jFEXFormTOBs::m_isMC {this, "IsMC", false, "For MC, always access the DB"}
private

Internal data.

Definition at line 46 of file jFEXFormTOBs.h.

◆ m_jetEtaCalibrationBeginTimestamp

UnsignedIntegerProperty LVL1::jFEXFormTOBs::m_jetEtaCalibrationBeginTimestamp {this, "JetEtaCalibrationBeginTimestamp", 1704063600 , "Earliest timestamp from which jet calibrations are binned in eta instead of ET"}
private

Definition at line 52 of file jFEXFormTOBs.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:
LVL1::FEXAlgoSpaceDefs::jTau_etaBit
constexpr static int jTau_etaBit
Definition: FEXAlgoSpaceDefs.h:101
test_pyathena.eta
eta
Definition: test_pyathena.py:10
et
Extra patterns decribing particle interation process.
LVL1::FEXAlgoSpaceDefs::jJ_etBit
constexpr static int jJ_etBit
Definition: FEXAlgoSpaceDefs.h:119
LVL1::FEXAlgoSpaceDefs::jTE_Et_upperBit
constexpr static int jTE_Et_upperBit
Definition: FEXAlgoSpaceDefs.h:142
LVL1::FEXAlgoSpaceDefs::jTau_phiBit
constexpr static int jTau_phiBit
Definition: FEXAlgoSpaceDefs.h:102
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::FEXAlgoSpaceDefs::jXE_Ey_Bit
constexpr static int jXE_Ey_Bit
Definition: FEXAlgoSpaceDefs.h:135
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1::FEXAlgoSpaceDefs::jFEX_algoSpace_C_EMIE_end_eta
constexpr static int jFEX_algoSpace_C_EMIE_end_eta
Definition: FEXAlgoSpaceDefs.h:66
Energy
std::vector< double > Energy
Definition: CalibHitToCaloCell.h:23
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
LVL1::FEXAlgoSpaceDefs::jTE_Sat_lowerBit
constexpr static int jTE_Sat_lowerBit
Definition: FEXAlgoSpaceDefs.h:144
LVL1::FEXAlgoSpaceDefs::jFEX_algoSpace_C_FCAL_end_eta
constexpr static int jFEX_algoSpace_C_FCAL_end_eta
Definition: FEXAlgoSpaceDefs.h:68
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
FEXReprocessingRun3.jFEX
jFEX
Definition: FEXReprocessingRun3.py:174
LVL1::jFEXFormTOBs::m_jetEtaCalibrationBeginTimestamp
UnsignedIntegerProperty m_jetEtaCalibrationBeginTimestamp
Definition: jFEXFormTOBs.h:52
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
LVL1::jFEXFormTOBs::m_isMC
Gaudi::Property< bool > m_isMC
Internal data.
Definition: jFEXFormTOBs.h:46
LVL1::FEXAlgoSpaceDefs::jXE_Ex_Bit
constexpr static int jXE_Ex_Bit
Definition: FEXAlgoSpaceDefs.h:136
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
LVL1::FEXAlgoSpaceDefs::jLJ_phiBit
constexpr static int jLJ_phiBit
Definition: FEXAlgoSpaceDefs.h:129
LVL1::FEXAlgoSpaceDefs::jJ_etaBit
constexpr static int jJ_etaBit
Definition: FEXAlgoSpaceDefs.h:120
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
LVL1::FEXAlgoSpaceDefs::jLJ_etBit
constexpr static int jLJ_etBit
Definition: FEXAlgoSpaceDefs.h:127
LVL1::FEXAlgoSpaceDefs::jTau_isoBit
constexpr static int jTau_isoBit
Definition: FEXAlgoSpaceDefs.h:99
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
LVL1::FEXAlgoSpaceDefs::jLJ_resBit
constexpr static int jLJ_resBit
Definition: FEXAlgoSpaceDefs.h:126
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::FEXAlgoSpaceDefs::jTau_etBit
constexpr static int jTau_etBit
Definition: FEXAlgoSpaceDefs.h:100
LVL1::FEXAlgoSpaceDefs::jTE_Sat_upperBit
constexpr static int jTE_Sat_upperBit
Definition: FEXAlgoSpaceDefs.h:141
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LVL1::jFEXFormTOBs::Get_calibrated_SRj_ET
int Get_calibrated_SRj_ET(int, int, const std::vector< int > &)
Definition: jFEXFormTOBs.cxx:72
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
LVL1::FEXAlgoSpaceDefs::jJ_resBit
constexpr static int jJ_resBit
Definition: FEXAlgoSpaceDefs.h:118
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LVL1::FEXAlgoSpaceDefs::jLJ_etaBit
constexpr static int jLJ_etaBit
Definition: FEXAlgoSpaceDefs.h:128
LVL1::FEXAlgoSpaceDefs::jFEX_algoSpace_A_FCAL_start_eta
constexpr static int jFEX_algoSpace_A_FCAL_start_eta
Definition: FEXAlgoSpaceDefs.h:47
LVL1::FEXAlgoSpaceDefs::jXE_ResBit
constexpr static int jXE_ResBit
Definition: FEXAlgoSpaceDefs.h:134
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:47
PlotSFuncertainty.calib
calib
Definition: PlotSFuncertainty.py:110
LVL1::FEXAlgoSpaceDefs::jFEX_algoSpace_A_EMIE_eta
constexpr static int jFEX_algoSpace_A_EMIE_eta
Definition: FEXAlgoSpaceDefs.h:46
LVL1::jFEXFormTOBs::Get_eta_calibrated_SRj_ET
int Get_eta_calibrated_SRj_ET(int, int, unsigned int, int, const std::vector< int > &)
Definition: jFEXFormTOBs.cxx:102
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::FEXAlgoSpaceDefs::jTE_Et_lowerBit
constexpr static int jTE_Et_lowerBit
Definition: FEXAlgoSpaceDefs.h:143
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
LVL1::FEXAlgoSpaceDefs::jJ_phiBit
constexpr static int jJ_phiBit
Definition: FEXAlgoSpaceDefs.h:121
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LVL1::FEXAlgoSpaceDefs::jXE_SatBit
constexpr static int jXE_SatBit
Definition: FEXAlgoSpaceDefs.h:137
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:77
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528