CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TtFullHadKinFitter::KinFit Class Reference

class that does the fitting More...

#include <TtFullHadKinFitter.h>

Public Member Functions

std::list
< TtFullHadKinFitter::KinFitResult
fit (const std::vector< pat::Jet > &jets)
 do the fitting and return fit result More...
 
 KinFit ()
 default constructor More...
 
 KinFit (bool useBTagging, unsigned int bTags, std::string bTagAlgo, double minBTagValueBJet, double maxBTagValueNonBJet, std::vector< edm::ParameterSet > udscResolutions, std::vector< edm::ParameterSet > bResolutions, double resolutionSmearFactor, std::string jetCorrectionLevel, int maxNJets, int maxNComb, unsigned int maxNrIter, double maxDeltaS, double maxF, unsigned int jetParam, std::vector< unsigned > constraints, double mW, double mTop)
 special constructor More...
 
void setBTagging (bool useBTagging, unsigned int bTags, std::string bTagAlgo, double minBTagValueBJet, double maxBTagValueNonBJet)
 set all parameters for b-tagging More...
 
void setFitter (int maxNJets, unsigned int maxNrIter, double maxDeltaS, double maxF, unsigned int jetParam, std::vector< unsigned > constraints, double mW, double mTop)
 set parameters for fitter More...
 
void setJEC (std::string jetCorrectionLevel)
 set jec level More...
 
void setMatch (std::vector< int > match)
 set match to be used More...
 
void setMatchInvalidity (bool invalidMatch)
 set the validity of a match More...
 
void setOutput (int maxNComb)
 set number of combinations of output More...
 
void setResolutions (std::vector< edm::ParameterSet > udscResolutions, std::vector< edm::ParameterSet > bResolutions, double resolutionSmearFactor=1.)
 set resolutions More...
 
void setUseOnlyMatch (bool useOnlyMatch)
 set useOnlyMatch More...
 
 ~KinFit ()
 default destructor More...
 

Private Member Functions

TtFullHadKinFitter::Constraint constraint (unsigned int configParameter)
 
std::vector
< TtFullHadKinFitter::Constraint
constraints (std::vector< unsigned int > &configParameters)
 
pat::Jet corJet (const pat::Jet &jet, const std::string &quarkType)
 helper function to construct the proper corrected jet for its corresponding quarkType More...
 
bool doBTagging (const std::vector< pat::Jet > &jets, const unsigned int &bJetCounter, std::vector< int > &combi)
 
TtFullHadKinFitter::Param param (unsigned int configParameter)
 

Private Attributes

std::vector< edm::ParameterSetbResolutions_
 
std::string bTagAlgo_
 input tag for b-tagging algorithm More...
 
unsigned int bTags_
 minimal number of b-jets More...
 
std::vector< unsigned > constraints_
 numbering of different possible kinematic constraints More...
 
TtFullHadKinFitterfitter
 kinematic fit interface More...
 
bool invalidMatch_
 match is invalid More...
 
std::string jetCorrectionLevel_
 correction level for jets More...
 
unsigned int jetParam_
 numbering of different possible jet parametrizations More...
 
std::vector< int > match_
 the combination that should be used More...
 
double maxBTagValueNonBJet_
 max value of bTag for a non-b-jet More...
 
double maxDeltaS_
 maximal chi2 equivalent More...
 
double maxF_
 maximal deviation for contstraints More...
 
int maxNComb_
 maximal number of combinations to be written to the event More...
 
int maxNJets_
 maximal number of jets (-1 possible to indicate 'all') More...
 
unsigned int maxNrIter_
 maximal number of iterations to be performed for the fit More...
 
double minBTagValueBJet_
 min value of bTag for a b-jet More...
 
double mTop_
 top mass value used for constraints More...
 
double mW_
 W mass value used for constraints. More...
 
double resolutionSmearFactor_
 smearing factor for jet energy resolutions More...
 
std::vector< edm::ParameterSetudscResolutions_
 store the resolutions for the jets More...
 
bool useBTagging_
 
bool useOnlyMatch_
 fit or only a certain combination More...
 

Detailed Description

class that does the fitting

Definition at line 120 of file TtFullHadKinFitter.h.

Constructor & Destructor Documentation

TtFullHadKinFitter::KinFit::KinFit ( )

default constructor

Definition at line 286 of file TtFullHadKinFitter.cc.

References constraints_.

