2 #include "TLorentzVector.h"
37 double temp =
sqrt((A+B)*(A+B)-(az+bz)*(az+bz));
43 double temp = met.
et()*(j1.Pt()+j2.Pt()) - met.
px()*(j1.X()+j2.X()) - met.
py()*(j1.Y()+j2.Y());
64 std::vector<LorentzVector>
jets;
65 jets.reserve( jetH.
product()->size() );
66 for (std::vector<pat::Jet>::const_iterator jetit = jetH.
product()->begin();
67 jetit!= jetH.
product()->end(); ++ jetit){
68 if (jetit->et() >
pt_ && fabs(jetit->eta()) <
eta_){
69 jets.push_back( jetit->p4());
75 HEM_1.SetPxPyPzE(0.0,0.0,0.0,0.0);
76 HEM_2.SetPxPyPzE(0.0,0.0,0.0,0.0);
81 unsigned int N_comb = 1;
82 for(
unsigned int i = 0;
i < jets.size();
i++){
88 double M_min = 9999999999.0;
91 for(
unsigned int i = 1;
i < N_comb-1;
i++){
92 LorentzVector j_temp1, j_temp2;
97 if(itemp/j_count == 1){
98 j_temp1 += jets[
count];
100 j_temp2 += jets[
count];
102 itemp -= j_count*(itemp/j_count);
107 M_temp = j_temp1.M2()+j_temp2.M2();
118 if(HEM_2.Pt() > HEM_1.Pt()){
119 LorentzVector
temp = HEM_1;
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Analysis-level MET class.
virtual double et() const
transverse energy
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double CalcMTR(const LorentzVector &j1, const LorentzVector &j2, const pat::MET &met)
void compute(const edm::Event &iEvent) const
RazorBox(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
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_
void compute(const edm::Event &iEvent) const
reco::Candidate::LorentzVector LorentzVector
T const * product() const
double CalcMR(const LorentzVector &ja, const LorentzVector &jb)
virtual double px() const
x coordinate of momentum vector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
edm::EDGetTokenT< std::vector< pat::Jet > > jetToken_
void declare(std::string var, edm::ConsumesCollector &iC)
virtual double py() const
y coordinate of momentum vector
math::PtEtaPhiELorentzVectorF LorentzVector