4 failed_(
false), maxNJets_(maxNJets), wMass_(wMass), massWBoson_(-1.), massTopQuark_(-1.)
30 std::vector<int> maxPtIndices;
31 maxPtIndices.push_back(-1);
32 maxPtIndices.push_back(-1);
33 maxPtIndices.push_back(-1);
35 for(
int jdx=0; jdx<
maxNJets_; ++jdx){
if(jdx<=idx)
continue;
36 for(
int kdx=0; kdx<
maxNJets_; ++kdx){
if(kdx==idx || kdx==jdx)
continue;
38 if( maxPt<0. || maxPt<sum.pt() ){
41 maxPtIndices.push_back(idx);
42 maxPtIndices.push_back(jdx);
43 maxPtIndices.push_back(kdx);
49 jets[maxPtIndices[1]].p4()+
50 jets[maxPtIndices[2]].p4()).
mass();
55 std::vector<int> wMassIndices;
56 wMassIndices.push_back(-1);
57 wMassIndices.push_back(-1);
58 for(
unsigned idx=0; idx<maxPtIndices.size(); ++idx){
59 for(
unsigned jdx=0; jdx<maxPtIndices.size(); ++jdx){
60 if( jdx==idx || maxPtIndices[idx]>maxPtIndices[jdx] )
continue;
62 if( wDist<0. || wDist>fabs(sum.mass()-
wMass_) ){
63 wDist=fabs(sum.mass()-
wMass_);
65 wMassIndices.push_back(maxPtIndices[idx]);
66 wMassIndices.push_back(maxPtIndices[jdx]);
71 jets[wMassIndices[1]].p4()).
mass();
double massWBoson_
cache of w boson mass estimate
double massTopQuark_
cache of top quark mass estimate
double massTopQuark(const std::vector< reco::Jet > &jets)
calculate W boson mass estimate
double massWBoson(const std::vector< reco::Jet > &jets)
calculate W boson mass estimate
int maxNJets_
max. number of jets to be considered
double wMass_
paramater of the w boson mass
void operator()(const std::vector< reco::Jet > &jets)
bool failed_
indicate failed associations
Calculate(int maxNJets, double wMass)
default constructor
math::XYZTLorentzVector LorentzVector
Lorentz vector.