Skip to content

Commit

Permalink
Merge pull request cms-sw#5022 from slava77/CMSSW_7_2_X_2014-08-20-02…
Browse files Browse the repository at this point in the history
…00/fix720pre4assert-conversionOneLeg

fix crash in pre4 Assertion `seedCollection==nullptr' failed.
  • Loading branch information
davidlange6 committed Aug 21, 2014
2 parents 1052f22 + fe57c40 commit 1921c89
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,22 @@ PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::find(const edm::Event &
if (clustsOrZero){
if (!theSilentOnClusterCheck)
edm::LogError("TooManyClusters") << "Found too many clusters (" << clustsOrZero << "), bailing out.\n";
return ;
seedCollection= nullptr; return ;
}


edm::ESHandle<MagneticField> handleMagField;
setup.get<IdealMagneticFieldRecord>().get(handleMagField);
magField = handleMagField.product();
if (unlikely(magField->inTesla(GlobalPoint(0.,0.,0.)).z()<0.01)) return;
if (unlikely(magField->inTesla(GlobalPoint(0.,0.,0.)).z()<0.01)){seedCollection= nullptr; return;}

_IdealHelixParameters.setMagnField(magField);


event.getByToken(token_vertex, vertexHandle);
if (!vertexHandle.isValid() || vertexHandle->empty()){
edm::LogError("PhotonConversionFinderFromTracks") << "Error! Can't get the product primary Vertex Collection "<< _primaryVtxInputTag << "\n";
return;
seedCollection= nullptr; return;
}

event.getByToken(token_bs,recoBeamSpotHandle);
Expand Down

0 comments on commit 1921c89

Please sign in to comment.