ATLAS Offline Software
Loading...
Searching...
No Matches
L1TopoSimulation.cxx File Reference

Go to the source code of this file.

Functions

StatusCode L1TopoSimulation::initialize ATLAS_NOT_THREAD_SAFE ()
 Install fatal handler with default options.

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

StatusCode L1TopoSimulation::initialize ATLAS_NOT_THREAD_SAFE ( void )
inline

Install fatal handler with default options.

This is meant to be easy to call from python via ctypes.

Install fatal handler with default options.

getLorentzAngle() Read LorentzAngle from HIST and write out into local DB

getBSErrors() Read BSErrors from Monitoring HIST and write out into local DB

getEfficiency() Read Efficiency from Monitoring HIST and write out into local DB

getRawOccupancy() Read RawOccupancy from Monitoring HIST and write out into local DB

getNoiseOccupancy() Read NoiseOccupancy from HIST and write out into local DB

getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats

Install fatal handler with default options.

called at the end of each athena event (can be used for eg.

called at the beginning of each athena event (can be used for eg.

return the simulation service ID

resetting dynamic selectors)

beginning of the loop of channels

bad bit newly found

known bad bit

for low noisy cells

for high noisy cells

0.01 is used to scale "PER" to the same order of magnitude to "SIG"

smaller deviation: distorted

checking TmaxAmp, Not mixed with MaxAmp and Width

channel information output

Only dead or distorted, or short known BCs are considered below.

index of bc

now add branches and leaves to the tree

Definition at line 55 of file L1TopoSimulation.cxx.

55 {
56 ATH_MSG_INFO("initialize");
57
58 m_topoSteering->setMsgLevel( TrigConf::MSGTC::Level((int)m_topoSteeringOutputLevel) );
59
60 m_topoSteering->setLegacyMode(m_isLegacyTopo);
61
62 ATH_MSG_DEBUG("retrieving " << m_histSvc);
63 CHECK( m_histSvc.retrieve() );
64
65 if (m_emtauInputProvider.isEnabled()) {
66 ATH_MSG_DEBUG("retrieving " << m_emtauInputProvider);
67 CHECK( m_emtauInputProvider.retrieve() );
68 }
69
70 if (m_jetInputProvider.isEnabled()) {
71 ATH_MSG_DEBUG("retrieving " << m_jetInputProvider);
72 CHECK( m_jetInputProvider.retrieve() );
73 }
74
75 if (m_energyInputProvider.isEnabled()) {
76 ATH_MSG_DEBUG("retrieving " << m_energyInputProvider);
77 CHECK( m_energyInputProvider.retrieve() );
78 }
79
80 if (m_muonInputProvider.isEnabled()) {
81 ATH_MSG_DEBUG("retrieving " << m_muonInputProvider);
82 CHECK( m_muonInputProvider.retrieve(DisableTool{m_isLegacyTopo}) );
83 }
84
85 ATH_MSG_DEBUG("retrieving " << m_ControlHistSvc);
86 CHECK( m_ControlHistSvc.retrieve());
87
88 CHECK(m_l1topoRawDataKey.initialize(m_fillHistogramsBasedOnHardwareDecision));
89
90 CHECK(m_legacyTopoCTPLocation.initialize(m_isLegacyTopo));
91 CHECK(m_legacyTopoOverflowCTPLocation.initialize(m_isLegacyTopo));
92 CHECK(m_topoCTPLocation.initialize(!m_isLegacyTopo));
93 CHECK(m_topoOverflowCTPLocation.initialize(!m_isLegacyTopo));
94 if (m_isLegacyTopo){
95 ATH_MSG_DEBUG("Legacy output trigger key property " << m_legacyTopoCTPLocation);
96 ATH_MSG_DEBUG("Legacy output overflow key property " << m_legacyTopoOverflowCTPLocation);
97 }
98 else {
99 ATH_MSG_DEBUG("Output trigger key property " << m_topoCTPLocation);
100 ATH_MSG_DEBUG("Output overflow key property " << m_topoOverflowCTPLocation);
101 }
102
103 ATH_MSG_DEBUG("Prescale factor set to " << m_prescale);
104 ATH_MSG_DEBUG("PrescaleDAQROBAccess factor set to " << m_prescaleForDAQROBAccess);
105 ATH_MSG_DEBUG("FillHistoBasedOnHardware " << m_fillHistogramsBasedOnHardwareDecision);
106 if(m_fillHistogramsBasedOnHardwareDecision and
107 (m_prescaleForDAQROBAccess % m_prescale)) {
108 ATH_MSG_FATAL("PrescaleDAQROBAccess must be a multiple of Prescale"
109 <<" : current values :"
110 <<" "<<m_prescaleForDAQROBAccess
111 <<", "<<m_prescale);
112 return StatusCode::FAILURE;
113 }
114
115 const TrigConf::L1Menu * l1menu = nullptr;
116 ATH_CHECK( detStore()->retrieve(l1menu) );
117 ATH_MSG_INFO( "initialize(): retrieving new-style L1 trigger menu from Detector Store" );
118
119 // retrieve cXE coefficients from menu and pass them to the m_jetInputProvider (if it's a jFEXInputProvider)
120 // Cannot set properties on IInputTOBConverter instances,
121 // but (relevant) inputProvider also inherits from AthAlgTool
122 AthAlgTool* jetProviderAsAlgTool = dynamic_cast<AthAlgTool*>( m_jetInputProvider.get() );
123 // if there is no particular cXE threshold defined the corresponding extraInfo is not populated!
124 if ( jetProviderAsAlgTool && l1menu->thrExtraInfo().hasInfo("cXE") ) {
125 const TrigConf::L1ThrExtraInfo_cXE & cXeExtraInfo = l1menu->thrExtraInfo().cXE();
126 if ( jetProviderAsAlgTool->hasProperty("cXEweight_jFEX") ) {
127 float jXEweight = cXeExtraInfo.jXeWeight();
128 jetProviderAsAlgTool->setProperty("cXEweight_jFEX", jXEweight).ignore();
129 }
130 if ( jetProviderAsAlgTool->hasProperty("cXEweight_gFEX") ) {
131 float gXEweight = cXeExtraInfo.gXeWeight();
132 jetProviderAsAlgTool->setProperty("cXEweight_gFEX", gXEweight).ignore();
133 }
134 }
135
136 m_topoSteering->setUseBitwise(m_enableBitwise);
137 try {
138 m_topoSteering->setupFromConfiguration(*l1menu);
139 }
140 catch(std::exception & e) {
141 ATH_MSG_FATAL("Caught exception when configuring topo steering from menu: " << e.what() );
142 return StatusCode::FAILURE;
143 }
144
145 m_topoSteering->setAlgMsgLevel( TrigConf::MSGTC::Level((int)m_topoOutputLevel) );
146 m_topoSteering->setOutputAlgosFillBasedOnHardware(m_fillHistogramsBasedOnHardwareDecision);
147
148 if (m_doMonitoring) {ATH_CHECK(m_ControlHistSvc->SetHistSvc(m_topoSteering, m_histBaseDir.value()));}
149
150 ATH_CHECK(m_legacyL1topoKey.initialize(m_isLegacyTopo));
151 ATH_CHECK(m_l1topoKey.initialize(!m_isLegacyTopo));
152
153 return StatusCode::SUCCESS;
154}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
L1 menu configuration.
Definition L1Menu.h:28
retrieve(aClass, aKey=None)
Definition PyKernel.py:110