83 auto pJets = std::make_unique<std::vector<pat::Jet>>();
84 auto pMETs = std::make_unique<std::vector<pat::MET>>();
90 for (std::vector<pat::Jet>::const_iterator
jet = jets->begin();
jet != jets->end(); ++
jet) {
93 pJets->push_back(scaledJet);
97 dPx += scaledJet.
px() -
jet->px();
98 dPy += scaledJet.
py() -
jet->py();
99 dSumEt += scaledJet.
et() -
jet->et();
105 double scaledMETPx = met.
px() - dPx;
106 double scaledMETPy = met.
py() - dPy;
110 scaledMETPx, scaledMETPy, 0,
sqrt(scaledMETPx * scaledMETPx + scaledMETPy * scaledMETPy)),
112 pMETs->push_back(scaledMET);
Analysis-level MET class.
T getParameter(std::string const &) const
double px() const final
x coordinate of momentum vector
void scaleEnergy(double fScale) override
Scale energy and correspondingly adjust raw jec factors.
double jetEMLimitForMET_
limit on the emf of the jet for Type1 MET corrections
std::string outputJets_
jet output collection
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
#define DEFINE_FWK_MODULE(type)
double et() const final
transverse energy
~JetEnergyShift() override
default destructor
void produce(edm::Event &, const edm::EventSetup &) override
rescale jet energy and recalculated MET
edm::EDGetTokenT< std::vector< pat::MET > > inputMETsToken_
met input collection
double py() const final
y coordinate of momentum vector
JetEnergyShift(const edm::ParameterSet &)
default constructor
Analysis-level calorimeter jet class.
double scaleFactor_
scale factor for the rescaling
Plugin to shift the jet energy scale and recalculate the MET accordingly.
double jetPTThresholdForMET_
threshold on (raw!) jet pt for Type1 MET corrections
edm::EDGetTokenT< std::vector< pat::Jet > > inputJetsToken_
jet input collection
std::string outputMETs_
MET output collection.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
math::XYZPoint Point
point in the space