Typesetting math: 100%
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
L1TopoRatesCalculator.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 #include <tuple>
9 #include "TH1.h"
10 #include "GaudiKernel/ITHistSvc.h"
11 #include <nlohmann/json.hpp>
12 
13 L1TopoRatesCalculator::L1TopoRatesCalculator( const std::string& name, ISvcLocator* pSvcLocator ) : RatesAnalysisAlg(name, pSvcLocator) {
14 }
15 
17 
18  ATH_MSG_ALWAYS("Initializing L1TopoRatesCalculator");
19 
20  ATH_CHECK( RatesAnalysisAlg::initialize() ); // Initialise my parent class first
21 
22  ATH_CHECK( m_trigDecisionKey.initialize() ); // Then initialise my fields afterwards
23 
24  ATH_CHECK(m_l1topoKey.initialize()); //L1Topo
25 
26  //Accessing L1Menu----------------------------------------------
27 
28  const TrigConf::L1Menu * l1menu = nullptr;
29  ATH_CHECK( detStore()->retrieve(l1menu)); //detStore() returns m_detStore. detStore() from AthCommonDataStore.h
30 
31  for (size_t i = 0; i < m_userDefinedNames.value().size(); ++i) {
33  }
34  for (const std::string& L1_item : m_L1_items_json) {
35  bool found = false;
36  for (const TrigConf::L1Item& L1item : *l1menu) {
37  const std::string& L1name = L1item.name();
38  if (L1name == L1_item){
39  const std::string& L1definition = L1item.definition();
40  m_L1_item_definitions.push_back(L1definition);
41  m_L1_items.push_back(L1_item);
42  found = true;
43  break;
44  }
45  }
46  if (!found) {
47  ATH_MSG_DEBUG("Warning: L1 item '" << L1_item << "' not found in the L1 menu!");
48  }
49  }
50 
51  for (const auto& pair : m_userDefinedMap) {
52  m_L1_items.push_back(pair.first);
53  m_L1_item_definitions.push_back(pair.second);
54  }
55  // Filling trigger map --------------
56 
57  std::map<std::string, TriggerInfo> triggerMap;
58  for (size_t i = 0; i < m_L1_items.size(); ++i){
60 
61  // Regular expression to capture the name of the trigger and the number in square brackets
62  std::regex re(R"(([\w\d_-]+)
Undefined control sequence \d
)");
63  std::sregex_iterator iter((m_L1_item_definitions[i]).begin(), (m_L1_item_definitions[i]).end(), re);
64  std::sregex_iterator end;
65  std::vector<size_t> triggerPositions;
66 
67  // Extract all triggers and their positions
68  while (iter != end) {
69  std::smatch match = *iter;
70  std::string triggerName = match.str(1);
71  std::string triggerCount = match.str(2);
72  info.triggers.push_back(triggerCount + triggerName);
73 
74  // Store the position of the end of the trigger in the original chain to identify the operations between them
75  triggerPositions.push_back(match.position(0) + match.length(0));
76  ++iter;
77  }
78  // Capturing operations using the positions between triggers
79  size_t prevPos = 0;
80  for (size_t j = 0; j < triggerPositions.size(); ++j) {
81  size_t pos = triggerPositions[j];
82  std::string part = (m_L1_item_definitions[i]).substr(prevPos, pos - prevPos);
83 
84  // Eliminate unnecessary spaces
85  part.erase(std::remove_if(part.begin(), part.end(),
86  [](unsigned char c) { return std::isspace(c); }),
87  part.end());
88 
89  // Si la parte contiene un operador &, |, guardamos esa operación
90  if (part.find("&") != std::string::npos) {
91  info.operations.push_back("&");
92  } else if (part.find("|") != std::string::npos) {
93  info.operations.push_back("|");
94  }
95 
96  prevPos = pos;
97  }
98  // Handling of final operation if there is only one trigger
99  std::string lastPart = (m_L1_item_definitions[i]).substr(prevPos);
100  lastPart.erase(std::remove_if(lastPart.begin(), lastPart.end(),
101  [](unsigned char c) { return std::isspace(c); }),
102  lastPart.end());
103  triggerMap[m_L1_items[i]] = info;
104  }
105 
106  m_triggerMap = triggerMap;
107  //--------------------------------
108  for (const auto& pair : triggerMap) {
109  ATH_MSG_DEBUG("Key: " << pair.first);
110  for (size_t i = 0; i < pair.second.triggers.size(); ++i) {
111  ATH_MSG_DEBUG("Trigger " << i + 1 << ": " << pair.second.triggers[i]);
112  if (i < pair.second.operations.size()) {
113  ATH_MSG_DEBUG("Operation: " << pair.second.operations[i]);
114  }
115  }
116  }
117 
118  // Listing the triggers needed for the L1 items (w/o the multiplicities)-----------
119 
120  std::vector<std::string> beforeCTP_triggers;
121  std::vector<std::string> beforeCTP_triggers_mult;
122 
123  for (const auto& pair : triggerMap) {
124  for (size_t i = 0; i < pair.second.triggers.size(); ++i) {
125  beforeCTP_triggers_mult.push_back(pair.second.triggers[i]);
126  size_t pos_number = 0;
127  while (pos_number < (pair.second.triggers[i]).size() && std::isdigit((pair.second.triggers[i])[pos_number])) {
128  ++pos_number;
129  }
130  beforeCTP_triggers.push_back((pair.second.triggers[i]).substr(pos_number));
131  }
132  }
133 
134  std::unordered_set<std::string> seen_mult;
135  std::vector<std::string> beforeCTP_triggers_mult_unique;
136 
137  for (const auto& str_mult : beforeCTP_triggers_mult) {
138  auto [it, inserted] = seen_mult.insert(str_mult);
139  if (inserted) {
140  beforeCTP_triggers_mult_unique.push_back(str_mult);
141  }
142  }
143 
144  std::sort(beforeCTP_triggers.begin(), beforeCTP_triggers.end());
145  auto beforeCTP_triggers_unique = std::unique(beforeCTP_triggers.begin(), beforeCTP_triggers.end());
146  beforeCTP_triggers.erase(beforeCTP_triggers_unique, beforeCTP_triggers.end());
147 
148  m_beforeCTP_triggers = beforeCTP_triggers;
149  m_beforeCTP_triggers_mult = beforeCTP_triggers_mult_unique;
150 
151  // --------------------------------
152 
153  for (size_t i = 0; i < beforeCTP_triggers.size(); ++i){
154  ATH_MSG_DEBUG("Filling L1menu parameters from item: " << beforeCTP_triggers[i]);
155  ResultDefinition definition;
156  definition.flatindex = 0;
157  definition.clock = 0;
158  definition.nBit = 0;
159  definition.fromSim = true;
160  definition.overflow = true;
161  ATH_MSG_DEBUG("Item being analyzed: " << beforeCTP_triggers[i]);
162  for( const auto & connName : l1menu->connectorNames() ) {
163  auto & conn = l1menu->connector(connName);
164  for( auto & tl : conn.triggerLines() ) {
165  //For electrical connectors from the L1Topo boards a triggerline vector holds up to 16 signals
166  if ((connName == "Topo2El") || (connName == "Topo3El")){
167  for (size_t fpga = 0; fpga < 2; ++fpga){ //run over fpgas
168  for (size_t clock = 0; clock < 2; ++clock){ //run over clocks
169  for (auto & tl : conn.triggerLines(fpga,clock)){
170  if (tl.name() == beforeCTP_triggers[i]){
171  definition.flatindex = tl.flatindex();
172  definition.nBit = tl.nbits();
173  definition.clock = tl.clock();
174  if (connName == "Topo2El") definition.conID = 2;
175  if (connName == "Topo3El") definition.conID = 3;
176  }
177  else{
178  continue;
179  }
180  }
181  }
182  }
183  }else{
184  if (tl.name() == beforeCTP_triggers[i]){
185  definition.flatindex = tl.flatindex();
186  definition.nBit = tl.nbits();
187  definition.clock = 0;
188  if (connName == "Topo1Opt0") definition.conID = 4;
189  if (connName == "Topo1Opt1") definition.conID = 5;
190  if (connName == "Topo1Opt2") definition.conID = 6;
191  if (connName == "Topo1Opt3") definition.conID = 7;
192  }else{
193  continue;
194  }
195  }
196  }
197  }
198  m_definitions.push_back(definition);
199  }
200 
201  //-----------------------------------------------------
202  return StatusCode::SUCCESS;
203 }
204 
206  ATH_MSG_DEBUG("In ratesInitialize()");
207 
208  if (m_doHistograms){
209  ATH_MSG_DEBUG("################## Registering rates matrix:");
210  m_ratesMatrixHist = new TH2D("rates_matrix","L1item Rates matrix",150,-3,3,150,-3,3);
211  ATH_CHECK( histSvc()->regHist("/RATESTREAM/rates_matrix", m_ratesMatrixHist) );
212 
213  }
214  // Here we assume a full-ring, other functions are available to change this assumption.
215  // @see setTargetLumiMu(const double lumi, const double mu);
216  // @see setTargetLumiBunches(const double lumi, const int32_t bunches);
217  // @see setTargetMuBunches(const double mu, const int32_t bunches);
219 
220  //-------------------
221 
222  // Define triggers to emulate
223  // TDT can be used instead by ATH_CHECK(addAllExisting());
224 
225  // name, prescale, expressPrescale, seedName, seedPrescale, groups
226  std::set<std::string> triggerGroup {"RATE_SingleElectron"};
227 
228  // Initialize rates matrix of zeros and right size ----------------------------------------
229 
230  std::vector<double> vector_zeros(m_L1_items.size(), 0);
231  for (size_t i = 0; i < m_L1_items.size(); ++i){
232  m_rates_matrix.push_back(vector_zeros);
233  m_rates_matrix2.push_back(vector_zeros);
234 
235  }
236  // Set labels of Rates matrix
237 
238  for (size_t i = 1; i <= m_L1_items.size(); ++i){
239  int j = i-1;
240  m_ratesMatrixHist ->GetXaxis()->SetBinLabel(i, m_L1_items[j].c_str());
241  m_ratesMatrixHist ->GetYaxis()->SetBinLabel(i, m_L1_items[j].c_str());
242  }
243  //-----------------------------------------------------------------------------------------
244  ATH_MSG_ALWAYS("Add Existing");
245 
246  for (const std::string& L1_item : m_L1_items_json) {
247  ATH_CHECK( addExisting(L1_item));
248  }
249 
250  return StatusCode::SUCCESS;
251 }
252 
254 // Decoding L1TopoSimResults
255 
256  uint32_t resultValue = 999;
257 
258  if (definition.fromSim) {
259  std::vector<uint32_t>result_vector(2,0);
260  xAOD::L1TopoSimResultsContainer const* resultCont = cont.cptr();
261  for (const xAOD::L1TopoSimResults* result : *resultCont) {
262  long long topoWordPrint = result->topoWord64();
263  std::bitset<64> wordPrint(topoWordPrint);
264  if (result->connectionId() != definition.conID) continue;
265 
266  std::vector<uint32_t> connectorWords(4); //4 x 32 = 128 bits should be enough
267  unsigned int bitWidth = result->bitWidth();
268  long long topoWord64 = result->topoWord64();
269  std::bitset<64> word(topoWord64);
270  if (bitWidth==32) {
271  ATH_MSG_DEBUG("Electrical connector ");
272 
273  long long topoWord = result->topoWord();
274  std::bitset<32> word(topoWord);
275  if (definition.overflow == 1){
276  long long topoWordOverflow = result->topoWordOverflow();
277 
278  std::bitset<32> wordRes(topoWord);
279  std::bitset<32> wordOver(topoWordOverflow);
280  word = wordRes | wordOver;
281  }
282  connectorWords[result->clock()] = static_cast<uint32_t>(word.to_ullong());
283  } else {
284  ATH_MSG_DEBUG("Optical connector ");
285 
286  if (definition.overflow == 1){
287  long long topoWord64Overflow = result->topoWord64Overflow();
288 
289  std::bitset<64> wordRes(topoWord64);
290  std::bitset<64> wordOver(topoWord64Overflow);
291  word = wordRes | wordOver;
292  }
293  // May be used to have enough space for the 96 bits on optical connectors
294  connectorWords[2*result->clock() + 0] = static_cast<uint32_t>(word.to_ullong()); //first 32 bits
295  connectorWords[2*result->clock() + 1] = static_cast<uint32_t>(word.to_ullong() >> 32); //second 32 bits
296  }
297 
298  //startOffset: for extraction of HW results to account for two fibers worth of data in one readout "TOB" block
299 
300  unsigned int startOffset = 0;
301 
302  if (result->connectionId() == 5 || result->connectionId() == 7){ // if Topo1Opt1 or Topo1Opt3
303  startOffset = 96;
304  }else{ // All other connectors
305  startOffset = 0;
306  }
307  resultValue = extractResult(connectorWords, definition, startOffset);
308  result_vector[result->clock()] = resultValue; //Saving the result from the loop over result->clock
309  }
310 
311  if ((result_vector[0]>1)||(result_vector[1]>1)){
312  if (result_vector[0]>1) resultValue = result_vector[0];
313  if (result_vector[1]>1) resultValue = result_vector[1];
314  }else{
315  resultValue = result_vector[0] || result_vector[1]; //OR between the results from the two result->clock iterations
316  }
317 
318  return resultValue;
319 
320  }else{
321  ATH_MSG_ERROR("definition.fromSim set to false");
322  return 999;
323  }
324 }
325 
326 
327 // Decoding L1Topo item (fromSim = true)
328 uint32_t L1TopoRatesCalculator::extractResult(const std::vector<uint32_t>& connectorContents, const L1TopoRatesCalculator::ResultDefinition& definition, unsigned int startOffset) {
329 
330  uint32_t result = 0;
331  unsigned int startindex = definition.flatindex + startOffset; //for optical clock is 0, for electrical account for structure of argument
332  unsigned int endindex = startindex + definition.nBit - 1;
333  unsigned int firstWord = startindex / 32; //integer division on purpose
334  unsigned int lastWord = endindex / 32; //integer division on purpose
335  unsigned int nBitAdded = 0;
336  uint32_t word = 0; //buffer
337 
338  if ((firstWord>1) | (lastWord>1)){
339  firstWord = firstWord%3;
340  lastWord = lastWord%3;
341  }
342 
343  std::vector<uint32_t>result_vec(lastWord,0);
344  uint32_t mask = 0;
345 
346  for (unsigned int wordIndex=firstWord; wordIndex <= lastWord; wordIndex++) {
347  unsigned int startPosInWord = (wordIndex == firstWord) ? (startindex % 32) : 0 ;
348  unsigned int endPosInWord = (wordIndex == lastWord) ? (endindex % 32) : 31;
349  // might be %3 (3words/fiber)
350  mask = ( ( 1u<< (endPosInWord+1) ) - 1 );
351  word = connectorContents[wordIndex] & mask;
352  word >>= startPosInWord;
353  result |= word << nBitAdded; //account for bits already accumulated from previous word(s)
354  nBitAdded += endPosInWord - startPosInWord + 1;
355  result_vec.push_back(result);
356  }
357  if (result_vec.size()>1){
358  result = result_vec[0] || result_vec[1];
359  }
360  return result;
361 
362 }
363 
365 
366  ATH_MSG_DEBUG("In ratesExecute");
367 
369 
370  const xAOD::TrigDecision* trigDecision = trigDecisionHandle.get();
371  const std::vector<uint32_t> l1Triggers = trigDecision->tbp();
373 
374  if(!cont.isValid()){
375  ATH_MSG_FATAL("Could not retrieve L1Topo EDM Container from the Simulation.");
376  return StatusCode::FAILURE;
377  }
378 
379  std::vector<std::string> l1Items_vector;
380  l1Items_vector = m_beforeCTP_triggers;
381  std::vector<uint32_t> resultValue(l1Items_vector.size(), 0);
382  //---------------------------------------Mult Items
383 
384  // Main loop to fill matrix and trigger rates
385  // It loops over m_l1items_mult (mult) and l1Items_vector (no mult) to fill the correct decision in the matrix and in the trigger rate
386  std::map<std::string, bool> beforeCTP_result_Map;
387  for (size_t j = 0; j < m_beforeCTP_triggers_mult.size(); ++j){
388  beforeCTP_result_Map[m_beforeCTP_triggers_mult[j]] = false;
389  }
390  for (size_t i = 0; i < m_beforeCTP_triggers.size(); ++i) {
391 
392  //Decision of the trigger item
393  resultValue[i] = L1TopoSimResultsContainer_decoder(m_definitions[i],cont);
394 
395  ATH_MSG_DEBUG("Trigger item: " << m_beforeCTP_triggers[i]);
396  ATH_MSG_DEBUG("Decision from the decoder (L1TopoResultsContainer): " << resultValue[i]);
397 
398  //m_l1items_mult includes the 4 multiplicity items
399  for (size_t j = 0; j < m_beforeCTP_triggers_mult.size(); ++j){
400  ATH_MSG_DEBUG("Loop over multiplicity array, analysing: " << m_beforeCTP_triggers_mult[j]);
401  const auto& mult_item = m_beforeCTP_triggers_mult[j];
402  size_t pos = 0;
403  while (pos < mult_item.size() && std::isdigit(mult_item[pos])) {
404  ++pos;
405  }
406  std::string leading_number = mult_item.substr(0, pos);
407  std::string item_name = mult_item.substr(pos);
408 
409  //Compares the name of the trigger item of the l1Items_vector with the multiplicities vector
410  if (item_name == l1Items_vector[i]) {
411  if (leading_number <= std::to_string(resultValue[i])) {
412  if (resultValue[i] >= 1){
413  beforeCTP_result_Map[mult_item] = true;
414  break;
415  }
416 
417  }
418  }
419 
420  }
421  }
422 
423 
424  //-------------------------
425  // Applying L1items operations-------
426 
427  std::map<std::string, bool> L1_result_Map;
428  std::vector<bool> isPassed_L1item;
429 
430  for (const auto& pair : m_triggerMap) {
431 
432  const std::string& key = pair.first;
433  const TriggerInfo& info = pair.second;
434  if (info.triggers.empty()) continue;
435 
436  bool result = beforeCTP_result_Map[info.triggers[0]];
437 
438  for (size_t i = 1; i < info.triggers.size(); ++i) {
439  const std::string& currentTrigger = info.triggers[i];
440  const std::string& currentOp = info.operations[i - 1];
441  if (currentOp == "&") {
442  result &= beforeCTP_result_Map[currentTrigger];
443  } else if (currentOp == "|") {
444  result |= beforeCTP_result_Map[currentTrigger];
445  }
446  }
447  L1_result_Map[key] = result;
448  isPassed_L1item.push_back(result);
449  }
450 
451  // ----------------------
452  //Rates Matrix-------------------------------------------
453 
454  int bin = 1;
455  for (const auto& pair : L1_result_Map) {
456  const std::string& label = pair.first;
457  m_ratesMatrixHist->GetXaxis()->SetBinLabel(bin, label.c_str());
458  m_ratesMatrixHist->GetYaxis()->SetBinLabel(bin, label.c_str());
459  ++bin;
460  }
461 
463  double weight=0;
465  for (size_t i = 0; i < m_rates_matrix.size(); ++i){
466  for (size_t j = 0; j < m_rates_matrix.size(); ++j){
467  weight=static_cast<double>((isPassed_L1item[i] && isPassed_L1item[j])*(m_weightingValues.m_enhancedBiasWeight)*(m_weightingValues.m_linearLumiFactor));
468  (m_rates_matrix[i])[j] += weight;
469  (m_rates_matrix2[i])[j] += weight*weight;
470  }
471  }
472 
473  //-------------------------------------------------------
474 
475  return StatusCode::SUCCESS;
476 }
477 
479  ATH_MSG_DEBUG("In ratesFinalize()");
480  //Fill rates matrix----------
481 
482  for (size_t i = 0; i < m_rates_matrix.size(); ++i) {
483  for (size_t j = 0; j < m_rates_matrix.size(); ++j) {
484  m_ratesMatrixHist->SetBinContent(j+1, i+1, ((m_rates_matrix[i])[j])/(m_ratesDenominator));
485  m_ratesMatrixHist->SetBinError(j+1, i+1,std::sqrt(((m_rates_matrix2[i])[j]))/(m_ratesDenominator));
486  }
487  }
488  //--------------------------
489  return StatusCode::SUCCESS;
490 }
grepfile.info
info
Definition: grepfile.py:38
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AthHistogramAlgorithm::histSvc
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
Definition: AthHistogramAlgorithm.h:113
L1TopoRatesCalculator::L1TopoRatesCalculator
L1TopoRatesCalculator(const std::string &name, ISvcLocator *pSvcLocator)
Definition: L1TopoRatesCalculator.cxx:13
L1TopoRatesCalculator::m_trigDecisionKey
SG::ReadHandleKey< xAOD::TrigDecision > m_trigDecisionKey
Definition: L1TopoRatesCalculator.h:34
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
get_generator_info.result
result
Definition: get_generator_info.py:21
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
L1TopoRatesCalculator::m_L1_items_json
Gaudi::Property< std::vector< std::string > > m_L1_items_json
Definition: L1TopoRatesCalculator.h:53
L1TopoRatesCalculator::m_triggerMap
std::map< std::string, TriggerInfo > m_triggerMap
Definition: L1TopoRatesCalculator.h:72
L1TopoRatesCalculator::m_userDefinedNames
Gaudi::Property< std::vector< std::string > > m_userDefinedNames
Definition: L1TopoRatesCalculator.h:54
L1TopoRatesCalculator::m_denominator
std::vector< double > m_denominator
Definition: L1TopoRatesCalculator.h:65
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:407
bin
Definition: BinsDiffFromStripMedian.h:43
RatesAnalysisAlg::m_ratesDenominator
double m_ratesDenominator
How much walltime is seen by the algorithm.
Definition: RatesAnalysisAlg.h:190
WeightingValuesSummary_t::m_linearLumiFactor
double m_linearLumiFactor
What weight needs to be applied to extrapolate rates linear in mu and bunches.
Definition: RatesHistoBase.h:66
L1TopoRatesCalculator::ratesInitialize
virtual StatusCode ratesInitialize() override
To be implemented by the user.
Definition: L1TopoRatesCalculator.cxx:205
L1TopoRatesCalculator::extractResult
uint32_t extractResult(const std::vector< uint32_t > &connectorContents, const L1TopoRatesCalculator::ResultDefinition &definition, unsigned int startOffset)
Definition: L1TopoRatesCalculator.cxx:328
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
L1TopoRatesCalculator::m_userDefinedMap
std::unordered_map< std::string, std::string > m_userDefinedMap
Definition: L1TopoRatesCalculator.h:56
xAOD::topoWord64
setTopoWord topoWord64
Definition: L1TopoSimResults_v1.cxx:36
xAOD::topoWord
topoWord
Definition: L1TopoSimResults_v1.cxx:28
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
L1TopoRatesCalculator::initialize
virtual StatusCode initialize() override
Get the trigger decision tool and set up global groups.
Definition: L1TopoRatesCalculator.cxx:16
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
L1TopoRatesCalculator::ResultDefinition
Definition: L1TopoRatesCalculator.h:44
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
L1TopoRatesCalculator::m_L1_item_definitions
std::vector< std::string > m_L1_item_definitions
Definition: L1TopoRatesCalculator.h:59
L1TopoRatesCalculator::m_lumi
Gaudi::Property< float > m_lumi
Definition: L1TopoRatesCalculator.h:77
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
RatesAnalysisAlg::initialize
virtual StatusCode initialize()
Get the trigger decision tool and set up global groups.
Definition: RatesAnalysisAlg.cxx:369
L1TopoRatesCalculator::ResultDefinition::clock
unsigned int clock
Definition: L1TopoRatesCalculator.h:48
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
L1TopoRatesCalculator::m_l1topoKey
SG::ReadHandleKey< xAOD::L1TopoSimResultsContainer > m_l1topoKey
Definition: L1TopoRatesCalculator.h:35
WeightingValuesSummary_t::m_enhancedBiasWeight
double m_enhancedBiasWeight
A property of the event derived from online enhanced bias prescales.
Definition: RatesHistoBase.h:57
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
L1TopoRatesCalculator::TriggerInfo
Definition: L1TopoRatesCalculator.h:67
ElectronContainer.h
L1TopoRatesCalculator::L1TopoSimResultsContainer_decoder
uint32_t L1TopoSimResultsContainer_decoder(const L1TopoRatesCalculator::ResultDefinition &definition, SG::ReadHandle< xAOD::L1TopoSimResultsContainer > &cont)
Definition: L1TopoRatesCalculator.cxx:253
lumiFormat.i
int i
Definition: lumiFormat.py:85
RunTileMonitoring.l1Triggers
l1Triggers
Definition: RunTileMonitoring.py:325
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::ReadHandle::get
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
add-xsec-uncert-quadrature-N.label
label
Definition: add-xsec-uncert-quadrature-N.py:104
L1TopoRatesCalculator::ratesFinalize
virtual StatusCode ratesFinalize() override
To be implemented by the user.
Definition: L1TopoRatesCalculator.cxx:478
L1TopoRatesCalculator::m_ratesMatrixHist
TH2D * m_ratesMatrixHist
Definition: L1TopoRatesCalculator.h:43
RatesAnalysisAlg::m_weightingValues
WeightingValuesSummary_t m_weightingValues
Possible weighting & lumi extrapolation values for the current event.
Definition: RatesAnalysisAlg.h:189
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
RatesAnalysisAlg::addExisting
StatusCode addExisting(const std::string &pattern)
Register some existing triggers based on wild-card match, e.g.
Definition: RatesAnalysisAlg.cxx:194
TrigConf::L1Item
L1 threshold configuration.
Definition: L1Item.h:18
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
RatesAnalysisAlg::m_doHistograms
Gaudi::Property< bool > m_doHistograms
Definition: RatesAnalysisAlg.h:191
xAOD::bitWidth
setTopoWord setTopoWord64 unsigned bitWidth
Definition: L1TopoSimResults_v1.cxx:44
L1Connector.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
L1TopoRatesCalculator::m_beforeCTP_triggers
std::vector< std::string > m_beforeCTP_triggers
Definition: L1TopoRatesCalculator.h:60
L1TopoRatesCalculator::m_beforeCTP_triggers_mult
std::vector< std::string > m_beforeCTP_triggers_mult
Definition: L1TopoRatesCalculator.h:61
L1TopoRatesCalculator::ResultDefinition::overflow
bool overflow
Definition: L1TopoRatesCalculator.h:50
L1TopoRatesCalculator.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
L1TopoRatesCalculator::m_userDefinedDefinitions
Gaudi::Property< std::vector< std::string > > m_userDefinedDefinitions
Definition: L1TopoRatesCalculator.h:55
RatesAnalysisAlg::setTargetLumi
void setTargetLumi(const double lumi)
Set the target instantaneous luminosity.
Definition: RatesAnalysisAlg.h:172
L1TopoRatesCalculator::ratesExecute
virtual StatusCode ratesExecute() override
To be implemented by the user.
Definition: L1TopoRatesCalculator.cxx:364
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
L1TopoRatesCalculator::m_definitions
std::vector< ResultDefinition > m_definitions
Definition: L1TopoRatesCalculator.h:62
re
const boost::regex re(r_e)
python.XMLReader.l1menu
l1menu
Definition: XMLReader.py:73
L1TopoRatesCalculator::m_rates_matrix2
std::vector< std::vector< double > > m_rates_matrix2
Definition: L1TopoRatesCalculator.h:64
xAOD::TrigDecision_v1::tbp
const std::vector< uint32_t > & tbp() const
Get the Trigger Before Prescale bits.
dqt_zlumi_alleff_HIST.tl
tl
Definition: dqt_zlumi_alleff_HIST.py:73
L1TopoRatesCalculator::m_rates_matrix
std::vector< std::vector< double > > m_rates_matrix
Definition: L1TopoRatesCalculator.h:63
L1TopoRatesCalculator::m_L1_items
std::vector< std::string > m_L1_items
Definition: L1TopoRatesCalculator.h:58
L1TopoRatesCalculator::ResultDefinition::flatindex
unsigned int flatindex
Definition: L1TopoRatesCalculator.h:46
xAOD::L1TopoSimResults_v1
Definition: L1TopoSimResults_v1.h:30
python.compressB64.c
def c
Definition: compressB64.py:93
L1TopoRatesCalculator::ResultDefinition::nBit
unsigned int nBit
Definition: L1TopoRatesCalculator.h:47
xAOD::TrigDecision_v1
Interface to the raw trigger decision information of the event.
Definition: TrigDecision_v1.h:44
RatesAnalysisAlg
virtual analysis class for performing rates studies on AOD Pure virtual base class for trigger rate s...
Definition: RatesAnalysisAlg.h:37
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
L1TopoRatesCalculator::ResultDefinition::fromSim
bool fromSim
Definition: L1TopoRatesCalculator.h:49
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
L1TopoRatesCalculator::m_weighted_sum
double m_weighted_sum
Definition: L1TopoRatesCalculator.h:66
L1TopoRatesCalculator::ResultDefinition::conID
unsigned int conID
Definition: L1TopoRatesCalculator.h:45