Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMSSW_14_1_X:Update HSCParticle object to be compatible with MiniAOD #46899

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions AnalysisDataFormats/SUSYBSMObjects/interface/HSCParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include <vector>

#include "DataFormats/PatCandidates/interface/Muon.h"
#include "DataFormats/PatCandidates/interface/PackedCandidate.h"
#include "DataFormats/PatCandidates/interface/IsolatedTrack.h"
#include "DataFormats/TrackReco/interface/DeDxHitInfo.h"

#include "DataFormats/MuonReco/interface/MuonTimeExtra.h"
#include "AnalysisDataFormats/SUSYBSMObjects/interface/HSCPCaloInfo.h"

Expand Down Expand Up @@ -45,6 +50,8 @@ namespace susybsm {
HSCParticle() {}

// check available infos
bool hasTrack() const { return track_.packedCandRef().isNonnull(); }
bool hasMuon() const { return muon_.isNonnull(); }
bool hasMuonRef() const { return muonRef_.isNonnull(); }
bool hasMTMuonRef() const { return MTMuonRef_.isNonnull(); }
bool hasTrackRef() const { return trackRef_.isNonnull(); }
Expand All @@ -53,6 +60,9 @@ namespace susybsm {
bool hasCaloInfo() const { return caloInfoRef_.isNonnull(); }

// set infos
void setDeDxHitInfo(const reco::DeDxHitInfo* data) { dedxHitInfo_ = data; }
void setTrack(const pat::IsolatedTrack& data) { track_ = data; }
void setMuon(const pat::MuonRef& data) { muon_ = data; }
void setMuon(const reco::MuonRef& data) { muonRef_ = data; }
void setMTMuon(const reco::MuonRef& data) { MTMuonRef_ = data; }
void setTrack(const reco::TrackRef& data) { trackRef_ = data; }
Expand All @@ -61,6 +71,9 @@ namespace susybsm {
void setCaloInfo(const HSCPCaloInfoRef& data) { caloInfoRef_ = data; }

// get infos
const reco::DeDxHitInfo* dedxHitInfo() const { return dedxHitInfo_; }
pat::IsolatedTrack track() const { return track_; }
pat::MuonRef muon() const { return muon_; }
reco::TrackRef trackRef() const { return trackRef_; }
reco::TrackRef trackIsoRef() const { return trackIsoRef_; }
reco::MuonRef muonRef() const { return muonRef_; }
Expand All @@ -74,6 +87,9 @@ namespace susybsm {
int type() const;

private:
const reco::DeDxHitInfo* dedxHitInfo_ = nullptr;
pat::IsolatedTrack track_;
pat::MuonRef muon_;
reco::TrackRef trackRef_; //TrackRef from refitted track collection (dE/dx purposes)
reco::TrackRef trackIsoRef_; //TrackRef from general track collection (isolation purposes)
reco::MuonRef muonRef_;
Expand Down
4 changes: 2 additions & 2 deletions AnalysisDataFormats/SUSYBSMObjects/src/classes_def.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<lcgdict>
<class name="susybsm::HSCParticle" ClassVersion="11">
<version ClassVersion="11" checksum="2205741811"/>
<class name="susybsm::HSCParticle" ClassVersion="12">
<version ClassVersion="12" checksum="3951465682"/>
</class>
<class name="susybsm::RPCBetaMeasurement" ClassVersion="10">
<version ClassVersion="10" checksum="2621605308"/>
Expand Down