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

Fix bug in PVAssignment: missing abs for dxy #8721

Merged
merged 2 commits into from Apr 16, 2015
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CommonTools/RecoAlgos/plugins/PrimaryVertexSorter.h
Expand Up @@ -167,7 +167,7 @@ void PrimaryVertexSorter<ParticlesCollection>::produce(Event& iEvent, const Eve
{
auto pv = pfToPVVector[i];
auto qual = pfToPVQualityVector[i];
if(pv >=0 and qual > PrimaryVertexAssignment::NotReconstructedPrimary){
if(pv >=0 and qual >= qualityCut_){
pvToPFVector[pv].push_back(i);
// std::cout << i << std::endl;
// const typename ParticlesCollection::value_type & cp = particles[i];
Expand Down
Expand Up @@ -20,7 +20,7 @@
particles = cms.InputTag("particleFlow"),
vertices= cms.InputTag("offlinePrimaryVertices"),
jets= cms.InputTag("ak4PFJets"),
qualityForPrimary = cms.int32(2),
qualityForPrimary = cms.int32(3),
usePVMET = cms.bool(True),
produceAssociationToOriginalVertices = cms.bool(True),
produceSortedVertices = cms.bool(True),
Expand Down
2 changes: 1 addition & 1 deletion CommonTools/RecoAlgos/python/sortedPrimaryVertices_cfi.py
Expand Up @@ -21,7 +21,7 @@
vertices= cms.InputTag("offlinePrimaryVertices"),
# Jets= cms.InputTag("ak4PFJets"),
jets= cms.InputTag("ak4CaloJetsForTrk"),
qualityForPrimary = cms.int32(2),
qualityForPrimary = cms.int32(3),
usePVMET = cms.bool(True),
produceAssociationToOriginalVertices= cms.bool(False),
produceSortedVertices = cms.bool(True),
Expand Down
2 changes: 1 addition & 1 deletion CommonTools/RecoAlgos/src/PrimaryVertexAssignment.cc
Expand Up @@ -92,7 +92,7 @@ PrimaryVertexAssignment::chargedHadronVertex( const reco::VertexCollection& vert

// if the track is not compatible with other PVs but is compatible with the BeamSpot, we may simply have not reco'ed the PV!
// we still point it to the closest in Z, but flag it as possible orphan-primary
if(track->dxy(vertices[0].position())<maxDxyForNotReconstructedPrimary_ && track->dxy(vertices[0].position())/track->dxyError()<maxDxySigForNotReconstructedPrimary_)
if(std::abs(track->dxy(vertices[0].position()))<maxDxyForNotReconstructedPrimary_ && std::abs(track->dxy(vertices[0].position())/track->dxyError())<maxDxySigForNotReconstructedPrimary_)
return std::pair<int,PrimaryVertexAssignment::Quality>(vtxIdMinDz,PrimaryVertexAssignment::NotReconstructedPrimary);

//FIXME: here we could better handle V0s and NucInt
Expand Down