|
ATLAS Offline Software
|
#include <METRemappingAlg.h>
|
| METRemappingAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~METRemappingAlg ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. 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 | 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::JetContainer > | m_jetContKey {this, "JetCollectionKey", "AnalysisJets", "SG key for the analysis jets collection"} |
|
SG::ReadHandleKey< xAOD::PhotonContainer > | m_photonContKey {this, "PhotonCollectionKey", "AnalysisPhotons", "SG key for the analysis photons collection"} |
|
SG::ReadHandleKey< xAOD::ElectronContainer > | m_electronContKey {this, "ElectronCollectionKey", "AnalysisElectrons", "SG key for the analysis electrons collection"} |
|
SG::ReadHandleKey< xAOD::MuonContainer > | m_muonContKey {this, "MuonCollectionKey", "AnalysisMuons", "SG key for the analysis muons collection"} |
|
SG::ReadHandleKey< xAOD::TauJetContainer > | m_tauContKey {this, "TauCollectionKey", "AnalysisTauJets", "SG key for the analysis tau jets collection"} |
|
SG::ReadHandleKey< xAOD::MissingETAssociationMap > | m_inputMapKey {this, "AssociationInputKey", "METAssoc_AntiKt4EMPFlow", "SG key for the input MissingETAssociationMap"} |
|
SG::ReadHandleKey< xAOD::MissingETContainer > | m_inputCoreKey {this, "METCoreInputKey", "MET_Core_AntiKt4EMPFlow", "SG key for the input MET core container"} |
|
SG::WriteHandleKey< xAOD::MissingETAssociationMap > | m_outputMapKey {this, "AssociationOutputKey", "METAssoc_AnalysisMET", "SG key for the output MissingETAssociationMap"} |
|
SG::WriteHandleKey< xAOD::MissingETContainer > | m_outputCoreKey {this, "METCoreOutputKey", "MET_Core_AnalysisMET", "SG key for the output MET core container"} |
|
const SG::AuxElement::ConstAccessor< ElementLink< xAOD::IParticleContainer > > | m_accOriginalObject {"originalObjectLink"} |
|
DataObjIDColl | m_extendedExtraObjects |
|
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 32 of file METRemappingAlg.h.
◆ linkMap_t
◆ StoreGateSvc_t
◆ METRemappingAlg()
DerivationFramework::METRemappingAlg::METRemappingAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~METRemappingAlg()
virtual DerivationFramework::METRemappingAlg::~METRemappingAlg |
( |
| ) |
|
|
virtualdefault |
◆ 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()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode DerivationFramework::METRemappingAlg::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 37 of file METRemappingAlg.cxx.
41 const EventContext& ctx = Gaudi::Hive::currentContext();
44 if( !jetContHandle.isValid() ) {
46 return StatusCode::FAILURE;
51 std::map<const xAOD::Jet*, ElementLink<xAOD::JetContainer> > jetLinkMap;
55 return StatusCode::FAILURE;
59 jetLinkMap.try_emplace(
82 if( !inputMapHandle.isValid() ) {
84 return StatusCode::FAILURE;
89 std::make_unique<xAOD::MissingETAssociationMap>(),
90 std::make_unique<xAOD::MissingETAuxAssociationMap>()
99 if( !assoc->isMisc() ) {
101 std::map<const xAOD::Jet*, ElementLink<xAOD::JetContainer> >::const_iterator jet_it = jetLinkMap.find(assoc->refJet());
102 if( jet_it != jetLinkMap.end() ) {
104 assoc->setJetLink(jet_it->second);
109 if( !link.isValid() ) {
110 objectLinks.push_back(invalidLink);
114 linkMap_t::const_iterator obj_it = objectLinkMap.find(*link);
115 if( obj_it != objectLinkMap.end() ) {
116 objectLinks.emplace_back(obj_it->second);
120 objectLinks.push_back(invalidLink);
123 assoc->setObjectLinks(objectLinks);
128 return StatusCode::FAILURE;
134 if( !link.isValid() ) {
135 miscObjectLinks.push_back(invalidLink);
139 linkMap_t::const_iterator obj_it = objectLinkMap.find(*link);
140 if( obj_it != objectLinkMap.end() ) {
141 miscObjectLinks.emplace_back(obj_it->second);
143 miscObjectLinks.push_back(invalidLink);
146 assoc->setObjectLinks(miscObjectLinks);
152 if( !inputCoreHandle.isValid() ) {
154 return StatusCode::FAILURE;
159 std::make_unique<xAOD::MissingETContainer>(),
160 std::make_unique<xAOD::MissingETAuxContainer>()
168 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 & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ fillLinkMap()
template<typename handle_t >
StatusCode DerivationFramework::METRemappingAlg::fillLinkMap |
( |
linkMap_t & |
map, |
|
|
handle_t & |
handle |
|
) |
| |
|
private |
Definition at line 172 of file METRemappingAlg.cxx.
174 if( !handle.isValid() ) {
176 return StatusCode::FAILURE;
182 return StatusCode::FAILURE;
186 map.try_emplace(orig, link);
188 return StatusCode::SUCCESS;
◆ initialize()
StatusCode DerivationFramework::METRemappingAlg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ 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()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_accOriginalObject
◆ m_detStore
◆ m_electronContKey
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_inputCoreKey
◆ m_inputMapKey
◆ m_jetContKey
◆ m_muonContKey
◆ m_outputCoreKey
◆ m_outputMapKey
◆ m_photonContKey
◆ m_tauContKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const SG::AuxElement::ConstAccessor< ElementLink< xAOD::IParticleContainer > > m_accOriginalObject
MET association descriptor contains object links and corresponding parameters.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::map< const xAOD::IParticle *, ElementLink< xAOD::IParticleContainer > > linkMap_t
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonContKey
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
StatusCode fillLinkMap(linkMap_t &map, handle_t &handle)
#define ATH_MSG_VERBOSE(x)
SG::ReadHandleKey< xAOD::MissingETContainer > m_inputCoreKey
Class providing the definition of the 4-vector interface.
SG::ReadHandleKey< xAOD::MuonContainer > m_muonContKey
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
virtual StatusCode sysInitialize() override
Override sysInitialize.
std::vector< objlink_t > objlink_vector_t
Vector of object links type.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadHandleKey< xAOD::MissingETAssociationMap > m_inputMapKey
Principal data object for Missing ET.
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.
SG::ReadHandleKey< xAOD::JetContainer > m_jetContKey
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauContKey
SG::WriteHandleKey< xAOD::MissingETAssociationMap > m_outputMapKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronContKey
SG::WriteHandleKey< xAOD::MissingETContainer > m_outputCoreKey
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataObjIDColl m_extendedExtraObjects
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>