|
ATLAS Offline Software
|
#include <L1JEPEtSumsTools.h>
|
| L1JEPEtSumsTools (const std::string &type, const std::string &name, const IInterface *parent) |
| Constructor. More...
|
|
virtual | ~L1JEPEtSumsTools () |
| default destructor More...
|
|
virtual StatusCode | initialize () |
| standard Athena-Algorithm method More...
|
|
virtual void | formJEMEtSums (const DataVector< xAOD::JetElement > *jetElementVec, DataVector< JEMEtSums > *jemEtSumsVec) const |
| form JEMEtSums from JetElements More...
|
|
virtual void | formCMMEtSums (const DataVector< JEMEtSums > *jemEtSumsVec, DataVector< CMMEtSums > *cmmEtSumsVec) const |
| form complete CMMEtSums from JEMEtSums More...
|
|
virtual void | formCMMEtSumsModule (const DataVector< JEMEtSums > *jemEtSumsVec, DataVector< CMMEtSums > *cmmEtSumsMod) const |
| form partial CMMEtSums (module) from JEMEtSums More...
|
|
virtual void | formCMMEtSumsCrate (const DataVector< CMMEtSums > *cmmEtSumsMod, DataVector< CMMEtSums > *cmmEtSumsCrate) const |
| form partial CMMEtSums (crate) from module CMMEtSums More...
|
|
virtual void | formCMMEtSumsSystem (const DataVector< CMMEtSums > *cmmEtSumsCrate, DataVector< CMMEtSums > *cmmEtSumsSys) const |
| form partial CMMEtSums (system) from crate CMMEtSums More...
|
|
virtual void | formCMMEtSumsEtMaps (const DataVector< CMMEtSums > *cmmEtSumsSys, DataVector< CMMEtSums > *cmmEtSumsMap) const |
| form partial CMMEtSums (sumEt/missingEt maps) from system CMMEtSums More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
void | etSumsToModuleEnergy (const DataVector< CMMEtSums > *etSums, MultiSliceModuleEnergy &modulesVec, int &peak) const |
| Convert CMMEtSums container to internal ModuleEnergy containers. More...
|
|
void | etSumsToCrateEnergy (const DataVector< CMMEtSums > *etSums, MultiSliceCrateEnergy &crateVec, int &peak) const |
| Convert CMMEtSums container to internal CrateEnergy containers. More...
|
|
void | etSumsToSystemEnergy (const DataVector< CMMEtSums > *etSums, MultiSliceSystemEnergy &systemVec, int &peak) const |
| Convert CMMEtSums container to internal SystemEnergy objects. More...
|
|
void | moduleEnergyToEtSums (const MultiSliceModuleEnergy &modulesVec, DataVector< JEMEtSums > *jemEtSumsVec, int peak) const |
| Convert internal ModuleEnergy containers to JEMEtSums container. More...
|
|
void | crateEnergyToEtSums (const MultiSliceCrateEnergy &cratesVec, DataVector< CMMEtSums > *cmmEtSumsVec, int peak) const |
| Convert internal CrateEnergy containers to CMMEtSums container. More...
|
|
void | systemEnergyToEtSums (const MultiSliceSystemEnergy &systemVec, DataVector< CMMEtSums > *cmmEtSumsVec, int peak) const |
| Convert internal SystemEnergy objects to CMMEtSums object. More...
|
|
void | etMapsToEtSums (const MultiSliceSystemEnergy &systemVec, DataVector< CMMEtSums > *cmmEtSumsVec, int peak) const |
| Convert maps from internal SystemEnergy objects to CMMEtSums objects. More...
|
|
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...
|
|
This is a tool to reconstruct the L1 JEM and CMM-Energy Et sums from Jet Elements. Used for offline monitoring and trigger reconstruction.
Useage: L1JEPEtSumsTools->formJEMEtSums() // Form JEMEtSums from JetElements L1JEPEtSumsTools->formCMMEtSums() // Form CMMEtSums from JEMEtSums
@author Peter Faulkner
Definition at line 55 of file L1JEPEtSumsTools.h.
◆ EnergyVector
◆ ErrorVector
◆ MultiSliceCrateEnergy
◆ MultiSliceModuleEnergy
◆ MultiSliceSystemEnergy
◆ StoreGateSvc_t
◆ L1JEPEtSumsTools()
LVL1::L1JEPEtSumsTools::L1JEPEtSumsTools |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Constructor.
Definition at line 24 of file L1JEPEtSumsTools.cxx.
29 m_jeTool(
"LVL1::L1JetElementTools/L1JetElementTools"),
30 m_etTool(
"LVL1::L1EtTools/L1EtTools")
32 declareInterface<IL1JEPEtSumsTools>(
this);
◆ ~L1JEPEtSumsTools()
LVL1::L1JEPEtSumsTools::~L1JEPEtSumsTools |
( |
| ) |
|
|
virtual |
◆ crateEnergyToEtSums()
Convert internal CrateEnergy containers to CMMEtSums container.
Definition at line 383 of file L1JEPEtSumsTools.cxx.
387 std::map<int, CMMEtSums*> etMap;
388 unsigned int nslices = cratesVec.size();
395 for (;
pos != pose; ++
pos) {
397 unsigned int ex =
energy->exTC();
398 unsigned int ey =
energy->eyTC();
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();
408 for (
int i = 0;
i < 2; ++
i) {
409 int key = crate*100 + dataId;
411 if (iter == etMap.end()) {
414 etMap.insert(std::make_pair(
key, 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());
427 DataError dEx(exErr[
slice]);
429 exErr[
slice] = dEx.error();
432 DataError dEy(eyErr[
slice]);
434 eyErr[
slice] = dEy.error();
437 DataError dEt(etErr[
slice]);
439 etErr[
slice] = dEt.error();
441 sums->addEx(exVec, exErr);
442 sums->addEy(eyVec, eyErr);
443 sums->addEt(etVec, etErr);
444 if (crate == 1)
break;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ etMapsToEtSums()
Convert maps from internal SystemEnergy objects to CMMEtSums objects.
Definition at line 509 of file L1JEPEtSumsTools.cxx.
516 unsigned int nslices = systemVec.size();
521 unsigned int etMissHits =
energy->etMissHits();
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);
534 unsigned int etSumHits =
energy->etSumHits();
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);
548 unsigned int etMissSigHits = ((
energy->roiWord0())>>16)&0xff;
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);
◆ etSumsToCrateEnergy()
Convert CMMEtSums container to internal CrateEnergy containers.
Definition at line 260 of file L1JEPEtSumsTools.cxx.
267 for (;
pos != pose; ++
pos) {
269 int crate = sums->crate();
270 if (crate != 1)
continue;
271 int dataId = sums->dataID();
275 if (sums->peak() > peak) peak = sums->peak();
289 for (
unsigned int sl = 0; sl <
slices; ++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],
◆ etSumsToModuleEnergy()
Convert CMMEtSums container to internal ModuleEnergy containers.
Definition at line 226 of file L1JEPEtSumsTools.cxx.
234 for (;
pos != pose; ++
pos) {
236 int dataId = sums->dataID();
237 if (dataId > 15)
continue;
238 int crate = sums->crate();
239 if (sums->peak() > peak) peak = sums->peak();
250 for (
unsigned int sl = 0; sl <
slices; ++sl) {
252 modules->
push_back(
new ModuleEnergy(crate, dataId,
253 et[sl], ex[sl], ey[sl]));
◆ etSumsToSystemEnergy()
Convert CMMEtSums container to internal SystemEnergy objects.
Definition at line 304 of file L1JEPEtSumsTools.cxx.
312 for (;
pos != pose; ++
pos) {
314 int dataId = sums->dataID();
316 if (sums->peak() > peak) peak = sums->peak();
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],
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ formCMMEtSums()
◆ formCMMEtSumsCrate()
◆ formCMMEtSumsEtMaps()
◆ formCMMEtSumsModule()
◆ formCMMEtSumsSystem()
◆ formJEMEtSums()
form JEMEtSums from JetElements
Implements LVL1::IL1JEPEtSumsTools.
Definition at line 63 of file L1JEPEtSumsTools.cxx.
72 for (; iter != iterE; ++iter) {
73 if ((*iter)->emJetElementETVec().size() >
nslices) {
74 nslices = (*iter)->emJetElementETVec().size();
75 peak = (*iter)->peak();
78 if ((*iter)->hadJetElementETVec().size() >
nslices) {
79 nslices = (*iter)->emJetElementETVec().size();
80 peak = (*iter)->peak();
86 m_jeTool->mapJetElements(jetElementVec, &jeMap);
97 for (; miter != miterE; ++miter)
delete *miter;
◆ initialize()
StatusCode LVL1::L1JEPEtSumsTools::initialize |
( |
| ) |
|
|
virtual |
standard Athena-Algorithm method
Initialisation.
Definition at line 46 of file L1JEPEtSumsTools.cxx.
58 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
const InterfaceID & LVL1::IL1JEPEtSumsTools::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ moduleEnergyToEtSums()
Convert internal ModuleEnergy containers to JEMEtSums container.
Definition at line 341 of file L1JEPEtSumsTools.cxx.
345 std::map<int, JEMEtSums*> etMap;
346 unsigned int nslices = modulesVec.size();
352 for (;
pos != pose; ++
pos) {
354 unsigned int ex =
energy->ex();
355 unsigned int ey =
energy->ey();
357 if (ex == 0 && ey == 0 &&
et == 0)
continue;
358 int crate =
energy->crate();
363 if (iter == etMap.end()) {
365 etMap.insert(std::make_pair(
key, 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());
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ systemEnergyToEtSums()
Convert internal SystemEnergy objects to CMMEtSums object.
Definition at line 454 of file L1JEPEtSumsTools.cxx.
459 unsigned int nslices = systemVec.size();
464 unsigned int ex =
energy->exTC();
465 unsigned int ey =
energy->eyTC();
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;
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());
487 DataError dEx(exErr[
slice]);
489 exErr[
slice] = dEx.error();
492 DataError dEy(eyErr[
slice]);
494 eyErr[
slice] = dEy.error();
497 DataError dEt(etErr[
slice]);
499 etErr[
slice] = dEt.error();
501 sums->addEx(exVec, exErr);
502 sums->addEy(eyVec, eyErr);
503 sums->addEt(etVec, etErr);
◆ updateVHKA()
◆ m_detStore
◆ m_etTool
◆ m_evtStore
◆ m_jeTool
◆ m_L1MenuKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
char data[hepevt_bytes_allocation_ATLAS]
Extra patterns decribing particle interation process.
Const iterator class for DataVector/DataList.
JEMEtSums_v2 JEMEtSums
Define the latest version of the JEMEtSums class.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
std::map< int, const JetElement * > JetElementMap_t
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
CMMEtSums_v1 CMMEtSums
Define the latest version of the CMMEtSums class.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.