Skip to content

Commit

Permalink
save trk algo only for better tracks (minPtForTrackProp)
Browse files Browse the repository at this point in the history
  • Loading branch information
slava77devel committed Mar 26, 2023
1 parent e6cbe22 commit da0cb6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions PhysicsTools/PatAlgos/plugins/PATLostTracks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ void pat::PATLostTracks::addPackedCandidate(std::vector<pat::PackedCandidate>& c
cands.back().setTrackHighPurity(trk->quality(reco::TrackBase::highPurity));
cands.back().setCovarianceVersion(covarianceVersion_);
cands.back().setLostInnerHits(lostHits);
cands.back().setTrkAlgo(static_cast<uint8_t>(trk->algo()));
cands.back().setTrkOriginalAlgo(static_cast<uint8_t>(trk->originalAlgo()));
if (trk->pt() > minPtToStoreProps_ || trkStatus == TrkStatus::VTX) {
cands.back().setTrkAlgo(static_cast<uint8_t>(trk->algo()));
cands.back().setTrkOriginalAlgo(static_cast<uint8_t>(trk->originalAlgo()));
if (useLegacySetup_ || std::abs(id) == 11 || trkStatus == TrkStatus::VTX) {
cands.back().setTrackProperties(*trk, covariancePackingSchemas_[4], covarianceVersion_);
} else {
Expand Down
4 changes: 2 additions & 2 deletions PhysicsTools/PatAlgos/plugins/PATPackedCandidateProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ void pat::PATPackedCandidateProducer::produce(edm::StreamID, edm::Event &iEvent,
}
// properties of the best track
outPtrP->back().setLostInnerHits(lostHits);
outPtrP->back().setTrkAlgo(static_cast<uint8_t>(ctrack->algo()));
outPtrP->back().setTrkOriginalAlgo(static_cast<uint8_t>(ctrack->originalAlgo()));
if (outPtrP->back().pt() > minPtForTrackProperties_ || outPtrP->back().ptTrk() > minPtForTrackProperties_ ||
whiteList.find(ic) != whiteList.end() ||
(cand.trackRef().isNonnull() && whiteListTk.find(cand.trackRef()) != whiteListTk.end())) {
outPtrP->back().setTrkAlgo(static_cast<uint8_t>(ctrack->algo()));
outPtrP->back().setTrkOriginalAlgo(static_cast<uint8_t>(ctrack->originalAlgo()));
outPtrP->back().setFirstHit(ctrack->hitPattern().getHitPattern(reco::HitPattern::TRACK_HITS, 0));
if (abs(outPtrP->back().pdgId()) == 22) {
outPtrP->back().setTrackProperties(*ctrack, covariancePackingSchemas_[4], covarianceVersion_);
Expand Down

0 comments on commit da0cb6d

Please sign in to comment.