Skip to content

Commit

Permalink
fixing to only use default values if a track is actually found
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Harper committed Apr 17, 2018
1 parent adcd0c5 commit fc9b9dc
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,13 @@ void EgammaHLTGsfTrackVarProducer::produce(edm::Event& iEvent, const edm::EventS
float oneOverESuperMinusOneOverPValue=999999;
float oneOverESeedMinusOneOverPValue=999999;

if(static_cast<int>(gsfTracks.size())>=upperTrackNrToRemoveCut_ ||
static_cast<int>(gsfTracks.size())<=lowerTrackNrToRemoveCut_ ||
(isBarrel && useDefaultValuesForBarrel_) ||
(!isBarrel && useDefaultValuesForEndcap_)){
const int nrTracks = gsfTracks.size();
const bool rmCutsDueToNrTracks = nrTracks <= lowerTrackNrToRemoveCut_ ||
nrTracks >= upperTrackNrToRemoveCut_;
//to use the default values, we require at least one track...
const bool useDefaultValues = isBarrel ? useDefaultValuesForBarrel_ && nrTracks>=1 : useDefaultValuesForEndcap_ && nrTracks>=1;

if(rmCutsDueToNrTracks || useDefaultValues){
dEtaInValue=0;
dEtaSeedInValue=0;
dPhiInValue=0;
Expand Down

0 comments on commit fc9b9dc

Please sign in to comment.