|
ATLAS Offline Software
|
#include <JetExternalAssocTool.h>
|
| JetExternalAssocTool (const std::string &t, const std::string &n, const IInterface *p) |
|
StatusCode | initialize () |
|
StatusCode | finalize () |
|
virtual StatusCode | addBranches () const |
| Pass the thinning service
More...
|
|
bool | TransferLink (const xAOD::Jet &jet, const xAOD::Jet &jet_external) 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 | 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 |
|
Definition at line 31 of file JetExternalAssocTool.h.
◆ StoreGateSvc_t
◆ type_el
◆ type_ghostlink
◆ JetExternalAssocTool()
DerivationFramework::JetExternalAssocTool::JetExternalAssocTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ addBranches()
StatusCode DerivationFramework::JetExternalAssocTool::addBranches |
( |
| ) |
const |
|
virtual |
Pass the thinning service
Implements DerivationFramework::IAugmentationTool.
Definition at line 67 of file JetExternalAssocTool.cxx.
73 return StatusCode::FAILURE;
80 return StatusCode::FAILURE;
87 if(
jets->size() != ExternalJetCollection->
size()){
89 return StatusCode::FAILURE;
94 auto jet_external = ExternalJetCollection->
at(
index);
96 if( std::abs(
jet->pt() - jet_external->pt()) > 0.1 ){
97 ATH_MSG_WARNING(
"Potential inconsistency between two jet collections: " <<
jet->pt() <<
" v.s. " << jet_external->pt());
101 ATH_MSG_ERROR(
"Failure when transferring link from external jet to current jet!");
102 return StatusCode::FAILURE;
110 std::vector<const xAOD::Jet*> UnAssignedExternalJets;
111 for(
auto jet_external : *ExternalJetCollection){
112 UnAssignedExternalJets.push_back(jet_external);
122 for(
auto external_iter = UnAssignedExternalJets.begin(); external_iter != UnAssignedExternalJets.end(); external_iter++){
123 auto jet_external = (*external_iter);
125 double dR =
jet->p4().DeltaR(jet_external->p4());
129 associated_jet = jet_external;
130 associated_iter = external_iter;
134 if(associated_jet == 0){
135 ATH_MSG_WARNING(
"Unable to find associated external jet! This jet will be skipped");
140 if(associated_jet != (*associated_iter)){
142 return StatusCode::FAILURE;
146 UnAssignedExternalJets.erase(associated_iter);
151 ATH_MSG_ERROR(
"Failure when transferring link from external jet to current jet!");
152 return StatusCode::FAILURE;
157 return StatusCode::SUCCESS;
◆ 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]
◆ 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
◆ finalize()
StatusCode DerivationFramework::JetExternalAssocTool::finalize |
( |
| ) |
|
◆ initialize()
StatusCode DerivationFramework::JetExternalAssocTool::initialize |
( |
| ) |
|
Definition at line 39 of file JetExternalAssocTool.cxx.
46 ATH_MSG_ERROR(
"Vector size between old and new link names does not agree!");
47 return StatusCode::FAILURE;
57 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()
static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool interface methods.
Definition at line 31 of file IAugmentationTool.h.
31 {
return IID_IAugmentationTool; }
◆ 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.
◆ TransferLink()
Definition at line 160 of file JetExternalAssocTool.cxx.
167 std::vector<const xAOD::IParticle*> targetObjs;
169 ATH_MSG_WARNING(
"Unable to fetch link " << OldLinkName <<
" under associated external jet");
175 for(
auto obj : targetObjs){
179 targetLinks.push_back(el_obj);
183 *dec_handle(
jet) = targetLinks;
◆ updateVHKA()
◆ m_containerName
std::string DerivationFramework::JetExternalAssocTool::m_containerName |
|
private |
◆ m_dec_keys
◆ m_detStore
◆ m_dRCut
double DerivationFramework::JetExternalAssocTool::m_dRCut |
|
private |
◆ m_dRMatch
bool DerivationFramework::JetExternalAssocTool::m_dRMatch |
|
private |
◆ m_evtStore
◆ m_ExternalJetCollectionName
std::string DerivationFramework::JetExternalAssocTool::m_ExternalJetCollectionName |
|
private |
◆ m_momentPrefix
std::string DerivationFramework::JetExternalAssocTool::m_momentPrefix |
|
private |
◆ m_varHandleArraysDeclared
◆ m_VectorOfNewLinkNames
std::vector<std::string> DerivationFramework::JetExternalAssocTool::m_VectorOfNewLinkNames |
|
private |
◆ m_VectorOfOldLinkNames
std::vector<std::string> DerivationFramework::JetExternalAssocTool::m_VectorOfOldLinkNames |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
std::string m_momentPrefix
Properties.
std::string m_ExternalJetCollectionName
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool toIndexedElement(BaseConstReference data, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by index and pointer to container.
SG::WriteDecorHandleKeyArray< xAOD::JetContainer > m_dec_keys
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< type_el > type_ghostlink
Class providing the definition of the 4-vector interface.
bool TransferLink(const xAOD::Jet &jet, const xAOD::Jet &jet_external) const
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< const T * > getAssociatedObjects(const std::string &name) const
get associated objects as a vector<object> this compact form throws an exception if the object is not...
ElementLink< xAOD::IParticleContainer > type_el
decoration pointers
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::vector< std::string > m_VectorOfNewLinkNames
Handle class for adding a decoration to an object.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< std::string > m_VectorOfOldLinkNames
std::string m_containerName
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>