37 jetParam_((
Param)jetParam),
38 lepParam_((
Param)lepParam),
39 metParam_((
Param)metParam),
40 constraints_(constraints) {
55 constraints_(constraints) {
64 TMatrixD m1(3, 3),
m2(3, 3);
65 TMatrixD m1b(4, 4), m2b(4, 4);
66 TMatrixD m3(3, 3), m4(3, 3);
74 TLorentzVector bottomVec(
76 TLorentzVector lightVec(
78 TLorentzVector leplVec;
80 leplVec = TLorentzVector(
126 if (fitsol.
getDecay() ==
"electron") {
127 m3(0, 0) =
pow(elecRes.
pt(pt, eta), 2);
128 m3(1, 1) =
pow(elecRes.
pt(pt, eta), 2);
129 m3(2, 2) =
pow(elecRes.
pt(pt, eta), 2);
132 m3(0, 0) =
pow(muonRes.
pt(pt, eta), 2);
133 m3(1, 1) =
pow(muonRes.
pt(pt, eta), 2);
134 m3(2, 2) =
pow(muonRes.
pt(pt, eta), 2);
137 if (fitsol.
getDecay() ==
"electron") {
138 m3(0, 0) =
pow(elecRes.
pt(pt, eta), 2);
139 m3(1, 1) =
pow(elecRes.
eta(pt, eta), 2);
140 m3(2, 2) =
pow(elecRes.
phi(pt, eta), 2);
143 m3(0, 0) =
pow(muonRes.
pt(pt, eta), 2);
144 m3(1, 1) =
pow(muonRes.
eta(pt, eta), 2);
145 m3(2, 2) =
pow(muonRes.
phi(pt, eta), 2);
148 if (fitsol.
getDecay() ==
"electron") {
149 m3(0, 0) =
pow(elecRes.
pt(pt, eta), 2);
150 m3(1, 1) =
pow(elecRes.
eta(pt, eta), 2);
151 m3(2, 2) =
pow(elecRes.
phi(pt, eta), 2);
154 m3(0, 0) =
pow(muonRes.
pt(pt, eta), 2);
155 m3(1, 1) =
pow(muonRes.
eta(pt, eta), 2);
156 m3(2, 2) =
pow(muonRes.
phi(pt, eta), 2);
166 m4(0, 0) =
pow(metRes.
met(met), 2);
167 m4(1, 1) =
pow(9999., 2);
168 m4(2, 2) =
pow(metRes.
met(met), 2);
170 m4(0, 0) =
pow(metRes.
met(met), 2);
171 m4(1, 1) =
pow(9999., 2);
172 m4(2, 2) =
pow(metRes.
phi(met), 2);
174 m4(0, 0) =
pow(metRes.
met(met), 2);
175 m4(1, 1) =
pow(9999., 2);
176 m4(2, 2) =
pow(metRes.
phi(met), 2);
198 if (
fitter_->getStatus() == 0) {
248 std::cout << std::endl << std::endl <<
"+++++++++++ KINFIT SETUP ++++++++++++" << std::endl;
252 std::cout <<
" constraints: " << std::endl;
255 std::cout <<
" - hadronic W-mass" << std::endl;
257 std::cout <<
" - leptonic W-mass" << std::endl;
259 std::cout <<
" - hadronic top mass" << std::endl;
261 std::cout <<
" - leptonic top mass" << std::endl;
263 std::cout <<
" - neutrino mass" << std::endl;
268 std::cout <<
"++++++++++++++++++++++++++++++++++++++++++++" << std::endl << std::endl << std::endl;
270 TMatrixD empty3(3, 3);
271 TMatrixD empty4(4, 4);
273 fitBottom_ = std::make_unique<TFitParticleEMomDev>(
"Jet1",
"Jet1",
nullptr, &empty4);
274 fitLight_ = std::make_unique<TFitParticleEMomDev>(
"Jet2",
"Jet2",
nullptr, &empty4);
276 fitBottom_ = std::make_unique<TFitParticleEtEtaPhi>(
"Jet1",
"Jet1",
nullptr, &empty3);
277 fitLight_ = std::make_unique<TFitParticleEtEtaPhi>(
"Jet2",
"Jet2",
nullptr, &empty3);
279 fitBottom_ = std::make_unique<TFitParticleEtThetaPhi>(
"Jet1",
"Jet1",
nullptr, &empty3);
280 fitLight_ = std::make_unique<TFitParticleEtThetaPhi>(
"Jet2",
"Jet2",
nullptr, &empty3);
283 fitLepton_ = std::make_unique<TFitParticleEScaledMomDev>(
"Lepton",
"Lepton",
nullptr, &empty3);
285 fitLepton_ = std::make_unique<TFitParticleEtEtaPhi>(
"Lepton",
"Lepton",
nullptr, &empty3);
287 fitLepton_ = std::make_unique<TFitParticleEtThetaPhi>(
"Lepton",
"Lepton",
nullptr, &empty3);
290 fitNeutrino_ = std::make_unique<TFitParticleEScaledMomDev>(
"Neutrino",
"Neutrino",
nullptr, &empty3);
292 fitNeutrino_ = std::make_unique<TFitParticleEtEtaPhi>(
"Neutrino",
"Neutrino",
nullptr, &empty3);
294 fitNeutrino_ = std::make_unique<TFitParticleEtThetaPhi>(
"Neutrino",
"Neutrino",
nullptr, &empty3);
297 cons1_ = std::make_unique<TFitConstraintM>(
"MassConstraint",
"Mass-Constraint",
nullptr,
nullptr,
mW_);
299 cons2_ = std::make_unique<TFitConstraintM>(
"MassConstraint",
"Mass-Constraint",
nullptr,
nullptr,
mTop_);
301 cons3_ = std::make_unique<TFitConstraintM>(
"MassConstraint",
"Mass-Constraint",
nullptr,
nullptr, 0.);
double pt(double pt, double eta, Flavor flav)
Param
supported parameterizations
double pz() const final
z coordinate of momentum vector
pat::Muon getMuon() const
double pt() const final
transverse momentum
double phi(double pt, double eta, Flavor flav)
double phi(double pt, double eta)
std::unique_ptr< TKinFitter > fitter_
kinematic fitter
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)
std::unique_ptr< TFitConstraintM > cons1_
int maxNrIter_
maximal allowed number of iterations to be used for the fit
std::unique_ptr< TFitConstraintM > cons3_
void setFitBottom(const pat::Particle &part)
void setChi2Prob(double prob)
void setFitNeutrino(const pat::Particle &part)
double fitProb() const
return fit probability
pat::Jet getBottom() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
std::unique_ptr< TAbsFitParticle > fitLight_
double px() const final
x coordinate of momentum vector
pat::Jet getLight() const
std::unique_ptr< TFitConstraintM > cons2_
std::unique_ptr< TAbsFitParticle > fitNeutrino_
std::vector< int > constraints_
void setFitLepton(const pat::Particle &part)
double mW_
W mass value used for constraints.
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)
std::unique_ptr< TAbsFitParticle > fitLepton_
pat::MET getNeutrino() const
XYZPointD XYZPoint
point in space with cartesian internal representation
Analysis-level particle class.
double eta(double pt, double eta)
std::unique_ptr< TAbsFitParticle > fitBottom_
double et() const final
transverse energy
double pt(double pt, double eta)
StEvtSolution addKinFitInfo(StEvtSolution *asol)
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