ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LVL1CTP::CTPSimulation Class Reference

#include <CTPSimulation.h>

Inheritance diagram for LVL1CTP::CTPSimulation:
Collaboration diagram for LVL1CTP::CTPSimulation:

Public Member Functions

 CTPSimulation (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~CTPSimulation ()
 
virtual StatusCode initialize () override
 
virtual StatusCode start () override
 
virtual StatusCode execute (const EventContext &context) const override
 
virtual StatusCode stop () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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
 

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

StatusCode bookHists ()
 
StatusCode setHistLabels (const TrigConf::L1Menu &l1menu)
 
StatusCode createMultiplicityHist (const std::string &type, unsigned int maxMult=10)
 
StatusCode setMultiplicityHistLabels (const TrigConf::L1Menu &l1menu, const std::string &type)
 
StatusCode hbook (const std::string &path, std::unique_ptr< TH1 > hist)
 
StatusCode hbook (const std::string &path, std::unique_ptr< TH2 > hist)
 
StatusCode storeMetadata ()
 
LockedHandle< TH1 > & get1DHist (const std::string &histName) const
 
LockedHandle< TH2 > & get2DHist (const std::string &histName) const
 
std::string getBaseHistPath () const
 
StatusCode fillInputHistograms (const EventContext &context) const
 
StatusCode extractMultiplicities (std::map< std::string, unsigned int > &thrMultiMap, const EventContext &context) const
 
StatusCode simulateItems (const std::map< std::string, unsigned int > &thrMultiMap, const EventContext &context) const
 
unsigned int calculateMultiplicity (const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
 
unsigned int calculateJetMultiplicity (const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
 
unsigned int calculateEMMultiplicity (const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
 
unsigned int calculateTauMultiplicity (const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
 
unsigned int calculateMETMultiplicity (const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
 
unsigned int calculateMuonMultiplicity (const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
 
unsigned int calculateTopoMultiplicity (const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context, bool UseLegacy) const
 
unsigned int calculateTopoOptMultiplicity (const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
 
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

ServiceHandle< ITHistSvc > m_histSvc { this, "THistSvc", "THistSvc/THistSvc", "Histogramming svc" }
 
ToolHandle< LVL1CTP::ResultBuilderm_resultBuilder { this, "ResultBuilder", "LVL1CTP__ResultBuilder/ResultBuilder", "Builds the CTP result" }
 
ATHRNG::RNGWrapper m_RNGEngines
 
std::map< std::string, LockedHandle< TH1 > > m_hist1D
 
std::map< std::string, LockedHandle< TH2 > > m_hist2D
 
SG::ReadHandleKey< LVL1::FrontPanelCTPm_iKeyTopo { this, "TopoInput", LVL1::DEFAULT_L1TopoCTPLocation, "Input from topo" }
 
SG::ReadHandleKey< LVL1::FrontPanelCTPm_iKeyLegacyTopo { this, "LegacyTopoInput", LVL1::DEFAULT_L1TopoLegacyCTPLocation, "Input from legacy topo" }
 
SG::ReadHandleKey< LVL1::MuCTPICTPm_iKeyMuctpi { this, "MuctpiInput", LVL1MUCTPI::DEFAULT_MuonCTPLocation, "Input from Muctpi" }
 
SG::ReadHandleKey< LVL1::EmTauCTPm_iKeyCtpinEM { this, "CtpinEMInput", LVL1::TrigT1CaloDefs::EmTauCTPLocation, "Input from CTPIN em and tau (legacy)" }
 
SG::ReadHandleKey< LVL1::JetCTPm_iKeyCtpinJet { this, "CtpinJetInput", LVL1::TrigT1CaloDefs::JetCTPLocation, "Input from CTPIN jet (legacy)" }
 
SG::ReadHandleKey< LVL1::EnergyCTPm_iKeyCtpinXE { this, "CtpinXEInput", LVL1::TrigT1CaloDefs::EnergyCTPLocation, "Input from CTPIN energy (te,xe,xs - legacy)" }
 
SG::ReadHandleKey< xAOD::JetRoIContainerm_iKeyJFexJets { this, "jFexJetInput", "jRoundJets", "Input list of jFEX jets" }
 
SG::ReadHandleKey< xAOD::JetRoIContainerm_iKeyJFexLJets { this, "jFexLJetInput", "jRoundLargeRJets", "Input list of jFEX large-R jets" }
 
SG::ReadHandleKey< xAOD::JetRoIContainerm_iKeyGFexJets { this, "gFexJetInput", "gL1Jets", "Input list of gFEX jets" }
 
SG::ReadHandleKey< xAOD::EnergySumRoIm_iKeyGFexMETNC { this, "gFexMETNCInput", "gXENOISECUTPerf", "Input list of gFEX MET NC" }
 
SG::ReadHandleKey< xAOD::EnergySumRoIm_iKeyGFexMETRho { this, "gFexMETRhoInput", "gXERHOPerf", "Input list of gFEX MET Rho" }
 
SG::ReadHandleKey< xAOD::EnergySumRoIm_iKeyGFexMETJwoJ { this, "gFexMETJwoJInput", "gXEJWOJPerf", "Input list of gFEX MET JwoJ" }
 
SG::ReadHandleKey< xAOD::TrigEMClusterContainerm_iKeyEFexCluster { this, "eFexClusterInput", "SClusterCl", "Input list of eFEX cluster" }
 
SG::ReadHandleKey< xAOD::EmTauRoIContainerm_iKeyEFexTau { this, "eFexTauInput", "SClusterTau", "Input list of eFEX tau" }
 
SG::ReadHandleKey< LVL1::ZdcCTPm_iKeyZDC {this, "ZdcInput", LVL1::TrigT1CaloDefs::ZdcCTPLocation, "Input from Zdc"}
 
SG::ReadHandleKey< LVL1::TrtCTPm_iKeyTRT {this, "TrtInput", LVL1::DEFAULT_TrtCTPLocation, "Input from Trt"}
 
SG::WriteHandleKey< CTP_RDOm_oKeyRDO {this, "RDOOutput", LVL1CTP::DEFAULT_RDOOutputLocation, "Output of CTP RDO object (sim)"}
 
SG::WriteHandleKey< CTPSLinkm_oKeySLink {this, "ROIOutput", LVL1CTP::DEFAULT_CTPSLinkLocation, "Output of CTP SLink object (sim)"}
 
Gaudi::Property< bool > m_isData { this, "IsData", false, "emulate CTP as part of MC or rerun on data" }
 
Gaudi::Property< std::string > m_histPath { this, "HistPath", "/EXPERT/L1", "Booking path for the histogram" }
 
Gaudi::Property< bool > m_doZDC {this, "DoZDC", false, "emulate CTP with ZDC included"}
 
Gaudi::Property< bool > m_doTRT {this, "DoTRT", false, "emulate CTP with TRT included"}
 
Gaudi::Property< bool > m_forceBunchGroupPattern { this, "ForceBunchGroupPattern", true, "When true, ignore the bunchgroups and use the provided BunchGroupPattern" }
 
Gaudi::Property< unsigned int > m_bunchGroupPattern { this, "BunchGroupPattern", 0x0003, "Bunchgroup pattern applied at every event, useful for simulation. Bit x corresponds to bunchgroup x" }
 
Gaudi::Property< bool > m_doL1CaloLegacy { this, "DoL1CaloLegacy", false, "Use L1Calo legacy" }
 
Gaudi::Property< bool > m_doL1Topo { this, "DoL1Topo", false, "Use L1Topo" }
 
Gaudi::Property< bool > m_doL1TopoLegacy { this, "DoL1TopoLegacy", false, "Use L1Topo Legacy" }
 
Gaudi::Property< bool > m_muonRun2Format { this, "MuonMultiplicityRun2Format", false, "Interpret muon multiplicity in Run 2 format (bit 0 unused)" }
 
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSetm_bgKey {this, "L1BunchGroup", "L1BunchGroup", "L1BunchGroupSet key name"}
 
LVL1::CPRoIDecoderm_decoder { nullptr }
 
LVL1::JEPRoIDecoderm_jetDecoder { nullptr }
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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 65 of file CTPSimulation.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CTPSimulation()

LVL1CTP::CTPSimulation::CTPSimulation ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 44 of file CTPSimulation.cxx.

44  :
45  AthReentrantAlgorithm ( name, pSvcLocator ),
49 {}

◆ ~CTPSimulation()

LVL1CTP::CTPSimulation::~CTPSimulation ( )

Definition at line 51 of file CTPSimulation.cxx.

52 {}

Member Function Documentation

◆ bookHists()

StatusCode LVL1CTP::CTPSimulation::bookHists ( )
private

Definition at line 335 of file CTPSimulation.cxx.

335  {
336 
337  // jets
338  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("jJetPt","Jet p_{T} - jJ", 40, 0, 80) ));
339  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("jJetEta","Jet #eta - jJ", 64, -3.2, 3.2) ));
340  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("jJetPhi","Jet #phi - jJ", 64, -3.2, 3.2) ));
341  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("jLJetPt","Jet p_{T} - jLJ", 40, 0, 80) ));
342  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("jLJetEta","Jet #eta - jLJ", 64, -3.2, 3.2) ));
343  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("jLJetPhi","Jet #phi - jLJ", 64, -3.2, 3.2) ));
344  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("gJetPt","Jet p_{T} - gJ", 40, 0, 80) ));
345  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("gJetEta","Jet #eta - gJ", 64, -3.2, 3.2) ));
346  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("gJetPhi","Jet #phi - gJ", 64, -3.2, 3.2) ));
347  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("gLJetPt","Jet p_{T} - gLJ", 40, 0, 80) ));
348  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("gLJetEta","Jet #eta - gLJ", 64, -3.2, 3.2) ));
349  ATH_CHECK ( hbook( "/input/jets/", std::make_unique<TH1I>("gLJetPhi","Jet #phi - gLJ", 64, -3.2, 3.2) ));
350 
351  // MET
352  ATH_CHECK ( hbook( "/input/met/", std::make_unique<TH1I>("Pufit","Missing ET from algorithm pufit", 40, 0, 80) ));
353  ATH_CHECK ( hbook( "/input/met/", std::make_unique<TH1I>("PufitPhi","Missing ET PUfit phi", 64, -3.2, 3.2) ));
354  ATH_CHECK ( hbook( "/input/met/", std::make_unique<TH1I>("Rho","Missing ET from algorithm rhosub", 40, 0, 80) ));
355  ATH_CHECK ( hbook( "/input/met/", std::make_unique<TH1I>("RhoPhi","Missing ET rhosub phi", 64, -3.2, 3.2) ));
356  ATH_CHECK ( hbook( "/input/met/", std::make_unique<TH1I>("JwoJ","Missing ET from algorithm jet without jets", 40, 0, 80) ));
357  ATH_CHECK ( hbook( "/input/met/", std::make_unique<TH1I>("JwoJPhi","Missing ET jet without jet phi", 64, -3.2, 3.2) ));
358 
359  // cluster
360  ATH_CHECK ( hbook( "/input/em/", std::make_unique<TH1I>("et","Cluster et", 40, 0, 40) ));
361  ATH_CHECK ( hbook( "/input/em/", std::make_unique<TH1I>("eta","Cluster eta ", 64, -3.2, 3.2) ));
362  ATH_CHECK ( hbook( "/input/em/", std::make_unique<TH1I>("phi","Cluster phi", 64, -3.2, 3.2) ));
363 
364  // tau
365  ATH_CHECK ( hbook( "/input/tau/", std::make_unique<TH1I>("et","Tau et", 40, 0, 40) ));
366  ATH_CHECK ( hbook( "/input/tau/", std::make_unique<TH1I>("eta","Tau eta ", 64, -3.2, 3.2) ));
367  ATH_CHECK ( hbook( "/input/tau/", std::make_unique<TH1I>("phi","Tau phi", 64, -3.2, 3.2) ));
368  ATH_CHECK ( hbook( "/input/tau/", std::make_unique<TH1I>("emIso","Tau em isolation", 40, 0, 1) ));
369  ATH_CHECK ( hbook( "/input/tau/", std::make_unique<TH1I>("hadIso","Tau hadronic isolation", 40, 0, 1) ));
370  ATH_CHECK ( hbook( "/input/tau/", std::make_unique<TH1I>("R3ET","Tau eT", 40, 0, 40) ));
371  ATH_CHECK ( hbook( "/input/tau/", std::make_unique<TH1I>("R3Iso","Tau isolation", 40, 0, 1) ));
372 
373  // input counts
374  ATH_CHECK ( hbook( "/input/counts/", std::make_unique<TH1I>("jJets","Number of jets (jJ)", 40, 0, 40) ));
375  ATH_CHECK ( hbook( "/input/counts/", std::make_unique<TH1I>("jLJets","Number of jets (jLJ)", 40, 0, 40) ));
376  ATH_CHECK ( hbook( "/input/counts/", std::make_unique<TH1I>("gJets","Number of jets (gJ)", 40, 0, 40) ));
377  ATH_CHECK ( hbook( "/input/counts/", std::make_unique<TH1I>("gLJets","Number of jets (gLJ)", 40, 0, 40) ));
378  ATH_CHECK ( hbook( "/input/counts/", std::make_unique<TH1I>("muons","Number of muons", 10, 0, 10) ));
379  ATH_CHECK ( hbook( "/input/counts/", std::make_unique<TH1I>("emcluster","Number of EM clusters", 20, 0, 20) ));
380  ATH_CHECK ( hbook( "/input/counts/", std::make_unique<TH1I>("taus","Number of TAU candidates", 20, 0, 20) ));
381 
382  // threshold multiplicities
383  ATH_CHECK ( createMultiplicityHist( "muon" ) );
384  ATH_CHECK ( createMultiplicityHist( "jet" ) );
385  ATH_CHECK ( createMultiplicityHist( "xe", 2) );
386  ATH_CHECK ( createMultiplicityHist( "te", 2) );
387  ATH_CHECK ( createMultiplicityHist( "xs", 2) );
388  ATH_CHECK ( createMultiplicityHist( "em" ) );
389  ATH_CHECK ( createMultiplicityHist( "tau" ) );
390 
391  ATH_CHECK ( hbook( "/multi/all", (std::unique_ptr<TH2>)std::make_unique<TH2I>("LegacyMult", "Legacy thresholds multiplicity", 1, 0, 1, 10, 0, 10) ));
392  ATH_CHECK ( hbook( "/multi/all", (std::unique_ptr<TH2>)std::make_unique<TH2I>("R3Mult", "New thresholds multiplicity", 1, 0, 1, 10, 0, 10) ));
393 
394  // Topo
395  ATH_CHECK( hbook( "/input/topo/", std::make_unique<TH1I>("LegacyTopo0","L1Topo Decision (Legacy 0)", 64, 0, 64) ));
396  ATH_CHECK( hbook( "/input/topo/", std::make_unique<TH1I>("LegacyTopo1","L1Topo Decision (Legacy 1)", 64, 0, 64) ));
397  ATH_CHECK( hbook( "/input/topo/", std::make_unique<TH1I>("Topo1El","L1Topo Decision (Topo 1 electrical)", 64, 0, 64) ));
398  ATH_CHECK( hbook( "/input/topo/", std::make_unique<TH1I>("Topo2El","L1Topo Decision (Topo 2 electrical)", 64, 0, 64) ));
399  ATH_CHECK( hbook( "/input/topo/", std::make_unique<TH1I>("Topo3El","L1Topo Decision (Topo 3 electrical)", 64, 0, 64) ));
400  ATH_CHECK( hbook( "/input/topo/", std::make_unique<TH1I>("Topo1Opt0","L1Topo Decision (Topo 1 optical 0)", 128, 0, 128) ));
401  ATH_CHECK( hbook( "/input/topo/", std::make_unique<TH1I>("Topo1Opt1","L1Topo Decision (Topo 1 optical 1)", 128, 0, 128) ));
402  ATH_CHECK( hbook( "/input/topo/", std::make_unique<TH1I>("Topo1Opt2","L1Topo Decision (Topo 1 optical 2)", 128, 0, 128) ));
403  ATH_CHECK( hbook( "/input/topo/", std::make_unique<TH1I>("Topo1Opt3","L1Topo Decision (Topo 1 optical 3)", 128, 0, 128) ));
404 
405  // item decision
406  ATH_CHECK ( hbook( "/output/", std::make_unique<TH1I>("tbpById", "Items decision (tbp)", 512, 0, 512) ));
407  ATH_CHECK ( hbook( "/output/", std::make_unique<TH1I>("tapById", "Items decision (tap)", 512, 0, 512) ));
408  ATH_CHECK ( hbook( "/output/", std::make_unique<TH1I>("tavById", "Items decision (tav)", 512, 0, 512) ));
409  ATH_CHECK ( hbook( "/output/", std::make_unique<TH1I>("tbpByName", "Items decision (tbp)", 512, 0, 512) ));
410  ATH_CHECK ( hbook( "/output/", std::make_unique<TH1I>("tapByName", "Items decision (tap)", 512, 0, 512) ));
411  ATH_CHECK ( hbook( "/output/", std::make_unique<TH1I>("tavByName", "Items decision (tav)", 512, 0, 512) ));
412 
413  ATH_CHECK ( hbook( "/", std::make_unique<TH1I>("bcid", "Bunch crossing ID", 3564, 0, 3564)) );
414 
416 
417  return StatusCode::SUCCESS;
418 }

