Skip to content

Commit 830b6f4

Browse files
author
AdrianoDee
committed
Moving the NOTUSED cut above
1 parent 743f900 commit 830b6f4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

PhysicsTools/PatAlgos/plugins/PATLostTracks.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,17 +205,16 @@ void pat::PATLostTracks::produce(edm::StreamID, edm::Event& iEvent, const edm::E
205205
// selecting potential Xi- -> Lambda pi candidates
206206
math::XYZTLorentzVector p4Lambda(v0.px(), v0.py(), v0.pz(), sqrt(v0.momentum().mag2() + v0.mass() * v0.mass()));
207207

208-
for (unsigned int trkIndx = 0; trkIndx < tracks->size(); trkIndx++) {
208+
for (unsigned int trkIndx = 0; trkIndx < tracks->size(); trkIndx++)
209+
{
209210
reco::TrackRef trk(tracks, trkIndx);
210-
if ((*trk).charge() * protonCharge < 0)
211+
if ((*trk).charge() * protonCharge < 0 || trkStatus[trkIndx] != TrkStatus::NOTUSED)
211212
continue;
212213

213214
math::XYZTLorentzVector p4pi(
214215
trk->px(), trk->py(), trk->pz(), sqrt(trk->momentum().mag2() + 0.01947995518)); // pion mass ^2
215-
if ((p4Lambda + p4pi).M() < xiMassCut_) { // selecting potential Xi- candidates
216-
if (trkStatus[trkIndx] == TrkStatus::NOTUSED)
217-
trkStatus[trkIndx] = TrkStatus::VTX;
218-
}
216+
if ((p4Lambda + p4pi).M() < xiMassCut_)
217+
trkStatus[trkIndx] = TrkStatus::VTX; // selecting potential Xi- candidates
219218
}
220219
}
221220
}

0 commit comments

Comments
 (0)