37 jetParam_((
Param)jetParam),
38 lepParam_((
Param)lepParam),
39 metParam_((
Param)metParam),
40 constraints_(constraints) {
55 constraints_(constraints) {
72 TMatrixD m1(3, 3),
m2(3, 3);
73 TMatrixD m1b(4, 4), m2b(4, 4);
74 TMatrixD m3(3, 3), m4(3, 3);
82 TLorentzVector bottomVec(
84 TLorentzVector lightVec(
86 TLorentzVector leplVec;
88 leplVec = TLorentzVector(
134 if (fitsol.
getDecay() ==
"electron") {
135 m3(0, 0) =
pow(elecRes.
pt(pt, eta), 2);
136 m3(1, 1) =
pow(elecRes.
pt(pt, eta), 2);
137 m3(2, 2) =
pow(elecRes.
pt(pt, eta), 2);
140 m3(0, 0) =
pow(muonRes.
pt(pt, eta), 2);
141 m3(1, 1) =
pow(muonRes.
pt(pt, eta), 2);
142 m3(2, 2) =
pow(muonRes.
pt(pt, eta), 2);
145 if (fitsol.
getDecay() ==
"electron") {
146 m3(0, 0) =
pow(elecRes.
pt(pt, eta), 2);
147 m3(1, 1) =
pow(elecRes.
eta(pt, eta), 2);
148 m3(2, 2) =
pow(elecRes.
phi(pt, eta), 2);
151 m3(0, 0) =
pow(muonRes.
pt(pt, eta), 2);
152 m3(1, 1) =
pow(muonRes.
eta(pt, eta), 2);
153 m3(2, 2) =
pow(muonRes.
phi(pt, eta), 2);
156 if (fitsol.
getDecay() ==
"electron") {
157 m3(0, 0) =
pow(elecRes.
pt(pt, eta), 2);
158 m3(1, 1) =
pow(elecRes.
eta(pt, eta), 2);
159 m3(2, 2) =
pow(elecRes.
phi(pt, eta), 2);
162 m3(0, 0) =
pow(muonRes.
pt(pt, eta), 2);
163 m3(1, 1) =
pow(muonRes.
eta(pt, eta), 2);
164 m3(2, 2) =
pow(muonRes.
phi(pt, eta), 2);
174 m4(0, 0) =
pow(metRes.
met(met), 2);
175 m4(1, 1) =
pow(9999., 2);
176 m4(2, 2) =
pow(metRes.
met(met), 2);
178 m4(0, 0) =
pow(metRes.
met(met), 2);
179 m4(1, 1) =
pow(9999., 2);
180 m4(2, 2) =
pow(metRes.
phi(met), 2);
182 m4(0, 0) =
pow(metRes.
met(met), 2);
183 m4(1, 1) =
pow(9999., 2);
184 m4(2, 2) =
pow(metRes.
phi(met), 2);
256 std::cout << std::endl << std::endl <<
"+++++++++++ KINFIT SETUP ++++++++++++" << std::endl;
260 std::cout <<
" constraints: " << std::endl;
263 std::cout <<
" - hadronic W-mass" << std::endl;
265 std::cout <<
" - leptonic W-mass" << std::endl;
267 std::cout <<
" - hadronic top mass" << std::endl;
269 std::cout <<
" - leptonic top mass" << std::endl;
271 std::cout <<
" - neutrino mass" << std::endl;
276 std::cout <<
"++++++++++++++++++++++++++++++++++++++++++++" << std::endl << std::endl << std::endl;
278 TMatrixD empty3(3, 3);
279 TMatrixD empty4(4, 4);
double pt(double pt, double eta, Flavor flav)
Param
supported parameterizations
double pz() const final
z coordinate of momentum vector
TAbsFitParticle * fitLight_
pat::Muon getMuon() const
double pt() const final
transverse momentum
double phi(double pt, double eta, Flavor flav)
virtual void setIni4Vec(const TLorentzVector *pini)=0
double phi(double pt, double eta)
std::string param(const Param ¶m) const
convert Param to human readable form
double pt(double pt, double eta)
double eta(double pt, double eta)
int maxNrIter_
maximal allowed number of iterations to be used for the fit
void setFitBottom(const pat::Particle &part)
void setChi2Prob(double prob)
void setFitNeutrino(const pat::Particle &part)
double fitProb() const
return fit probability
TAbsFitParticle * fitBottom_
pat::Jet getBottom() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
TAbsFitParticle * fitNeutrino_
double px() const final
x coordinate of momentum vector
pat::Jet getLight() const
void addConstraint(TAbsFitConstraint *constraint)
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
std::vector< int > constraints_
void setFitLepton(const pat::Particle &part)
double mW_
W mass value used for constraints.
void addMeasParticle(TAbsFitParticle *particle)
double eta(double pt, double eta, Flavor flav)
void setFitLight(const pat::Particle &part)
double py() const final
y coordinate of momentum vector
std::string getDecay() const
double maxDeltaS_
maximal allowed chi2 (not normalized to degrees of freedom)
pat::MET getNeutrino() const
XYZPointD XYZPoint
point in space with cartesian internal representation
Analysis-level particle class.
void addParticles1(TAbsFitParticle *p1, TAbsFitParticle *p2=nullptr, TAbsFitParticle *p3=nullptr, TAbsFitParticle *p4=nullptr, TAbsFitParticle *p5=nullptr, TAbsFitParticle *p6=nullptr, TAbsFitParticle *p7=nullptr, TAbsFitParticle *p8=nullptr, TAbsFitParticle *p9=nullptr, TAbsFitParticle *p10=nullptr)
double eta(double pt, double eta)
const TLorentzVector * getCurr4Vec()
double et() const final
transverse energy
void addParticle1(TAbsFitParticle *particle)
double pt(double pt, double eta)
StEvtSolution addKinFitInfo(StEvtSolution *asol)
TAbsFitParticle * fitLepton_
TKinFitter * fitter_
kinematic fitter
double phi(double pt, double eta)
double mTop_
top mass value used for constraints
Power< A, B >::type pow(const A &a, const B &b)
pat::Electron getElectron() const
double maxF_
maximal allowed distance from constraints
double energy() const final
energy
double eta() const final
momentum pseudorapidity