|
ATLAS Offline Software
|
#include <IsolationBuilder.h>
|
| IsolationBuilder (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor with parameters: More...
|
|
virtual | ~IsolationBuilder () |
| Destructor: More...
|
|
virtual StatusCode | initialize () override final |
|
virtual StatusCode | execute (const EventContext &ctx) const override final |
|
virtual StatusCode | finalize () override final |
|
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 |
|
|
| IsolationBuilder () |
| Default constructor: More...
|
|
StatusCode | initializeIso (std::set< xAOD::Iso::IsolationFlavour > &runIsoType, std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey >> *caloIsoMap, std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey >> *trackIsoMap, const std::string &containerName, const std::vector< std::vector< int >> &isoInts, const std::vector< std::vector< int >> &corInts, const std::vector< std::vector< int >> &corIntsExtra, const std::string &customConfig) |
| called by algorithm initialize per object (electron, photon, forward electron, muon) More...
|
|
StatusCode | addCaloIsoCorrections (size_t flavor, xAOD::Iso::IsolationFlavour isoFlav, CaloIsoHelpKey &cisoH, const std::vector< std::vector< int >> &corInts, bool corrsAreExtra, const std::string &prefix, const std::string &customConfig) |
| called by initializeIso More...
|
|
StatusCode | addTrackIsoCorrections (size_t flavor, xAOD::Iso::IsolationFlavour isoFlav, TrackIsoHelpKey &tisoH, const std::vector< std::vector< int >> &corInts, bool corrsAreExtra, const std::string &prefix, const std::string &customConfig) |
| called by initializeIso More...
|
|
StatusCode | executeCaloIso (const std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey >> &caloIsoMap, const CaloCellContainer *cellColl) const |
|
StatusCode | executeTrackIso (const std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey >> &trackIsoMap) const |
|
void | declareIso (std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey >> &caloIso) |
|
void | declareIso (std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey >> &trackIso) |
|
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...
|
|
|
Gaudi::Property< std::string > | m_ElectronContainerName |
| Containers (Is it best to make them as strings? Used by multiple handles) More...
|
|
Gaudi::Property< std::string > | m_FwdElectronContainerName |
|
Gaudi::Property< std::string > | m_PhotonContainerName |
|
Gaudi::Property< std::string > | m_MuonContainerName |
|
ToolHandle< xAOD::ICaloCellIsolationTool > | m_cellIsolationTool |
| Tool for cell isolation calculation. More...
|
|
SG::ReadHandleKey< CaloCellContainer > | m_cellsKey |
| Cell container. More...
|
|
ToolHandle< xAOD::ICaloTopoClusterIsolationTool > | m_topoIsolationTool |
| Tool for topo isolation calculation. More...
|
|
ToolHandle< xAOD::INeutralEFlowIsolationTool > | m_pflowIsolationTool |
| Tool for neutral pflow isolation calculation. More...
|
|
ToolHandle< xAOD::ITrackIsolationTool > | m_trackIsolationTool |
| Tool for neutral pflow isolation calculation. More...
|
|
Gaudi::Property< bool > | m_isTrigger { this, "IsTrigger", false } |
| is the alg run at trigger level More...
|
|
Gaudi::Property< bool > | m_useBremAssoc |
|
Gaudi::Property< bool > | m_allTrackRemoval { this, "AllTrackRemoval", true } |
|
Gaudi::Property< bool > | m_storepileupCorrection { this, "storepileupCorrection", false } |
|
Gaudi::Property< std::vector< std::vector< int > > > | m_elisoInts |
| Isolation types. More...
|
|
Gaudi::Property< std::vector< std::vector< int > > > | m_elcorInts |
|
Gaudi::Property< std::vector< std::vector< int > > > | m_elcorIntsExtra |
|
Gaudi::Property< std::vector< std::vector< int > > > | m_phisoInts |
| Isolation types (for the alg. More...
|
|
Gaudi::Property< std::vector< std::vector< int > > > | m_phcorInts |
|
Gaudi::Property< std::vector< std::vector< int > > > | m_phcorIntsExtra |
|
Gaudi::Property< std::vector< std::vector< int > > > | m_muisoInts |
|
Gaudi::Property< std::vector< std::vector< int > > > | m_mucorInts |
|
Gaudi::Property< std::vector< std::vector< int > > > | m_mucorIntsExtra |
|
Gaudi::Property< std::vector< std::vector< int > > > | m_feisoInts |
|
Gaudi::Property< std::vector< std::vector< int > > > | m_fecorInts |
|
Gaudi::Property< std::vector< std::vector< int > > > | m_fecorIntsExtra |
|
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > | m_elCaloIso |
|
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > | m_phCaloIso |
|
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > | m_feCaloIso |
|
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > | m_muCaloIso |
|
std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey > > | m_elTrackIso |
|
std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey > > | m_phTrackIso |
|
std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey > > | m_muTrackIso |
|
Gaudi::Property< std::string > | m_customConfigEl |
|
Gaudi::Property< std::string > | m_customConfigPh |
|
Gaudi::Property< std::string > | m_customConfigFwd |
|
Gaudi::Property< std::string > | m_customConfigMu |
|
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 |
|
Definition at line 44 of file IsolationBuilder.h.
◆ StoreGateSvc_t
◆ IsolationBuilder() [1/2]
IsolationBuilder::IsolationBuilder |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~IsolationBuilder()
IsolationBuilder::~IsolationBuilder |
( |
| ) |
|
|
virtualdefault |
◆ IsolationBuilder() [2/2]
IsolationBuilder::IsolationBuilder |
( |
| ) |
|
|
private |
◆ addCaloIsoCorrections()
called by initializeIso
Definition at line 401 of file IsolationBuilder.cxx.
411 if (!corrsAreExtra) {
412 std::string bitsetName =
414 if (!customConfig.empty()) {
415 bitsetName +=
"_" + customConfig;
418 cisoH.corrBitsetDeco = bitsetName;
419 ATH_MSG_DEBUG(
"Initializing non extra corr : " << cisoH.corrBitsetDeco.key());
420 ATH_CHECK(cisoH.corrBitsetDeco.initialize());
425 const auto cor =
static_cast<unsigned int>(corInts[flavor][
corrType]);
427 cisoH.CorrList.calobitset.set(cor);
432 std::string isoCorName =
prefix;
440 if (!customConfig.empty()) {
441 isoCorName +=
"_" + customConfig;
443 cisoH.coreCorDeco.emplace(isoCor, isoCorName);
444 cisoH.coreCorDeco[isoCor].setOwner(
this);
445 ATH_MSG_DEBUG(
"initializing " << cisoH.coreCorDeco[isoCor].key());
446 ATH_CHECK(cisoH.coreCorDeco[isoCor].initialize());
451 cisoH.noncoreCorDeco.emplace(
453 auto&
vec = cisoH.noncoreCorDeco[isoCor];
455 for (
auto type : cisoH.isoTypes) {
458 if (!customConfig.empty()) {
459 corName +=
"_" + customConfig;
461 vec.emplace_back(corName);
468 return StatusCode::SUCCESS;
◆ addTrackIsoCorrections()
called by initializeIso
Definition at line 472 of file IsolationBuilder.cxx.
482 if (!corrsAreExtra) {
483 std::string bitsetName =
485 if (!customConfig.empty()) {
486 bitsetName +=
"_" + customConfig;
489 tisoH.corrBitsetDeco = bitsetName;
490 ATH_MSG_DEBUG(
"Initializing " << tisoH.corrBitsetDeco.key());
491 ATH_CHECK(tisoH.corrBitsetDeco.initialize());
495 const auto cor =
static_cast<unsigned int>(corInts[flavor][
corrType]);
497 tisoH.CorrList.trackbitset.set(cor);
505 if (!customConfig.empty()) {
506 isoCorName +=
"_" + customConfig;
508 tisoH.coreCorDeco.emplace(isoCor, isoCorName);
509 tisoH.coreCorDeco[isoCor].setOwner(
this);
510 ATH_MSG_DEBUG(
"initializing " << tisoH.coreCorDeco[isoCor].key());
511 ATH_CHECK(tisoH.coreCorDeco[isoCor].initialize());
513 return StatusCode::SUCCESS;
◆ 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.
◆ 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]
◆ declareIso() [1/2]
◆ declareIso() [2/2]
Definition at line 765 of file IsolationBuilder.cxx.
769 for (
auto& iso : trackIso) {
770 iso.second.declare(
this);
◆ 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);
◆ 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.
◆ 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.
◆ 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()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode IsolationBuilder::execute |
( |
const EventContext & |
ctx | ) |
const |
|
finaloverridevirtual |
Definition at line 132 of file IsolationBuilder.cxx.
142 if (!cellcoll.isValid()) {
144 return StatusCode::FAILURE;
146 cellColl = cellcoll.cptr();
180 return StatusCode::SUCCESS;
◆ executeCaloIso()
Definition at line 517 of file IsolationBuilder.cxx.
522 for (
const auto&
pr : caloIsoMap) {
525 const auto&
keys =
pr.second;
526 CaloIsoHelpHandles handles(
keys);
530 if (handles.isoDeco.empty()) {
531 ATH_MSG_FATAL(
"Have a CaloIsoHelpHandles with no actual isolations; "
532 "something wrong happened");
533 return StatusCode::FAILURE;
538 if (readHandle.isAvailable()){
540 ATH_MSG_DEBUG(
"read (actually a write) handle for " <<
keys.isoDeco[0].key() <<
" already exists. "
541 <<
"Will not recompute." );
542 return StatusCode::SUCCESS;
545 if (!readHandle.isValid()) {
547 <<
keys.isoDeco[0].key());
548 return StatusCode::FAILURE;
551 for (
const auto *
part : *readHandle) {
553 bool successfulCalc =
false;
556 CaloIsoResult, *
part,
keys.isoTypes,
keys.CorrList, cellColl);
565 if (successfulCalc) {
566 for (
unsigned int i = 0;
i <
keys.isoTypes.size();
i++) {
567 float iso = CaloIsoResult.
etcones[
i];
569 <<
" = " << iso / 1
e3);
570 (handles.isoDeco[
i])(*
part) = iso;
573 (handles.corrBitsetDeco)(*
part) =
keys.CorrList.calobitset.to_ulong();
578 for (
auto& coreCorDecoPr : handles.coreCorDeco) {
583 ATH_MSG_FATAL(
"Could not find core correction of required type: "
584 << xAOD::Iso::toCString(coreCorDecoPr.first));
586 return StatusCode::FAILURE;
590 float>::const_iterator
it =
592 if (
it == corIter->second.end()) {
594 << xAOD::Iso::toCString(coreCorDecoPr.first));
596 return StatusCode::FAILURE;
599 << xAOD::Iso::toCString(coreCorDecoPr.first));
600 (coreCorDecoPr.second)(*
part) =
it->second;
604 for (
auto& noncoreCorDecoPr : handles.noncoreCorDeco) {
609 ATH_MSG_FATAL(
"Could not find noncore correction of required type: "
610 << xAOD::Iso::toCString(noncoreCorDecoPr.first));
612 return StatusCode::FAILURE;
616 << xAOD::Iso::toCString(noncoreCorDecoPr.first));
617 auto& vecHandles = noncoreCorDecoPr.second;
618 for (
size_t i = 0;
i < vecHandles.size();
i++) {
619 (vecHandles[
i])(*
part) = corIter->second[
i];
624 << xAOD::Iso::toCString(flav));
625 return StatusCode::FAILURE;
629 return StatusCode::SUCCESS;
◆ executeTrackIso()
Definition at line 633 of file IsolationBuilder.cxx.
637 for (
const auto&
pr : trackIsoMap) {
639 const auto&
keys =
pr.second;
640 TrackIsoHelpHandles handles(
keys);
644 if (handles.isoDeco.empty()) {
645 ATH_MSG_FATAL(
"Have a TrackIsoHelpHandles with no actual isolations; "
646 "something wrong happened");
647 return StatusCode::FAILURE;
652 if (readHandle.isAvailable()){
654 ATH_MSG_DEBUG(
"Decoration for for " <<
keys.isoDeco[0].key() <<
" already exists. "
655 <<
"Will not recompute." );
656 return StatusCode::SUCCESS;
659 if (!readHandle.isValid()) {
661 <<
keys.isoDeco[0].key());
662 return StatusCode::FAILURE;
665 for (
const auto *
part : *readHandle) {
667 bool successfulCalc =
false;
671 ATH_MSG_DEBUG(
"Doing track isolation on an egamma particle");
672 std::unique_ptr<xAOD::Vertex> trigVtx =
nullptr;
673 std::set<const xAOD::TrackParticle*> tracksToExclude;
679 trigVtx = std::make_unique<xAOD::Vertex>();
681 trigVtx->
setZ(
el->trackParticle()->z0() +
el->trackParticle()->vz());
682 ATH_MSG_DEBUG(
"will use a vertex at z = " << trigVtx->
z() <<
" to compute electron track isolation");
692 if (gam && gam->nVertices() > 0) {
695 tracksToExclude.insert(
710 ATH_MSG_DEBUG(
"Not doing track isolation on an egamma particle");
715 if (successfulCalc) {
716 for (
unsigned int i = 0;
i <
keys.isoTypes.size();
i++) {
717 float iso = TrackIsoResult.
ptcones[
i];
720 <<
" = " << iso / 1
e3
721 <<
", var cone = " << isoV / 1
e3);
722 (handles.isoDeco[
i])(*
part) = iso;
723 (handles.isoDecoV[
i])(*
part) = isoV;
727 (handles.corrBitsetDeco)(*
part) =
keys.CorrList.trackbitset.to_ulong();
730 for (
auto& coreCorDecoPr : handles.coreCorDeco) {
735 ATH_MSG_FATAL(
"Could not find core correction of required type: "
736 << xAOD::Iso::toCString(coreCorDecoPr.first));
738 return StatusCode::FAILURE;
741 << xAOD::Iso::toCString(coreCorDecoPr.first));
742 (coreCorDecoPr.second)(*
part) = corIter->second;
746 ATH_MSG_FATAL(
"Call to TrackIsolationTool failed for flavor "
747 << xAOD::Iso::toCString(flav));
748 return StatusCode::FAILURE;
752 return StatusCode::SUCCESS;
◆ 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
◆ 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.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ finalize()
StatusCode IsolationBuilder::finalize |
( |
| ) |
|
|
finaloverridevirtual |
◆ initialize()
StatusCode IsolationBuilder::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 26 of file IsolationBuilder.cxx.
30 std::set<xAOD::Iso::IsolationFlavour> runIsoType;
120 return StatusCode::SUCCESS;
◆ initializeIso()
called by algorithm initialize per object (electron, photon, forward electron, muon)
Definition at line 269 of file IsolationBuilder.cxx.
282 std::string
prefix = containerName +
".";
284 for (
size_t flavor = 0; flavor < isoInts.size(); flavor++) {
289 CaloIsoHelpKey cisoH(
this);
290 TrackIsoHelpKey tisoH(
this);
296 for (
size_t type = 0;
type < isoInts[flavor].size();
type++) {
306 oldIsoFlav != isoFlav) {
307 ATH_MSG_FATAL(
"Configuration error: can only have one type of "
308 "isolation in inner vector");
309 return StatusCode::FAILURE;
311 oldIsoFlav = isoFlav;
313 if (!customConfig.empty()) {
314 isoName +=
"_" + customConfig;
318 cisoH.isoTypes.push_back(isoType);
319 cisoH.isoDeco.emplace_back(isoName);
321 tisoH.isoTypes.push_back(isoType);
322 tisoH.isoDeco.emplace_back(isoName);
326 if (!customConfig.empty()) {
327 isoNameV +=
"_" + customConfig;
329 tisoH.isoDecoV.emplace_back(isoNameV);
332 << isoFlav <<
" not supported.");
333 return StatusCode::FAILURE;
339 ATH_MSG_WARNING(
"The configuration was malformed: an empty inner vector "
340 "was added; ignoring");
359 flavor, isoFlav, cisoH, corInts,
false,
prefix, customConfig));
361 flavor, isoFlav, cisoH, corIntsExtra,
true,
prefix, customConfig));
364 caloIsoMap->push_back(std::make_pair(isoFlav, cisoH));
367 "caloIsoMap was nullptr but the configuration attempted to use it");
368 return StatusCode::FAILURE;
379 flavor, isoFlav, tisoH, corInts,
false,
prefix, customConfig));
381 flavor, isoFlav, tisoH, corIntsExtra,
true,
prefix, customConfig));
384 trackIsoMap->push_back(std::make_pair(isoFlav, tisoH));
387 "trackIsoMap was nullptr but the configuration attempted to use it");
388 return StatusCode::FAILURE;
392 << xAOD::Iso::toCString(isoFlav)
393 <<
" does not exist ! Check your inputs");
395 runIsoType.insert(isoFlav);
397 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.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, InDet::SiSPGNNTrackMaker, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ isCoreCor()
◆ 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()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ 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.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ 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.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_allTrackRemoval
Gaudi::Property<bool> IsolationBuilder::m_allTrackRemoval { this, "AllTrackRemoval", true } |
|
private |
◆ m_cellIsolationTool
Initial value:{
this,
"CaloCellIsolationTool",
"",
"Handle of the calo cell IsolationTool"
}
Tool for cell isolation calculation.
Definition at line 97 of file IsolationBuilder.h.
◆ m_cellsKey
Initial value:{
this,
"CellCollectionName",
"AllCalo",
"Name of container which contain calo cells"
}
Cell container.
Definition at line 105 of file IsolationBuilder.h.
◆ m_customConfigEl
Gaudi::Property<std::string> IsolationBuilder::m_customConfigEl |
|
private |
Initial value:{
this,
"CustomConfigurationNameEl",
"",
"use a custom configuration for electron"
}
Definition at line 349 of file IsolationBuilder.h.
◆ m_customConfigFwd
Gaudi::Property<std::string> IsolationBuilder::m_customConfigFwd |
|
private |
Initial value:{
this,
"CustomConfigurationNameFwd",
"",
"use a custom configuration for forward electron"
}
Definition at line 363 of file IsolationBuilder.h.
◆ m_customConfigMu
Gaudi::Property<std::string> IsolationBuilder::m_customConfigMu |
|
private |
Initial value:{
this,
"CustomConfigurationNameMu",
"",
"use a custom configuration for muon"
}
Definition at line 370 of file IsolationBuilder.h.
◆ m_customConfigPh
Gaudi::Property<std::string> IsolationBuilder::m_customConfigPh |
|
private |
Initial value:{
this,
"CustomConfigurationNamePh",
"",
"use a custom configuration for photon"
}
Definition at line 356 of file IsolationBuilder.h.
◆ m_detStore
◆ m_elCaloIso
◆ m_elcorInts
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_elcorInts |
|
private |
Initial value:{
this,
"ElCorTypes",
{},
"The correction types to do for electron iso: vector of vector of enum "
"type Iso::IsolationCalo/TrackCorrection"
}
Definition at line 158 of file IsolationBuilder.h.
◆ m_elcorIntsExtra
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_elcorIntsExtra |
|
private |
Initial value:{
this,
"ElCorTypesExtra",
{},
"The extra correction types to store but not apply for electrons"
}
Definition at line 166 of file IsolationBuilder.h.
◆ m_ElectronContainerName
Gaudi::Property<std::string> IsolationBuilder::m_ElectronContainerName |
|
private |
Initial value:{
this,
"ElectronCollectionContainerName",
"Electrons"
}
Containers (Is it best to make them as strings? Used by multiple handles)
Definition at line 72 of file IsolationBuilder.h.
◆ m_elisoInts
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_elisoInts |
|
private |
Initial value:{
this,
"ElIsoTypes",
{},
"The isolation types to do for electrons: vector of vector of enum type "
"Iso::IsolationType"
}
Isolation types.
Definition at line 150 of file IsolationBuilder.h.
◆ m_elTrackIso
◆ m_evtStore
◆ 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_feCaloIso
◆ m_fecorInts
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_fecorInts |
|
private |
Initial value:{
this,
"FeCorTypes",
{},
"The correction types to do for forward electron iso: vector of vector of "
"enum type Iso::IsolationCalo/TrackCorrection"
}
Definition at line 229 of file IsolationBuilder.h.
◆ m_fecorIntsExtra
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_fecorIntsExtra |
|
private |
Initial value:{
this,
"FeCorTypesExtra",
{},
"The extra correction types to store but not apply for forward electrons"
}
Definition at line 237 of file IsolationBuilder.h.
◆ m_feisoInts
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_feisoInts |
|
private |
Initial value:{
this,
"FeIsoTypes",
{},
"The isolation types to do for forward electron: vector of vector of enum "
"type Iso::IsolationType"
}
Definition at line 221 of file IsolationBuilder.h.
◆ m_FwdElectronContainerName
Gaudi::Property<std::string> IsolationBuilder::m_FwdElectronContainerName |
|
private |
Initial value:{
this,
"FwdElectronCollectionContainerName",
"ForwardElectrons"
}
Definition at line 78 of file IsolationBuilder.h.
◆ m_isTrigger
Gaudi::Property<bool> IsolationBuilder::m_isTrigger { this, "IsTrigger", false } |
|
private |
◆ m_muCaloIso
◆ m_mucorInts
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_mucorInts |
|
private |
Initial value:{
this,
"MuCorTypes",
{},
"The correction types to do for Muon iso: vector of vector of enum type "
"Iso::IsolationCalo/TrackCorrection"
}
Definition at line 206 of file IsolationBuilder.h.
◆ m_mucorIntsExtra
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_mucorIntsExtra |
|
private |
Initial value:{
this,
"MuCorTypesExtra",
{},
"The extra correction types to store but not apply for muons"
}
Definition at line 214 of file IsolationBuilder.h.
◆ m_muisoInts
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_muisoInts |
|
private |
Initial value:{
this,
"MuIsoTypes",
{},
"The isolation types to do for Muons : vector of vector of enum type "
"Iso::IsolationType"
}
Definition at line 198 of file IsolationBuilder.h.
◆ m_MuonContainerName
Gaudi::Property<std::string> IsolationBuilder::m_MuonContainerName |
|
private |
Initial value:{
this,
"MuonCollectionContainerName",
"Muons"
}
Definition at line 90 of file IsolationBuilder.h.
◆ m_muTrackIso
◆ m_pflowIsolationTool
Initial value:{
this,
"PFlowIsolationTool",
"",
"Handle of the pflow IsolationTool"
}
Tool for neutral pflow isolation calculation.
Definition at line 121 of file IsolationBuilder.h.
◆ m_phCaloIso
◆ m_phcorInts
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_phcorInts |
|
private |
Initial value:{
this,
"PhCorTypes",
{},
"The correction types to do for photons iso: vector of vector of enum type "
"Iso::IsolationCalo/TrackCorrection"
}
Definition at line 183 of file IsolationBuilder.h.
◆ m_phcorIntsExtra
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_phcorIntsExtra |
|
private |
Initial value:{
this,
"PhCorTypesExtra",
{},
"The extra correction types to store but not apply for photons"
}
Definition at line 191 of file IsolationBuilder.h.
◆ m_phisoInts
Gaudi::Property<std::vector<std::vector<int> > > IsolationBuilder::m_phisoInts |
|
private |
Initial value:{
this,
"PhIsoTypes",
{},
"The isolation types to do for photons: vector of vector of enum type "
"Iso::IsolationType"
}
Isolation types (for the alg.
properties, only vector<vector<double>> available
Definition at line 175 of file IsolationBuilder.h.
◆ m_PhotonContainerName
Gaudi::Property<std::string> IsolationBuilder::m_PhotonContainerName |
|
private |
Initial value:{
this,
"PhotonCollectionContainerName",
"Photons"
}
Definition at line 84 of file IsolationBuilder.h.
◆ m_phTrackIso
◆ m_storepileupCorrection
Gaudi::Property<bool> IsolationBuilder::m_storepileupCorrection { this, "storepileupCorrection", false } |
|
private |
◆ m_topoIsolationTool
Initial value:{
this,
"CaloTopoIsolationTool",
"",
"Handle of the calo topo IsolationTool"
}
Tool for topo isolation calculation.
Definition at line 113 of file IsolationBuilder.h.
◆ m_trackIsolationTool
Initial value:{
this,
"TrackIsolationTool",
"",
"Handle of the track IsolationTool"
}
Tool for neutral pflow isolation calculation.
Definition at line 129 of file IsolationBuilder.h.
◆ m_useBremAssoc
Gaudi::Property<bool> IsolationBuilder::m_useBremAssoc |
|
private |
Initial value:{ this,
"useBremAssoc",
true,
"use track to track assoc after brem" }
Definition at line 140 of file IsolationBuilder.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Property< bool > m_allTrackRemoval
Gaudi::Property< std::vector< std::vector< int > > > m_elisoInts
Isolation types.
@ topoetcone
Topo-cluster ET-sum.
Gaudi::Property< std::string > m_customConfigFwd
Gaudi::Property< bool > m_storepileupCorrection
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
@ coreConeSC
core energy (super cluster).
void declareIso(std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey >> &caloIso)
@ coreEnergy
energy stored for this correction
std::vector< float > ptvarcones_10GeVDivPt
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > m_phCaloIso
Gaudi::Property< std::string > m_customConfigMu
Gaudi::Property< std::vector< std::vector< int > > > m_elcorIntsExtra
IsolationFlavour
Enumeration for different ways of calculating isolation in xAOD files.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::string toString(const IsoType &iso)
Gaudi::Property< std::vector< std::vector< int > > > m_mucorInts
float round(const float toRound, const unsigned int decimals)
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)
Gaudi::Property< std::string > m_ElectronContainerName
Containers (Is it best to make them as strings? Used by multiple handles)
Gaudi::Property< std::vector< std::vector< int > > > m_phisoInts
Isolation types (for the alg.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Gaudi::Property< std::string > m_MuonContainerName
Gaudi::Property< std::string > m_FwdElectronContainerName
@ etcone
Calorimeter isolation.
std::set< const xAOD::TrackParticle * > getTrackParticles(const xAOD::Egamma *eg, bool useBremAssoc=true, bool allParticles=true)
Return a list of all or only the best TrackParticle associated to the object.
std::vector< size_t > vec
@ neflowisol
neutral eflow
Gaudi::Property< bool > m_isTrigger
is the alg run at trigger level
const std::string & key() const
Return the StoreGate ID for the referenced object.
IsolationCorrectionParameter
std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey > > m_elTrackIso
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Property< std::vector< std::vector< int > > > m_fecorInts
StatusCode addCaloIsoCorrections(size_t flavor, xAOD::Iso::IsolationFlavour isoFlav, CaloIsoHelpKey &cisoH, const std::vector< std::vector< int >> &corInts, bool corrsAreExtra, const std::string &prefix, const std::string &customConfig)
called by initializeIso
StatusCode addTrackIsoCorrections(size_t flavor, xAOD::Iso::IsolationFlavour isoFlav, TrackIsoHelpKey &tisoH, const std::vector< std::vector< int >> &corInts, bool corrsAreExtra, const std::string &prefix, const std::string &customConfig)
called by initializeIso
Gaudi::Property< std::vector< std::vector< int > > > m_phcorIntsExtra
@ core57cells
core 5x7 cells
Gaudi::Property< std::string > m_customConfigPh
void setZ(float value)
Sets the z position.
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
Cell container.
AthReentrantAlgorithm()
Default constructor:
StatusCode initializeIso(std::set< xAOD::Iso::IsolationFlavour > &runIsoType, std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey >> *caloIsoMap, std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey >> *trackIsoMap, const std::string &containerName, const std::vector< std::vector< int >> &isoInts, const std::vector< std::vector< int >> &corInts, const std::vector< std::vector< int >> &corIntsExtra, const std::string &customConfig)
called by algorithm initialize per object (electron, photon, forward electron, muon)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
@ caloIso
Get sum of transvers energy of clusters around jet seed within 0.2 < dR < 0.4
std::map< Iso::IsolationTrackCorrection, float > coreCorrections
::StatusCode StatusCode
StatusCode definition for legacy code.
std::map< Iso::IsolationCaloCorrection, std::map< Iso::IsolationCorrectionParameter, float > > coreCorrections
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
IsolationType
Overall enumeration for isolation types in xAOD files.
Gaudi::Property< std::vector< std::vector< int > > > m_feisoInts
Gaudi::Property< std::vector< std::vector< int > > > m_phcorInts
StatusCode executeTrackIso(const std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey >> &trackIsoMap) const
std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey > > m_muTrackIso
ToolHandle< xAOD::INeutralEFlowIsolationTool > m_pflowIsolationTool
Tool for neutral pflow isolation calculation.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
float z() const
Returns the z position.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Gaudi::Property< bool > m_useBremAssoc
Gaudi::Property< std::vector< std::vector< int > > > m_muisoInts
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Gaudi::Property< std::vector< std::vector< int > > > m_fecorIntsExtra
virtual void renounce()=0
IsolationFlavour isolationFlavour(IsolationType type)
convert Isolation Type into Isolation Flavour
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode executeCaloIso(const std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey >> &caloIsoMap, const CaloCellContainer *cellColl) const
ToolHandle< xAOD::ITrackIsolationTool > m_trackIsolationTool
Tool for neutral pflow isolation calculation.
ToolHandle< xAOD::ICaloCellIsolationTool > m_cellIsolationTool
Tool for cell isolation calculation.
std::string to_string(const DetectorType &type)
std::vector< float > etcones
@ coreCone
core energy (in dR<0.1).
virtual StatusCode sysInitialize() override
Override sysInitialize.
Gaudi::Property< std::string > m_customConfigEl
const xAOD::TrackParticle * getOriginalTrackParticleFromGSF(const xAOD::TrackParticle *trkPar)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the GSF Track Particle...
void makePrivateStore()
Create a new (empty) private store for this object.
Container class for CaloCell.
std::vector< float > ptcones
Gaudi::Property< std::string > m_PhotonContainerName
IsolationCaloCorrection
Enumeration for different ways of correcting isolation in xAOD files.
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
std::vector< std::pair< xAOD::Iso::IsolationFlavour, TrackIsoHelpKey > > m_phTrackIso
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > m_feCaloIso
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
static bool isCoreCor(xAOD::Iso::IsolationCaloCorrection corr)
std::map< Iso::IsolationCaloCorrection, std::vector< float > > noncoreCorrections
Gaudi::Property< std::vector< std::vector< int > > > m_mucorIntsExtra
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
ToolHandle< xAOD::ICaloTopoClusterIsolationTool > m_topoIsolationTool
Tool for topo isolation calculation.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > m_elCaloIso
std::vector< std::pair< xAOD::Iso::IsolationFlavour, CaloIsoHelpKey > > m_muCaloIso
Gaudi::Property< std::vector< std::vector< int > > > m_elcorInts
@ pileupCorrection
fully corrected