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++) {
88 if (itemp / j_count == 1) {
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()) {
119 double r = -1,
r2 = -1;
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Analysis-level MET class.
void compute(const edm::Event &iEvent) const
double CalcMTR(const LorentzVector &j1, const LorentzVector &j2, const pat::MET &met)
T const * product() const
RazorBox(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
void assign(std::string var, double &value) const
RazorComputer(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
edm::EDGetTokenT< std::vector< pat::MET > > metToken_
math::XYZTLorentzVector LorentzVector
reco::Candidate::LorentzVector LorentzVector
void compute(const edm::Event &iEvent) const override
double CalcMR(const LorentzVector &ja, const LorentzVector &jb)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
edm::EDGetTokenT< std::vector< pat::Jet > > jetToken_
void declare(std::string var, edm::ConsumesCollector &iC)