◆ calculateEMMultiplicity()

unsigned int LVL1CTP::CTPSimulation::calculateEMMultiplicity ( const TrigConf::L1Threshold confThr,
const TrigConf::L1Menu l1menu,
const EventContext &  context 
) const
private

Definition at line 857 of file CTPSimulation.cxx.

857  {
858  unsigned int multiplicity (0);
859  if ( confThr.name()[0]=='e' ) {
860  // new EM threshold from eFEX
861  if(!m_iKeyEFexCluster.empty()) {
862  float scale = l1menu->getObject("thresholds.legacyCalo.EM.emscale").getValue<float>();
863  auto eFexCluster = SG::makeHandle( m_iKeyEFexCluster, context );
864  for ( const auto cl : *eFexCluster ) {
865  float eta = cl->eta();
866  int ieta = int((eta + (eta>0 ? 0.005 : -0.005))/0.1);
867  unsigned int thrV = confThr.thrValue( ieta );
868  bool clusterPasses = ( ((unsigned int) cl->et()) > (thrV * scale) ); // need to add cut on isolation and other variables, once available
869  multiplicity += clusterPasses ? 1 : 0;
870  }
871  }
872  } else {
873  // old EM threshold from data
874  if(m_doL1CaloLegacy) {
875  auto ctpinEM = SG::makeHandle( m_iKeyCtpinEM, context );
876  if ( ctpinEM.isValid() ) {
877  if( l1menu->connector("EM1").hasLine(confThr.name()) ) {
878  auto & triggerline = l1menu->connector("EM1").triggerLine(confThr.name());
879  multiplicity = CTPUtil::getMult( ctpinEM->cableWord0(), triggerline.startbit(), triggerline.endbit() );
880  } else if( l1menu->connector("EM2").hasLine(confThr.name()) ) {
881  auto & triggerline = l1menu->connector("EM2").triggerLine(confThr.name());
882  multiplicity = CTPUtil::getMult( ctpinEM->cableWord1(), triggerline.startbit(), triggerline.endbit() );
883  }
884  }
885  }
886  }
887  get2DHist( "/multi/em/" + confThr.type() + "Mult" )->Fill(confThr.mapping(), multiplicity);
888  ATH_MSG_DEBUG("EM MULT calculated mult for threshold " << confThr.name() << " : " << multiplicity);
889  return multiplicity;
890 }

◆ calculateJetMultiplicity()

unsigned int LVL1CTP::CTPSimulation::calculateJetMultiplicity ( const TrigConf::L1Threshold confThr,
const TrigConf::L1Menu l1menu,
const EventContext &  context 
) const
private

Definition at line 834 of file CTPSimulation.cxx.

834  {
835  unsigned int multiplicity = 0;
836  if( confThr.type() == "JET" ) {
837  if(m_doL1CaloLegacy) {
838  auto ctpinJet = SG::makeHandle( m_iKeyCtpinJet, context );
839  if ( ctpinJet.isValid() ) {
840  if( l1menu->connector("JET1").hasLine(confThr.name()) ) {
841  auto & triggerline = l1menu->connector("JET1").triggerLine(confThr.name());
842  multiplicity = CTPUtil::getMult( ctpinJet->cableWord0(), triggerline.startbit(), triggerline.endbit() );
843  } else if( l1menu->connector("JET2").hasLine(confThr.name()) ) {
844  auto & triggerline = l1menu->connector("JET2").triggerLine(confThr.name());
845  multiplicity = CTPUtil::getMult( ctpinJet->cableWord1(), triggerline.startbit(), triggerline.endbit() );
846  }
847  }
848  }
849  }
850  get2DHist( "/multi/jet/" + confThr.type() + "Mult" )->Fill(confThr.mapping(), multiplicity);
851  ATH_MSG_DEBUG("JET MULT calculated mult for threshold " << confThr.name() << " : " << multiplicity);
852  return multiplicity;
853 }

◆ calculateMETMultiplicity()

unsigned int LVL1CTP::CTPSimulation::calculateMETMultiplicity ( const TrigConf::L1Threshold confThr,
const TrigConf::L1Menu l1menu,
const EventContext &  context 
) const
private

Definition at line 932 of file CTPSimulation.cxx.

932  {
933  unsigned int multiplicity = 0;
934  if ( confThr.type() == "XE" or confThr.type() == "TE" or confThr.type() == "XS" ) {
935  // old XE, TE, XS
936  if(m_doL1CaloLegacy) {
937  auto ctpinEnergy = SG::makeHandle( m_iKeyCtpinXE, context );
938  if ( ctpinEnergy.isValid() ) {
939  if( l1menu->connector("EN1").hasLine(confThr.name()) ) {
940  auto & triggerline = l1menu->connector("EN1").triggerLine(confThr.name());
941  multiplicity = CTPUtil::getMult( ctpinEnergy->cableWord0(), triggerline.startbit(), triggerline.endbit() );
942  } else if( l1menu->connector("EN2").hasLine(confThr.name()) ) {
943  auto & triggerline = l1menu->connector("EN2").triggerLine(confThr.name());
944  multiplicity = CTPUtil::getMult( ctpinEnergy->cableWord1(), triggerline.startbit(), triggerline.endbit() );
945  }
946  }
947  }
948  } else {
949  // new XE
950  const SG::ReadHandleKey< xAOD::EnergySumRoI > * rhk { nullptr };
951  if ( confThr.name().find("gXENC")==0 ) {
952  rhk = & m_iKeyGFexMETNC;
953  ATH_MSG_DEBUG("Using Pufit input for threshold " << confThr.name() );
954  } else if ( confThr.name().find("gXERHO")==0 ) {
955  rhk = & m_iKeyGFexMETRho;
956  ATH_MSG_DEBUG("Using Rho input for threshold " << confThr.name() );
957  } else if ( confThr.name().find("gXEJWOJ")==0 ) {
958  rhk = & m_iKeyGFexMETJwoJ;
959  ATH_MSG_DEBUG("Using JwoJ input for threshold " << confThr.name() );
960  } else {
961  rhk = & m_iKeyGFexMETJwoJ;
962  ATH_MSG_DEBUG("Using default input JwoJ for threshold " << confThr.name() );
963  }
964  if(!rhk->empty()) {
965  auto met = SG::makeHandle( *rhk, context );
966  multiplicity = ( met->energyT()/1000. < confThr.getAttribute<unsigned int>("xe") ) ? 0 : 1; // energyT value is in MeV, cut in GeV
967  }
968  }
969  if(confThr.type() == "TE") {
970  get2DHist( "/multi/te/" + confThr.type() + "Mult" )->Fill(confThr.mapping(), multiplicity);
971  ATH_MSG_DEBUG("TE MULT calculated mult for threshold " << confThr.name() << " : " << multiplicity);
972  } else if(confThr.type() == "XS") {
973  get2DHist( "/multi/xs/" + confThr.type() + "Mult" )->Fill(confThr.mapping(), multiplicity);
974  ATH_MSG_DEBUG("XS MULT calculated mult for threshold " << confThr.name() << " : " << multiplicity);
975  } else {
976  get2DHist( "/multi/xe/" + confThr.type() + "Mult" )->Fill(confThr.mapping(), multiplicity);
977  ATH_MSG_DEBUG("XE MULT calculated mult for threshold " << confThr.name() << " : " << multiplicity);
978  }
979  return multiplicity;
980 }

◆ calculateMultiplicity()

unsigned int LVL1CTP::CTPSimulation::calculateMultiplicity ( const TrigConf::L1Threshold confThr,
const TrigConf::L1Menu l1menu,
const EventContext &  context 
) const
private

Definition at line 1099 of file CTPSimulation.cxx.

1099  {
1100  unsigned int multiplicity = 0;
1101  try {
1102  if ( confThr.type() == "EM" ) {
1103  multiplicity = calculateEMMultiplicity( confThr, l1menu, context );
1104  } else if ( confThr.type() == "TAU" ) {
1105  multiplicity = calculateTauMultiplicity( confThr, l1menu, context );
1106  } else if ( confThr.type() == "XE" || confThr.type() == "TE" || confThr.type() == "XS" ) {
1107  multiplicity = calculateMETMultiplicity( confThr, l1menu, context );
1108  } else if ( confThr.type() == "JET" ) {
1109  multiplicity = calculateJetMultiplicity( confThr, l1menu, context );
1110  } else if ( confThr.type() == "MU" ) {
1111  multiplicity = calculateMuonMultiplicity( confThr, l1menu, context );
1112  } else if ( confThr.type() == "R2TOPO") {
1113  multiplicity = calculateTopoMultiplicity( confThr, l1menu, context, true );
1114  } else if ( confThr.type() == "TOPO" ) {
1115  multiplicity = calculateTopoMultiplicity( confThr, l1menu, context, m_doL1TopoLegacy);
1116  } else if ( confThr.type()[0] == 'e' || confThr.type()[0] == 'c' || confThr.type()[0] == 'j' || confThr.type()[0] == 'g' ){
1117  multiplicity = calculateTopoOptMultiplicity( confThr, l1menu, context );
1118  }
1119  }
1120  catch(std::exception & ex) {
1121  ATH_MSG_FATAL("Caught exception when calculating multiplicity for threshold " << confThr.name() << ": " << ex.what());
1122  throw;
1123  }
1124  // all other thresholds are not simulated
1125  return multiplicity;
1126 }

