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

Add track-based isolation, recHit energy sum to IsolatedTrack class #31399

Closed
wants to merge 5 commits into from
Closed
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
28 changes: 27 additions & 1 deletion DataFormats/PatCandidates/interface/IsolatedTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ namespace pat {
: LeafCandidate(0, LorentzVector(0, 0, 0, 0)),
pfIsolationDR03_(pat::PFIsolation()),
miniIsolation_(pat::PFIsolation()),
trackIsolation_(0.),
matchedCaloJetEmEnergy_(0.),
matchedCaloJetHadEnergy_(0.),
associatedEcalEnergy_(0.),
associatedHcalEnergy_(0.),
pfLepOverlap_(false),
pfNeutralSum_(0.),
dz_(0.),
Expand All @@ -47,8 +50,11 @@ namespace pat {

explicit IsolatedTrack(const PFIsolation& iso,
const PFIsolation& miniiso,
float trackiso,
float caloJetEm,
float caloJetHad,
float ecalEnergy,
float hcalEnergy,
bool pfLepOverlap,
float pfNeutralSum,
const LorentzVector& p4,
Expand All @@ -73,8 +79,11 @@ namespace pat {
: LeafCandidate(charge, p4, Point(0., 0., 0.), id),
pfIsolationDR03_(iso),
miniIsolation_(miniiso),
trackIsolation_(trackiso),
matchedCaloJetEmEnergy_(caloJetEm),
matchedCaloJetHadEnergy_(caloJetHad),
associatedEcalEnergy_(ecalEnergy),
associatedHcalEnergy_(hcalEnergy),
pfLepOverlap_(pfLepOverlap),
pfNeutralSum_(pfNeutralSum),
dz_(dz),
Expand All @@ -97,12 +106,15 @@ namespace pat {
~IsolatedTrack() override {}

const PFIsolation& pfIsolationDR03() const { return pfIsolationDR03_; }

const PFIsolation& miniPFIsolation() const { return miniIsolation_; }
float trackIsolation() const { return trackIsolation_; }

float matchedCaloJetEmEnergy() const { return matchedCaloJetEmEnergy_; }
float matchedCaloJetHadEnergy() const { return matchedCaloJetHadEnergy_; }

float associatedEcalEnergy() const { return associatedEcalEnergy_; }
float associatedHcalEnergy() const { return associatedHcalEnergy_; }

bool pfLepOverlap() const { return pfLepOverlap_; }
float pfNeutralSum() const { return pfNeutralSum_; }

Expand All @@ -121,6 +133,17 @@ namespace pat {

const reco::HitPattern& hitPattern() const { return hitPattern_; }

// helper functions for PhysicsTools/PatAlgos/python/slimming/isolatedTracks_cfi.py
int numMissingInnerHits() const {
return hitPattern_.trackerLayersWithoutMeasurement(reco::HitPattern::MISSING_INNER_HITS);
}
int numMissingMiddleHits() const {
return hitPattern_.trackerLayersWithoutMeasurement(reco::HitPattern::TRACK_HITS);
}
int numMissingOuterHits() const {
return hitPattern_.trackerLayersWithoutMeasurement(reco::HitPattern::MISSING_OUTER_HITS);
}

float dEdxStrip() const { return dEdxStrip_; }
float dEdxPixel() const { return dEdxPixel_; }

Expand All @@ -141,8 +164,11 @@ namespace pat {
protected:
PFIsolation pfIsolationDR03_;
PFIsolation miniIsolation_;
float trackIsolation_;
float matchedCaloJetEmEnergy_; //energy of nearest calojet within a given dR;
float matchedCaloJetHadEnergy_;
float associatedEcalEnergy_; // sum of EBEE recHits within a given dR
float associatedHcalEnergy_; // sum of HBHE recHits within a given dR
bool pfLepOverlap_;
float pfNeutralSum_;
float dz_, dxy_, dzError_, dxyError_;
Expand Down
3 changes: 2 additions & 1 deletion DataFormats/PatCandidates/src/classes_def_objects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@
<version ClassVersion="10" checksum="2244564938"/>
</class>

<class name="pat::IsolatedTrack" ClassVersion="5">
<class name="pat::IsolatedTrack" ClassVersion="6">
<version ClassVersion="6" checksum="2605383357"/>
<version ClassVersion="5" checksum="139818330"/>
<version ClassVersion="4" checksum="71166093"/>
<version ClassVersion="3" checksum="550880582"/>
Expand Down
Loading