Skip to content

Commit

Permalink
Removed embedded BaseTagInfo in pat::Jet
Browse files Browse the repository at this point in the history
The interface to add an embedded object was removed in 2010 and
the member data was only kept to read very old files.
  • Loading branch information
Dr15Jones committed Nov 20, 2023
1 parent 7d99d30 commit 65bd015
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
11 changes: 1 addition & 10 deletions DataFormats/PatCandidates/interface/Jet.h
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,7 @@ namespace pat {

std::vector<std::pair<std::string, float> > pairDiscriVector_;
std::vector<std::string> tagInfoLabels_;
edm::OwnVector<reco::BaseTagInfo> tagInfos_; // Compatibility embedding
TagInfoFwdPtrCollection tagInfosFwdPtr_; // Refactorized embedding
TagInfoFwdPtrCollection tagInfosFwdPtr_;

// ---- track related members ----

Expand Down Expand Up @@ -663,14 +662,6 @@ namespace pat {
return static_cast<const T*>(baseTagInfo);
}
}
// Then check compatibility version
for (size_t i = 0, n = tagInfos_.size(); i < n; ++i) {
edm::OwnVector<reco::BaseTagInfo>::value_type const& val = tagInfos_[i];
reco::BaseTagInfo const* baseTagInfo = &val;
if (typeid(*baseTagInfo) == typeid(T)) {
return static_cast<const T*>(baseTagInfo);
}
}
return nullptr;
}

Expand Down
2 changes: 0 additions & 2 deletions DataFormats/PatCandidates/src/Jet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,6 @@ const reco::BaseTagInfo* Jet::tagInfo(const std::string& label) const {
if (tagInfoLabels_[i] == label) {
if (!tagInfosFwdPtr_.empty())
return tagInfosFwdPtr_[i].get();
else if (!tagInfos_.empty())
return &tagInfos_[i];
return nullptr;
}
}
Expand Down
5 changes: 3 additions & 2 deletions DataFormats/PatCandidates/src/classes_def_objects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,9 @@
newObj->setPflowIsolationVariables(pfIsoVar);]]>
</ioread>

<class name="pat::Jet" ClassVersion="17">
<version ClassVersion="17" checksum="739868501"/>
<class name="pat::Jet" ClassVersion="18">
<version ClassVersion="18" checksum="1519176793"/>
<version ClassVersion="17" checksum="739868501"/>
<field name="daughtersTemp_" transient="true"/>
<version ClassVersion="16" checksum="4069285947"/>
<version ClassVersion="15" checksum="727883729"/>
Expand Down
1 change: 0 additions & 1 deletion PhysicsTools/PatAlgos/plugins/PATJetSlimmer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ void pat::PATJetSlimmer::produce(edm::Event& iEvent, const edm::EventSetup& iSet

if (dropTagInfos_(*it)) {
jet.tagInfoLabels_.clear();
jet.tagInfos_.clear();
jet.tagInfosFwdPtr_.clear();
}
if (dropJetVars_(*it)) {
Expand Down

0 comments on commit 65bd015

Please sign in to comment.