1 #ifndef TtFullHadKinFitter_h
2 #define TtFullHadKinFitter_h
6 #include "TLorentzVector.h"
42 double mW=80.4,
double mTop=173.,
43 const std::vector<edm::ParameterSet>* udscResolutions=0,
44 const std::vector<edm::ParameterSet>* bResolutions =0,
45 const std::vector<double>* jetEnergyResolutionScaleFactors=0,
46 const std::vector<double>* jetEnergyResolutionEtaBinning =0);
49 double mW=80.4,
double mTop=173.,
50 const std::vector<edm::ParameterSet>* udscResolutions=0,
51 const std::vector<edm::ParameterSet>* bResolutions =0,
52 const std::vector<double>* jetEnergyResolutionScaleFactors=0,
53 const std::vector<double>* jetEnergyResolutionEtaBinning =0);
58 int fit(
const std::vector<pat::Jet>&
jets);
140 KinFit(
bool useBTagging,
unsigned int bTags,
std::string bTagAlgo,
double minBTagValueBJet,
double maxBTagValueNonBJet,
141 const std::vector<edm::ParameterSet>& udscResolutions,
const std::vector<edm::ParameterSet>& bResolutions,
const std::vector<double>& jetEnergyResolutionScaleFactors,
142 const std::vector<double>& jetEnergyResolutionEtaBinning,
std::string jetCorrectionLevel,
int maxNJets,
int maxNComb,
143 unsigned int maxNrIter,
double maxDeltaS,
double maxF,
unsigned int jetParam,
const std::vector<unsigned>&
constraints,
double mW,
double mTop);
148 void setBTagging(
bool useBTagging,
unsigned int bTags,
std::string bTagAlgo,
double minBTagValueBJet,
double maxBTagValueNonBJet){
156 void setResolutions(
const std::vector<edm::ParameterSet>& udscResolutions,
const std::vector<edm::ParameterSet>& bResolutions,
157 const std::vector<double>& jetEnergyResolutionScaleFactors,
const std::vector<double>& jetEnergyResolutionEtaBinning){
164 void setFitter(
int maxNJets,
unsigned int maxNrIter,
double maxDeltaS,
double maxF,
165 unsigned int jetParam,
const std::vector<unsigned>& constraints,
double mW,
double mTop){
197 std::list<TtFullHadKinFitter::KinFitResult>
fit(
const std::vector<pat::Jet>&
jets);
202 bool doBTagging(
const std::vector<pat::Jet>&
jets,
const unsigned int& bJetCounter, std::vector<int>& combi);
211 std::vector<TtFullHadKinFitter::Constraint>
constraints(
const std::vector<unsigned int>& configParameters);
TAbsFitParticle * lightQ_
void setResolutions(const std::vector< edm::ParameterSet > &udscResolutions, const std::vector< edm::ParameterSet > &bResolutions, const std::vector< double > &jetEnergyResolutionScaleFactors, const std::vector< double > &jetEnergyResolutionEtaBinning)
set resolutions
double maxF_
maximal deviation for contstraints
const std::vector< double > * jetEnergyResolutionEtaBinning_
double maxDeltaS_
maximal chi2 equivalent
TtFullHadKinFitter::Param param(unsigned int configParameter)
CovarianceMatrix * covM_
get object resolutions and put them into a matrix
Param
supported parameterizations
void setupConstraints()
initialize constraints
void setFitter(int maxNJets, unsigned int maxNrIter, double maxDeltaS, double maxF, unsigned int jetParam, const std::vector< unsigned > &constraints, double mW, double mTop)
set parameters for fitter
TtHadEvtSolution addKinFitInfo(TtHadEvtSolution *asol)
add kin fit information to the old event solution (in for legacy reasons)
TAbsFitParticle * lightP_
void setBTagging(bool useBTagging, unsigned int bTags, std::string bTagAlgo, double minBTagValueBJet, double maxBTagValueNonBJet)
set all parameters for b-tagging
int maxNComb_
maximal number of combinations to be written to the event
TtFullHadKinFitter::Constraint constraint(unsigned int configParameter)
const pat::Particle fittedLightPBar() const
return fitted light quark candidate
pat::Particle fittedLightPBar_
void setUseOnlyMatch(bool useOnlyMatch)
set useOnlyMatch
pat::Particle fittedB_
output particles
int fit(const std::vector< pat::Jet > &jets)
kinematic fit interface
void printSetup() const
print fitter setup
TtFullHadKinFitter * fitter
kinematic fit interface
double mW_
W mass value used for constraints.
std::vector< unsigned > constraints_
numbering of different possible kinematic constraints
pat::Particle fittedLightQBar_
const std::vector< double > * jetEnergyResolutionScaleFactors_
scale factors for the jet energy resolution
std::list< TtFullHadKinFitter::KinFitResult > fit(const std::vector< pat::Jet > &jets)
do the fitting and return fit result
std::vector< double > jetEnergyResolutionScaleFactors_
scale factors for the jet energy resolution
const pat::Particle fittedBBar() const
return fitted b quark candidate
std::vector< edm::ParameterSet > udscResolutions_
store the resolutions for the jets
class that does the fitting
std::vector< edm::ParameterSet > bResolutions_
std::string jetCorrectionLevel_
correction level for jets
void setJEC(std::string jetCorrectionLevel)
set jec level
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< double > jetEnergyResolutionEtaBinning_
unsigned int bTags_
minimal number of b-jets
Constraint
supported constraints
void setMatch(const std::vector< int > &match)
set match to be used
unsigned int maxNrIter_
maximal number of iterations to be performed for the fit
std::vector< int > match_
the combination that should be used
std::vector< TtFullHadKinFitter::Constraint > intToConstraint(const std::vector< unsigned int > &constraints)
used to convert vector of int's to vector of constraints (just used in TtFullHadKinFitter(int, int, double, double, std::vector<unsigned int>))
~TtFullHadKinFitter()
default destructor
const std::vector< edm::ParameterSet > * bResolutions_
TAbsFitParticle * b_
input particles
double minBTagValueBJet_
min value of bTag for a b-jet
std::map< Constraint, TFitConstraintM * > massConstr_
supported constraints
std::vector< TtFullHadKinFitter::Constraint > constraints(const std::vector< unsigned int > &configParameters)
pat::Particle fittedLightP_
TAbsFitParticle * lightQBar_
const pat::Particle fittedLightQ() const
return fitted light quark candidate
pat::Particle fittedBBar_
double mTop_
top mass value used for constraints
std::vector< Constraint > constraints_
vector of constraints to be used
std::vector< int > JetCombi
Param jetParam_
jet parametrization
pat::Particle fittedLightQ_
void setupFitter()
setup fitter
~KinFit()
default destructor
Analysis-level particle class.
std::string bTagAlgo_
input tag for b-tagging algorithm
const std::vector< edm::ParameterSet > * udscResolutions_
resolutions
Analysis-level calorimeter jet class.
void setOutput(int maxNComb)
set number of combinations of output
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 'all')
TtFullHadKinFitter()
default constructor
const pat::Particle fittedLightP() const
return fitted light quark candidate
void setupJets()
initialize jet inputs
TKinFitter * fitter_
kinematic fitter
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
bool operator<(const KinFitResult &rhs)
double maxBTagValueNonBJet_
max value of bTag for a non-b-jet
bool invalidMatch_
match is invalid
const pat::Particle fittedLightQBar() const
return fitted light quark candidate
const pat::Particle fittedB() const
return fitted b quark candidate
KinFit()
default constructor
TAbsFitParticle * lightPBar_
void setMatchInvalidity(bool invalidMatch)
set the validity of a match