Skip to content

Commit

Permalink
making small code clean up fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Harper committed Dec 7, 2016
1 parent 20e58c0 commit 6f80377
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions PhysicsTools/PatAlgos/plugins/PATPackedCandidateProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ void pat::PATPackedCandidateProducer::produce(edm::StreamID, edm::Event& iEvent,
}
}
std::vector<int> mappingPuppi(usePuppi_ ? puppiCands->size() : 0);
auto const puppiCandsNoLepV = usePuppi_ ? puppiCandsNoLep.product() : nullptr;

edm::Handle<reco::VertexCollection> PVOrigs;
iEvent.getByToken( PVOrigs_, PVOrigs );
Expand Down Expand Up @@ -270,7 +269,6 @@ void pat::PATPackedCandidateProducer::produce(edm::StreamID, edm::Event& iEvent,

float puppiWeightVal = (*puppiWeight)[pkref];
float puppiWeightNoLepVal = 0.0;

// Check the "no lepton" puppi weights.
// If present, then it is not a lepton, use stored weight
// If absent, it is a lepton, so set the weight to 1.0
Expand All @@ -282,7 +280,7 @@ void pat::PATPackedCandidateProducer::produce(edm::StreamID, edm::Event& iEvent,
for ( size_t ipcnl = 0; ipcnl < puppiCandsNoLepPtrs.size(); ipcnl++){
if (puppiCandsNoLepPtrs[ipcnl] == pkrefPtr){
foundNoLep = true;
puppiWeightNoLepVal = puppiCandsNoLepV->at(ipcnl).pt()/cand.pt(); // a hack for now, should use the value map
puppiWeightNoLepVal = puppiCandsNoLep->at(ipcnl).pt()/cand.pt(); // a hack for now, should use the value map
break;
}
}
Expand Down

0 comments on commit 6f80377

Please sign in to comment.