Skip to content

Commit

Permalink
Merge pull request cms-sw#95 from mbluj/CMSSW_10_4_X_recoOnMiniAOD
Browse files Browse the repository at this point in the history
Remove unnecessary catch(...) expressions
  • Loading branch information
mbluj authored Oct 18, 2018
2 parents 92b023d + f8c7d83 commit a4ca868
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
6 changes: 1 addition & 5 deletions RecoTauTag/RecoTau/plugins/PFTauSecondaryVertexProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,7 @@ void PFTauSecondaryVertexProducer::produce(edm::StreamID, edm::Event& iEvent,con
bool FitOk(true);
KalmanVertexFitter kvf(true);
if(transTrk.size() > 1) {
try{
transVtx = kvf.vertex(transTrk); //KalmanVertexFitter
}catch(...){
FitOk=false;
}
transVtx = kvf.vertex(transTrk); //KalmanVertexFitter
} else {
FitOk = false;
}
Expand Down
12 changes: 4 additions & 8 deletions RecoTauTag/RecoTau/src/PFTauPrimaryVertexProducerBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,10 @@ void PFTauPrimaryVertexProducerBase::produce(edm::Event& iEvent,const edm::Event
if ( transTracks.size() >= 2 ) {
AdaptiveVertexFitter avf;
avf.setWeightThreshold(0.1); //weight per track. allow almost every fit, else --> exception
try {
if ( !useBeamSpot_ ){
transVtx = avf.vertex(transTracks);
} else {
transVtx = avf.vertex(transTracks, *beamSpot);
}
} catch (...) {
fitOK = false;
if ( !useBeamSpot_ ){
transVtx = avf.vertex(transTracks);
} else {
transVtx = avf.vertex(transTracks, *beamSpot);
}
} else fitOK = false;
if ( fitOK ) thePV = transVtx;
Expand Down

0 comments on commit a4ca868

Please sign in to comment.