ATLAS Offline Software
L1JEPEtSumsTools.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
5 // L1JEPEtSumsTools.cxx,
7 
8 #include <map>
9 #include <utility>
10 
18 #include "L1JEPEtSumsTools.h"
19 
20 namespace LVL1 {
21 
25  const std::string& name,
26  const IInterface* parent)
27  :
29  m_jeTool("LVL1::L1JetElementTools/L1JetElementTools"),
30  m_etTool("LVL1::L1EtTools/L1EtTools")
31 {
32  declareInterface<IL1JEPEtSumsTools>(this);
33  declareProperty( "JetElementTool", m_jeTool);
34  declareProperty( "EtTool", m_etTool);
35 }
36 
40 {
41 }
42 
43 
47 {
48 
50  // Retrieve jet element tool
51 
52  ATH_CHECK(m_jeTool.retrieve());
53 
54  // Retrieve energy sums tool
55 
56  ATH_CHECK(m_etTool.retrieve());
57 
58  return StatusCode::SUCCESS;
59 }
60 
64  const DataVector<xAOD::JetElement>* jetElementVec,
65  DataVector<JEMEtSums>* jemEtSumsVec) const
66 {
67  // Find number of slices
68  int peak = 0;
69  unsigned int nslices = 1;
71  DataVector<xAOD::JetElement>::const_iterator iterE = jetElementVec->end();
72  for (; iter != iterE; ++iter) {
73  if ((*iter)->emJetElementETVec().size() > nslices) {
74  nslices = (*iter)->emJetElementETVec().size();
75  peak = (*iter)->peak();
76  break;
77  }
78  if ((*iter)->hadJetElementETVec().size() > nslices) {
79  nslices = (*iter)->emJetElementETVec().size();
80  peak = (*iter)->peak();
81  break;
82  }
83  }
84  // Process each slice
86  m_jeTool->mapJetElements(jetElementVec, &jeMap);
87  MultiSliceModuleEnergy modulesVec;
88  for (unsigned int slice = 0; slice < nslices; ++slice) {
90  modulesVec.push_back(modules);
91  m_etTool->moduleSums(&jeMap, modules, slice);
92  }
93  // Convert to JEMEtSums
94  moduleEnergyToEtSums(modulesVec, jemEtSumsVec, peak);
95  MultiSliceModuleEnergy::iterator miter = modulesVec.begin();
96  MultiSliceModuleEnergy::iterator miterE = modulesVec.end();
97  for (; miter != miterE; ++miter) delete *miter;
98 }
99 
103  DataVector<CMMEtSums>* cmmEtSumsVec) const
104 {
105  formCMMEtSumsModule(jemEtSumsVec, cmmEtSumsVec);
106  // Convert to internal containers
107  int peak = 0;
108  MultiSliceModuleEnergy modulesVec;
109  MultiSliceCrateEnergy cratesVec;
110  MultiSliceSystemEnergy systemVec;
111  etSumsToModuleEnergy(cmmEtSumsVec, modulesVec, peak);
112  // Process each slice
113  MultiSliceModuleEnergy::iterator iter = modulesVec.begin();
114  MultiSliceModuleEnergy::iterator iterE = modulesVec.end();
115  for (; iter != iterE; ++iter) {
116  DataVector<ModuleEnergy>* modules = *iter;
118  cratesVec.push_back(crates);
119  m_etTool->crateSums(modules, crates);
120  systemVec.push_back(new SystemEnergy(m_etTool->systemSums(crates)));
121  delete modules;
122  }
123  // Convert back to CMMEtSums
124  crateEnergyToEtSums(cratesVec, cmmEtSumsVec, peak);
125  MultiSliceCrateEnergy::iterator citer = cratesVec.begin();
126  MultiSliceCrateEnergy::iterator citerE = cratesVec.end();
127  for (; citer != citerE; ++citer) delete *citer;
128  systemEnergyToEtSums(systemVec, cmmEtSumsVec, peak);
129  etMapsToEtSums(systemVec, cmmEtSumsVec, peak);
130  MultiSliceSystemEnergy::iterator siter = systemVec.begin();
131  MultiSliceSystemEnergy::iterator siterE = systemVec.end();
132  for (; siter != siterE; ++siter) delete *siter;
133 }
134 
138  const DataVector<JEMEtSums>* jemEtSumsVec,
139  DataVector<CMMEtSums>* cmmEtSumsMod) const
140 {
142  DataVector<JEMEtSums>::const_iterator pose = jemEtSumsVec->end();
143  for (; pos != pose; ++pos) {
144  const JEMEtSums* sums = *pos;
145  ErrorVector err(sums->EtVec().size());
146  cmmEtSumsMod->push_back(new CMMEtSums(sums->crate(), sums->module(),
147  sums->EtVec(), sums->ExVec(), sums->EyVec(),
148  err, err, err, sums->peak()));
149  }
150 }
151 
155  const DataVector<CMMEtSums>* cmmEtSumsMod,
156  DataVector<CMMEtSums>* cmmEtSumsCrate) const
157 {
158  // Convert to internal containers
159  int peak = 0;
160  MultiSliceModuleEnergy modulesVec;
161  MultiSliceCrateEnergy cratesVec;
162  etSumsToModuleEnergy(cmmEtSumsMod, modulesVec, peak);
163  // Process each slice
164  MultiSliceModuleEnergy::iterator iter = modulesVec.begin();
165  MultiSliceModuleEnergy::iterator iterE = modulesVec.end();
166  for (; iter != iterE; ++iter) {
167  DataVector<ModuleEnergy>* modules = *iter;
169  cratesVec.push_back(crates);
170  m_etTool->crateSums(modules, crates);
171  delete modules;
172  }
173  // Convert back to CMMEtSums
174  crateEnergyToEtSums(cratesVec, cmmEtSumsCrate, peak);
175  MultiSliceCrateEnergy::iterator miter = cratesVec.begin();
176  MultiSliceCrateEnergy::iterator miterE = cratesVec.end();
177  for (; miter != miterE; ++miter) delete *miter;
178 }
179 
183  const DataVector<CMMEtSums>* cmmEtSumsCrate,
184  DataVector<CMMEtSums>* cmmEtSumsSys) const
185 {
186  // Convert to internal containers
187  int peak = 0;
188  MultiSliceCrateEnergy cratesVec;
189  MultiSliceSystemEnergy systemVec;
190  etSumsToCrateEnergy(cmmEtSumsCrate, cratesVec, peak);
191  // Process each slice
192  MultiSliceCrateEnergy::iterator iter = cratesVec.begin();
193  MultiSliceCrateEnergy::iterator iterE = cratesVec.end();
194  for (; iter != iterE; ++iter) {
195  DataVector<CrateEnergy>* crates = *iter;
196  systemVec.push_back(new SystemEnergy(m_etTool->systemSums(crates)));
197  delete crates;
198  }
199  // Convert back to CMMEtSums
200  systemEnergyToEtSums(systemVec, cmmEtSumsSys, peak);
201  MultiSliceSystemEnergy::iterator siter = systemVec.begin();
202  MultiSliceSystemEnergy::iterator siterE = systemVec.end();
203  for (; siter != siterE; ++siter) delete *siter;
204 }
205 
210  const DataVector<CMMEtSums>* cmmEtSumsSys,
211  DataVector<CMMEtSums>* cmmEtSumsMap) const
212 {
213  // Convert to internal objects
214  int peak = 0;
215  MultiSliceSystemEnergy systemVec;
216  etSumsToSystemEnergy(cmmEtSumsSys, systemVec, peak);
217  // Convert back to CMMEtSums
218  etMapsToEtSums(systemVec, cmmEtSumsMap, peak);
219  MultiSliceSystemEnergy::iterator iter = systemVec.begin();
220  MultiSliceSystemEnergy::iterator iterE = systemVec.end();
221  for (; iter != iterE; ++iter) delete *iter;
222 }
223 
227  const DataVector<CMMEtSums>* etSums,
228  MultiSliceModuleEnergy& modulesVec, int& peak) const
229 {
230  peak = 0;
231  unsigned int nslices = 0;
234  for (; pos != pose; ++pos) {
235  const CMMEtSums* sums = *pos;
236  int dataId = sums->dataID();
237  if (dataId > 15) continue;
238  int crate = sums->crate();
239  if (sums->peak() > peak) peak = sums->peak();
240  const EnergyVector& ex(sums->ExVec());
241  const EnergyVector& ey(sums->EyVec());
242  const EnergyVector& et(sums->EtVec());
243  unsigned int slices = et.size();
244  if (slices > nslices) {
245  for (unsigned int i = nslices; i < slices; ++i) {
246  modulesVec.push_back(new DataVector<ModuleEnergy>);
247  }
248  nslices = slices;
249  }
250  for (unsigned int sl = 0; sl < slices; ++sl) {
251  DataVector<ModuleEnergy>* modules = modulesVec[sl];
252  modules->push_back(new ModuleEnergy(crate, dataId,
253  et[sl], ex[sl], ey[sl]));
254  }
255  }
256 }
257 
261  MultiSliceCrateEnergy& crateVec, int& peak) const
262 {
263  peak = 0;
264  unsigned int nslices = 0;
267  for (; pos != pose; ++pos) {
268  const CMMEtSums* sums = *pos;
269  int crate = sums->crate();
270  if (crate != 1) continue;
271  int dataId = sums->dataID();
272  if (dataId != CMMEtSums::LOCAL &&
273  dataId != CMMEtSums::REMOTE) continue;
274  if (dataId == CMMEtSums::REMOTE) crate = 0;
275  if (sums->peak() > peak) peak = sums->peak();
276  const EnergyVector& ex(sums->ExVec());
277  const EnergyVector& ey(sums->EyVec());
278  const EnergyVector& et(sums->EtVec());
279  const ErrorVector& exErrVec(sums->ExErrorVec());
280  const ErrorVector& eyErrVec(sums->EyErrorVec());
281  const ErrorVector& etErrVec(sums->EtErrorVec());
282  unsigned int slices = et.size();
283  if (slices > nslices) {
284  for (unsigned int i = nslices; i < slices; ++i) {
285  crateVec.push_back(new DataVector<CrateEnergy>);
286  }
287  nslices = slices;
288  }
289  for (unsigned int sl = 0; sl < slices; ++sl) {
290  DataVector<CrateEnergy>* crates = crateVec[sl];
291  DataError exErr(exErrVec[sl]);
292  DataError eyErr(eyErrVec[sl]);
293  DataError etErr(etErrVec[sl]);
294  crates->push_back(new CrateEnergy(crate, et[sl], ex[sl], ey[sl],
295  etErr.get(DataError::Overflow),
296  exErr.get(DataError::Overflow),
297  eyErr.get(DataError::Overflow)));
298  }
299  }
300 }
301 
305  const DataVector<CMMEtSums>* etSums,
306  MultiSliceSystemEnergy& systemVec, int& peak) const
307 {
308  peak = 0;
309  int restricted = 0;
312  for (; pos != pose; ++pos) {
313  const CMMEtSums* sums = *pos;
314  int dataId = sums->dataID();
315  if (dataId != CMMEtSums::TOTAL) continue;
316  if (sums->peak() > peak) peak = sums->peak();
317  const EnergyVector& ex(sums->ExVec());
318  const EnergyVector& ey(sums->EyVec());
319  const EnergyVector& et(sums->EtVec());
320  const ErrorVector& exErrVec(sums->ExErrorVec());
321  const ErrorVector& eyErrVec(sums->EyErrorVec());
322  const ErrorVector& etErrVec(sums->EtErrorVec());
323  unsigned int slices = et.size();
324  auto l1Menu = SG::makeHandle( m_L1MenuKey );
325  for (unsigned int sl = 0; sl < slices; ++sl) {
326  DataError exErr(exErrVec[sl]);
327  DataError eyErr(eyErrVec[sl]);
328  DataError etErr(etErrVec[sl]);
329  systemVec.push_back(new SystemEnergy(et[sl], ex[sl], ey[sl],
330  etErr.get(DataError::Overflow),
331  exErr.get(DataError::Overflow),
332  eyErr.get(DataError::Overflow),
333  restricted,
334  &(*l1Menu)));
335  }
336  }
337 }
338 
342  const MultiSliceModuleEnergy& modulesVec,
343  DataVector<JEMEtSums>* jemEtSumsVec, int peak) const
344 {
345  std::map<int, JEMEtSums*> etMap;
346  unsigned int nslices = modulesVec.size();
347  std::vector<unsigned int> dummy(nslices);
348  for (unsigned int slice = 0; slice < nslices; ++slice) {
349  const DataVector<ModuleEnergy>* modules = modulesVec[slice];
352  for (; pos != pose; ++pos) {
353  const ModuleEnergy* energy = *pos;
354  unsigned int ex = energy->ex();
355  unsigned int ey = energy->ey();
356  unsigned int et = energy->et();
357  if (ex == 0 && ey == 0 && et == 0) continue;
358  int crate = energy->crate();
359  int module = energy->module();
360  JEMEtSums* sums = 0;
361  int key = crate*100 + module;
362  std::map<int, JEMEtSums*>::iterator iter = etMap.find(key);
363  if (iter == etMap.end()) {
364  sums = new JEMEtSums(crate, module, dummy, dummy, dummy, peak);
365  etMap.insert(std::make_pair(key, sums));
366  jemEtSumsVec->push_back(sums);
367  } else sums = iter->second;
368  std::vector<unsigned int> exVec(sums->ExVec());
369  std::vector<unsigned int> eyVec(sums->EyVec());
370  std::vector<unsigned int> etVec(sums->EtVec());
371  exVec[slice] = ex;
372  eyVec[slice] = ey;
373  etVec[slice] = et;
374  sums->addEx(exVec);
375  sums->addEy(eyVec);
376  sums->addEt(etVec);
377  }
378  }
379 }
380 
384  const MultiSliceCrateEnergy& cratesVec,
385  DataVector<CMMEtSums>* cmmEtSumsVec, int peak) const
386 {
387  std::map<int, CMMEtSums*> etMap;
388  unsigned int nslices = cratesVec.size();
389  std::vector<unsigned int> dummy(nslices);
390  std::vector<int> error(nslices);
391  for (unsigned int slice = 0; slice < nslices; ++slice) {
392  const DataVector<CrateEnergy>* crates = cratesVec[slice];
395  for (; pos != pose; ++pos) {
396  const CrateEnergy* energy = *pos;
397  unsigned int ex = energy->exTC();
398  unsigned int ey = energy->eyTC();
399  unsigned int et = energy->et();
400  int exOverflow = energy->exOverflow();
401  int eyOverflow = energy->eyOverflow();
402  int etOverflow = energy->etOverflow();
403  if (ex == 0 && ey == 0 && et == 0 &&
404  exOverflow == 0 && eyOverflow == 0 && etOverflow == 0) continue;
405  int crate = energy->crate();
406  CMMEtSums* sums = 0;
407  int dataId = CMMEtSums::LOCAL;
408  for (int i = 0; i < 2; ++i) {
409  int key = crate*100 + dataId;
410  std::map<int, CMMEtSums*>::iterator iter = etMap.find(key);
411  if (iter == etMap.end()) {
412  sums = new CMMEtSums(crate, dataId, dummy, dummy, dummy,
413  error, error, error, peak);
414  etMap.insert(std::make_pair(key, sums));
415  cmmEtSumsVec->push_back(sums);
416  } else sums = iter->second;
417  std::vector<unsigned int> exVec(sums->ExVec());
418  std::vector<unsigned int> eyVec(sums->EyVec());
419  std::vector<unsigned int> etVec(sums->EtVec());
420  std::vector<int> exErr(sums->ExErrorVec());
421  std::vector<int> eyErr(sums->EyErrorVec());
422  std::vector<int> etErr(sums->EtErrorVec());
423  exVec[slice] = ex;
424  eyVec[slice] = ey;
425  etVec[slice] = et;
426  if (exOverflow) {
427  DataError dEx(exErr[slice]);
429  exErr[slice] = dEx.error();
430  }
431  if (eyOverflow) {
432  DataError dEy(eyErr[slice]);
434  eyErr[slice] = dEy.error();
435  }
436  if (etOverflow) {
437  DataError dEt(etErr[slice]);
439  etErr[slice] = dEt.error();
440  }
441  sums->addEx(exVec, exErr);
442  sums->addEy(eyVec, eyErr);
443  sums->addEt(etVec, etErr);
444  if (crate == 1) break;
445  crate = 1;
446  dataId = CMMEtSums::REMOTE;
447  }
448  }
449  }
450 }
451 
455  const MultiSliceSystemEnergy& systemVec,
456  DataVector<CMMEtSums>* cmmEtSumsVec, int peak) const
457 {
458  CMMEtSums* sums = 0;
459  unsigned int nslices = systemVec.size();
460  std::vector<unsigned int> data(nslices);
461  std::vector<int> error(nslices);
462  for (unsigned int slice = 0; slice < nslices; ++slice) {
463  SystemEnergy* energy = systemVec[slice];
464  unsigned int ex = energy->exTC();
465  unsigned int ey = energy->eyTC();
466  unsigned int et = energy->et();
467  int exOverflow = energy->exOverflow();
468  int eyOverflow = energy->eyOverflow();
469  int etOverflow = energy->etOverflow();
470  if (ex == 0 && ey == 0 && et == 0 &&
471  exOverflow == 0 && eyOverflow == 0 && etOverflow == 0) continue;
472  if ( !sums ) {
473  sums = new CMMEtSums(1, CMMEtSums::TOTAL, data, data, data,
474  error, error, error, peak);
475  cmmEtSumsVec->push_back(sums);
476  }
477  std::vector<unsigned int> exVec(sums->ExVec());
478  std::vector<unsigned int> eyVec(sums->EyVec());
479  std::vector<unsigned int> etVec(sums->EtVec());
480  std::vector<int> exErr(sums->ExErrorVec());
481  std::vector<int> eyErr(sums->EyErrorVec());
482  std::vector<int> etErr(sums->EtErrorVec());
483  exVec[slice] = ex;
484  eyVec[slice] = ey;
485  etVec[slice] = et;
486  if (exOverflow) {
487  DataError dEx(exErr[slice]);
489  exErr[slice] = dEx.error();
490  }
491  if (eyOverflow) {
492  DataError dEy(eyErr[slice]);
494  eyErr[slice] = dEy.error();
495  }
496  if (etOverflow) {
497  DataError dEt(etErr[slice]);
499  etErr[slice] = dEt.error();
500  }
501  sums->addEx(exVec, exErr);
502  sums->addEy(eyVec, eyErr);
503  sums->addEt(etVec, etErr);
504  }
505 }
506 
510  const MultiSliceSystemEnergy& systemVec,
511  DataVector<CMMEtSums>* cmmEtSumsVec, int peak) const
512 {
513  CMMEtSums* missEt = 0;
514  CMMEtSums* sumEt = 0;
515  CMMEtSums* missEtSig = 0;
516  unsigned int nslices = systemVec.size();
517  std::vector<unsigned int> data(nslices);
518  std::vector<int> error(nslices);
519  for (unsigned int slice = 0; slice < nslices; ++slice) {
520  SystemEnergy* energy = systemVec[slice];
521  unsigned int etMissHits = energy->etMissHits();
522  if (etMissHits) {
523  if ( !missEt ) {
524  missEt = new CMMEtSums(1, CMMEtSums::MISSING_ET_MAP, data, data, data,
525  error, error, error, peak);
526  cmmEtSumsVec->push_back(missEt);
527  }
528  std::vector<unsigned int> etVec(missEt->EtVec());
529  etVec[slice] = etMissHits;
530  missEt->addEx(etVec, error);
531  missEt->addEy(etVec, error);
532  missEt->addEt(etVec, error);
533  }
534  unsigned int etSumHits = energy->etSumHits();
535  if (etSumHits) {
536  if ( !sumEt ) {
537  sumEt = new CMMEtSums(1, CMMEtSums::SUM_ET_MAP, data, data, data,
538  error, error, error, peak);
539  cmmEtSumsVec->push_back(sumEt);
540  }
541  std::vector<unsigned int> etVec(sumEt->EtVec());
542  etVec[slice] = etSumHits;
543  sumEt->addEx(etVec, error);
544  sumEt->addEy(etVec, error);
545  sumEt->addEt(etVec, error);
546  }
547  //unsigned int etMissSigHits = energy->etMissSigHits();
548  unsigned int etMissSigHits = ((energy->roiWord0())>>16)&0xff;
549  if (etMissSigHits) {
550  if ( !missEtSig ) {
551  missEtSig = new CMMEtSums(1, CMMEtSums::MISSING_ET_SIG_MAP,
552  data, data, data, error, error, error, peak);
553  cmmEtSumsVec->push_back(missEtSig);
554  }
555  std::vector<unsigned int> etVec(missEtSig->EtVec());
556  etVec[slice] = etMissSigHits;
557  missEtSig->addEx(etVec, error);
558  missEtSig->addEy(etVec, error);
559  missEtSig->addEt(etVec, error);
560  }
561  }
562 }
563 
564 } // end of namespace
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
LVL1::L1JEPEtSumsTools::moduleEnergyToEtSums
void moduleEnergyToEtSums(const MultiSliceModuleEnergy &modulesVec, DataVector< JEMEtSums > *jemEtSumsVec, int peak) const
Convert internal ModuleEnergy containers to JEMEtSums container.
Definition: L1JEPEtSumsTools.cxx:341
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
et
Extra patterns decribing particle interation process.
JEMEtSums.h
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
module_driven_slicing.nslices
nslices
Definition: module_driven_slicing.py:575
xAOD::JEMEtSums
JEMEtSums_v2 JEMEtSums
Define the latest version of the JEMEtSums class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/JEMEtSums.h:16
LVL1::DataError
Error data.
Definition: DataError.h:27
LVL1::CMMEtSums::SUM_ET_MAP
@ SUM_ET_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
LVL1::L1JEPEtSumsTools::m_jeTool
ToolHandle< LVL1::IL1JetElementTools > m_jeTool
Tool for JetElement map.
Definition: L1JEPEtSumsTools.h:119
LVL1::L1JEPEtSumsTools::m_L1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Definition: L1JEPEtSumsTools.h:122
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
LVL1::L1JEPEtSumsTools::crateEnergyToEtSums
void crateEnergyToEtSums(const MultiSliceCrateEnergy &cratesVec, DataVector< CMMEtSums > *cmmEtSumsVec, int peak) const
Convert internal CrateEnergy containers to CMMEtSums container.
Definition: L1JEPEtSumsTools.cxx:383
LVL1::L1JEPEtSumsTools::systemEnergyToEtSums
void systemEnergyToEtSums(const MultiSliceSystemEnergy &systemVec, DataVector< CMMEtSums > *cmmEtSumsVec, int peak) const
Convert internal SystemEnergy objects to CMMEtSums object.
Definition: L1JEPEtSumsTools.cxx:454
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1::CrateEnergy
CrateEnergy class declaration Simulates behaviour of the Crate-CMM System CMM logic is done in Energy...
Definition: CrateEnergy.h:34
LVL1::CMMEtSums
CMMEtSums object stores Et sums from the Energy CMMs.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:33
LVL1::CMMEtSums::LOCAL
@ LOCAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:36
ModuleEnergy.h
LVL1::CMMEtSums::ExErrorVec
const std::vector< int > & ExErrorVec() const
returns module Ex errors
Definition: CMMEtSums.cxx:140
LVL1::L1JEPEtSumsTools::ErrorVector
std::vector< int > ErrorVector
Definition: L1JEPEtSumsTools.h:91
LVL1::JEMEtSums::EyVec
const std::vector< unsigned int > & EyVec() const
returns module Ey sum
Definition: JEMEtSums.cxx:103
LVL1::L1JEPEtSumsTools::etMapsToEtSums
void etMapsToEtSums(const MultiSliceSystemEnergy &systemVec, DataVector< CMMEtSums > *cmmEtSumsVec, int peak) const
Convert maps from internal SystemEnergy objects to CMMEtSums objects.
Definition: L1JEPEtSumsTools.cxx:509
LVL1::JEMEtSums::module
int module() const
returns module number
Definition: JEMEtSums.cxx:73
LVL1::CMMEtSums::EyErrorVec
const std::vector< int > & EyErrorVec() const
returns module Ey errors
Definition: CMMEtSums.cxx:145
LVL1::L1JEPEtSumsTools::initialize
virtual StatusCode initialize()
standard Athena-Algorithm method
Definition: L1JEPEtSumsTools.cxx:46
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::CMMEtSums::REMOTE
@ REMOTE
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:36
LVL1::JEMEtSums::addEy
void addEy(const std::vector< unsigned int > &Ey)
Update Ey sum.
Definition: JEMEtSums.cxx:123
CrateEnergy.h
LVL1::CMMEtSums::dataID
int dataID() const
returns data ID
Definition: CMMEtSums.cxx:85
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
python.PyAthena.module
module
Definition: PyAthena.py:131
xAOD::JetElementMap_t
std::map< int, const JetElement * > JetElementMap_t
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/JetElement.h:18
LVL1::L1JEPEtSumsTools::etSumsToModuleEnergy
void etSumsToModuleEnergy(const DataVector< CMMEtSums > *etSums, MultiSliceModuleEnergy &modulesVec, int &peak) const
Convert CMMEtSums container to internal ModuleEnergy containers.
Definition: L1JEPEtSumsTools.cxx:226
LVL1::JEMEtSums::crate
int crate() const
returns crate number
Definition: JEMEtSums.cxx:68
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
LVL1::DataError::Overflow
@ Overflow
Definition: DataError.h:31
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
LVL1::CMMEtSums::addEt
void addEt(const std::vector< unsigned int > &Et, const std::vector< int > &EtError)
Add data to existing objects.
Definition: CMMEtSums.cxx:150
lumiFormat.i
int i
Definition: lumiFormat.py:85
L1JEPEtSumsTools.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::L1JEPEtSumsTools::formJEMEtSums
virtual void formJEMEtSums(const DataVector< xAOD::JetElement > *jetElementVec, DataVector< JEMEtSums > *jemEtSumsVec) const
form JEMEtSums from JetElements
Definition: L1JEPEtSumsTools.cxx:63
LVL1::CMMEtSums::EyVec
const std::vector< unsigned int > & EyVec() const
returns module Ey sum
Definition: CMMEtSums.cxx:130
LVL1::DataError::set
void set(ErrorBit bit, int value=1)
Set an error bit or data.
Definition: DataError.cxx:28
LVL1::L1JEPEtSumsTools::formCMMEtSumsEtMaps
virtual void formCMMEtSumsEtMaps(const DataVector< CMMEtSums > *cmmEtSumsSys, DataVector< CMMEtSums > *cmmEtSumsMap) const
form partial CMMEtSums (sumEt/missingEt maps) from system CMMEtSums
Definition: L1JEPEtSumsTools.cxx:209
LVL1::ModuleEnergy
This is an internal class, used in the Energy trigger.
Definition: ModuleEnergy.h:45
test_pyathena.parent
parent
Definition: test_pyathena.py:15
JetElement.h
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::L1JEPEtSumsTools::etSumsToCrateEnergy
void etSumsToCrateEnergy(const DataVector< CMMEtSums > *etSums, MultiSliceCrateEnergy &crateVec, int &peak) const
Convert CMMEtSums container to internal CrateEnergy containers.
Definition: L1JEPEtSumsTools.cxx:260
LVL1::L1JEPEtSumsTools::L1JEPEtSumsTools
L1JEPEtSumsTools(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: L1JEPEtSumsTools.cxx:24
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
LVL1::CMMEtSums::EtVec
const std::vector< unsigned int > & EtVec() const
Access multi-slice data.
Definition: CMMEtSums.cxx:120
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
LVL1::CMMEtSums::addEy
void addEy(const std::vector< unsigned int > &Ey, const std::vector< int > &EyError)
Update Ey sum.
Definition: CMMEtSums.cxx:164
LVL1::JEMEtSums::peak
int peak() const
returns peak slice number
Definition: JEMEtSums.cxx:133
LVL1::L1JEPEtSumsTools::MultiSliceSystemEnergy
std::vector< SystemEnergy * > MultiSliceSystemEnergy
Definition: L1JEPEtSumsTools.h:94
DataError.h
TrigConf::name
Definition: HLTChainList.h:35
LVL1::DataError::error
int error() const
Return the full error word.
Definition: DataError.h:78
LVL1::L1JEPEtSumsTools::formCMMEtSumsCrate
virtual void formCMMEtSumsCrate(const DataVector< CMMEtSums > *cmmEtSumsMod, DataVector< CMMEtSums > *cmmEtSumsCrate) const
form partial CMMEtSums (crate) from module CMMEtSums
Definition: L1JEPEtSumsTools.cxx:154
LVL1::L1JEPEtSumsTools::EnergyVector
std::vector< unsigned int > EnergyVector
Definition: L1JEPEtSumsTools.h:90
LVL1::L1JEPEtSumsTools::formCMMEtSumsSystem
virtual void formCMMEtSumsSystem(const DataVector< CMMEtSums > *cmmEtSumsCrate, DataVector< CMMEtSums > *cmmEtSumsSys) const
form partial CMMEtSums (system) from crate CMMEtSums
Definition: L1JEPEtSumsTools.cxx:182
xAOD::CMMEtSums
CMMEtSums_v1 CMMEtSums
Define the latest version of the CMMEtSums class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CMMEtSums.h:14
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
LVL1::JEMEtSums::ExVec
const std::vector< unsigned int > & ExVec() const
returns module Ex sum
Definition: JEMEtSums.cxx:98
LVL1::CMMEtSums::crate
int crate() const
Data accessors.
Definition: CMMEtSums.cxx:80
CMMEtSums.h
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
LVL1::L1JEPEtSumsTools::formCMMEtSumsModule
virtual void formCMMEtSumsModule(const DataVector< JEMEtSums > *jemEtSumsVec, DataVector< CMMEtSums > *cmmEtSumsMod) const
form partial CMMEtSums (module) from JEMEtSums
Definition: L1JEPEtSumsTools.cxx:137
LVL1::JEMEtSums::addEt
void addEt(const std::vector< unsigned int > &Et)
Update ET sum.
Definition: JEMEtSums.cxx:113
LVL1::CMMEtSums::addEx
void addEx(const std::vector< unsigned int > &Ex, const std::vector< int > &ExError)
Update Ex sum.
Definition: CMMEtSums.cxx:157
LVL1::CMMEtSums::MISSING_ET_SIG_MAP
@ MISSING_ET_SIG_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
LVL1::JEMEtSums
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMEtSums.h:27
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::L1JEPEtSumsTools::MultiSliceCrateEnergy
std::vector< DataVector< CrateEnergy > * > MultiSliceCrateEnergy
Definition: L1JEPEtSumsTools.h:93
LVL1::CMMEtSums::MISSING_ET_MAP
@ MISSING_ET_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
LVL1::JEMEtSums::EtVec
const std::vector< unsigned int > & EtVec() const
returns module ET sum
Definition: JEMEtSums.cxx:93
LVL1::JEMEtSums::addEx
void addEx(const std::vector< unsigned int > &Ex)
Update Ex sum.
Definition: JEMEtSums.cxx:118
LVL1::L1JEPEtSumsTools::m_etTool
ToolHandle< LVL1::IL1EtTools > m_etTool
Tool for energy sums.
Definition: L1JEPEtSumsTools.h:121
LVL1::L1JEPEtSumsTools::formCMMEtSums
virtual void formCMMEtSums(const DataVector< JEMEtSums > *jemEtSumsVec, DataVector< CMMEtSums > *cmmEtSumsVec) const
form complete CMMEtSums from JEMEtSums
Definition: L1JEPEtSumsTools.cxx:102
LVL1::L1JEPEtSumsTools::MultiSliceModuleEnergy
std::vector< DataVector< ModuleEnergy > * > MultiSliceModuleEnergy
Definition: L1JEPEtSumsTools.h:92
LVL1::SystemEnergy
SystemEnergy class declaration Simulates behaviour of the Crate-CMM System CMM logic is done in Energ...
Definition: SystemEnergy.h:35
LVL1::CMMEtSums::peak
int peak() const
returns peak slice number
Definition: CMMEtSums.cxx:176
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::DataError::get
int get(ErrorBit bit) const
Return an error bit or data.
Definition: DataError.cxx:48
LVL1::CMMEtSums::EtErrorVec
const std::vector< int > & EtErrorVec() const
returns module ET errors
Definition: CMMEtSums.cxx:135
SystemEnergy.h
get_generator_info.error
error
Definition: get_generator_info.py:40
LVL1::CMMEtSums::TOTAL
@ TOTAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:36
error
Definition: IImpactPoint3dEstimator.h:70
LVL1::L1JEPEtSumsTools::~L1JEPEtSumsTools
virtual ~L1JEPEtSumsTools()
default destructor
Definition: L1JEPEtSumsTools.cxx:39
keylayer_zslicemap.slices
slices
Definition: keylayer_zslicemap.py:112
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
LVL1::L1JEPEtSumsTools::etSumsToSystemEnergy
void etSumsToSystemEnergy(const DataVector< CMMEtSums > *etSums, MultiSliceSystemEnergy &systemVec, int &peak) const
Convert CMMEtSums container to internal SystemEnergy objects.
Definition: L1JEPEtSumsTools.cxx:304
LVL1::CMMEtSums::ExVec
const std::vector< unsigned int > & ExVec() const
returns module Ex sum
Definition: CMMEtSums.cxx:125
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37