◆ calculateMuonMultiplicity()

unsigned int LVL1CTP::CTPSimulation::calculateMuonMultiplicity ( const TrigConf::L1Threshold confThr,
const TrigConf::L1Menu l1menu,
const EventContext &  context 
) const
private

Definition at line 984 of file CTPSimulation.cxx.

984  {
985  if(m_iKeyMuctpi.empty()) {
986  return 0;
987  }
988  unsigned int multiplicity = 0;
989  auto ctpinMuon = SG::makeHandle( m_iKeyMuctpi, context );
990  if ( ctpinMuon.isValid() ) {
991  auto & triggerline = l1menu->connector("MuCTPiOpt0").triggerLine(confThr.name());
992  multiplicity = CTPUtil::getMuonMult( ctpinMuon->muCTPIWord(), triggerline.startbit() + (m_muonRun2Format ? 1 : 0), triggerline.endbit()+ (m_muonRun2Format ? 1 : 0) );
993  }
994  get2DHist( "/multi/muon/" + confThr.type() + "Mult" )->Fill(confThr.mapping(), multiplicity);
995  ATH_MSG_DEBUG("MU MULT calculated mult for threshold " << confThr.name() << " : " << multiplicity);
996  return multiplicity;
997 }

◆ calculateTauMultiplicity()

unsigned int LVL1CTP::CTPSimulation::calculateTauMultiplicity ( const TrigConf::L1Threshold confThr,
const TrigConf::L1Menu l1menu,
const EventContext &  context 
) const
private

Definition at line 894 of file CTPSimulation.cxx.

894  {
895  unsigned int multiplicity = 0;
896  if ( confThr.name()[0]=='e' ) {
897  // new TAU threshold from eFEX
898  auto eFexTaus = SG::makeHandle( m_iKeyEFexTau, context );
899  const static SG::AuxElement::ConstAccessor<float> accR3ClET ("R3ClusterET");
900  const static SG::AuxElement::ConstAccessor<float> accR3ClIso ("R3ClusterIso");
901  if( eFexTaus.isValid() ) {
902  for ( const auto tau : *eFexTaus ) {
903  unsigned int eT = (unsigned int) (accR3ClET(*tau)/1000.); // tau eT is in MeV while the cut is in GeV - this is only temporary and needs to be made consistent for all L1Calo
904  //float iso = accR3ClIso(*tau);
905  unsigned int etCut = confThr.data().get_child("et").get_value<unsigned int>();
906  bool tauPasses = ( eT >= etCut ); // need to add cut on isolation and other variables, once available
907  multiplicity += tauPasses ? 1 : 0;
908  }
909  }
910  } else {
911  // old TAU threshold
912  if(m_doL1CaloLegacy) {
913  auto ctpinEM = SG::makeHandle( m_iKeyCtpinEM, context );
914  if ( ctpinEM.isValid() ) {
915  if( l1menu->connector("TAU1").hasLine(confThr.name()) ) {
916  auto & triggerline = l1menu->connector("TAU1").triggerLine(confThr.name());
917  multiplicity = CTPUtil::getMult( ctpinEM->cableWord2(), triggerline.startbit(), triggerline.endbit() );
918  } else if( l1menu->connector("TAU2").hasLine(confThr.name()) ) {
919  auto & triggerline = l1menu->connector("TAU2").triggerLine(confThr.name());
920  multiplicity = CTPUtil::getMult( ctpinEM->cableWord3(), triggerline.startbit(), triggerline.endbit() );
921  }
922  }
923  }
924  }
925  get2DHist( "/multi/tau/" + confThr.type() + "Mult" )->Fill(confThr.mapping(), multiplicity);
926  ATH_MSG_DEBUG("TAU MULT calculated mult for threshold " << confThr.name() << " : " << multiplicity);
927  return multiplicity;
928 }

◆ calculateTopoMultiplicity()

unsigned int LVL1CTP::CTPSimulation::calculateTopoMultiplicity ( const TrigConf::L1Threshold confThr,
const TrigConf::L1Menu l1menu,
const EventContext &  context,
bool  UseLegacy = false 
) const
private

Definition at line 1040 of file CTPSimulation.cxx.

1040  {
1041  unsigned int multiplicity = 0;
1042  if(UseLegacy){
1044  {
1045  return 0;
1046  }
1047  multiplicity = 0;
1048  auto topoInput = SG::makeHandle( m_iKeyTopo, context );
1049  if(topoInput.isValid()) {
1050  uint64_t cable = 0;
1051  std::string conn("");
1052  if( l1menu->connector("LegacyTopo0").hasLine(confThr.name()) ) {
1053  conn = "LegacyTopo0";
1054  cable = ( (uint64_t)topoInput->cableWord1( 1 ) << 32) + topoInput->cableWord1( 0 );
1055  } else if( l1menu->connector("LegacyTopo1").hasLine(confThr.name()) ) {
1056  conn = "LegacyTopo1";
1057  cable = ( (uint64_t)topoInput->cableWord2( 1 ) << 32) + topoInput->cableWord2( 0 );
1058  }
1059  if(conn != "") {
1060  auto & triggerline = l1menu->connector(conn).triggerLine(confThr.name());
1061  ATH_MSG_DEBUG( " ---> Topo input " << confThr.name() << " on module " << conn
1062  << ", cable start " << triggerline.startbit() << " and end " << triggerline.endbit()
1063  << " double word 0x" << std::setw(16) << std::setfill('0') << std::hex << cable << std::dec << std::setfill(' ') );
1064  multiplicity = CTPUtil::getMultTopo( cable, triggerline.startbit(), triggerline.endbit(), triggerline.clock() );
1065  }
1066  }
1067  }
1068  else{
1069  if (m_iKeyTopo.empty() || !m_doL1Topo )
1070  {
1071  return 0;
1072  }
1073  multiplicity = 0;
1074  auto topoInput = SG::makeHandle( m_iKeyTopo, context );
1075  if(topoInput.isValid()) {
1076  uint64_t cable = 0;
1077  std::string conn("");
1078  if( l1menu->connector("Topo2El").hasLine(confThr.name()) ) {
1079  conn = "Topo2El";
1080  cable = ( (uint64_t)topoInput->cableWord1( 1 ) << 32) + topoInput->cableWord1( 0 );
1081  } else if( l1menu->connector("Topo3El").hasLine(confThr.name()) ) {
1082  conn = "Topo3El";
1083  cable = ( (uint64_t)topoInput->cableWord2( 1 ) << 32) + topoInput->cableWord2( 0 );
1084  }
1085  if(conn != "") {
1086  auto & triggerline = l1menu->connector(conn).triggerLine(confThr.name());
1087  ATH_MSG_DEBUG( " ---> Topo input " << confThr.name() << " on module " << conn
1088  << ", cable start " << triggerline.startbit() << " and end " << triggerline.endbit()
1089  << " double word 0x" << std::setw(16) << std::setfill('0') << std::hex << cable << std::dec << std::setfill(' ') );
1090  multiplicity = CTPUtil::getMultTopo( cable, triggerline.startbit(), triggerline.endbit(), triggerline.clock() );
1091  }
1092  }
1093  }
1094  return multiplicity;
1095 }

◆ calculateTopoOptMultiplicity()

unsigned int LVL1CTP::CTPSimulation::calculateTopoOptMultiplicity ( const TrigConf::L1Threshold confThr,
const TrigConf::L1Menu l1menu,
const EventContext &  context 
) const
private

Definition at line 1001 of file CTPSimulation.cxx.

1001  {
1002  if(m_iKeyTopo.empty() || !m_doL1Topo ) {
1003  return 0;
1004  }
1005  unsigned int multiplicity = 0;
1006  auto topoInput = SG::makeHandle( m_iKeyTopo, context );
1007  std::string connector = "";
1008  if (topoInput.isValid()) {
1009  connector = l1menu->connectorNameFromThreshold(confThr.name());
1010  auto & triggerline = l1menu->connector(connector).triggerLine(confThr.name());
1011  std::bitset<128> bits = topoInput->optcableWord(connector);
1012  multiplicity = CTPUtil::getOptMult( bits, triggerline.startbit(), triggerline.endbit() );
1013  }
1014  std::string subfolder = "";
1015  if (confThr.type().find("XE") != std::string::npos) {
1016  subfolder = "xe";
1017  } else if (confThr.type().find("TE") != std::string::npos) {
1018  subfolder = "te";
1019  } else if (confThr.type().find("TAU") != std::string::npos) {
1020  subfolder = "tau";
1021  } else if (confThr.type().find("EM") != std::string::npos) {
1022  subfolder = "em";
1023  } else if (confThr.type().find("jJ") != std::string::npos) {
1024  subfolder = "jet";
1025  } else if (confThr.type().find("jLJ") != std::string::npos) {
1026  subfolder = "jet";
1027  } else if (confThr.type().find("gJ") != std::string::npos) {
1028  subfolder = "jet";
1029  } else if (confThr.type().find("gLJ") != std::string::npos) {
1030  subfolder = "jet";
1031  }
1032  get2DHist( "/multi/" + subfolder + "/" + confThr.type() + "Mult" )->Fill(confThr.mapping(), multiplicity);
1033  ATH_MSG_DEBUG("TOPO OPT input MULT calculated mult for threshold " << confThr.name() << " : " << multiplicity << " received via connector: " << connector);
1034  //ATH_MSG_INFO("TOPO OPT input MULT calculated mult for threshold " << confThr.name() << " : " << multiplicity << " received via connector: " << connector);
1035  return multiplicity;
1036 }

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ createMultiplicityHist()

StatusCode LVL1CTP::CTPSimulation::createMultiplicityHist ( const std::string &  type,
unsigned int  maxMult = 10 
)
private

Definition at line 141 of file CTPSimulation.cxx.

