2 #include "TLorentzVector.h"
33 double temp =
sqrt((A + B) * (A + B) - (az + bz) * (az + bz));
38 double temp = met.
et() * (j1.Pt() + j2.Pt()) - met.
px() * (j1.X() + j2.X()) - met.
py() * (j1.Y() + j2.Y());
57 std::vector<LorentzVector>
jets;
58 jets.reserve(jetH.
product()->size());
59 for (std::vector<pat::Jet>::const_iterator jetit = jetH.
product()->begin(); jetit != jetH.
product()->end(); ++jetit) {
60 if (jetit->et() >
pt_ && fabs(jetit->eta()) <
eta_) {
61 jets.push_back(jetit->p4());
67 HEM_1.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
68 HEM_2.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
70 if (jets.size() < 2) {
72 unsigned int N_comb = 1;
73 for (
unsigned int i = 0;
i < jets.size();
i++) {
79 double M_min = 9999999999.0;
82 for (
unsigned int i = 1;
i < N_comb - 1;
i++) {
83 LorentzVector j_temp1, j_temp2;
88 if (itemp / j_count == 1) {
89 j_temp1 += jets[
count];
91 j_temp2 += jets[
count];
93 itemp -= j_count * (itemp / j_count);
98 M_temp = j_temp1.M2() + j_temp2.M2();
100 if (M_temp < M_min) {
107 if (HEM_2.Pt() > HEM_1.Pt()) {
108 LorentzVector
temp = HEM_1;
119 double r = -1,
r2 = -1;
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Analysis-level MET class.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double CalcMTR(const LorentzVector &j1, const LorentzVector &j2, const pat::MET &met)
RazorBox(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
double px() const final
x coordinate of momentum vector
void assign(std::string var, double &value) const
edm::ParameterSet & iConfig
RazorComputer(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
edm::EDGetTokenT< std::vector< pat::MET > > metToken_
double py() const final
y coordinate of momentum vector
void compute(const edm::Event &iEvent) const
reco::Candidate::LorentzVector LorentzVector
void compute(const edm::Event &iEvent) const override
T const * product() const
double CalcMR(const LorentzVector &ja, const LorentzVector &jb)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
double et() const final
transverse energy
edm::EDGetTokenT< std::vector< pat::Jet > > jetToken_
void declare(std::string var, edm::ConsumesCollector &iC)
math::PtEtaPhiELorentzVectorF LorentzVector