Skip to content

Commit

Permalink
Merge pull request #19752 from Martin-Grunewald/FixOfHLTEgammaL1TMatc…
Browse files Browse the repository at this point in the history
…hFilterRegional

Fix saveTags() and abs() use in HLTEgammaL1TMatchFilterRegional (92X)
  • Loading branch information
cmsbuild committed Jul 19, 2017
2 parents 17e6a32 + 08ab8a4 commit 7295455
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions HLTrigger/Egamma/src/HLTEgammaL1TMatchFilterRegional.cc
Expand Up @@ -91,6 +91,10 @@ HLTEgammaL1TMatchFilterRegional::hltFilter(edm::Event& iEvent, const edm::EventS
filterproduct.addCollectionTag(l1EGTag_);
filterproduct.addCollectionTag(l1JetsTag_);
filterproduct.addCollectionTag(l1TausTag_);
filterproduct.addCollectionTag(candIsolatedTag_);
if(!doIsolated_ && !candNonIsolatedTag_.label().empty()) {
filterproduct.addCollectionTag(candNonIsolatedTag_);
}
}

edm::Ref<reco::RecoEcalCandidateCollection> ref;
Expand Down Expand Up @@ -123,7 +127,7 @@ HLTEgammaL1TMatchFilterRegional::hltFilter(edm::Event& iEvent, const edm::EventS
int countCand=0;
for (auto recoecalcand= recoIsolecalcands->begin(); recoecalcand!=recoIsolecalcands->end(); recoecalcand++) {
countCand++;
if(fabs(recoecalcand->eta()) < endcap_end_){
if(std::abs(recoecalcand->eta()) < endcap_end_){
//SC should be inside the ECAL fiducial volume

//now EGamma is just one collection so automatically matches to Isolated and NonIsolated Seeds
Expand Down Expand Up @@ -152,7 +156,7 @@ HLTEgammaL1TMatchFilterRegional::hltFilter(edm::Event& iEvent, const edm::EventS
for (auto recoecalcand= recoNonIsolecalcands->begin(); recoecalcand!=recoNonIsolecalcands->end(); recoecalcand++) {
countCand++;

if(fabs(recoecalcand->eta()) < endcap_end_){
if(std::abs(recoecalcand->eta()) < endcap_end_){
bool matchedSCEG = matchedToL1Cand(l1EGs,recoecalcand->eta(),recoecalcand->phi());
bool matchedSCJet = matchedToL1Cand(l1Jets,recoecalcand->eta(),recoecalcand->phi());
bool matchedSCTau = matchedToL1Cand(l1Taus,recoecalcand->eta(),recoecalcand->phi());
Expand Down Expand Up @@ -183,7 +187,7 @@ HLTEgammaL1TMatchFilterRegional::matchedToL1Cand(const std::vector<l1t::EGammaRe
//ORCA matching method
double etaBinLow = 0.;
double etaBinHigh = 0.;
if(fabs(scEta) < barrel_end_){
if(std::abs(scEta) < barrel_end_){
etaBinLow = l1Cand->eta() - region_eta_size_/2.;
etaBinHigh = etaBinLow + region_eta_size_;
}
Expand All @@ -192,7 +196,7 @@ HLTEgammaL1TMatchFilterRegional::matchedToL1Cand(const std::vector<l1t::EGammaRe
etaBinHigh = etaBinLow + region_eta_size_ecap_;
}

float deltaphi=fabs(scPhi -l1Cand->phi());
float deltaphi=std::abs(scPhi -l1Cand->phi());
if(deltaphi>TWOPI) deltaphi-=TWOPI;
if(deltaphi>TWOPI/2.) deltaphi=TWOPI-deltaphi;

Expand All @@ -211,7 +215,7 @@ HLTEgammaL1TMatchFilterRegional::matchedToL1Cand(const std::vector<l1t::JetRef>&
//ORCA matching method
double etaBinLow = 0.;
double etaBinHigh = 0.;
if(fabs(scEta) < barrel_end_){
if(std::abs(scEta) < barrel_end_){
etaBinLow = l1Cand->eta() - region_eta_size_/2.;
etaBinHigh = etaBinLow + region_eta_size_;
}
Expand All @@ -220,7 +224,7 @@ HLTEgammaL1TMatchFilterRegional::matchedToL1Cand(const std::vector<l1t::JetRef>&
etaBinHigh = etaBinLow + region_eta_size_ecap_;
}

float deltaphi=fabs(scPhi -l1Cand->phi());
float deltaphi=std::abs(scPhi -l1Cand->phi());
if(deltaphi>TWOPI) deltaphi-=TWOPI;
if(deltaphi>TWOPI/2.) deltaphi=TWOPI-deltaphi;

Expand All @@ -238,7 +242,7 @@ HLTEgammaL1TMatchFilterRegional::matchedToL1Cand(const std::vector<l1t::TauRef>&
//ORCA matching method
double etaBinLow = 0.;
double etaBinHigh = 0.;
if(fabs(scEta) < barrel_end_){
if(std::abs(scEta) < barrel_end_){
etaBinLow = l1Cand->eta() - region_eta_size_/2.;
etaBinHigh = etaBinLow + region_eta_size_;
}
Expand All @@ -247,7 +251,7 @@ HLTEgammaL1TMatchFilterRegional::matchedToL1Cand(const std::vector<l1t::TauRef>&
etaBinHigh = etaBinLow + region_eta_size_ecap_;
}

float deltaphi=fabs(scPhi -l1Cand->phi());
float deltaphi=std::abs(scPhi -l1Cand->phi());
if(deltaphi>TWOPI) deltaphi-=TWOPI;
if(deltaphi>TWOPI/2.) deltaphi=TWOPI-deltaphi;

Expand Down

0 comments on commit 7295455

Please sign in to comment.