#include <TtSemiLepKinFitter.h>
Public Types | |
enum | Constraint { kWHadMass = 1, kWLepMass, kTopHadMass, kTopLepMass, kNeutrinoMass, kEqualTopMasses, kSumPt } |
supported constraints More... | |
Public Types inherited from TopKinFitter | |
enum | Param { kEMom, kEtEtaPhi, kEtThetaPhi } |
supported parameterizations More... | |
Public Member Functions | |
TtSemiEvtSolution | addKinFitInfo (TtSemiEvtSolution *asol) |
add kin fit information to the old event solution (in for legacy reasons) More... | |
template<class LeptonType > | |
int | fit (const std::vector< pat::Jet > &jets, const pat::Lepton< LeptonType > &leps, const pat::MET &met) |
kinematic fit interface for PAT objects More... | |
int | fit (const TLorentzVector &p4HadP, const TLorentzVector &p4HadQ, const TLorentzVector &p4HadB, const TLorentzVector &p4LepB, const TLorentzVector &p4Lepton, const TLorentzVector &p4Neutrino, const int leptonCharge, const CovarianceMatrix::ObjectType leptonType) |
kinematic fit interface for plain 4-vecs More... | |
int | fit (const TLorentzVector &p4HadP, const TLorentzVector &p4HadQ, const TLorentzVector &p4HadB, const TLorentzVector &p4LepB, const TLorentzVector &p4Lepton, const TLorentzVector &p4Neutrino, const TMatrixD &covHadP, const TMatrixD &covHadQ, const TMatrixD &covHadB, const TMatrixD &covLepB, const TMatrixD &covLepton, const TMatrixD &covNeutrino, const int leptonCharge) |
common core of the fit interface More... | |
const pat::Particle | fittedHadB () const |
return hadronic b quark candidate More... | |
const pat::Particle | fittedHadP () const |
return hadronic light quark candidate More... | |
const pat::Particle | fittedHadQ () const |
return hadronic light quark candidate More... | |
const pat::Particle | fittedLepB () const |
return leptonic b quark candidate More... | |
const pat::Particle | fittedLepton () const |
return lepton candidate More... | |
const pat::Particle | fittedNeutrino () const |
return neutrino candidate More... | |
TtSemiLepKinFitter () | |
default constructor More... | |
TtSemiLepKinFitter (Param jetParam, Param lepParam, Param metParam, int maxNrIter, double maxDeltaS, double maxF, const std::vector< Constraint > &constraints, double mW=80.4, double mTop=173., const std::vector< edm::ParameterSet > *udscResolutions=nullptr, const std::vector< edm::ParameterSet > *bResolutions=nullptr, const std::vector< edm::ParameterSet > *lepResolutions=nullptr, const std::vector< edm::ParameterSet > *metResolutions=nullptr, const std::vector< double > *jetEnergyResolutionScaleFactors=nullptr, const std::vector< double > *jetEnergyResolutionEtaBinning=nullptr) | |
constructor initialized with built-in types and class enum's custom parameters More... | |
~TtSemiLepKinFitter () | |
default destructor More... | |
Public Member Functions inherited from TopKinFitter | |
int | fitNrIter () const |
return number of used iterations More... | |
double | fitProb () const |
return fit probability More... | |
double | fitS () const |
return chi2 of fit (not normalized to degrees of freedom) More... | |
void | setVerbosity (const int verbosityLevel) |
allows to change the verbosity of the TKinFitter More... | |
TopKinFitter (const int maxNrIter=200, const double maxDeltaS=5e-5, const double maxF=1e-4, const double mW=80.4, const double mTop=173.) | |
default constructor More... | |
~TopKinFitter () | |
default destructor More... | |
Private Member Functions | |
void | printSetup () const |
print fitter setup More... | |
void | setupConstraints () |
initialize constraints More... | |
void | setupFitter () |
setup fitter More... | |
void | setupJets () |
initialize jet inputs More... | |
void | setupLeptons () |
initialize lepton inputs More... | |
Private Attributes | |
const std::vector< edm::ParameterSet > * | bResolutions_ = nullptr |
bool | constrainSumPt_ |
internally use simple boolean for this constraint to reduce the per-event computing time More... | |
std::vector< Constraint > | constrList_ |
vector of constraints to be used More... | |
std::unique_ptr< CovarianceMatrix > | covM_ |
object used to construct the covariance matrices for the individual particles More... | |
pat::Particle | fittedHadB_ |
output particles More... | |
pat::Particle | fittedHadP_ |
pat::Particle | fittedHadQ_ |
pat::Particle | fittedLepB_ |
pat::Particle | fittedLepton_ |
pat::Particle | fittedNeutrino_ |
std::unique_ptr< TAbsFitParticle > | hadB_ |
input particles More... | |
std::unique_ptr< TAbsFitParticle > | hadP_ |
std::unique_ptr< TAbsFitParticle > | hadQ_ |
const std::vector< double > * | jetEnergyResolutionEtaBinning_ = nullptr |
const std::vector< double > * | jetEnergyResolutionScaleFactors_ = nullptr |
scale factors for the jet energy resolution More... | |
Param | jetParam_ |
jet parametrization More... | |
std::unique_ptr< TAbsFitParticle > | lepB_ |
Param | lepParam_ |
lepton parametrization More... | |
const std::vector< edm::ParameterSet > * | lepResolutions_ = nullptr |
std::unique_ptr< TAbsFitParticle > | lepton_ |
std::map< Constraint, std::unique_ptr< TFitConstraintM > > | massConstr_ |
supported constraints More... | |
Param | metParam_ |
met parametrization More... | |
const std::vector< edm::ParameterSet > * | metResolutions_ = nullptr |
std::unique_ptr< TAbsFitParticle > | neutrino_ |
std::unique_ptr< TFitConstraintEp > | sumPxConstr_ |
std::unique_ptr< TFitConstraintEp > | sumPyConstr_ |
const std::vector< edm::ParameterSet > * | udscResolutions_ = nullptr |
resolutions More... | |
Additional Inherited Members | |
Protected Member Functions inherited from TopKinFitter | |
std::string | param (const Param ¶m) const |
convert Param to human readable form More... | |
Protected Attributes inherited from TopKinFitter | |
std::unique_ptr< TKinFitter > | fitter_ |
kinematic fitter More... | |
double | maxDeltaS_ |
maximal allowed chi2 (not normalized to degrees of freedom) More... | |
double | maxF_ |
maximal allowed distance from constraints More... | |
int | maxNrIter_ |
maximal allowed number of iterations to be used for the fit More... | |
double | mTop_ |
top mass value used for constraints More... | |
double | mW_ |
W mass value used for constraints. More... | |
Definition at line 32 of file TtSemiLepKinFitter.h.
supported constraints
Enumerator | |
---|---|
kWHadMass | |
kWLepMass | |
kTopHadMass | |
kTopLepMass | |
kNeutrinoMass | |
kEqualTopMasses | |
kSumPt |
Definition at line 35 of file TtSemiLepKinFitter.h.
|
explicit |
default constructor
default configuration is: Parametrization kEMom, Max iterations = 200, deltaS<= 5e-5, maxF<= 1e-4, no constraints
Definition at line 15 of file TtSemiLepKinFitter.cc.
References setupFitter().
|
explicit |
constructor initialized with built-in types and class enum's custom parameters
Definition at line 19 of file TtSemiLepKinFitter.cc.
References setupFitter().
|
default |
default destructor
TtSemiEvtSolution TtSemiLepKinFitter::addKinFitInfo | ( | TtSemiEvtSolution * | asol | ) |
add kin fit information to the old event solution (in for legacy reasons)
Definition at line 318 of file TtSemiLepKinFitter.cc.
References fit(), TopKinFitter::fitProb(), fittedHadB(), fittedHadP(), fittedHadQ(), fittedLepB(), fittedLepton(), fittedNeutrino(), TopKinFitter::fitter_, TtSemiEvtSolution::getCalHadb(), TtSemiEvtSolution::getCalHadp(), TtSemiEvtSolution::getCalHadq(), TtSemiEvtSolution::getCalLepb(), TtSemiEvtSolution::getCalLepe(), TtSemiEvtSolution::getCalLepm(), TtSemiEvtSolution::getCalLepn(), TtSemiEvtSolution::getDecay(), TtSemiLepEvtPartons::HadB, PDWG_EXODelayedJetMET_cff::jets, TtSemiLepEvtPartons::LepB, TtSemiLepEvtPartons::LightQ, TtSemiLepEvtPartons::LightQBar, TtSemiEvtSolution::setFitHadb(), TtSemiEvtSolution::setFitHadp(), TtSemiEvtSolution::setFitHadq(), TtSemiEvtSolution::setFitLepb(), TtSemiEvtSolution::setFitLepl(), TtSemiEvtSolution::setFitLepn(), and TtSemiEvtSolution::setProbChi2().
Referenced by TtSemiEvtSolutionMaker::produce().
int TtSemiLepKinFitter::fit | ( | const std::vector< pat::Jet > & | jets, |
const pat::Lepton< LeptonType > & | leps, | ||
const pat::MET & | met | ||
) |
kinematic fit interface for PAT objects
Definition at line 156 of file TtSemiLepKinFitter.h.
References edm::errors::Configuration, covM_, reco::LeafCandidate::energy(), reco::LeafCandidate::et(), TtSemiLepEvtPartons::HadB, jetParam_, PDWG_EXODelayedJetMET_cff::jets, TtSemiLepEvtPartons::LepB, lepParam_, TtSemiLepEvtPartons::LightQ, TtSemiLepEvtPartons::LightQBar, metParam_, reco::LeafCandidate::px(), reco::LeafCandidate::py(), and reco::LeafCandidate::pz().
Referenced by addKinFitInfo(), fit(), and trackingPlots.Iteration::modules().
int TtSemiLepKinFitter::fit | ( | const TLorentzVector & | p4HadP, |
const TLorentzVector & | p4HadQ, | ||
const TLorentzVector & | p4HadB, | ||
const TLorentzVector & | p4LepB, | ||
const TLorentzVector & | p4Lepton, | ||
const TLorentzVector & | p4Neutrino, | ||
const int | leptonCharge, | ||
const CovarianceMatrix::ObjectType | leptonType | ||
) |
kinematic fit interface for plain 4-vecs
Definition at line 204 of file TtSemiLepKinFitter.cc.
References covM_, fit(), jetParam_, CovarianceMatrix::kBJet, CovarianceMatrix::kMet, CovarianceMatrix::kUdscJet, lepParam_, objects.autophobj::leptonType, and metParam_.
Referenced by trackingPlots.Iteration::modules().
int TtSemiLepKinFitter::fit | ( | const TLorentzVector & | p4HadP, |
const TLorentzVector & | p4HadQ, | ||
const TLorentzVector & | p4HadB, | ||
const TLorentzVector & | p4LepB, | ||
const TLorentzVector & | p4Lepton, | ||
const TLorentzVector & | p4Neutrino, | ||
const TMatrixD & | covHadP, | ||
const TMatrixD & | covHadQ, | ||
const TMatrixD & | covHadB, | ||
const TMatrixD & | covLepB, | ||
const TMatrixD & | covLepton, | ||
const TMatrixD & | covNeutrino, | ||
const int | leptonCharge | ||
) |
common core of the fit interface
Definition at line 236 of file TtSemiLepKinFitter.cc.
References constrainSumPt_, fittedHadB_, fittedHadP_, fittedHadQ_, fittedLepB_, fittedLepton_, fittedNeutrino_, TopKinFitter::fitter_, hadB_, hadP_, hadQ_, lepB_, lepton_, neutrino_, sumPxConstr_, and sumPyConstr_.
Referenced by trackingPlots.Iteration::modules().
|
inline |
return hadronic b quark candidate
Definition at line 86 of file TtSemiLepKinFitter.h.
References fittedHadB_, and TopKinFitter::fitter_.
Referenced by addKinFitInfo().
|
inline |
return hadronic light quark candidate
Definition at line 88 of file TtSemiLepKinFitter.h.
References fittedHadP_, and TopKinFitter::fitter_.
Referenced by addKinFitInfo().
|
inline |
return hadronic light quark candidate
Definition at line 90 of file TtSemiLepKinFitter.h.
References fittedHadQ_, and TopKinFitter::fitter_.
Referenced by addKinFitInfo().
|
inline |
return leptonic b quark candidate
Definition at line 92 of file TtSemiLepKinFitter.h.
References fittedLepB_, and TopKinFitter::fitter_.
Referenced by addKinFitInfo().
|
inline |
return lepton candidate
Definition at line 94 of file TtSemiLepKinFitter.h.
References fittedLepton_, and TopKinFitter::fitter_.
Referenced by addKinFitInfo().
|
inline |
return neutrino candidate
Definition at line 96 of file TtSemiLepKinFitter.h.
References fittedNeutrino_, and TopKinFitter::fitter_.
Referenced by addKinFitInfo().
|
private |
print fitter setup
Definition at line 50 of file TtSemiLepKinFitter.cc.
References constrList_, mps_fire::i, jetParam_, kEqualTopMasses, kNeutrinoMass, kSumPt, kTopHadMass, kTopLepMass, kWHadMass, kWLepMass, lepParam_, TopKinFitter::maxDeltaS_, TopKinFitter::maxF_, TopKinFitter::maxNrIter_, metParam_, TopKinFitter::mTop_, TopKinFitter::mW_, and TopKinFitter::param().
Referenced by setupFitter().
|
private |
initialize constraints
Definition at line 141 of file TtSemiLepKinFitter.cc.
References constrainSumPt_, constrList_, spr::find(), hadB_, hadP_, hadQ_, kEqualTopMasses, kNeutrinoMass, kSumPt, kTopHadMass, kTopLepMass, kWHadMass, kWLepMass, lepB_, lepton_, massConstr_, TopKinFitter::mTop_, TopKinFitter::mW_, neutrino_, TFitConstraintEp::pX, TFitConstraintEp::pY, sumPxConstr_, and sumPyConstr_.
Referenced by setupFitter().
|
private |
setup fitter
Definition at line 167 of file TtSemiLepKinFitter.cc.
References bResolutions_, constrainSumPt_, constrList_, covM_, TopKinFitter::fitter_, hadB_, hadP_, hadQ_, mps_fire::i, jetEnergyResolutionEtaBinning_, jetEnergyResolutionScaleFactors_, kSumPt, lepB_, lepResolutions_, lepton_, massConstr_, metResolutions_, neutrino_, printSetup(), setupConstraints(), setupJets(), setupLeptons(), sumPxConstr_, sumPyConstr_, and udscResolutions_.
Referenced by TtSemiLepKinFitter().
|
private |
initialize jet inputs
Definition at line 90 of file TtSemiLepKinFitter.cc.
References hadB_, hadP_, hadQ_, jetParam_, TopKinFitter::kEMom, TopKinFitter::kEtEtaPhi, TopKinFitter::kEtThetaPhi, and lepB_.
Referenced by setupFitter().
|
private |
initialize lepton inputs
Definition at line 115 of file TtSemiLepKinFitter.cc.
References TopKinFitter::kEMom, TopKinFitter::kEtEtaPhi, TopKinFitter::kEtThetaPhi, lepParam_, lepton_, metParam_, and neutrino_.
Referenced by setupFitter().
|
private |
Definition at line 124 of file TtSemiLepKinFitter.h.
Referenced by setupFitter().
|
private |
internally use simple boolean for this constraint to reduce the per-event computing time
Definition at line 152 of file TtSemiLepKinFitter.h.
Referenced by fit(), setupConstraints(), and setupFitter().
|
private |
vector of constraints to be used
Definition at line 150 of file TtSemiLepKinFitter.h.
Referenced by printSetup(), setupConstraints(), and setupFitter().
|
private |
object used to construct the covariance matrices for the individual particles
Definition at line 131 of file TtSemiLepKinFitter.h.
Referenced by fit(), and setupFitter().
|
private |
output particles
Definition at line 137 of file TtSemiLepKinFitter.h.
Referenced by fit(), and fittedHadB().
|
private |
Definition at line 138 of file TtSemiLepKinFitter.h.
Referenced by fit(), and fittedHadP().
|
private |
Definition at line 139 of file TtSemiLepKinFitter.h.
Referenced by fit(), and fittedHadQ().
|
private |
Definition at line 140 of file TtSemiLepKinFitter.h.
Referenced by fit(), and fittedLepB().
|
private |
Definition at line 141 of file TtSemiLepKinFitter.h.
Referenced by fit(), and fittedLepton().
|
private |
Definition at line 142 of file TtSemiLepKinFitter.h.
Referenced by fit(), and fittedNeutrino().
|
private |
input particles
Definition at line 116 of file TtSemiLepKinFitter.h.
Referenced by fit(), setupConstraints(), setupFitter(), and setupJets().
|
private |
Definition at line 117 of file TtSemiLepKinFitter.h.
Referenced by fit(), setupConstraints(), setupFitter(), and setupJets().
|
private |
Definition at line 118 of file TtSemiLepKinFitter.h.
Referenced by fit(), setupConstraints(), setupFitter(), and setupJets().
|
private |
Definition at line 129 of file TtSemiLepKinFitter.h.
Referenced by setupFitter().
|
private |
scale factors for the jet energy resolution
Definition at line 128 of file TtSemiLepKinFitter.h.
Referenced by setupFitter().
|
private |
jet parametrization
Definition at line 144 of file TtSemiLepKinFitter.h.
Referenced by fit(), printSetup(), and setupJets().
|
private |
Definition at line 119 of file TtSemiLepKinFitter.h.
Referenced by fit(), setupConstraints(), setupFitter(), and setupJets().
|
private |
lepton parametrization
Definition at line 146 of file TtSemiLepKinFitter.h.
Referenced by fit(), printSetup(), and setupLeptons().
|
private |
Definition at line 125 of file TtSemiLepKinFitter.h.
Referenced by setupFitter().
|
private |
Definition at line 120 of file TtSemiLepKinFitter.h.
Referenced by fit(), setupConstraints(), setupFitter(), and setupLeptons().
|
private |
supported constraints
Definition at line 133 of file TtSemiLepKinFitter.h.
Referenced by setupConstraints(), and setupFitter().
|
private |
met parametrization
Definition at line 148 of file TtSemiLepKinFitter.h.
Referenced by fit(), printSetup(), and setupLeptons().
|
private |
Definition at line 126 of file TtSemiLepKinFitter.h.
Referenced by setupFitter().
|
private |
Definition at line 121 of file TtSemiLepKinFitter.h.
Referenced by fit(), setupConstraints(), setupFitter(), and setupLeptons().
|
private |
Definition at line 134 of file TtSemiLepKinFitter.h.
Referenced by fit(), setupConstraints(), and setupFitter().
|
private |
Definition at line 135 of file TtSemiLepKinFitter.h.
Referenced by fit(), setupConstraints(), and setupFitter().
|
private |