src
RecoJets
FFTJetAlgorithms
src
adjustForPileup.cc
Go to the documentation of this file.
1
#include "
RecoJets/FFTJetAlgorithms/interface/adjustForPileup.h
"
2
3
namespace
fftjetcms
{
4
math::XYZTLorentzVector
adjustForPileup
(
const
math::XYZTLorentzVector
&
jet
,
5
const
math::XYZTLorentzVector
&
pileup
,
6
const
bool
subtractPileupAs4Vec
) {
7
const
double
pt
=
jet
.Pt();
8
if
(
pt
> 0.0) {
9
const
double
pileupPt =
pileup
.Pt();
10
const
double
ptFactor = (
pt
- pileupPt) /
pt
;
11
if
(ptFactor <= 0.0)
12
return
math::XYZTLorentzVector
();
13
else
if
(
subtractPileupAs4Vec
) {
14
const
math::XYZTLorentzVector
subtracted(
jet
-
pileup
);
15
const
double
e
= subtracted.E();
16
if
(
e
<= 0.0)
17
return
math::XYZTLorentzVector
();
18
else
{
19
// Avoid negative jet masses
20
const
double
px
= subtracted.Px();
21
const
double
py
= subtracted.Py();
22
const
double
pz = subtracted.Pz();
23
if
(
e
*
e
<
px
*
px
+
py
*
py
+ pz * pz)
24
// It is not clear what is the best thing to do here.
25
// For now, revert to Pt scaling.
26
return
jet
* ptFactor;
27
else
28
return
subtracted;
29
}
30
}
else
31
return
jet
* ptFactor;
32
}
else
33
return
jet
;
34
}
35
}
// namespace fftjetcms
metsig::jet
Definition:
SignAlgoResolutions.h:47
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
fftjetproducer_cfi.subtractPileupAs4Vec
subtractPileupAs4Vec
Definition:
fftjetproducer_cfi.py:223
DiDispStaMuonMonitor_cfi.pt
pt
Definition:
DiDispStaMuonMonitor_cfi.py:39
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition:
LorentzVector.h:29
mixOne_premix_on_sim_cfi.pileup
pileup
Definition:
mixOne_premix_on_sim_cfi.py:42
multPhiCorr_741_25nsDY_cfi.py
py
Definition:
multPhiCorr_741_25nsDY_cfi.py:12
multPhiCorr_741_25nsDY_cfi.px
px
Definition:
multPhiCorr_741_25nsDY_cfi.py:10
adjustForPileup.h
fftjetcms
Definition:
AbsPileupCalculator.h:15
fftjetcms::adjustForPileup
math::XYZTLorentzVector adjustForPileup(const math::XYZTLorentzVector &jet, const math::XYZTLorentzVector &pileup, bool subtractPileupAs4Vec)
Definition:
adjustForPileup.cc:4
Generated for CMSSW Reference Manual by
1.8.14