#include <JetExternalAssocTool.h>
|
| SG::ReadHandleKey< xAOD::JetContainer > | m_containerName {this, "InputJets", ""} |
| | Properties. More...
|
| |
| SG::ReadHandleKey< xAOD::JetContainer > | m_ExternalJetCollectionName {this, "ExternalJetCollectionName", ""} |
| |
| Gaudi::Property< std::string > | m_momentPrefix {this, "MomentPrefix", ""} |
| |
| Gaudi::Property< std::vector< std::string > > | m_VectorOfOldLinkNames {this, "ListOfOldLinkNames", {}} |
| |
| Gaudi::Property< std::vector< std::string > > | m_VectorOfNewLinkNames {this, "ListOfNewLinkNames", {}} |
| |
| SG::WriteDecorHandleKeyArray< xAOD::JetContainer > | m_dec_keys {this, "DecKeys", {}, "SG keys for external decorations"} |
| |
| Gaudi::Property< bool > | m_dRMatch {this, "DeltaRMatch", false} |
| |
| Gaudi::Property< double > | m_dRCut {this, "DeltaRCut", 0.01} |
| |
Definition at line 29 of file JetExternalAssocTool.h.
◆ 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 EventContext & |
ctx | ) |
const |
|
finaloverridevirtual |
Definition at line 45 of file JetExternalAssocTool.cxx.
48 if (!
jets.isValid()) {
50 return StatusCode::FAILURE;
55 if (!ExternalJetCollection.isValid()) {
57 return StatusCode::FAILURE;
64 if(
jets->size() != ExternalJetCollection->size()){
66 return StatusCode::FAILURE;
71 auto jet_external = ExternalJetCollection->at(
index);
73 if( std::abs(
jet->pt() - jet_external->pt()) > 0.1 ){
74 ATH_MSG_WARNING(
"Potential inconsistency between two jet collections: " <<
jet->pt() <<
" v.s. " << jet_external->pt());
78 ATH_MSG_ERROR(
"Failure when transferring link from external jet to current jet!");
79 return StatusCode::FAILURE;
87 std::vector<const xAOD::Jet*> UnAssignedExternalJets;
88 for (
auto jet_external : *ExternalJetCollection) {
89 UnAssignedExternalJets.push_back(jet_external);
99 for(
auto external_iter = UnAssignedExternalJets.begin(); external_iter != UnAssignedExternalJets.end(); external_iter++){
100 auto jet_external = (*external_iter);
102 double dR =
jet->p4().DeltaR(jet_external->p4());
106 associated_jet = jet_external;
107 associated_iter = external_iter;
111 if(associated_jet == 0){
112 ATH_MSG_WARNING(
"Unable to find associated external jet! This jet will be skipped");
117 if(associated_jet != (*associated_iter)){
119 return StatusCode::FAILURE;
123 UnAssignedExternalJets.erase(associated_iter);
128 ATH_MSG_ERROR(
"Failure when transferring link from external jet to current jet!");
129 return StatusCode::FAILURE;
134 return StatusCode::SUCCESS;
◆ initialize()
| StatusCode DerivationFramework::JetExternalAssocTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 21 of file JetExternalAssocTool.cxx.
29 ATH_MSG_ERROR(
"Vector size between old and new link names does not agree!");
30 return StatusCode::FAILURE;
40 return StatusCode::SUCCESS;
◆ TransferLink()
Definition at line 137 of file JetExternalAssocTool.cxx.
144 std::vector<const xAOD::IParticle*> targetObjs;
146 ATH_MSG_ERROR(
"Unable to fetch link " << OldLinkName <<
" under associated external jet");
147 return StatusCode::FAILURE;
152 for(
auto obj : targetObjs){
156 targetLinks.push_back(el_obj);
160 *dec_handle(
jet) = std::move(targetLinks);
164 return StatusCode::SUCCESS;
◆ m_containerName
◆ m_dec_keys
◆ m_dRCut
| Gaudi::Property<double> DerivationFramework::JetExternalAssocTool::m_dRCut {this, "DeltaRCut", 0.01} |
|
private |
◆ m_dRMatch
| Gaudi::Property<bool> DerivationFramework::JetExternalAssocTool::m_dRMatch {this, "DeltaRMatch", false} |
|
private |
◆ m_ExternalJetCollectionName
◆ m_momentPrefix
| Gaudi::Property<std::string> DerivationFramework::JetExternalAssocTool::m_momentPrefix {this, "MomentPrefix", ""} |
|
private |
◆ m_VectorOfNewLinkNames
| Gaudi::Property<std::vector<std::string> > DerivationFramework::JetExternalAssocTool::m_VectorOfNewLinkNames {this, "ListOfNewLinkNames", {}} |
|
private |
◆ m_VectorOfOldLinkNames
| Gaudi::Property<std::vector<std::string> > DerivationFramework::JetExternalAssocTool::m_VectorOfOldLinkNames {this, "ListOfOldLinkNames", {}} |
|
private |
The documentation for this class was generated from the following files:
bool toIndexedElement(BaseConstReference data, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by index and pointer to container.
Class providing the definition of the 4-vector interface.