5 failed_(
false), maxNJets_(maxNJets), wMass_(wMass), massWBoson_(-1.), massTopQuark_(-1.), massBTopQuark_(-1.), tmassWBoson_(-1),tmassTopQuark_(-1)
64 std::vector<int> maxPtIndices;
65 maxPtIndices.push_back(-1);
66 maxPtIndices.push_back(-1);
67 maxPtIndices.push_back(-1);
70 for(
int jdx=0; jdx<
maxNJets_; ++jdx){
if(jdx<=
idx)
continue;
71 for(
int kdx=0; kdx<
maxNJets_; ++kdx){
if(kdx==
idx || kdx==jdx)
continue;
73 if( maxPt<0. || maxPt<sum.pt() ){
76 maxPtIndices.push_back(
idx);
77 maxPtIndices.push_back(jdx);
78 maxPtIndices.push_back(kdx);
84 jets[maxPtIndices[1]].p4()+
85 jets[maxPtIndices[2]].p4()).mass();
90 std::vector<int> wMassIndices;
91 wMassIndices.push_back(-1);
92 wMassIndices.push_back(-1);
93 for(
unsigned idx=0;
idx<maxPtIndices.size(); ++
idx){
94 for(
unsigned jdx=0; jdx<maxPtIndices.size(); ++jdx){
95 if( jdx==
idx || maxPtIndices[
idx]>maxPtIndices[jdx] )
continue;
97 if( wDist<0. || wDist>fabs(sum.mass()-
wMass_) ){
98 wDist=fabs(sum.mass()-
wMass_);
100 wMassIndices.push_back(maxPtIndices[
idx]);
101 wMassIndices.push_back(maxPtIndices[jdx]);
106 jets[wMassIndices[1]].p4()).mass();
115 if (jets.size() != bjet.size()){
return;}
120 std::vector<int> maxBPtIndices;
121 maxBPtIndices.push_back(-1);
122 maxBPtIndices.push_back(-1);
123 maxBPtIndices.push_back(-1);
125 for(
int jdx=0; jdx<
maxNJets_; ++jdx){
if(jdx<=
idx)
continue;
126 for(
int kdx=0; kdx<
maxNJets_; ++kdx){
if(kdx==
idx || kdx==jdx)
continue;
128 if ((bjet[
idx]> btagWP && bjet[jdx]<= btagWP && bjet[kdx]<= btagWP) ||
129 (bjet[
idx]<= btagWP && bjet[jdx]> btagWP && bjet[kdx]<= btagWP) ||
130 (bjet[
idx]<= btagWP && bjet[jdx]<= btagWP && bjet[kdx]> btagWP) ){
132 if( maxBPt<0. || maxBPt<sum.pt() ){
134 maxBPtIndices.clear();
135 maxBPtIndices.push_back(
idx);
136 maxBPtIndices.push_back(jdx);
137 maxBPtIndices.push_back(kdx);
143 if (maxBPtIndices[0]<0 || maxBPtIndices[1]<0 || maxBPtIndices[2]<0)
return;
145 jets[maxBPtIndices[1]].p4()+
146 jets[maxBPtIndices[2]].p4()).mass();
double massWBoson_
cache of w boson mass estimate
tuple met
____________________________________________________________________________||
double massBTopQuark(const std::vector< reco::Jet > &jets, std::vector< double > VbtagWP, double btagWP_)
calculate b-tagged t-quark mass estimate
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
double massTopQuark_
cache of top quark mass estimate
double tmassTopQuark_
cache of top quark transverse mass estimate
Base class for all types of Jets.
double massTopQuark(const std::vector< reco::Jet > &jets)
calculate t-quark mass estimate
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
double massWBoson(const std::vector< reco::Jet > &jets)
calculate W boson mass estimate
void operator2(const std::vector< reco::Jet > &, std::vector< double >, double)
do the calculation of the t-quark mass with one b-jet
int maxNJets_
max. number of jets to be considered
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
double wMass_
paramater of the w boson mass
double tmassTopQuark(reco::RecoCandidate *lep, const reco::MET &met, const reco::Jet &b)
calculate top quark transverse mass estimate
double tmassWBoson(reco::RecoCandidate *lep, const reco::MET &met, const reco::Jet &b)
calculate W boson transverse mass estimate
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
void operator()(const std::vector< reco::Jet > &jets)
bool failed_
indicate failed associations
volatile std::atomic< bool > shutdown_flag false
Calculate(int maxNJets, double wMass)
default constructor
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Power< A, B >::type pow(const A &a, const B &b)
double tmassWBoson_
cache of W boson transverse mass estimate
double massBTopQuark_
cache of b-tagged top quark mass estimate