141  {
142 
143  StatusCode sc;
144  std::map<std::string,std::vector<std::string>> typeMapping = {
145  { "muon", {"MU"} },
146  { "jet", {"JET", "jJ", "jLJ", "gJ", "gLJ"} },
147  { "xe", {"XE", "gXE", "jXE"} },
148  { "te", {"TE", "jTE", "gTE"} },
149  { "xs", {"XS"} },
150  { "em", {"EM", "eEM", "jEM"} },
151  { "tau", {"TAU", "eTAU", "jTAU", "cTAU"} }
152  };
153  std::vector<TrigConf::L1Threshold> thrV;
154  for( const std::string & t : typeMapping[type] ) {
155  size_t xsize = 1;
156  TH2* hist = new TH2I( Form("%sMult", t.c_str()),
157  Form("%s threshold multiplicity", t.c_str()), xsize, 0, xsize, maxMult, 0, maxMult);
158  sc = hbook( "/multi/" + type, std::unique_ptr<TH2>(hist));
159  }
160 
161  return sc;
162 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode LVL1CTP::CTPSimulation::execute ( const EventContext &  context) const
overridevirtual

Definition at line 125 of file CTPSimulation.cxx.

125  {
126 
127  ATH_MSG_DEBUG("execute");
128 
129  fillInputHistograms(context).ignore();
130 
131  std::map<std::string, unsigned int> thrMultiMap;
132 
133  extractMultiplicities(thrMultiMap, context).ignore();
134 
135  simulateItems(thrMultiMap, context).ignore();
136 
137  return StatusCode::SUCCESS;
138 }

◆ extractMultiplicities()

StatusCode LVL1CTP::CTPSimulation::extractMultiplicities ( std::map< std::string, unsigned int > &  thrMultiMap,
const EventContext &  context 
) const
private

Definition at line 620 of file CTPSimulation.cxx.

620  {
621 
622  const TrigConf::L1Menu * l1menu = nullptr;
624 
625  thrMultiMap.clear();
626 
627  std::vector<std::string> connNames = l1menu->connectorNames();
628  for (const std::string connName : {"LegacyTopo0", "LegacyTopo1", "Topo1El", "Topo2El", "Topo3El", "Topo1Opt0", "Topo1Opt1", "Topo1Opt2", "Topo1Opt3", "CTPCAL", "NIM2"})
629  {
630  if( find(connNames.begin(), connNames.end(), connName) == connNames.end() ) {
631  continue;
632  }
633  bool opt_cable = false;
634  std::bitset<128> cable128 {0};
635  uint64_t cable {0};
636  if (connName.starts_with( "Legacy")) { // legacy topo
638  {
639  continue;
640  }
641  auto topoInput = SG::makeHandle( m_iKeyLegacyTopo, context );
642  if (not topoInput.isValid()) {
643  continue;
644  }
645  if(connName == "LegacyTopo0") {
646  cable = ( (uint64_t)topoInput->cableWord1( 1 ) << 32) + topoInput->cableWord1( 0 );
647  } else if (connName == "LegacyTopo1") {
648  cable = ( (uint64_t)topoInput->cableWord2( 1 ) << 32) + topoInput->cableWord2( 0 );
649  }
650  }
651  else if (connName.starts_with( "CTPCAL") && m_doZDC) // ZDC simulation
652  {
653  auto zdcInput = SG::makeHandle(m_iKeyZDC, context);
654  if (not zdcInput.isValid())
655  {
656  continue;
657  }
658  cable = static_cast<uint64_t>(zdcInput->cableWord0());
659  auto &conn = l1menu->connector(connName);
660  for (auto &tl : conn.triggerLines()){
661  if (tl.name().find("ZDC") == std::string::npos)
662  {
663  continue;
664  }
665  uint flatIndex = tl.flatindex();
666  uint pass = (cable & (uint64_t(0x1) << flatIndex)) == 0 ? 0 : 1;
667  thrMultiMap[tl.name()] = pass;
668  ATH_MSG_DEBUG(tl.name() << " MULT calculated mult for topo " << pass);
669 
670  }
671  continue;
672  }
673  else if (connName.starts_with( "NIM2"))
674  {
675  if (m_doTRT) // TRT simulation
676  {
677  auto trtInput = SG::makeHandle(m_iKeyTRT, context);
678  if (not trtInput.isValid())
679  {
680  continue;
681  }
682  cable = static_cast<uint64_t>(trtInput->cableWord0());
683  auto &conn = l1menu->connector(connName);
684  for (auto &tl : conn.triggerLines()){
685  if (tl.name().find("TRT") == std::string::npos)
686  {
687  continue;
688  }
689  uint flatIndex = tl.flatindex();
690  uint pass = (cable & (uint64_t(0x1) << flatIndex)) == 0 ? 0 : 1;
691  thrMultiMap[tl.name()] = pass;
692  ATH_MSG_DEBUG(tl.name() << " MULT calculated mult for topo " << pass);
693  }
694  }
695  if (m_doZDC) // ZDC ALT simulation
696  {
697  auto zdcInput = SG::makeHandle(m_iKeyZDC, context);
698  if (not zdcInput.isValid())
699  {
700  continue;
701  }
702  cable = static_cast<uint64_t>(zdcInput->cableWord1());
703  auto &conn = l1menu->connector(connName);
704  for (const auto &tl : conn.triggerLines()){
705  if (tl.name().find("ZDC") == std::string::npos)
706  {
707  continue;
708  }
709  uint flatIndex = tl.flatindex();
710  uint pass = (cable & (uint64_t(0x1) << flatIndex)) == 0 ? 0 : 1;
711  thrMultiMap[tl.name()] = pass;
712  ATH_MSG_DEBUG(tl.name() << " MULT calculated mult for topo " << pass);
713  }
714  }
715  continue;
716  }
717 
718  else { // new topo
719  if (m_iKeyTopo.empty() || !m_doL1Topo )
720  {
721  continue;
722  }
723  auto topoInput = SG::makeHandle( m_iKeyTopo, context );
724  if (not topoInput.isValid()) {
725  continue;
726  }
727  if(connName == "Topo1El") {
728  cable = ( (uint64_t)topoInput->cableWord0( 1 ) << 32) + topoInput->cableWord0( 0 );
729  } else if(connName == "Topo2El") {
730  cable = ( (uint64_t)topoInput->cableWord1( 1 ) << 32) + topoInput->cableWord1( 0 );
731  } else if (connName == "Topo3El") {
732  cable = ( (uint64_t)topoInput->cableWord2( 1 ) << 32) + topoInput->cableWord2( 0 );
733  } else if(connName == "Topo1Opt0") {
734  ATH_MSG_DEBUG("BIT word Topo1Opt0: " << topoInput->optcableWord( connName ));
735  opt_cable = true;
736  cable128 = topoInput->optcableWord( connName );
737  } else if(connName == "Topo1Opt1") {
738  ATH_MSG_DEBUG("BIT word Topo1Opt1: " << topoInput->optcableWord( connName ));
739  opt_cable = true;
740  cable128 = topoInput->optcableWord( connName );
741  } else if(connName == "Topo1Opt2") {
742  ATH_MSG_DEBUG("BIT word Topo1Opt2: " << topoInput->optcableWord( connName ));
743  opt_cable = true;
744  cable128 = topoInput->optcableWord( connName );
745  } else if(connName == "Topo1Opt3") {
746  ATH_MSG_DEBUG("BIT word Topo1Opt3: " << topoInput->optcableWord( connName ));
747  opt_cable = true;
748  cable128 = topoInput->optcableWord( connName );
749  }
750  }
751  auto & conn = l1menu->connector(connName);
752  for(uint fpga : {0,1}) {
753  for(uint clock : {0,1}) {
754  for(auto & tl : conn.triggerLines(fpga,clock)) {
755  uint flatIndex = tl.flatindex();
756  uint pass = 0;
757  if (opt_cable) {
758  pass = ((cable128 >> flatIndex).test(0)) == 0 ? 0 : 1;
759  }
760  else {
761  pass = (cable & (static_cast<uint64_t>(0x1) << flatIndex)) == 0 ? 0 : 1;
762  }
763  if(size_t pos = tl.name().find('['); pos == std::string::npos) {
764  thrMultiMap[tl.name()] = pass;
765  ATH_MSG_DEBUG(tl.name() << " MULT calculated mult for topo " << pass);
766  } else {
767  auto thrName = tl.name().substr(0,pos);
768  int bit = std::stoi(tl.name().substr(pos+1));
769  thrMultiMap.try_emplace(thrName, 0);
770  thrMultiMap[thrName] += (pass << bit);
771  ATH_MSG_DEBUG(thrName << " MULT updated mult for topo " << pass);
772  }
773  }
774  }
775  }
776  }
777  for ( auto & thr : l1menu->thresholds() ) {
778  if (thr->type() == "TOPO" or thr->type() == "MULTTOPO" or thr->type() == "MUTOPO")
779  {
780  continue;
781  }
782  if( thr->type() == "ZDC" && m_doZDC ){
783  continue;
784  }
785  if( thr->name() == "NIMTRT" && m_doTRT ){
786  continue;
787  }
788  // get the multiplicity for each threshold
789  unsigned int multiplicity = calculateMultiplicity(*thr, l1menu, context);
790  // and record in threshold--> multiplicity map (to be used for item decision)
791  thrMultiMap[thr->name()] = multiplicity;
792  ATH_MSG_DEBUG( thr->name() << " MULT calculated mult for topo " << multiplicity);
793  }
794 
795  // internal triggers
796  auto bcid = context.eventID().bunch_crossing_id();
798  // force bunch group pattern from job options
799  for ( size_t bg = 0; bg < 16; ++bg ) {
800  std::string bgName("BGRP");
801  bgName += std::to_string(bg);
802  thrMultiMap[bgName] = ( m_bunchGroupPattern & (0x1<<bg) ) ? 1 : 0;
803  }
804  } else {
805  // use bunchgroup definition from configuration and pick according to the BCID
807  ATH_CHECK(bgkey.isValid());
808  const TrigConf::L1BunchGroupSet *l1bgs = *bgkey;
809  if (l1bgs)
810  {
811  for (size_t i = 0; i < l1bgs->maxNBunchGroups(); ++i)
812  {
813  std::shared_ptr<TrigConf::L1BunchGroup> bg = l1bgs->getBunchGroup(i);
814  thrMultiMap[std::string("BGRP") + std::to_string(i)] = bg->contains(bcid) ? 1 : 0;
815  }
816  }
817  else
818  {
819  ATH_MSG_ERROR("Did not find L1BunchGroupSet in DetectorStore");
820  }
821  }
822 
823  // all RNDM triggers run with 40MHz, so they are always in
824  thrMultiMap["RNDM0"] = 1;
825  thrMultiMap["RNDM1"] = 1;
826  thrMultiMap["RNDM2"] = 1;
827  thrMultiMap["RNDM3"] = 1;
828 
829  return StatusCode::SUCCESS;
830 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ fillInputHistograms()

StatusCode LVL1CTP::CTPSimulation::fillInputHistograms ( const EventContext &  context) const
private

Definition at line 421 of file CTPSimulation.cxx.

421  {
422 
423  ATH_MSG_DEBUG( "fillInputHistograms" );
424 
425  // jFEX jets
426  if( not m_iKeyJFexJets.empty() ) {
427  auto jFexJets = SG::makeHandle( m_iKeyJFexJets, context );
428  if(jFexJets.isValid()) {
429  get1DHist("/input/counts/jJets")->Fill(jFexJets->size());
430  auto h0 = *get1DHist("/input/jets/jJetPt"); // calling operator* to get the Guard outside the filling loop
431  auto h1 = *get1DHist("/input/jets/jJetEta");
432  auto h2 = *get1DHist("/input/jets/jJetPhi");
433  for( const auto jet : *jFexJets ) {
434  h0->Fill(fabs(jet->et8x8()/1000.));
435  h1->Fill(jet->eta());
436  h2->Fill(jet->phi());
437  }
438  } else {
439  ATH_MSG_DEBUG("No collection " << m_iKeyJFexJets);
440  }
441  }
442 
443  // jFEX large-R jets
444  if( not m_iKeyJFexLJets.empty() ) {
445  auto jFexLJets = SG::makeHandle( m_iKeyJFexLJets, context );
446  if(jFexLJets.isValid()) {
447  get1DHist("/input/counts/jLets")->Fill(jFexLJets->size());
448  auto h0 = *get1DHist("/input/jets/jLJetPt");
449  auto h1 = *get1DHist("/input/jets/jLJetEta");
450  auto h2 = *get1DHist("/input/jets/jLJetPhi");
451  for( const auto jet : *jFexLJets ) {
452  h0->Fill(fabs(jet->et8x8()/1000.));
453  h1->Fill(jet->eta());
454  h2->Fill(jet->phi());
455  }
456  } else {
457  ATH_MSG_DEBUG("No collection " << m_iKeyJFexLJets);
458  }
459  } else {
460  ATH_MSG_DEBUG("No collection " << m_iKeyJFexLJets);
461  }
462 
463  // gFEX jets
464  if( not m_iKeyGFexJets.empty() ) {
465  auto gFexJets = SG::makeHandle( m_iKeyGFexJets, context );
466  if(gFexJets.isValid()) {
467  get1DHist("/input/counts/gJets")->Fill(gFexJets->size());
468  auto h0 = *get1DHist("/input/jets/gJetPt");
469  auto h1 = *get1DHist("/input/jets/gJetEta");
470  auto h2 = *get1DHist("/input/jets/gJetPhi");
471  for( const auto jet : *gFexJets ) {
472  h0->Fill(fabs(jet->et8x8()/1000.));
473  h1->Fill(jet->eta());
474  h2->Fill(jet->phi());
475  }
476  } else {
477  ATH_MSG_DEBUG("No collection " << m_iKeyGFexJets);
478  }
479  }
480 
481  // MET
482  if( not m_iKeyGFexMETNC.empty() ) {
483  auto gFexMETPufit = SG::makeHandle( m_iKeyGFexMETNC, context );
484  if( gFexMETPufit.isValid() ) {
485  get1DHist("/input/met/Pufit")->Fill(gFexMETPufit->energyT()/1000.);
486  get1DHist("/input/met/PufitPhi")->Fill(atan2(gFexMETPufit->energyX(), gFexMETPufit->energyY()));
487  } else {
488  ATH_MSG_DEBUG("No collection " << m_iKeyGFexMETNC);
489  }
490  }
491 
492  if( not m_iKeyGFexMETRho.empty() ) {
493  auto gFexMETRho = SG::makeHandle( m_iKeyGFexMETRho, context );
494  if( gFexMETRho.isValid() ) {
495  get1DHist("/input/met/Rho")->Fill(gFexMETRho->energyT()/1000.);
496  get1DHist("/input/met/RhoPhi")->Fill(atan2(gFexMETRho->energyX(), gFexMETRho->energyY()));
497  } else {
498  ATH_MSG_DEBUG("No collection " << m_iKeyGFexMETRho);
499  }
500  }
501 
502  if( not m_iKeyGFexMETJwoJ.empty() ) {
503  auto gFexMETJwoJ = SG::makeHandle( m_iKeyGFexMETJwoJ, context );
504  if( gFexMETJwoJ.isValid() ) {
505  get1DHist("/input/met/JwoJ")->Fill(gFexMETJwoJ->energyT()/1000.);
506  get1DHist("/input/met/JwoJPhi")->Fill(atan2(gFexMETJwoJ->energyX(), gFexMETJwoJ->energyY()));
507  } else {
508  ATH_MSG_DEBUG("No collection " << m_iKeyGFexMETJwoJ);
509  }
510  }
511 
512  // EM cluster
513  if( not m_iKeyEFexCluster.empty() ) {
514  auto eFexCluster = SG::makeHandle( m_iKeyEFexCluster, context );
515  if( eFexCluster.isValid() ) {
516  get1DHist( "/input/counts/emcluster")->Fill(eFexCluster->size());
517  auto h0 = *get1DHist("/input/em/et");
518  auto h1 = *get1DHist("/input/em/eta");
519  auto h2 = *get1DHist("/input/em/phi");
520  for( const auto cl : *eFexCluster ) {
521  h0->Fill(cl->et());
522  h1->Fill(cl->eta());
523  h2->Fill(cl->phi());
524  }
525  } else {
526  ATH_MSG_DEBUG("No collection " << m_iKeyEFexCluster);
527  }
528  }
529 
530  // eFEX Tau
531  if( not m_iKeyEFexTau.empty() ) {
532  auto eFexTau = SG::makeHandle( m_iKeyEFexTau, context );
533  if( eFexTau.isValid() ) {
534  get1DHist( "/input/counts/taus")->Fill(eFexTau->size());
535  auto h0 = *get1DHist("/input/tau/et");
536  auto h1 = *get1DHist("/input/tau/eta");
537  auto h2 = *get1DHist("/input/tau/phi");
538  auto h3 = *get1DHist("/input/tau/emIso");
539  auto h4 = *get1DHist("/input/tau/hadIso");
540  auto h5 = *get1DHist("/input/tau/R3ClusterET");
541  auto h6 = *get1DHist("/input/tau/R3ClusterIso");
542  const static SG::AuxElement::ConstAccessor<float> accR3ClET ("R3ClusterET");
543  const static SG::AuxElement::ConstAccessor<float> accR3ClIso ("R3ClusterIso");
544  for( const auto tau : *eFexTau ) {
545  h0->Fill(tau->eT());
546  h1->Fill(tau->eta());
547  h2->Fill(tau->phi());
548  h3->Fill(tau->emIsol());
549  h4->Fill(tau->hadIsol());
550  h5->Fill(accR3ClET(*tau)/1000.);
551  h6->Fill(accR3ClIso(*tau));
552  }
553  } else {
554  ATH_MSG_DEBUG("No collection " << m_iKeyEFexTau);
555  }
556  }
557 
558  // topo
560  auto legacyTopoInput = SG::makeHandle( m_iKeyLegacyTopo, context );
561  if(legacyTopoInput.isValid()) {
562  ATH_MSG_DEBUG("Retrieved input from L1Topo from StoreGate with key " << m_iKeyTopo);
563  ATH_MSG_DEBUG("L1TopoLegacy0 word 0 is: 0x" << std::hex << std::setw( 8 ) << std::setfill( '0' ) << legacyTopoInput->cableWord1(0));
564  ATH_MSG_DEBUG("L1TopoLegacy0 word 1 is: 0x" << std::hex << std::setw( 8 ) << std::setfill( '0' ) << legacyTopoInput->cableWord1(1));
565  ATH_MSG_DEBUG("L1TopoLegacy1 word 0 is: 0x" << std::hex << std::setw( 8 ) << std::setfill( '0' ) << legacyTopoInput->cableWord2(0));
566  ATH_MSG_DEBUG("L1TopoLegacy1 word 1 is: 0x" << std::hex << std::setw( 8 ) << std::setfill( '0' ) << legacyTopoInput->cableWord2(1));
567  auto h0 = *get1DHist("/input/topo/LegacyTopo0");
568  auto h1 = *get1DHist("/input/topo/LegacyTopo1");
569  for(unsigned int i=0; i<32; ++i) {
570  uint32_t mask = 0x1; mask <<= i;
571  if( (legacyTopoInput->cableWord1(0) & mask) != 0 ) h0->Fill(i); // cable 0, clock 0
572  if( (legacyTopoInput->cableWord1(1) & mask) != 0 ) h0->Fill(32 + i); // cable 0, clock 1
573  if( (legacyTopoInput->cableWord2(0) & mask) != 0 ) h1->Fill(i); // cable 1, clock 0
574  if( (legacyTopoInput->cableWord2(1) & mask) != 0 ) h1->Fill(32 + i); // cable 1, clock 1
575  }
576  }
577  }
578 
579  if( not m_iKeyTopo.empty() && m_doL1Topo ) {
580  auto topoInput = SG::makeHandle( m_iKeyTopo, context );
581  if(topoInput.isValid()) {
582  ATH_MSG_DEBUG("Retrieved input from L1Topo from StoreGate with key " << m_iKeyTopo);
583  ATH_MSG_DEBUG("L1Topo0 word 0 is: 0x" << std::hex << std::setw( 8 ) << std::setfill( '0' ) << topoInput->cableWord1(0));
584  ATH_MSG_DEBUG("L1Topo0 word 1 is: 0x" << std::hex << std::setw( 8 ) << std::setfill( '0' ) << topoInput->cableWord1(1));
585  ATH_MSG_DEBUG("L1Topo1 word 0 is: 0x" << std::hex << std::setw( 8 ) << std::setfill( '0' ) << topoInput->cableWord2(0));
586  ATH_MSG_DEBUG("L1Topo1 word 1 is: 0x" << std::hex << std::setw( 8 ) << std::setfill( '0' ) << topoInput->cableWord2(1));
587  auto h0 = *get1DHist("/input/topo/Topo2El");
588  auto h1 = *get1DHist("/input/topo/Topo3El");
589  for(unsigned int i=0; i<32; ++i) {
590  uint32_t mask = 0x1; mask <<= i;
591  if( (topoInput->cableWord1(0) & mask) != 0 ) h0->Fill(i); // cable 0, clock 0
592  if( (topoInput->cableWord1(1) & mask) != 0 ) h0->Fill(32 + i); // cable 0, clock 1
593  if( (topoInput->cableWord2(0) & mask) != 0 ) h1->Fill(i); // cable 1, clock 0
594  if( (topoInput->cableWord2(1) & mask) != 0 ) h1->Fill(32 + i); // cable 1, clock 1
595  }
596  auto h2 = *get1DHist("/input/topo/Topo1Opt0");
597  auto h3 = *get1DHist("/input/topo/Topo1Opt1");
598  auto h4 = *get1DHist("/input/topo/Topo1Opt2");
599  auto h5 = *get1DHist("/input/topo/Topo1Opt3");
600  for(unsigned int i=0; i<128; i += 3) {
601  std::bitset<128> mask = 0x11; mask <<= i;
602  if( (topoInput->optcableWord("Topo1Opt0") & mask) != 0 ) h2->Fill(i); //
603  if( (topoInput->optcableWord("Topo1Opt1") & mask) != 0 ) h3->Fill(i); //
604  if( (topoInput->optcableWord("Topo1Opt2") & mask) != 0 ) h4->Fill(i); //
605  if( (topoInput->optcableWord("Topo1Opt3") & mask) != 0 ) h5->Fill(i); //
606  }
607  } else {
608  ATH_MSG_DEBUG("No collection " << m_iKeyTopo);
609  }
610  }
611 
612  // bcid
613  auto bcid = context.eventID().bunch_crossing_id();
614  get1DHist( "/bcid")->Fill(bcid);
615 
616  return StatusCode::SUCCESS;
617 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ get1DHist()

LockedHandle< TH1 > & LVL1CTP::CTPSimulation::get1DHist ( const std::string &  histName) const
private

Definition at line 253 of file CTPSimulation.cxx.

253  {
254  auto itr = m_hist1D.find(histName);
255  if (itr == m_hist1D.end()) {
256  throw GaudiException("1D-hist "+histName +" does not exist", name(), StatusCode::FAILURE);
257  }
258  // returning non-const LockHandle from const function is OK:
259  LockedHandle<TH1>& h ATLAS_THREAD_SAFE = const_cast<LockedHandle<TH1>&>(itr->second);
260  return h;
261 }

◆ get2DHist()

LockedHandle< TH2 > & LVL1CTP::CTPSimulation::get2DHist ( const std::string &  histName) const
private

Definition at line 264 of file CTPSimulation.cxx.

264  {
265  auto itr = m_hist2D.find(histName);
266  if (itr == m_hist2D.end()) {
267  throw GaudiException("2D-hist "+histName +" does not exist", name(), StatusCode::FAILURE);
268  }
269  // returning non-const LockHandle from const function is OK:
270  LockedHandle<TH2>& h ATLAS_THREAD_SAFE = const_cast<LockedHandle<TH2>&>(itr->second);
271  return h;
272 }

◆ getBaseHistPath()

std::string LVL1CTP::CTPSimulation::getBaseHistPath ( ) const
private

Definition at line 197 of file CTPSimulation.cxx.

197  {
198  std::string baseHistPath( m_histPath );
199  if(baseHistPath.back()!='/') baseHistPath += "/";
200  baseHistPath += name();
201  return baseHistPath;
202 }

◆ hbook() [1/2]

StatusCode LVL1CTP::CTPSimulation::hbook ( const std::string &  path,
std::unique_ptr< TH1 >  hist 
)
private

Definition at line 205 of file CTPSimulation.cxx.

205  {
206  const std::string & hname(hist->GetName());
207 
208  std::string key(path);
209  if(key.back()!='/') key += "/";
210  key+=hname;
211 
212  if(m_hist1D.find(key)!=m_hist1D.end()) {
213  ATH_MSG_WARNING("1D-hist " << key << " already exists, won't register it");
214  return StatusCode::RECOVERABLE;
215  }
216 
217  LockedHandle<TH1> lh;
218  StatusCode sc = m_histSvc->regShared( getBaseHistPath() + key, std::move(hist), lh );
219  if( sc.isSuccess() ) {
220  ATH_MSG_DEBUG("1D-hist " << hname << " registered with key - " << key);
221  m_hist1D[key] = lh;
222  } else {
223  ATH_MSG_WARNING("Could not register histogram " << hname);
224  }
225  return sc;
226 }

◆ hbook() [2/2]

StatusCode LVL1CTP::CTPSimulation::hbook ( const std::string &  path,
std::unique_ptr< TH2 >  hist 
)
private

Definition at line 229 of file CTPSimulation.cxx.

229  {
230  const std::string & hname(hist->GetName());
231 
232  std::string key(path);
233  if(key.back()!='/') key += "/";
234  key+=hname;
235 
236  if(m_hist2D.find(key)!=m_hist2D.end()) {
237  ATH_MSG_WARNING("2D-hist " << key << " already exists, won't register it");
238  return StatusCode::RECOVERABLE;
239  }
240 
241  LockedHandle<TH2> lh;
242  StatusCode sc = m_histSvc->regShared( getBaseHistPath() + key, std::move(hist), lh );
243  if( sc.isSuccess() ) {
244  ATH_MSG_DEBUG("2D-hist " << hname << " registered with key - " << key);
245  m_hist2D[key] = lh;
246  } else {
247  ATH_MSG_WARNING("Could not register histogram " << hname);
248  }
249  return sc;
250 }

◆ initialize()

StatusCode LVL1CTP::CTPSimulation::initialize ( )
overridevirtual

Definition at line 55 of file CTPSimulation.cxx.

55  {
56 
57  ATH_MSG_DEBUG("initialize");
59  ATH_MSG_INFO("Will use bunchgroup pattern 0x" << std::hex << m_bunchGroupPattern);
60  } else {
61  ATH_MSG_INFO("Will use bunchgroup definition from bunchgroup set");
62  }
63 
64  if( m_isData ) {
65  CHECK( m_oKeyRDO.assign(LVL1CTP::DEFAULT_RDOOutputLocation_Rerun) );
66  CHECK( m_oKeySLink.assign(LVL1CTP::DEFAULT_CTPSLinkLocation_Rerun) );
67  }
69 
70  // data links
73 
74  // Legacy L1Calo
79 
80  // new L1Calo
81  ATH_CHECK( m_iKeyJFexJets.initialize( ! m_iKeyJFexJets.empty() ) );
82  ATH_CHECK( m_iKeyJFexLJets.initialize( ! m_iKeyJFexLJets.empty() ) );
83  ATH_CHECK( m_iKeyGFexJets.initialize( ! m_iKeyGFexJets.empty() ) );
84  ATH_CHECK( m_iKeyGFexMETNC.initialize( ! m_iKeyGFexMETNC.empty() ) );
85  ATH_CHECK( m_iKeyGFexMETRho.initialize( ! m_iKeyGFexMETRho.empty() ) );
86  ATH_CHECK( m_iKeyGFexMETJwoJ.initialize( ! m_iKeyGFexMETJwoJ.empty() ) );
87  ATH_CHECK( m_iKeyEFexCluster.initialize( ! m_iKeyEFexCluster.empty() ) );
88  ATH_CHECK( m_iKeyEFexTau.initialize( ! m_iKeyEFexTau.empty() ) );
90  ATH_CHECK( m_oKeySLink.initialize( ! m_oKeySLink.empty() ) );
91 
92  // L1ZDC
94 
95  // L1TRT
97 
98  // services
99  ATH_CHECK( m_histSvc.retrieve() );
100 
101  // tools
102  ATH_CHECK( m_resultBuilder.retrieve() );
103 
104  ATH_MSG_DEBUG("Registering histograms under " << getBaseHistPath() << " in " << m_histSvc);
105 
106  return StatusCode::SUCCESS;
107 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ setHistLabels()

StatusCode LVL1CTP::CTPSimulation::setHistLabels ( const TrigConf::L1Menu l1menu)
private

Definition at line 275 of file CTPSimulation.cxx.

275  {
276 
277  ATH_MSG_DEBUG("setHistLabels(). L1 menu " << l1menu.size() << " items" );
278  // threshold multiplicities
286 
287  // Topo
288  std::vector<std::string> connNames = l1menu.connectorNames();
289  for( const std::string connName : {"LegacyTopo0", "LegacyTopo1", "Topo1El", "Topo2El", "Topo3El", "Topo1Opt0", "Topo1Opt1", "Topo1Opt2", "Topo1Opt3"}) {
290  if( find(connNames.begin(), connNames.end(), connName) == connNames.end() ) {
291  continue;
292  }
293  auto hTopo = *get1DHist("/input/topo/" + connName);
294  for(uint fpga : {0,1}) {
295  for(uint clock : {0,1}) {
296  for(auto & tl : l1menu.connector(connName).triggerLines(fpga,clock)) {
297  uint flatIndex = tl.flatindex();
298  hTopo->GetXaxis()->SetBinLabel(flatIndex+1,tl.name().c_str());
299  }
300  }
301  }
302  }
303 
304  std::vector<std::string> orderedItemnames;
305  orderedItemnames.reserve( l1menu.size() );
306  for( const auto & item : l1menu ) {
307  orderedItemnames.emplace_back(item.name());
308  }
309  std::sort(orderedItemnames.begin(), orderedItemnames.end());
310 
311  // item decision
312  auto tbpById = *get1DHist( "/output/tbpById" );
313  auto tapById = *get1DHist( "/output/tapById" );
314  auto tavById = *get1DHist( "/output/tavById" );
315  auto tbpByName = *get1DHist( "/output/tbpByName" );
316  auto tapByName = *get1DHist( "/output/tapByName" );
317  auto tavByName = *get1DHist( "/output/tavByName" );
318  unsigned int bin = 1;
319  for ( const std::string & itemname : orderedItemnames ) {
320  unsigned int ctpId(0);
321  TrigConf::L1Item item = l1menu.item( itemname );
322  ctpId = item.ctpId();
323  tbpById->GetXaxis()->SetBinLabel( ctpId+1, itemname.c_str() );
324  tapById->GetXaxis()->SetBinLabel( ctpId+1, itemname.c_str() );
325  tavById->GetXaxis()->SetBinLabel( ctpId+1, itemname.c_str() );
326  tbpByName->GetXaxis()->SetBinLabel( bin, itemname.c_str() );
327  tapByName->GetXaxis()->SetBinLabel( bin, itemname.c_str() );
328  tavByName->GetXaxis()->SetBinLabel( bin++, itemname.c_str() );
329  }
330 
331  return StatusCode::SUCCESS;
332 }

◆ setMultiplicityHistLabels()

StatusCode LVL1CTP::CTPSimulation::setMultiplicityHistLabels ( const TrigConf::L1Menu l1menu,
const std::string &  type 
)
private

Definition at line 165 of file CTPSimulation.cxx.

165  {
166  StatusCode sc;
167  std::map<std::string,std::vector<std::string>> typeMapping = {
168  { "muon", {"MU"} },
169  { "jet", {"JET", "jJ", "jLJ", "gJ", "gLJ"} },
170  { "xe", {"XE", "gXE", "jXE"} },
171  { "te", {"TE", "jTE", "gTE"} },
172  { "xs", {"XS"} },
173  { "em", {"EM", "eEM", "jEM"} },
174  { "tau", {"TAU", "eTAU", "jTAU", "cTAU"} }
175  };
176 
177 
178  std::vector<TrigConf::L1Threshold> thrV;
179  for( const std::string & t : typeMapping[type] ) {
180  try {
181  auto hist = get2DHist( "/multi/" + type + "/" + t + "Mult" );
182  auto & thrV = l1menu.thresholds(t);
183  while( hist->GetNbinsX() < (int)thrV.size() ) {
184  hist->LabelsInflate("xaxis");
185  }
186  for(auto thr : thrV) {
187  hist->GetXaxis()->SetBinLabel(thr->mapping()+1, thr->name().c_str() );
188  }
189  } catch (std::exception & ex) {
190  ATH_MSG_DEBUG("Caught exception when setting new JSON MultiplicityHistLabel " << t << " : " << ex.what());
191  }
192  }
193  return sc;
194 }

◆ simulateItems()

StatusCode LVL1CTP::CTPSimulation::simulateItems ( const std::map< std::string, unsigned int > &  thrMultiMap,
const EventContext &  context 
) const
private

Definition at line 1129 of file CTPSimulation.cxx.

1131 {
1132 
1133  std::vector<uint32_t> tip;
1134  CHECK( m_resultBuilder->constructTIPVector( thrMultiMap, tip ) );
1135 
1136  std::map<std::string, unsigned int> itemDecisionMap;
1137  CLHEP::HepRandomEngine* rndmEngine = m_RNGEngines.getEngine( context );
1138  CHECK( m_resultBuilder->buildItemDecision(thrMultiMap, itemDecisionMap, rndmEngine) );
1139 
1140  std::vector<uint32_t> tbp;
1141  std::vector<uint32_t> tap;
1142  std::vector<uint32_t> tav;
1143  unsigned char triggerType(0);
1144  CHECK( m_resultBuilder->constructResultVectors( itemDecisionMap, tbp, tap, tav, triggerType ) );
1145 
1146  // Create a fixed vector of 6 extra words to allow for inserting prescale change information
1147  // when running a partition with preloaded data, see ATR-24654
1148  const std::vector<uint32_t> extra(size_t{6}, uint32_t{0});
1149 
1150  auto eventID = context.eventID();
1151  std::unique_ptr<CTP_RDO> rdo = m_resultBuilder->constructRDOResult( eventID, tbp, tap, tav, tip, extra );
1152  std::unique_ptr<CTPSLink> roi = m_resultBuilder->constructRoIResult( eventID, tbp, tap, tav, tip, extra, triggerType );
1153 
1154  // create CTP output format and store in the event
1155  auto rdoWriteHandle = SG::makeHandle( m_oKeyRDO, context );
1156  auto sLinkWriteHandle = SG::makeHandle( m_oKeySLink, context );
1157  ATH_CHECK( rdoWriteHandle.record( std::move(rdo) ));
1158  ATH_CHECK( sLinkWriteHandle.record( std::move(roi) ));
1159 
1160  // fill histograms with item simulation results
1161  {
1162  auto tbpById = *get1DHist( "/output/tbpById" );
1163  auto tapById = *get1DHist( "/output/tapById" );
1164  auto tavById = *get1DHist( "/output/tavById" );
1165  for( unsigned int ctpId= 0; ctpId < 512; ++ctpId ) {
1166  unsigned int wordNr = ctpId / 32;
1167  unsigned int posWithinWord = ctpId % 32;
1168  auto mask = 1L << posWithinWord;
1169  if( 0 != (tbp[wordNr] & mask) ) {
1170  tbpById->Fill( ctpId );
1171  }
1172  if( 0 != (tap[wordNr] & mask) ) {
1173  tapById->Fill( ctpId );
1174  }
1175  if( 0 != (tav[wordNr] & mask) ) {
1176  tavById->Fill( ctpId );
1177  }
1178  }
1179  }
1180  return StatusCode::SUCCESS;
1181 }

◆ start()

StatusCode LVL1CTP::CTPSimulation::start ( )
overridevirtual

Definition at line 110 of file CTPSimulation.cxx.

110  {
111 
112  const TrigConf::L1Menu * l1menu = nullptr;
114 
115  bookHists().ignore();
116 
117  // configure the CTP ResultBuilder
118  ATH_CHECK( m_resultBuilder->setConfiguration( *l1menu ) );
119  setHistLabels(*l1menu).ignore();
120 
121  return StatusCode::SUCCESS;
122 }

◆ stop()

StatusCode LVL1CTP::CTPSimulation::stop ( )
overridevirtual

Definition at line 1185 of file CTPSimulation.cxx.

1185  {
1186 
1187  const TrigConf::L1Menu * l1menu = nullptr;
1189 
1190  constexpr unsigned int sizeOfCTPOutput = 512;
1191 
1192  unsigned int tbp[sizeOfCTPOutput];
1193  unsigned int tap[sizeOfCTPOutput];
1194  unsigned int tav[sizeOfCTPOutput];
1195  {
1196  auto h = *get1DHist( "/output/tbpById" );
1197  for( unsigned int id = 0; id < sizeOfCTPOutput; ++id ) tbp[id] = h->GetBinContent(id+1);
1198  }
1199  {
1200  auto h = *get1DHist( "/output/tapById" );
1201  for( unsigned int id = 0; id < sizeOfCTPOutput; ++id ) tap[id] = h->GetBinContent(id+1);
1202  }
1203  {
1204  auto h = *get1DHist( "/output/tavById" );
1205  for( unsigned int id = 0; id < sizeOfCTPOutput; ++id ) tav[id] = h->GetBinContent(id+1);
1206  }
1207 
1208  // fill the byName TAV histograms from the byID ones
1209  {
1210  auto htbp = *get1DHist( "/output/tbpByName" );
1211  auto htap = *get1DHist( "/output/tapByName" );
1212  auto htav = *get1DHist( "/output/tavByName" );
1213  for( auto & item : *l1menu ) {
1214  unsigned int ctpId = item.ctpId();
1215  htbp->Fill( item.name().c_str(), tbp[ctpId]);
1216  htap->Fill( item.name().c_str(), tap[ctpId]);
1217  htav->Fill( item.name().c_str(), tav[ctpId]);
1218  }
1219  htbp->Sumw2(0);
1220  htap->Sumw2(0);
1221  htav->Sumw2(0);
1222  htbp->LabelsDeflate();
1223  htap->LabelsDeflate();
1224  htav->LabelsDeflate();
1225 
1226  }
1227 
1228  // fill the threshold summary hists
1229  {
1230  // run 2 thresholds (legacy + muon)
1231  std::vector<std::string> thrHists{ "em/EM", "muon/MU", "tau/TAU", "jet/JET", "xe/XE", "te/TE", "xs/XS" };
1232  auto hist = * get2DHist( "/multi/all/LegacyMult" );
1233  for(const std::string & histpath : thrHists) {
1234  auto h = * get2DHist( "/multi/" + histpath + "Mult" );
1235  auto xaxis = h->GetXaxis();
1236  size_t xsize = xaxis->GetNbins();
1237  size_t ysize = h->GetNbinsY();
1238  for(size_t x = 1; x<xsize; x++) {
1239  std::string s("");
1240  for(size_t y = 1; y<=ysize; y++) {
1241  size_t binContent = h->GetBinContent(x,y);
1242  hist->Fill(xaxis->GetBinLabel(x),y-1,binContent);
1243  s += std::to_string(binContent) + " ";
1244  }
1245  ATH_MSG_DEBUG( "REGTEST CTPSim " << xaxis->GetBinLabel(x) << " MULT " << s);
1246  }
1247  }
1248  hist->Sumw2(0);
1249  hist->LabelsDeflate();
1250  }
1251  {
1252  // run 3 thresholds
1253  auto hist = * get2DHist( "/multi/all/R3Mult" );
1254  std::vector<std::string> thrHists = { "em/eEM", "em/jEM", "muon/MU", "tau/eTAU", "tau/jTAU", "tau/cTAU", "jet/jJ", "jet/jLJ", "jet/gJ", "jet/gLJ", "xe/gXE", "xe/jXE", "te/jTE", "te/gTE" };
1255  for(const std::string & histpath : thrHists) {
1256  auto h = * get2DHist( "/multi/" + histpath + "Mult" );
1257  auto xaxis = h->GetXaxis();
1258  size_t xsize = xaxis->GetNbins();
1259  size_t ysize = h->GetNbinsY();
1260  for(size_t x = 1; x<=xsize; x++) {
1261  std::string s("");
1262  for(size_t y = 1; y<=ysize; y++) {
1263  size_t binContent = h->GetBinContent(x,y);
1264  hist->Fill(xaxis->GetBinLabel(x) ,y-1, binContent);
1265  s += std::to_string(binContent) + " ";
1266  }
1267  ATH_MSG_DEBUG( "REGTEST CTPSim " << xaxis->GetBinLabel(x) << " MULT " << s);
1268  }
1269  }
1270  hist->Sumw2(0);
1271  hist->LabelsDeflate();
1272  }
1273 
1274  if ( msgLvl(MSG::DEBUG) ) {
1275  for( auto & item : *l1menu ) {
1276  ATH_MSG_DEBUG( "REGTEST CTPSim " << item.name() << " " << item.ctpId() <<
1277  " TBP " << tbp[item.ctpId()] <<
1278  " TAP " << tap[item.ctpId()] <<
1279  " TAV " << tav[item.ctpId()]);
1280  }
1281  }
1282  return StatusCode::SUCCESS;
1283 }

◆ storeMetadata()

StatusCode LVL1CTP::CTPSimulation::storeMetadata ( )
private

Definition at line 1290 of file CTPSimulation.cxx.

1290  {
1291  std::vector<std::string> storedPaths;
1292  for( auto & entry : m_hist1D ) {
1293  storedPaths.push_back( getBaseHistPath() + entry.first);
1294  }
1295  for( auto & entry : m_hist2D ) {
1296  storedPaths.push_back( getBaseHistPath() + entry.first);
1297  }
1298  std::scoped_lock<std::mutex> metadataLock(s_metadataMutex);
1299  for (const auto & path : storedPaths) {
1300  size_t pos = path.find_last_of('/');
1301  auto splitPath = std::make_pair(path.substr(0, pos), path.substr(pos + 1));
1302  std::string treePath = splitPath.first + "/metadata";
1303  std::string interval("run");
1304  char triggerData[] = "<none>";
1305  const std::string mergeDataStr = "<default>";
1306  std::vector<char> mergeData{mergeDataStr.begin(), mergeDataStr.end()};
1307  mergeData.push_back('\0');
1308  interval = "run";
1309  if (!m_histSvc->existsTree(treePath)) {
1310  auto tree = std::make_unique<TTree>("metadata", "Monitoring Metadata");
1311  tree->SetDirectory(nullptr);
1312  tree->Branch("Name", &(splitPath.second[0]), "Name/C");
1313  tree->Branch("Interval", &(interval[0]), "Interval/C");
1314  tree->Branch("TriggerChain", triggerData, "TriggerChain/C");
1315  tree->Branch("MergeMethod", mergeData.data(), "MergeMethod/C");
1316  tree->Fill();
1317  if (!m_histSvc->regTree(treePath, std::move(tree))) {
1318  MsgStream log(Athena::getMessageSvc(), "OfflineHistogramProvider");
1319  log << MSG::ERROR
1320  << "Failed to register DQ metadata TTree " << treePath << endmsg;
1321  }
1322  } else {
1323  TTree *tree{nullptr};
1324  if (m_histSvc->getTree(treePath, tree).isSuccess()) {
1325  tree->SetBranchAddress("Name", &(splitPath.second[0]));
1326  tree->SetBranchAddress("Interval", &(interval[0]));
1327  tree->SetBranchAddress("TriggerChain", triggerData);
1328  tree->SetBranchAddress("MergeMethod", mergeData.data());
1329  tree->Fill();
1330  } else {
1331  MsgStream log(Athena::getMessageSvc(), "OfflineHistogramProvider");
1332  log << MSG::ERROR
1333  << "Failed to retrieve DQ metadata TTree " << treePath << " which is reported to exist" << endmsg;
1334  }
1335  }
1336  }
1337  return StatusCode::SUCCESS;
1338 }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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_bgKey

SG::ReadCondHandleKey<TrigConf::L1BunchGroupSet> LVL1CTP::CTPSimulation::m_bgKey {this, "L1BunchGroup", "L1BunchGroup", "L1BunchGroupSet key name"}
private

Definition at line 168 of file CTPSimulation.h.

◆ m_bunchGroupPattern

Gaudi::Property<unsigned int> LVL1CTP::CTPSimulation::m_bunchGroupPattern { this, "BunchGroupPattern", 0x0003, "Bunchgroup pattern applied at every event, useful for simulation. Bit x corresponds to bunchgroup x" }
private

Definition at line 161 of file CTPSimulation.h.

◆ m_decoder

LVL1::CPRoIDecoder* LVL1CTP::CTPSimulation::m_decoder { nullptr }
private

Definition at line 170 of file CTPSimulation.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doL1CaloLegacy

Gaudi::Property<bool> LVL1CTP::CTPSimulation::m_doL1CaloLegacy { this, "DoL1CaloLegacy", false, "Use L1Calo legacy" }
private

Definition at line 163 of file CTPSimulation.h.

◆ m_doL1Topo

Gaudi::Property<bool> LVL1CTP::CTPSimulation::m_doL1Topo { this, "DoL1Topo", false, "Use L1Topo" }
private

Definition at line 164 of file CTPSimulation.h.

◆ m_doL1TopoLegacy

Gaudi::Property<bool> LVL1CTP::CTPSimulation::m_doL1TopoLegacy { this, "DoL1TopoLegacy", false, "Use L1Topo Legacy" }
private

Definition at line 165 of file CTPSimulation.h.

◆ m_doTRT

Gaudi::Property<bool> LVL1CTP::CTPSimulation::m_doTRT {this, "DoTRT", false, "emulate CTP with TRT included"}
private

Definition at line 159 of file CTPSimulation.h.

◆ m_doZDC

Gaudi::Property<bool> LVL1CTP::CTPSimulation::m_doZDC {this, "DoZDC", false, "emulate CTP with ZDC included"}
private

Definition at line 158 of file CTPSimulation.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_forceBunchGroupPattern

Gaudi::Property<bool> LVL1CTP::CTPSimulation::m_forceBunchGroupPattern { this, "ForceBunchGroupPattern", true, "When true, ignore the bunchgroups and use the provided BunchGroupPattern" }
private

Definition at line 160 of file CTPSimulation.h.

◆ m_hist1D

std::map<std::string, LockedHandle<TH1> > LVL1CTP::CTPSimulation::m_hist1D
private

Definition at line 119 of file CTPSimulation.h.

◆ m_hist2D

std::map<std::string, LockedHandle<TH2> > LVL1CTP::CTPSimulation::m_hist2D
private

Definition at line 120 of file CTPSimulation.h.

◆ m_histPath

Gaudi::Property<std::string> LVL1CTP::CTPSimulation::m_histPath { this, "HistPath", "/EXPERT/L1", "Booking path for the histogram" }
private

Definition at line 157 of file CTPSimulation.h.

◆ m_histSvc

ServiceHandle<ITHistSvc> LVL1CTP::CTPSimulation::m_histSvc { this, "THistSvc", "THistSvc/THistSvc", "Histogramming svc" }
private

Definition at line 111 of file CTPSimulation.h.

◆ m_iKeyCtpinEM

SG::ReadHandleKey<LVL1::EmTauCTP> LVL1CTP::CTPSimulation::m_iKeyCtpinEM { this, "CtpinEMInput", LVL1::TrigT1CaloDefs::EmTauCTPLocation, "Input from CTPIN em and tau (legacy)" }
private

Definition at line 130 of file CTPSimulation.h.

◆ m_iKeyCtpinJet

SG::ReadHandleKey<LVL1::JetCTP> LVL1CTP::CTPSimulation::m_iKeyCtpinJet { this, "CtpinJetInput", LVL1::TrigT1CaloDefs::JetCTPLocation, "Input from CTPIN jet (legacy)" }
private

Definition at line 131 of file CTPSimulation.h.

◆ m_iKeyCtpinXE

SG::ReadHandleKey<LVL1::EnergyCTP> LVL1CTP::CTPSimulation::m_iKeyCtpinXE { this, "CtpinXEInput", LVL1::TrigT1CaloDefs::EnergyCTPLocation, "Input from CTPIN energy (te,xe,xs - legacy)" }
private

Definition at line 132 of file CTPSimulation.h.

◆ m_iKeyEFexCluster

SG::ReadHandleKey< xAOD::TrigEMClusterContainer > LVL1CTP::CTPSimulation::m_iKeyEFexCluster { this, "eFexClusterInput", "SClusterCl", "Input list of eFEX cluster" }
private

Definition at line 143 of file CTPSimulation.h.

◆ m_iKeyEFexTau

SG::ReadHandleKey< xAOD::EmTauRoIContainer > LVL1CTP::CTPSimulation::m_iKeyEFexTau { this, "eFexTauInput", "SClusterTau", "Input list of eFEX tau" }
private

Definition at line 144 of file CTPSimulation.h.

◆ m_iKeyGFexJets

SG::ReadHandleKey< xAOD::JetRoIContainer > LVL1CTP::CTPSimulation::m_iKeyGFexJets { this, "gFexJetInput", "gL1Jets", "Input list of gFEX jets" }
private

Definition at line 138 of file CTPSimulation.h.

◆ m_iKeyGFexMETJwoJ

SG::ReadHandleKey< xAOD::EnergySumRoI > LVL1CTP::CTPSimulation::m_iKeyGFexMETJwoJ { this, "gFexMETJwoJInput", "gXEJWOJPerf", "Input list of gFEX MET JwoJ" }
private

Definition at line 141 of file CTPSimulation.h.

◆ m_iKeyGFexMETNC

SG::ReadHandleKey< xAOD::EnergySumRoI > LVL1CTP::CTPSimulation::m_iKeyGFexMETNC { this, "gFexMETNCInput", "gXENOISECUTPerf", "Input list of gFEX MET NC" }
private

Definition at line 139 of file CTPSimulation.h.

◆ m_iKeyGFexMETRho

SG::ReadHandleKey< xAOD::EnergySumRoI > LVL1CTP::CTPSimulation::m_iKeyGFexMETRho { this, "gFexMETRhoInput", "gXERHOPerf", "Input list of gFEX MET Rho" }
private

Definition at line 140 of file CTPSimulation.h.

◆ m_iKeyJFexJets

SG::ReadHandleKey< xAOD::JetRoIContainer > LVL1CTP::CTPSimulation::m_iKeyJFexJets { this, "jFexJetInput", "jRoundJets", "Input list of jFEX jets" }
private

Definition at line 135 of file CTPSimulation.h.

◆ m_iKeyJFexLJets

SG::ReadHandleKey< xAOD::JetRoIContainer > LVL1CTP::CTPSimulation::m_iKeyJFexLJets { this, "jFexLJetInput", "jRoundLargeRJets", "Input list of jFEX large-R jets" }
private

Definition at line 136 of file CTPSimulation.h.

◆ m_iKeyLegacyTopo

SG::ReadHandleKey<LVL1::FrontPanelCTP> LVL1CTP::CTPSimulation::m_iKeyLegacyTopo { this, "LegacyTopoInput", LVL1::DEFAULT_L1TopoLegacyCTPLocation, "Input from legacy topo" }
private

Definition at line 126 of file CTPSimulation.h.

◆ m_iKeyMuctpi

SG::ReadHandleKey<LVL1::MuCTPICTP> LVL1CTP::CTPSimulation::m_iKeyMuctpi { this, "MuctpiInput", LVL1MUCTPI::DEFAULT_MuonCTPLocation, "Input from Muctpi" }
private

Definition at line 128 of file CTPSimulation.h.

◆ m_iKeyTopo

SG::ReadHandleKey<LVL1::FrontPanelCTP> LVL1CTP::CTPSimulation::m_iKeyTopo { this, "TopoInput", LVL1::DEFAULT_L1TopoCTPLocation, "Input from topo" }
private

Definition at line 124 of file CTPSimulation.h.

◆ m_iKeyTRT

SG::ReadHandleKey<LVL1::TrtCTP> LVL1CTP::CTPSimulation::m_iKeyTRT {this, "TrtInput", LVL1::DEFAULT_TrtCTPLocation, "Input from Trt"}
private

Definition at line 148 of file CTPSimulation.h.

◆ m_iKeyZDC

SG::ReadHandleKey<LVL1::ZdcCTP> LVL1CTP::CTPSimulation::m_iKeyZDC {this, "ZdcInput", LVL1::TrigT1CaloDefs::ZdcCTPLocation, "Input from Zdc"}
private

Definition at line 146 of file CTPSimulation.h.

◆ m_isData

Gaudi::Property<bool> LVL1CTP::CTPSimulation::m_isData { this, "IsData", false, "emulate CTP as part of MC or rerun on data" }
private

Definition at line 156 of file CTPSimulation.h.

◆ m_jetDecoder

LVL1::JEPRoIDecoder* LVL1CTP::CTPSimulation::m_jetDecoder { nullptr }
private

Definition at line 171 of file CTPSimulation.h.

◆ m_muonRun2Format

Gaudi::Property<bool> LVL1CTP::CTPSimulation::m_muonRun2Format { this, "MuonMultiplicityRun2Format", false, "Interpret muon multiplicity in Run 2 format (bit 0 unused)" }
private

Definition at line 166 of file CTPSimulation.h.

◆ m_oKeyRDO

SG::WriteHandleKey<CTP_RDO> LVL1CTP::CTPSimulation::m_oKeyRDO {this, "RDOOutput", LVL1CTP::DEFAULT_RDOOutputLocation, "Output of CTP RDO object (sim)"}
private

Definition at line 151 of file CTPSimulation.h.

◆ m_oKeySLink

SG::WriteHandleKey<CTPSLink> LVL1CTP::CTPSimulation::m_oKeySLink {this, "ROIOutput", LVL1CTP::DEFAULT_CTPSLinkLocation, "Output of CTP SLink object (sim)"}
private

Definition at line 152 of file CTPSimulation.h.

◆ m_resultBuilder

ToolHandle<LVL1CTP::ResultBuilder> LVL1CTP::CTPSimulation::m_resultBuilder { this, "ResultBuilder", "LVL1CTP__ResultBuilder/ResultBuilder", "Builds the CTP result" }
private

Definition at line 113 of file CTPSimulation.h.

◆ m_RNGEngines

ATHRNG::RNGWrapper LVL1CTP::CTPSimulation::m_RNGEngines
private

Definition at line 116 of file CTPSimulation.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
LVL1CTP::CTPSimulation::m_resultBuilder
ToolHandle< LVL1CTP::ResultBuilder > m_resultBuilder
Definition: CTPSimulation.h:113
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TrigConf::DataStructure::data
const ptree & data() const
Access to the underlying data, if needed.
Definition: DataStructure.h:83
TrigConf::L1Threshold::mapping
unsigned int mapping() const
Accessor to the mapping number The mapping is unique within a type.
Definition: L1ThresholdBase.h:163
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
test_pyathena.eta
eta
Definition: test_pyathena.py:10
TileDCSDataPlotter.h0
h0
Definition: TileDCSDataPlotter.py:873
DiTauMassTools::TauTypes::lh
@ lh
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:53
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
LVL1CTP::CTPSimulation::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Definition: CTPSimulation.h:111
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
LVL1CTP::CTPSimulation::m_iKeyJFexJets
SG::ReadHandleKey< xAOD::JetRoIContainer > m_iKeyJFexJets
Definition: CTPSimulation.h:135
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
checkCorrelInHIST.histpath
histpath
Definition: checkCorrelInHIST.py:400
AddEmptyComponent.histName
string histName
Definition: AddEmptyComponent.py:64
StandaloneBunchgroupHandler.bg
bg
Definition: StandaloneBunchgroupHandler.py:243
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
LVL1CTP::CTPSimulation::extractMultiplicities
StatusCode extractMultiplicities(std::map< std::string, unsigned int > &thrMultiMap, const EventContext &context) const
Definition: CTPSimulation.cxx:620
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1CTP::CTPSimulation::m_iKeyGFexMETRho
SG::ReadHandleKey< xAOD::EnergySumRoI > m_iKeyGFexMETRho
Definition: CTPSimulation.h:140
dqt_zlumi_pandas.hname
string hname
Definition: dqt_zlumi_pandas.py:279
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1::JEPRoIDecoder
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
Definition: JEPRoIDecoder.h:33
plotmaker.hist
hist
Definition: plotmaker.py:148
tree
TChain * tree
Definition: tile_monitor.h:30
LVL1CTP::CTPSimulation::m_doZDC
Gaudi::Property< bool > m_doZDC
Definition: CTPSimulation.h:158
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
LVL1CTP::CTPSimulation::m_oKeySLink
SG::WriteHandleKey< CTPSLink > m_oKeySLink
Definition: CTPSimulation.h:152
LVL1CTP::CTPSimulation::m_jetDecoder
LVL1::JEPRoIDecoder * m_jetDecoder
Definition: CTPSimulation.h:171
LVL1CTP::CTPSimulation::m_hist1D
std::map< std::string, LockedHandle< TH1 > > m_hist1D
Definition: CTPSimulation.h:119
bin
Definition: BinsDiffFromStripMedian.h:43
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
TrigConf::DataStructure::getAttribute
T getAttribute(const std::string &key, bool ignoreIfMissing=false, const T &def=T()) const
Access to simple attribute.
Definition: DataStructure.h:152
LVL1CTP::CTPSimulation::m_oKeyRDO
SG::WriteHandleKey< CTP_RDO > m_oKeyRDO
Definition: CTPSimulation.h:151
LVL1CTP::CTPSimulation::createMultiplicityHist
StatusCode createMultiplicityHist(const std::string &type, unsigned int maxMult=10)
Definition: CTPSimulation.cxx:141
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
TrigConf::L1Threshold::type
const std::string & type() const
Accessor to the threshold type.
Definition: L1ThresholdBase.h:157
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
LVL1CTP::CTPSimulation::calculateEMMultiplicity
unsigned int calculateEMMultiplicity(const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
Definition: CTPSimulation.cxx:857
LVL1CTP::CTPSimulation::m_decoder
LVL1::CPRoIDecoder * m_decoder
Definition: CTPSimulation.h:170
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:147
LVL1CTP::CTPSimulation::setMultiplicityHistLabels
StatusCode setMultiplicityHistLabels(const TrigConf::L1Menu &l1menu, const std::string &type)
Definition: CTPSimulation.cxx:165
LVL1CTP::CTPSimulation::calculateTauMultiplicity
unsigned int calculateTauMultiplicity(const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
Definition: CTPSimulation.cxx:894
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
LVL1CTP::CTPSimulation::m_bunchGroupPattern
Gaudi::Property< unsigned int > m_bunchGroupPattern
Definition: CTPSimulation.h:161
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
TrigConf::DataStructure::name
virtual const std::string & name() const final
Definition: DataStructure.cxx:109
TrigConf::L1BunchGroupSet::getBunchGroup
const std::shared_ptr< L1BunchGroup > & getBunchGroup(const std::string &name) const
Accessor to the bunchgroup by name.
Definition: L1BunchGroupSet.cxx:118
read_hist_ntuple.h1
h1
Definition: read_hist_ntuple.py:21
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
x
#define x
LVL1CTP::CTPSimulation::m_iKeyEFexTau
SG::ReadHandleKey< xAOD::EmTauRoIContainer > m_iKeyEFexTau
Definition: CTPSimulation.h:144
xAOD::tap
setBGCode tap
Definition: TrigDecision_v1.cxx:43
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
LVL1CTP::CTPSimulation::get2DHist
LockedHandle< TH2 > & get2DHist(const std::string &histName) const
Definition: CTPSimulation.cxx:264
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
LVL1CTP::CTPSimulation::m_histPath
Gaudi::Property< std::string > m_histPath
Definition: CTPSimulation.h:157
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
LVL1CTP::CTPSimulation::getBaseHistPath
std::string getBaseHistPath() const
Definition: CTPSimulation.cxx:197
LVL1CTP::CTPSimulation::m_iKeyCtpinXE
SG::ReadHandleKey< LVL1::EnergyCTP > m_iKeyCtpinXE
Definition: CTPSimulation.h:132
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
LVL1CTP::CTPUtil::getMult
static int getMult(uint64_t word, unsigned int startbit, unsigned int endbit)
extract multiplicities using new trigger configuration interface
Definition: CTPUtil.cxx:64
LVL1CTP::CTPSimulation::m_iKeyJFexLJets
SG::ReadHandleKey< xAOD::JetRoIContainer > m_iKeyJFexLJets
Definition: CTPSimulation.h:136
met
Definition: IMETSignificance.h:24
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CTPSimRanluxFactory
const std::function< CLHEP::HepRandomEngine *(void) > CTPSimRanluxFactory
Definition: CTPSimulation.cxx:39
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LVL1CTP::CTPSimulation::hbook
StatusCode hbook(const std::string &path, std::unique_ptr< TH1 > hist)
Definition: CTPSimulation.cxx:205
LVL1CTP::CTPSimulation::calculateTopoMultiplicity
unsigned int calculateTopoMultiplicity(const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context, bool UseLegacy) const
Definition: CTPSimulation.cxx:1040
LVL1CTP::CTPSimulation::storeMetadata
StatusCode storeMetadata()
Definition: CTPSimulation.cxx:1290
LVL1CTP::CTPSimulation::calculateMETMultiplicity
unsigned int calculateMETMultiplicity(const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
Definition: CTPSimulation.cxx:932
IDTPM::eT
float eT(const U &p)
Accessor utility function for getting the value of Tranverse energy.
Definition: TrackParametersHelper.h:120
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
LVL1CTP::CTPSimulation::calculateJetMultiplicity
unsigned int calculateJetMultiplicity(const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
Definition: CTPSimulation.cxx:834
lumiFormat.i
int i
Definition: lumiFormat.py:85
h
SG::VarHandleKey::assign
virtual StatusCode assign(const std::string &sgkey)
Change the key of the object to which we're referring.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:88
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1CTP::CTPSimulation::get1DHist
LockedHandle< TH1 > & get1DHist(const std::string &histName) const
Definition: CTPSimulation.cxx:253
extractSporadic.h
list h
Definition: extractSporadic.py:97
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
getLatestRuns.interval
interval
Definition: getLatestRuns.py:24
LVL1CTP::CTPSimulation::calculateTopoOptMultiplicity
unsigned int calculateTopoOptMultiplicity(const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
Definition: CTPSimulation.cxx:1001
calibdata.exception
exception
Definition: calibdata.py:496
LVL1CTP::CTPSimulation::m_doTRT
Gaudi::Property< bool > m_doTRT
Definition: CTPSimulation.h:159
TrigConf::L1Threshold::thrValue
virtual float thrValue(int eta=0) const
Accessor to the threshold value for eta-dependent threholds.
Definition: L1ThresholdBase.cxx:127
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
TrigConf::L1Item
L1 threshold configuration.
Definition: L1Item.h:18
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
TrigConf::L1BunchGroupSet::maxNBunchGroups
constexpr std::size_t maxNBunchGroups() const
Maximum number of bunchgroups.
Definition: L1BunchGroupSet.h:107
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
TrigConf::L1BunchGroupSet
L1 board configuration.
Definition: L1BunchGroupSet.h:71
LVL1CTP::CTPSimulation::bookHists
StatusCode bookHists()
Definition: CTPSimulation.cxx:335
LVL1CTP::CTPSimulation::m_iKeyCtpinJet
SG::ReadHandleKey< LVL1::JetCTP > m_iKeyCtpinJet
Definition: CTPSimulation.h:131
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
TrigConf::name
Definition: HLTChainList.h:35
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
LVL1CTP::CTPUtil::getOptMult
static int getOptMult(std::bitset< 128 > bits, unsigned int startbit, unsigned int endbit)
Definition: CTPUtil.cxx:77
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
python.handimod.extra
int extra
Definition: handimod.py:522
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
LVL1CTP::CTPSimulation::m_isData
Gaudi::Property< bool > m_isData
Definition: CTPSimulation.h:156
LVL1CTP::CTPSimulation::simulateItems
StatusCode simulateItems(const std::map< std::string, unsigned int > &thrMultiMap, const EventContext &context) const
Definition: CTPSimulation.cxx:1129
LVL1CTP::CTPSimulation::m_doL1TopoLegacy
Gaudi::Property< bool > m_doL1TopoLegacy
Definition: CTPSimulation.h:165
LVL1CTP::CTPSimulation::m_forceBunchGroupPattern
Gaudi::Property< bool > m_forceBunchGroupPattern
Definition: CTPSimulation.h:160
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
LVL1CTP::CTPSimulation::setHistLabels
StatusCode setHistLabels(const TrigConf::L1Menu &l1menu)
Definition: CTPSimulation.cxx:275
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
LVL1CTP::CTPSimulation::m_muonRun2Format
Gaudi::Property< bool > m_muonRun2Format
Definition: CTPSimulation.h:166
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
LVL1CTP::CTPSimulation::m_hist2D
std::map< std::string, LockedHandle< TH2 > > m_hist2D
Definition: CTPSimulation.h:120
LVL1CTP::CTPSimulation::m_iKeyGFexMETNC
SG::ReadHandleKey< xAOD::EnergySumRoI > m_iKeyGFexMETNC
Definition: CTPSimulation.h:139
item
Definition: ItemListSvc.h:43
LVL1CTP::CTPSimulation::m_iKeyGFexMETJwoJ
SG::ReadHandleKey< xAOD::EnergySumRoI > m_iKeyGFexMETJwoJ
Definition: CTPSimulation.h:141
LVL1CTP::CTPSimulation::calculateMuonMultiplicity
unsigned int calculateMuonMultiplicity(const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
Definition: CTPSimulation.cxx:984
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1CTP::CTPSimulation::m_iKeyLegacyTopo
SG::ReadHandleKey< LVL1::FrontPanelCTP > m_iKeyLegacyTopo
Definition: CTPSimulation.h:126
LVL1CTP::CTPUtil::getMuonMult
static int getMuonMult(unsigned int word, int threshold)
get Muon multiplicty in legacy mode
Definition: CTPUtil.cxx:22
LVL1::CPRoIDecoder
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
Definition: CPRoIDecoder.h:37
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
LVL1CTP::CTPSimulation::m_bgKey
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSet > m_bgKey
Definition: CTPSimulation.h:168
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LVL1CTP::CTPSimulation::m_iKeyZDC
SG::ReadHandleKey< LVL1::ZdcCTP > m_iKeyZDC
Definition: CTPSimulation.h:146
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1CTP::CTPUtil::getMultTopo
static unsigned int getMultTopo(uint64_t word, unsigned int startbit, unsigned int endbit, unsigned int clock)
extract multiplicities from Topo words, were the encoding is different
Definition: CTPUtil.cxx:83
SG::getNSlots
size_t getNSlots()
Return the number of event slots.
Definition: SlotSpecificObj.cxx:64
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LVL1CTP::CTPSimulation::calculateMultiplicity
unsigned int calculateMultiplicity(const TrigConf::L1Threshold &confThr, const TrigConf::L1Menu *l1menu, const EventContext &context) const
Definition: CTPSimulation.cxx:1099
python.XMLReader.l1menu
l1menu
Definition: XMLReader.py:73
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
RunTileMonitoring.triggerType
triggerType
Definition: RunTileMonitoring.py:162
LVL1CTP::CTPSimulation::fillInputHistograms
StatusCode fillInputHistograms(const EventContext &context) const
Definition: CTPSimulation.cxx:421
LVL1CTP::CTPSimulation::m_iKeyMuctpi
SG::ReadHandleKey< LVL1::MuCTPICTP > m_iKeyMuctpi
Definition: CTPSimulation.h:128
LVL1CTP::CTPSimulation::m_iKeyEFexCluster
SG::ReadHandleKey< xAOD::TrigEMClusterContainer > m_iKeyEFexCluster
Definition: CTPSimulation.h:143
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
dqt_zlumi_alleff_HIST.tl
tl
Definition: dqt_zlumi_alleff_HIST.py:73
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LVL1CTP::CTPSimulation::m_doL1CaloLegacy
Gaudi::Property< bool > m_doL1CaloLegacy
Definition: CTPSimulation.h:163
LVL1CTP::CTPSimulation::m_doL1Topo
Gaudi::Property< bool > m_doL1Topo
Definition: CTPSimulation.h:164
LVL1CTP::CTPSimulation::m_iKeyTRT
SG::ReadHandleKey< LVL1::TrtCTP > m_iKeyTRT
Definition: CTPSimulation.h:148
LVL1CTP::CTPSimulation::m_iKeyCtpinEM
SG::ReadHandleKey< LVL1::EmTauCTP > m_iKeyCtpinEM
Definition: CTPSimulation.h:130
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LVL1CTP::CTPSimulation::m_iKeyGFexJets
SG::ReadHandleKey< xAOD::JetRoIContainer > m_iKeyGFexJets
Definition: CTPSimulation.h:138
LVL1CTP::CTPSimulation::m_iKeyTopo
SG::ReadHandleKey< LVL1::FrontPanelCTP > m_iKeyTopo
Definition: CTPSimulation.h:124
fitman.k
k
Definition: fitman.py:528
LVL1CTP::CTPSimulation::m_RNGEngines
ATHRNG::RNGWrapper m_RNGEngines
Definition: CTPSimulation.h:116
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37