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

Fixing Default Values of EgammaHLTGsfTrackVarProducer to be only used if there is a track found : 102X #22987

Merged
merged 1 commit into from
Apr 18, 2018
Merged
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
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