Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
This is the algorithm, which inherits from AthReentrantAlgorithm, that adds element links between FlowElements (FEs) and Tau objects.
More...
#include <PFTauFlowElementAssoc.h>
|
| PFTauFlowElementAssoc (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~PFTauFlowElementAssoc () |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute (const EventContext &ctx) const |
| This algorithm: 1) Accesses the relevant FlowElement and TauJet containers 2) Loops over the neutral FEs and matches them to the corresponding TauJet clusters, creating the ElementLinks and adding them to the JetETMissNeutralParticleFlowObjects container as a decoration 3) Loops over the charged FEs and matches them to the corresponding TauJet tracks, creating the ElementLinks and adding them to the JetETMissChargedParticleFlowObjects container as a decoration 4) Adds the decoration to the TauJet container containing a vector of ElementLinks to corresponding FEs. More...
|
|
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 |
|
|
SG::ReadHandleKey< xAOD::TauJetContainer > | m_tauJetReadHandleKey {this,"TauJetContainer","TauJets","ReadHandleKey for TauJet Container"} |
|
SG::ReadHandleKey< xAOD::FlowElementContainer > | m_neutralFEReadHandleKey {this,"JetETMissNeutralFlowElementContainer","JetETMissNeutralParticleFlowObjects","ReadHandleKey for neutral FlowElements"} |
|
SG::ReadHandleKey< xAOD::FlowElementContainer > | m_chargedFEReadHandleKey {this,"JetETMissChargedFlowElementContainer","JetETMissChargedParticleFlowObjects","ReadHandleKey for charged FlowElements"} |
|
SG::WriteDecorHandleKey< xAOD::TauJetContainer > | m_tauNeutralFEWriteDecorKey {this,"TauNeutralFEDecorKey","TauJets.neutralFELinks","WriteDecorHandleKey for adding neutral FE links to taus"} |
| The write key for adding Neutral Flow Element links to the taus. More...
|
|
SG::WriteDecorHandleKey< xAOD::TauJetContainer > | m_tauChargedFEWriteDecorKey {this,"TauChargedFEDecorKey","TauJets.chargedFELinks","WriteDecorHandleKey for adding charged FE links to taus"} |
| The write key for adding Charged Flow Element links to the taus. More...
|
|
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > | m_neutralFETauWriteDecorKey {this,"NeutralFETauDecorKey","JetETMissNeutralParticleFlowObjects.FE_TauLinks","WriteDecorHandleKey for adding tau links to neutral FEs"} |
| The write key for adding tau element links to the Neutral Flow Elements. More...
|
|
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > | m_chargedFETauWriteDecorKey {this,"ChargedFETauDecorKey","JetETMissChargedParticleFlowObjects.FE_TauLinks","WriteDecorHandleKey for adding tau links to charged FEs"} |
| The write key for adding tau element links to the Charged Flow Elements. More...
|
|
SG::ReadHandleKey< xAOD::JetContainer > | m_jetReadHandleKey {this,"JetContainer","AntiKt4EMPFlowJets","ReadHandleKey for Jet Container"} |
|
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 |
|
This is the algorithm, which inherits from AthReentrantAlgorithm, that adds element links between FlowElements (FEs) and Tau objects.
Charged FEs are associated with core tau tracks and neutral FEs are associated with tau clusters. Decorations are added to the TauJet container consisting of a vector of ElementLinks to the charged and neutral FlowElement container. Similarly, decorations are added to the charged and neutral FlowElement containers (JetETMissChargedFlowElements and JetETMissNeutralFlowElements) which contain a vector of ElementLinks to the associated TauJets.
Definition at line 36 of file PFTauFlowElementAssoc.h.
◆ StoreGateSvc_t
◆ PFTauFlowElementAssoc()
PFTauFlowElementAssoc::PFTauFlowElementAssoc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~PFTauFlowElementAssoc()
PFTauFlowElementAssoc::~PFTauFlowElementAssoc |
( |
| ) |
|
|
virtualdefault |
◆ cardinality()
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 75 of file AthCommonReentrantAlgorithm.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]
◆ 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 PFTauFlowElementAssoc::execute |
( |
const EventContext & |
ctx | ) |
const |
|
virtual |
This algorithm: 1) Accesses the relevant FlowElement and TauJet containers 2) Loops over the neutral FEs and matches them to the corresponding TauJet clusters, creating the ElementLinks and adding them to the JetETMissNeutralParticleFlowObjects container as a decoration 3) Loops over the charged FEs and matches them to the corresponding TauJet tracks, creating the ElementLinks and adding them to the JetETMissChargedParticleFlowObjects container as a decoration 4) Adds the decoration to the TauJet container containing a vector of ElementLinks to corresponding FEs.
Definition at line 50 of file PFTauFlowElementAssoc.cxx.
63 std::vector<std::vector<FELink_t>> tauNeutralFEVec(tauJetReadHandle->size());
64 std::vector<std::vector<FELink_t>> tauChargedFEVec(tauJetReadHandle->size());
73 if (FE->otherObjects().empty())
continue;
74 if (FE->otherObjects().at(0) ==
nullptr)
continue;
76 size_t FEClusterIndex = FE->otherObjects().at(0)->index();
78 std::vector<TauJetLink_t> FETauJetLinks;
81 for (
const xAOD::TauJet* tau : *tauNeutralFEWriteDecorHandle) {
84 if(acc_passThinning.isAvailable(*tau) && !acc_passThinning(*tau))
continue;
88 std::vector<const xAOD::IParticle*> tauClusters = tau->clusters();
89 for (
const auto *cluster : tauClusters) {
91 TLorentzVector clusterp4 = clus->
p4();
93 if (tauVertex !=
nullptr) {
95 clusterp4 = vertexedClus.p4();
100 size_t tauClusterIndex = clus->
index();
103 if (tauClusterIndex == FEClusterIndex) {
104 FETauJetLinks.emplace_back(*tauJetReadHandle,tau->index() );
105 tauNeutralFEVec.at(tau->index()).emplace_back(*neutralFEReadHandle, FE->index() );
112 neutralFETauWriteDecorHandle (*FE) = FETauJetLinks;
121 if (FE->chargedObjects().empty())
continue;
122 if (FE->chargedObjects().at(0) ==
nullptr)
continue;
125 size_t FETrackIndex = FE->chargedObjects().at(0)->index();
127 std::vector<TauJetLink_t> FETauJetLinks;
130 for (
const xAOD::TauJet* tau : *tauChargedFEWriteDecorHandle) {
133 if(acc_passThinning.isAvailable(*tau) && !acc_passThinning(*tau))
continue;
135 std::vector<const xAOD::TauTrack*> tauTracks = tau->tracks();
136 for (
const auto *tauTrack : tauTracks) {
140 size_t tauIDTrackIndex = tauIDTrack->
index();
143 if (tauIDTrackIndex == FETrackIndex) {
144 FETauJetLinks.emplace_back(*tauJetReadHandle,tau->index() );
145 tauChargedFEVec.at(tau->index()).emplace_back(*chargedFEReadHandle, FE->index() );
151 chargedFETauWriteDecorHandle (*FE) = FETauJetLinks;
159 for (
const xAOD::TauJet* tau : *tauNeutralFEWriteDecorHandle) {
160 tauNeutralFEWriteDecorHandle (*tau) = tauNeutralFEVec.at(tau->index());
161 tauChargedFEWriteDecorHandle (*tau) = tauChargedFEVec.at(tau->index());
166 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()
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
◆ filterPassed()
◆ initialize()
StatusCode PFTauFlowElementAssoc::initialize |
( |
| ) |
|
|
virtual |
◆ 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()
◆ 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()
◆ sysExecute()
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 85 of file AthCommonReentrantAlgorithm.cxx.
◆ sysInitialize()
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 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 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_chargedFEReadHandleKey
SG::ReadHandleKey<xAOD::FlowElementContainer> PFTauFlowElementAssoc::m_chargedFEReadHandleKey {this,"JetETMissChargedFlowElementContainer","JetETMissChargedParticleFlowObjects","ReadHandleKey for charged FlowElements"} |
|
private |
◆ m_chargedFETauWriteDecorKey
The write key for adding tau element links to the Charged Flow Elements.
Definition at line 63 of file PFTauFlowElementAssoc.h.
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
◆ m_jetReadHandleKey
◆ m_neutralFEReadHandleKey
SG::ReadHandleKey<xAOD::FlowElementContainer> PFTauFlowElementAssoc::m_neutralFEReadHandleKey {this,"JetETMissNeutralFlowElementContainer","JetETMissNeutralParticleFlowObjects","ReadHandleKey for neutral FlowElements"} |
|
private |
◆ m_neutralFETauWriteDecorKey
The write key for adding tau element links to the Neutral Flow Elements.
Definition at line 61 of file PFTauFlowElementAssoc.h.
◆ m_tauChargedFEWriteDecorKey
◆ m_tauJetReadHandleKey
◆ m_tauNeutralFEWriteDecorKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const Amg::Vector3D & position() const
Returns the 3-pos.
Helper class to provide constant type-safe access to aux data.
SG::ReadHandleKey< xAOD::JetContainer > m_jetReadHandleKey
bool empty() const
Test if the key is blank.
SG::ReadHandleKey< xAOD::FlowElementContainer > m_neutralFEReadHandleKey
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_tauNeutralFEWriteDecorKey
The write key for adding Neutral Flow Element links to the taus.
virtual void setOwner(IDataHandleHolder *o)=0
An algorithm that can be simultaneously executed in multiple threads.
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Description of a calorimeter cluster.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
Class describing a tau jet.
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
SG::ReadHandleKey< xAOD::FlowElementContainer > m_chargedFEReadHandleKey
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_tauChargedFEWriteDecorKey
The write key for adding Charged Flow Element links to the taus.
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.
size_t index() const
Return the index of this element within its container.
virtual void renounce()=0
virtual FourMom_t p4() const
The full 4-momentum of the particle.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_neutralFETauWriteDecorKey
The write key for adding tau element links to the Neutral Flow Elements.
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_chargedFETauWriteDecorKey
The write key for adding tau element links to the Charged Flow Elements.
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauJetReadHandleKey
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
Class describing a TrackParticle.
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
Evaluate cluster kinematics with a different vertex / signal state.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
A detector object made of other lower level object(s)