67 scaleFactor_ (cfg.getParameter<double> (
"scaleFactor" )),
88 auto pJets = std::make_unique<std::vector<pat::Jet>>();
89 auto pMETs = std::make_unique<std::vector<pat::MET>>();
95 for(std::vector<pat::Jet>::const_iterator
jet = jets->begin();
jet != jets->end(); ++
jet) {
98 pJets->push_back( scaledJet );
103 dPx += scaledJet.
px() -
jet->px();
104 dPy += scaledJet.
py() -
jet->py();
105 dSumEt += scaledJet.
et() -
jet->et();
111 double scaledMETPx = met.
px() - dPx;
112 double scaledMETPy = met.
py() - dPy;
114 pMETs->push_back( scaledMET );
Analysis-level MET class.
T getParameter(std::string const &) const
~JetEnergyShift()
default destructor
virtual void scaleEnergy(double fScale)
scale energy of the jet
#define DEFINE_FWK_MODULE(type)
def setup(process, global_tag, zero_tesla=False)
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)
virtual double et() const final
transverse energy
virtual double px() const final
x coordinate of momentum vector
virtual void produce(edm::Event &, const edm::EventSetup &) override
rescale jet energy and recalculated MET
edm::EDGetTokenT< std::vector< pat::MET > > inputMETsToken_
met input collection
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.
virtual double py() const final
y coordinate of momentum vector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
math::XYZPoint Point
point in the space