Skip to content

Commit

Permalink
remove normal photons from GS samples.
Browse files Browse the repository at this point in the history
  • Loading branch information
blallen committed Jul 16, 2018
1 parent 845246e commit 133f010
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions monophoton/fakemet/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@
canvas.ylimits = (-5., 5.)

canvas.title = '#sigma#timesBR = %.2f' % mu
canvas.xtitle = '(N_{extracted}^{fake} - N_{injected}^{fake})/#sigma_{extracted}^{fake}'
canvas.ytitle = '(N_{extracted}^{signal} - N_{injected}^{signal})/#sigma_{extracted}^{signal}'
canvas.xtitle = 'Fake E_{T}^{miss}: (N_{fit} - N_{true})/#sigma_{fit}'
canvas.ytitle = 'Signal: (N_{fit} - N_{true})/#sigma_{fit}'

canvas.printWeb('monophoton/fakemet', sourceName + '_' + sigs, logy = False)
canvas.Clear()
Expand Down
11 changes: 9 additions & 2 deletions monophoton/main/operators.cc
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,15 @@ double
PhotonSelection::ptVariation(panda::XPhoton const& _photon, double _shift)
{
double scRawPt(_photon.scRawPt);
if (useOriginalPt_)
scRawPt *= _photon.originalPt / _photon.pt();
if (useOriginalPt_) {
double deltaPt = ((_photon.originalPt - _photon.pt()) / _photon.pt());

if (TMath::Abs(deltaPt) < 0.2)
scRawPt = 0.0; // don't keep events that weren't affected by the gain switch issue
else {
scRawPt *= _photon.originalPt / _photon.pt();
}
}

return scRawPt * (1. + 0.015 * _shift);
}
Expand Down

0 comments on commit 133f010

Please sign in to comment.