286  :
287  useBTagging_(true),
288  bTags_(2),
289  bTagAlgo_("trackCountingHighPurBJetTags"),
290  minBTagValueBJet_(3.41),
291  maxBTagValueNonBJet_(3.41),
292  udscResolutions_(std::vector<edm::ParameterSet>(0)),
293  bResolutions_(std::vector<edm::ParameterSet>(0)),
295  jetCorrectionLevel_("L3Absolute"),
296  maxNJets_(-1),
297  maxNComb_(1),
298  maxNrIter_(500),
299  maxDeltaS_(5e-5),
300  maxF_(0.0001),
301  jetParam_(1),
302  mW_(80.4),
303  mTop_(173.),
304  useOnlyMatch_(false),
305  match_(std::vector<int>(0)),
306  invalidMatch_(false)
307 {
308  constraints_.push_back(1);
309  constraints_.push_back(2);
310  constraints_.push_back(5);
311 }
double resolutionSmearFactor_
smearing factor for jet energy resolutions
double maxF_
maximal deviation for contstraints
double maxDeltaS_
maximal chi2 equivalent
int maxNComb_
maximal number of combinations to be written to the event
double mW_
W mass value used for constraints.
std::vector< unsigned > constraints_
numbering of different possible kinematic constraints
std::vector< edm::ParameterSet > udscResolutions_
store the resolutions for the jets
std::vector< edm::ParameterSet > bResolutions_
std::string jetCorrectionLevel_
correction level for jets
unsigned int bTags_
minimal number of b-jets
unsigned int maxNrIter_
maximal number of iterations to be performed for the fit
std::vector< int > match_
the combination that should be used
double minBTagValueBJet_
min value of bTag for a b-jet
double mTop_
top mass value used for constraints
std::string bTagAlgo_
input tag for b-tagging algorithm
unsigned int jetParam_
numbering of different possible jet parametrizations
bool useOnlyMatch_
fit or only a certain combination
int maxNJets_
maximal number of jets (-1 possible to indicate &#39;all&#39;)
double maxBTagValueNonBJet_
max value of bTag for a non-b-jet
bool invalidMatch_
match is invalid
TtFullHadKinFitter::KinFit::KinFit ( bool  useBTagging,
unsigned int  bTags,
std::string  bTagAlgo,
double  minBTagValueBJet,
double  maxBTagValueNonBJet,
std::vector< edm::ParameterSet udscResolutions,
std::vector< edm::ParameterSet bResolutions,
double  resolutionSmearFactor,
std::string  jetCorrectionLevel,
int  maxNJets,
int  maxNComb,
unsigned int  maxNrIter,
double  maxDeltaS,
double  maxF,
unsigned int  jetParam,
std::vector< unsigned >  constraints,
double  mW,
double  mTop 
)

special constructor

Definition at line 314 of file TtFullHadKinFitter.cc.

References constraints(), constraints_, fitter, jetParam_, maxDeltaS_, maxF_, maxNrIter_, mTop_, mW_, param(), and TtFullHadKinFitter::TtFullHadKinFitter().

317  :
318  useBTagging_(useBTagging),
319  bTags_(bTags),
320  bTagAlgo_(bTagAlgo),
321  minBTagValueBJet_(minBTagValueBJet),
322  maxBTagValueNonBJet_(maxBTagValueNonBJet),
323  udscResolutions_(udscResolutions),
324  bResolutions_(bResolutions),
325  resolutionSmearFactor_(resolutionSmearFactor),
326  jetCorrectionLevel_(jetCorrectionLevel),
327  maxNJets_(maxNJets),
328  maxNComb_(maxNComb),
329  maxNrIter_(maxNrIter),
330  maxDeltaS_(maxDeltaS),
331  maxF_(maxF),
332  jetParam_(jetParam),
334  mW_(mW),
335  mTop_(mTop),
336  useOnlyMatch_(false),
337  invalidMatch_(false)
338 {
339  // define kinematic fit interface
341 }
double resolutionSmearFactor_
smearing factor for jet energy resolutions
double maxF_
maximal deviation for contstraints
double maxDeltaS_
maximal chi2 equivalent
TtFullHadKinFitter::Param param(unsigned int configParameter)
int maxNComb_
maximal number of combinations to be written to the event
TtFullHadKinFitter * fitter
kinematic fit interface
double mW_
W mass value used for constraints.
std::vector< unsigned > constraints_
numbering of different possible kinematic constraints
std::vector< edm::ParameterSet > udscResolutions_
store the resolutions for the jets
std::vector< edm::ParameterSet > bResolutions_
std::string jetCorrectionLevel_
correction level for jets
unsigned int bTags_
minimal number of b-jets
unsigned int maxNrIter_
maximal number of iterations to be performed for the fit
double minBTagValueBJet_
min value of bTag for a b-jet
double mTop_
top mass value used for constraints
std::string bTagAlgo_
input tag for b-tagging algorithm
unsigned int jetParam_
numbering of different possible jet parametrizations
bool useOnlyMatch_
fit or only a certain combination
int maxNJets_
maximal number of jets (-1 possible to indicate &#39;all&#39;)
TtFullHadKinFitter()
default constructor
std::vector< TtFullHadKinFitter::Constraint > constraints(std::vector< unsigned int > &configParameters)
double maxBTagValueNonBJet_
max value of bTag for a non-b-jet
bool invalidMatch_
match is invalid
TtFullHadKinFitter::KinFit::~KinFit ( )

default destructor

Definition at line 344 of file TtFullHadKinFitter.cc.

345 {
346  delete fitter;
347 }
TtFullHadKinFitter * fitter
kinematic fit interface

Member Function Documentation

TtFullHadKinFitter::Constraint TtFullHadKinFitter::KinFit::constraint ( unsigned int  configParameter)
private

Definition at line 605 of file TtFullHadKinFitter.cc.

References edm::hlt::Exception, TtFullHadKinFitter::kEqualTopMasses, TtFullHadKinFitter::kTopBarMass, TtFullHadKinFitter::kTopMass, TtFullHadKinFitter::kWMinusMass, TtFullHadKinFitter::kWPlusMass, and query::result.

606 {
608  switch(configParameter){
614  default:
615  throw cms::Exception("WrongConfig")
616  << "Chosen fit constraint is not supported: " << configParameter << "\n";
617  break;
618  }
619  return result;
620 }
Constraint
supported constraints
tuple result
Definition: query.py:137
std::vector< TtFullHadKinFitter::Constraint > TtFullHadKinFitter::KinFit::constraints ( std::vector< unsigned int > &  configParameters)
private

Definition at line 623 of file TtFullHadKinFitter.cc.

References i, and query::result.

Referenced by KinFit(), and setFitter().

624 {
625  std::vector<TtFullHadKinFitter::Constraint> result;
626  for(unsigned i=0; i<configParameters.size(); ++i){
627  result.push_back(constraint(configParameters[i]));
628  }
629  return result;
630 }
int i
Definition: DBlmapReader.cc:9
TtFullHadKinFitter::Constraint constraint(unsigned int configParameter)
tuple result
Definition: query.py:137
pat::Jet TtFullHadKinFitter::KinFit::corJet ( const pat::Jet jet,
const std::string &  quarkType 
)
private

helper function to construct the proper corrected jet for its corresponding quarkType

Definition at line 417 of file TtFullHadKinFitter.cc.

References pat::Jet::jecFactor(), metsig::jet, reco::LeafCandidate::p4(), runTheMatrix::ret, and reco::LeafCandidate::setP4().

418 {
419  // jetCorrectionLevel was not configured
420  if(jetCorrectionLevel_.empty())
421  throw cms::Exception("Configuration")
422  << "Unconfigured jetCorrectionLevel. Please use an appropriate, non-empty string.\n";
423 
424  // quarkType is unknown
425  if( !(quarkType=="wMix" ||
426  quarkType=="uds" ||
427  quarkType=="charm" ||
428  quarkType=="bottom") )
429  throw cms::Exception("Configuration")
430  << quarkType << " is unknown as a quarkType for the jetCorrectionLevel.\n";
431 
432  float jecFactor = 1.;
433  if(quarkType=="wMix") jecFactor = 0.75 * jet.jecFactor(jetCorrectionLevel_, "uds") + 0.25 * jet.jecFactor(jetCorrectionLevel_, "charm");
434  else jecFactor = jet.jecFactor(jetCorrectionLevel_, quarkType);
435 
436  pat::Jet ret = jet;
437  ret.setP4(ret.p4()*jecFactor);
438  return ret;
439 }
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:239
virtual void setP4(const LorentzVector &p4)
set 4-momentum
std::string jetCorrectionLevel_
correction level for jets
Analysis-level calorimeter jet class.
Definition: Jet.h:71
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
bool TtFullHadKinFitter::KinFit::doBTagging ( const std::vector< pat::Jet > &  jets,
const unsigned int &  bJetCounter,
std::vector< int > &  combi 
)
private

Definition at line 350 of file TtFullHadKinFitter.cc.

References TtFullHadEvtPartons::B, TtFullHadEvtPartons::BBar, edm::hlt::Exception, TtFullHadEvtPartons::LightP, TtFullHadEvtPartons::LightPBar, TtFullHadEvtPartons::LightQ, and TtFullHadEvtPartons::LightQBar.

350  {
351 
352  if( !useBTagging_ ) {
353  return true;
354  }
355  if( bTags_ == 2 &&
356  jets[combi[TtFullHadEvtPartons::B ]].bDiscriminator(bTagAlgo_) >= minBTagValueBJet_ &&
357  jets[combi[TtFullHadEvtPartons::BBar ]].bDiscriminator(bTagAlgo_) >= minBTagValueBJet_ &&
358  jets[combi[TtFullHadEvtPartons::LightQ ]].bDiscriminator(bTagAlgo_) < maxBTagValueNonBJet_ &&
360  jets[combi[TtFullHadEvtPartons::LightP ]].bDiscriminator(bTagAlgo_) < maxBTagValueNonBJet_ &&
362  return true;
363  }
364  else if( bTags_ == 1 ){
365  if( bJetCounter == 1 &&
366  (jets[combi[TtFullHadEvtPartons::B ]].bDiscriminator(bTagAlgo_) >= minBTagValueBJet_ ||
367  jets[combi[TtFullHadEvtPartons::BBar ]].bDiscriminator(bTagAlgo_) >= minBTagValueBJet_) &&
368  jets[combi[TtFullHadEvtPartons::LightQ ]].bDiscriminator(bTagAlgo_) < maxBTagValueNonBJet_ &&
370  jets[combi[TtFullHadEvtPartons::LightP ]].bDiscriminator(bTagAlgo_) < maxBTagValueNonBJet_ &&
372  return true;
373  }
374  else if( bJetCounter > 1 &&
375  jets[combi[TtFullHadEvtPartons::B ]].bDiscriminator(bTagAlgo_) >= minBTagValueBJet_ &&
376  jets[combi[TtFullHadEvtPartons::BBar ]].bDiscriminator(bTagAlgo_) >= minBTagValueBJet_ &&
377  jets[combi[TtFullHadEvtPartons::LightQ ]].bDiscriminator(bTagAlgo_) < maxBTagValueNonBJet_ &&
379  jets[combi[TtFullHadEvtPartons::LightP ]].bDiscriminator(bTagAlgo_) < maxBTagValueNonBJet_ &&
381  return true;
382  }
383  }
384  else if( bTags_ == 0 ){
385  if( bJetCounter == 0){
386  return true;
387  }
388  else if( bJetCounter == 1 &&
389  (jets[combi[TtFullHadEvtPartons::B ]].bDiscriminator(bTagAlgo_) >= minBTagValueBJet_ ||
390  jets[combi[TtFullHadEvtPartons::BBar ]].bDiscriminator(bTagAlgo_) >= minBTagValueBJet_) &&
391  jets[combi[TtFullHadEvtPartons::LightQ ]].bDiscriminator(bTagAlgo_) < maxBTagValueNonBJet_ &&
393  jets[combi[TtFullHadEvtPartons::LightP ]].bDiscriminator(bTagAlgo_) < maxBTagValueNonBJet_ &&
395  return true;
396  }
397  else if( bJetCounter > 1 &&
398  jets[combi[TtFullHadEvtPartons::B ]].bDiscriminator(bTagAlgo_) >= minBTagValueBJet_ &&
399  jets[combi[TtFullHadEvtPartons::BBar ]].bDiscriminator(bTagAlgo_) >= minBTagValueBJet_ &&
400  jets[combi[TtFullHadEvtPartons::LightQ ]].bDiscriminator(bTagAlgo_) < maxBTagValueNonBJet_ &&
402  jets[combi[TtFullHadEvtPartons::LightP ]].bDiscriminator(bTagAlgo_) < maxBTagValueNonBJet_ &&
404  return true;
405  }
406  }
407  else if( bTags_ > 2 ){
408  throw cms::Exception("Configuration")
409  << "Wrong number of bTags (" << bTags_ << " bTags not supported)!\n";
410  return true;
411  }
412  return false;
413 }
unsigned int bTags_
minimal number of b-jets
double minBTagValueBJet_
min value of bTag for a b-jet
std::string bTagAlgo_
input tag for b-tagging algorithm
double maxBTagValueNonBJet_
max value of bTag for a non-b-jet
std::list< TtFullHadKinFitter::KinFitResult > TtFullHadKinFitter::KinFit::fit ( const std::vector< pat::Jet > &  jets)

do the fitting and return fit result


skip events with less jets than partons or invalid match

analyze different jet combinations using the KinFitter (or only a given jet combination if useOnlyMatch=true)

feed out result starting with the JetComb having the smallest chi2

Definition at line 442 of file TtFullHadKinFitter.cc.

References TtFullHadEvtPartons::B, TtFullHadKinFitter::KinFitResult::B, TtFullHadEvtPartons::BBar, TtFullHadKinFitter::KinFitResult::BBar, TtFullHadKinFitter::KinFitResult::Chi2, i, metsig::jet, TtFullHadKinFitter::KinFitResult::JetCombi, TtFullHadEvtPartons::LightP, TtFullHadKinFitter::KinFitResult::LightP, TtFullHadEvtPartons::LightPBar, TtFullHadKinFitter::KinFitResult::LightPBar, TtFullHadEvtPartons::LightQ, TtFullHadKinFitter::KinFitResult::LightQ, TtFullHadEvtPartons::LightQBar, TtFullHadKinFitter::KinFitResult::LightQBar, stdcomb::next_combination(), nPartons, TtFullHadKinFitter::KinFitResult::Prob, query::result, TtFullHadKinFitter::KinFitResult::Status, and ntuplemaker::status.

Referenced by TtFullHadKinFitProducer::produce().

442  {
443 
444  std::list<TtFullHadKinFitter::KinFitResult> fitResults;
445 
452  if( jets.size()<nPartons || invalidMatch_ ) {
453  // indices referring to the jet combination
454  std::vector<int> invalidCombi;
455  for(unsigned int i = 0; i < nPartons; ++i) invalidCombi.push_back( -1 );
456 
457  KinFitResult result;
458  // status of the fitter
459  result.Status = -1;
460  // chi2
461  result.Chi2 = -1.;
462  // chi2 probability
463  result.Prob = -1.;
464  // the kinFit getters return empty objects here
465  result.B = fitter->fittedB();
466  result.BBar = fitter->fittedBBar();
467  result.LightQ = fitter->fittedLightQ();
468  result.LightQBar= fitter->fittedLightQBar();
469  result.LightP = fitter->fittedLightP();
470  result.LightPBar= fitter->fittedLightPBar();
471  result.JetCombi = invalidCombi;
472  // push back fit result
473  fitResults.push_back( result );
474  return fitResults;
475  }
476 
482  std::vector<int> jetIndices;
483  if(!useOnlyMatch_) {
484  for(unsigned int idx=0; idx<jets.size(); ++idx){
485  if(maxNJets_>=(int)nPartons && maxNJets_==(int)idx) break;
486  jetIndices.push_back(idx);
487  }
488  }
489 
490  std::vector<int> combi;
491  for(unsigned int idx=0; idx<nPartons; ++idx) {
492  useOnlyMatch_?combi.push_back(match_[idx]):combi.push_back(idx);
493  }
494 
495 
496  unsigned int bJetCounter = 0;
497  for(std::vector<pat::Jet>::const_iterator jet = jets.begin(); jet < jets.end(); ++jet){
498  if(jet->bDiscriminator(bTagAlgo_) >= minBTagValueBJet_) ++bJetCounter;
499  }
500 
501  do{
502  for(int cnt=0; cnt<TMath::Factorial(combi.size()); ++cnt){
503  // take into account indistinguishability of the two jets from the two W decays,
504  // and the two decay branches, this reduces the combinatorics by a factor of 2*2*2
508  useOnlyMatch_) && doBTagging(jets, bJetCounter, combi) ) {
509 
510  std::vector<pat::Jet> jetCombi;
511  jetCombi.resize(nPartons);
514  jetCombi[TtFullHadEvtPartons::B ] = corJet(jets[combi[TtFullHadEvtPartons::B ]], "bottom");
515  jetCombi[TtFullHadEvtPartons::BBar ] = corJet(jets[combi[TtFullHadEvtPartons::BBar ]], "bottom");
518 
519  // do the kinematic fit
521 
522  if( status == 0 ) {
523  // fill struct KinFitResults if converged
525  result.Status = status;
526  result.Chi2 = fitter->fitS();
527  result.Prob = fitter->fitProb();
528  result.B = fitter->fittedB();
529  result.BBar = fitter->fittedBBar();
530  result.LightQ = fitter->fittedLightQ();
531  result.LightQBar= fitter->fittedLightQBar();
532  result.LightP = fitter->fittedLightP();
533  result.LightPBar= fitter->fittedLightPBar();
534  result.JetCombi = combi;
535  // push back fit result
536  fitResults.push_back( result );
537  }
538  }
539  // don't go through combinatorics if useOnlyMatch was chosen
540  if(useOnlyMatch_){
541  break;
542  }
543  // next permutation
544  std::next_permutation( combi.begin(), combi.end() );
545  }
546  // don't go through combinatorics if useOnlyMatch was chosen
547  if(useOnlyMatch_){
548  break;
549  }
550  }
551  while( stdcomb::next_combination( jetIndices.begin(), jetIndices.end(), combi.begin(), combi.end() ) );
552 
553 
554  // sort results w.r.t. chi2 values
555  fitResults.sort();
556 
562  if( fitResults.size() < 1 ) {
563  // in case no fit results were stored in the list (i.e. when all fits were aborted)
564 
565  KinFitResult result;
566  // status of the fitter
567  result.Status = -1;
568  // chi2
569  result.Chi2 = -1.;
570  // chi2 probability
571  result.Prob = -1.;
572  // the kinFit getters return empty objects here
573  result.B = fitter->fittedB();
574  result.BBar = fitter->fittedBBar();
575  result.LightQ = fitter->fittedLightQ();
576  result.LightQBar= fitter->fittedLightQBar();
577  result.LightP = fitter->fittedLightP();
578  result.LightPBar= fitter->fittedLightPBar();
579  // indices referring to the jet combination
580  std::vector<int> invalidCombi(nPartons, -1);
581  result.JetCombi = invalidCombi;
582  // push back fit result
583  fitResults.push_back( result );
584  }
585  return fitResults;
586 }
double resolutionSmearFactor_
smearing factor for jet energy resolutions
int i
Definition: DBlmapReader.cc:9
const pat::Particle fittedLightPBar() const
return fitted light quark candidate
int fit(const std::vector< pat::Jet > &jets)
kinematic fit interface
TtFullHadKinFitter * fitter
kinematic fit interface
const pat::Particle fittedBBar() const
return fitted b quark candidate
std::vector< edm::ParameterSet > udscResolutions_
store the resolutions for the jets
double fitProb() const
return fit probability
Definition: TopKinFitter.h:36
std::vector< edm::ParameterSet > bResolutions_
bool doBTagging(const std::vector< pat::Jet > &jets, const unsigned int &bJetCounter, std::vector< int > &combi)
pat::Jet corJet(const pat::Jet &jet, const std::string &quarkType)
helper function to construct the proper corrected jet for its corresponding quarkType ...
std::vector< int > match_
the combination that should be used
tuple result
Definition: query.py:137
double minBTagValueBJet_
min value of bTag for a b-jet
const pat::Particle fittedLightQ() const
return fitted light quark candidate
std::string bTagAlgo_
input tag for b-tagging algorithm
static const unsigned int nPartons
bool useOnlyMatch_
fit or only a certain combination
int maxNJets_
maximal number of jets (-1 possible to indicate &#39;all&#39;)
const pat::Particle fittedLightP() const
return fitted light quark candidate
double fitS() const
return chi2 of fit (not normalized to degrees of freedom)
Definition: TopKinFitter.h:32
tuple status
Definition: ntuplemaker.py:245
bool invalidMatch_
match is invalid
bool next_combination(BidIt n_begin, BidIt n_end, BidIt r_begin, BidIt r_end)
Definition: combination.h:22
const pat::Particle fittedLightQBar() const
return fitted light quark candidate
const pat::Particle fittedB() const
return fitted b quark candidate
TtFullHadKinFitter::Param TtFullHadKinFitter::KinFit::param ( unsigned int  configParameter)
private

Definition at line 589 of file TtFullHadKinFitter.cc.

References edm::hlt::Exception, TopKinFitter::kEMom, TopKinFitter::kEtEtaPhi, TopKinFitter::kEtThetaPhi, and query::result.

Referenced by KinFit().

590 {
592  switch(configParameter){
596  default:
597  throw cms::Exception("WrongConfig")
598  << "Chosen jet parametrization is not supported: " << configParameter << "\n";
599  break;
600  }
601  return result;
602 }
Param
supported parameterizations
Definition: TopKinFitter.h:22
tuple result
Definition: query.py:137
void TtFullHadKinFitter::KinFit::setBTagging ( bool  useBTagging,
unsigned int  bTags,
std::string  bTagAlgo,
double  minBTagValueBJet,
double  maxBTagValueNonBJet 
)
inline

set all parameters for b-tagging

Definition at line 135 of file TtFullHadKinFitter.h.

References bTagAlgo_, bTags_, maxBTagValueNonBJet_, minBTagValueBJet_, and useBTagging_.

135  {
136  useBTagging_ = useBTagging;
137  bTags_ = bTags;
138  bTagAlgo_ = bTagAlgo;
139  minBTagValueBJet_ = minBTagValueBJet;
140  maxBTagValueNonBJet_ = maxBTagValueNonBJet;
141  }
unsigned int bTags_
minimal number of b-jets
double minBTagValueBJet_
min value of bTag for a b-jet
std::string bTagAlgo_
input tag for b-tagging algorithm
double maxBTagValueNonBJet_
max value of bTag for a non-b-jet
void TtFullHadKinFitter::KinFit::setFitter ( int  maxNJets,
unsigned int  maxNrIter,
double  maxDeltaS,
double  maxF,
unsigned int  jetParam,
std::vector< unsigned >  constraints,
double  mW,
double  mTop 
)
inline

set parameters for fitter

Definition at line 149 of file TtFullHadKinFitter.h.

References constraints(), constraints_, jetParam_, maxDeltaS_, maxF_, maxNJets_, maxNrIter_, mTop_, and mW_.

150  {
151  maxNJets_ = maxNJets;
152  maxNrIter_ = maxNrIter;
153  maxDeltaS_ = maxDeltaS;
154  maxF_ = maxF;
155  jetParam_ = jetParam;
157  mW_ = mW;
158  mTop_ = mTop;
159  }
double maxF_
maximal deviation for contstraints
double maxDeltaS_
maximal chi2 equivalent
double mW_
W mass value used for constraints.
std::vector< unsigned > constraints_
numbering of different possible kinematic constraints
unsigned int maxNrIter_
maximal number of iterations to be performed for the fit
double mTop_
top mass value used for constraints
unsigned int jetParam_
numbering of different possible jet parametrizations
int maxNJets_
maximal number of jets (-1 possible to indicate &#39;all&#39;)
std::vector< TtFullHadKinFitter::Constraint > constraints(std::vector< unsigned int > &configParameters)
void TtFullHadKinFitter::KinFit::setJEC ( std::string  jetCorrectionLevel)
inline

set jec level

Definition at line 161 of file TtFullHadKinFitter.h.

References jetCorrectionLevel_.

161  {
162  jetCorrectionLevel_ = jetCorrectionLevel;
163  }
std::string jetCorrectionLevel_
correction level for jets
void TtFullHadKinFitter::KinFit::setMatch ( std::vector< int >  match)
inline

set match to be used

Definition at line 169 of file TtFullHadKinFitter.h.

References match(), and match_.

Referenced by TtFullHadKinFitProducer::produce().

169  {
170  match_ = match;
171  }
std::vector< int > match_
the combination that should be used
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:6
void TtFullHadKinFitter::KinFit::setMatchInvalidity ( bool  invalidMatch)
inline

set the validity of a match

Definition at line 173 of file TtFullHadKinFitter.h.

References invalidMatch_.

Referenced by TtFullHadKinFitProducer::produce().

173  {
174  invalidMatch_ = invalidMatch;
175  }
bool invalidMatch_
match is invalid
void TtFullHadKinFitter::KinFit::setOutput ( int  maxNComb)
inline

set number of combinations of output

Definition at line 177 of file TtFullHadKinFitter.h.

References maxNComb_.

177  {
178  maxNComb_ = maxNComb;
179  }
int maxNComb_
maximal number of combinations to be written to the event
void TtFullHadKinFitter::KinFit::setResolutions ( std::vector< edm::ParameterSet udscResolutions,
std::vector< edm::ParameterSet bResolutions,
double  resolutionSmearFactor = 1. 
)
inline

set resolutions

Definition at line 143 of file TtFullHadKinFitter.h.

References bResolutions_, resolutionSmearFactor_, and udscResolutions_.

143  {
144  udscResolutions_ = udscResolutions;
145  bResolutions_ = bResolutions;
146  resolutionSmearFactor_ = resolutionSmearFactor;
147  }
double resolutionSmearFactor_
smearing factor for jet energy resolutions
std::vector< edm::ParameterSet > udscResolutions_
store the resolutions for the jets
std::vector< edm::ParameterSet > bResolutions_
void TtFullHadKinFitter::KinFit::setUseOnlyMatch ( bool  useOnlyMatch)
inline

set useOnlyMatch

Definition at line 165 of file TtFullHadKinFitter.h.

References useOnlyMatch_.

Referenced by TtFullHadKinFitProducer::produce().

165  {
166  useOnlyMatch_ = useOnlyMatch;
167  }
bool useOnlyMatch_
fit or only a certain combination

Member Data Documentation

std::vector<edm::ParameterSet> TtFullHadKinFitter::KinFit::bResolutions_
private

Definition at line 211 of file TtFullHadKinFitter.h.

Referenced by setResolutions().

std::string TtFullHadKinFitter::KinFit::bTagAlgo_
private

input tag for b-tagging algorithm

Definition at line 205 of file TtFullHadKinFitter.h.

Referenced by setBTagging().

unsigned int TtFullHadKinFitter::KinFit::bTags_
private

minimal number of b-jets

Definition at line 203 of file TtFullHadKinFitter.h.

Referenced by setBTagging().

std::vector<unsigned> TtFullHadKinFitter::KinFit::constraints_
private

numbering of different possible kinematic constraints

Definition at line 229 of file TtFullHadKinFitter.h.

Referenced by KinFit(), and setFitter().

TtFullHadKinFitter* TtFullHadKinFitter::KinFit::fitter
private

kinematic fit interface

Definition at line 242 of file TtFullHadKinFitter.h.

Referenced by KinFit().

bool TtFullHadKinFitter::KinFit::invalidMatch_
private

match is invalid

Definition at line 239 of file TtFullHadKinFitter.h.

Referenced by setMatchInvalidity().

std::string TtFullHadKinFitter::KinFit::jetCorrectionLevel_
private

correction level for jets

Definition at line 215 of file TtFullHadKinFitter.h.

Referenced by setJEC().

unsigned int TtFullHadKinFitter::KinFit::jetParam_
private

numbering of different possible jet parametrizations

Definition at line 227 of file TtFullHadKinFitter.h.

Referenced by KinFit(), and setFitter().

std::vector<int> TtFullHadKinFitter::KinFit::match_
private

the combination that should be used

Definition at line 237 of file TtFullHadKinFitter.h.

Referenced by setMatch().

double TtFullHadKinFitter::KinFit::maxBTagValueNonBJet_
private

max value of bTag for a non-b-jet

Definition at line 209 of file TtFullHadKinFitter.h.

Referenced by setBTagging().

double TtFullHadKinFitter::KinFit::maxDeltaS_
private

maximal chi2 equivalent

Definition at line 223 of file TtFullHadKinFitter.h.

Referenced by KinFit(), and setFitter().

double TtFullHadKinFitter::KinFit::maxF_
private

maximal deviation for contstraints

Definition at line 225 of file TtFullHadKinFitter.h.

Referenced by KinFit(), and setFitter().

int TtFullHadKinFitter::KinFit::maxNComb_
private

maximal number of combinations to be written to the event

Definition at line 219 of file TtFullHadKinFitter.h.

Referenced by setOutput().

int TtFullHadKinFitter::KinFit::maxNJets_
private

maximal number of jets (-1 possible to indicate 'all')

Definition at line 217 of file TtFullHadKinFitter.h.

Referenced by setFitter().

unsigned int TtFullHadKinFitter::KinFit::maxNrIter_
private

maximal number of iterations to be performed for the fit

Definition at line 221 of file TtFullHadKinFitter.h.

Referenced by KinFit(), and setFitter().

double TtFullHadKinFitter::KinFit::minBTagValueBJet_
private

min value of bTag for a b-jet

Definition at line 207 of file TtFullHadKinFitter.h.

Referenced by setBTagging().

double TtFullHadKinFitter::KinFit::mTop_
private

top mass value used for constraints

Definition at line 233 of file TtFullHadKinFitter.h.

Referenced by KinFit(), and setFitter().

double TtFullHadKinFitter::KinFit::mW_
private

W mass value used for constraints.

Definition at line 231 of file TtFullHadKinFitter.h.

Referenced by KinFit(), and setFitter().

double TtFullHadKinFitter::KinFit::resolutionSmearFactor_
private

smearing factor for jet energy resolutions

Definition at line 213 of file TtFullHadKinFitter.h.

Referenced by setResolutions().

std::vector<edm::ParameterSet> TtFullHadKinFitter::KinFit::udscResolutions_
private

store the resolutions for the jets

Definition at line 211 of file TtFullHadKinFitter.h.

Referenced by setResolutions().

bool TtFullHadKinFitter::KinFit::useBTagging_
private

switch to tell whether all possible combinations should be used for the switch to tell whether to use b-tagging or not

Definition at line 201 of file TtFullHadKinFitter.h.

Referenced by setBTagging().

bool TtFullHadKinFitter::KinFit::useOnlyMatch_
private

fit or only a certain combination

Definition at line 235 of file TtFullHadKinFitter.h.

Referenced by setUseOnlyMatch().