CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
TtFullHadKinFitter Class Reference

#include <TtFullHadKinFitter.h>

Inheritance diagram for TtFullHadKinFitter:
TopKinFitter

Classes

class  KinFit
 class that does the fitting More...
 
struct  KinFitResult
 struct for fit results More...
 

Public Types

enum  Constraint {
  kWPlusMass = 1, kWMinusMass, kTopMass, kTopBarMass,
  kEqualTopMasses
}
 supported constraints More...
 
- Public Types inherited from TopKinFitter
enum  Param { kEMom, kEtEtaPhi, kEtThetaPhi }
 supported parameterizations More...
 

Public Member Functions

TtHadEvtSolution addKinFitInfo (TtHadEvtSolution *asol)
 add kin fit information to the old event solution (in for legacy reasons) More...
 
int fit (const std::vector< pat::Jet > &jets)
 kinematic fit interface More...
 
const pat::Particle fittedB () const
 return fitted b quark candidate More...
 
const pat::Particle fittedBBar () const
 return fitted b quark candidate More...
 
const pat::Particle fittedLightP () const
 return fitted light quark candidate More...
 
const pat::Particle fittedLightPBar () const
 return fitted light quark candidate More...
 
const pat::Particle fittedLightQ () const
 return fitted light quark candidate More...
 
const pat::Particle fittedLightQBar () const
 return fitted light quark candidate More...
 
std::vector< TtFullHadKinFitter::ConstraintintToConstraint (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>)) More...
 
 TtFullHadKinFitter ()
 default constructor More...
 
 TtFullHadKinFitter (int jetParam, int maxNrIter, double maxDeltaS, double maxF, const std::vector< unsigned int > &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< double > *jetEnergyResolutionScaleFactors=nullptr, const std::vector< double > *jetEnergyResolutionEtaBinning=nullptr)
 constructor initialized with build-in types as custom parameters (only included to keep TtHadEvtSolutionMaker.cc running) More...
 
 TtFullHadKinFitter (Param jetParam, 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< double > *jetEnergyResolutionScaleFactors=nullptr, const std::vector< double > *jetEnergyResolutionEtaBinning=nullptr)
 constructor initialized with built-in types and class enum's custom parameters More...
 
 ~TtFullHadKinFitter ()
 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...
 

Private Attributes

TAbsFitParticleb_
 input particles More...
 
TAbsFitParticlebBar_
 
const std::vector< edm::ParameterSet > * bResolutions_
 
std::vector< Constraintconstraints_
 vector of constraints to be used More...
 
CovarianceMatrixcovM_
 get object resolutions and put them into a matrix More...
 
pat::Particle fittedB_
 output particles More...
 
pat::Particle fittedBBar_
 
pat::Particle fittedLightP_
 
pat::Particle fittedLightPBar_
 
pat::Particle fittedLightQ_
 
pat::Particle fittedLightQBar_
 
const std::vector< double > * jetEnergyResolutionEtaBinning_
 
const std::vector< double > * jetEnergyResolutionScaleFactors_
 scale factors for the jet energy resolution More...
 
Param jetParam_
 jet parametrization More...
 
TAbsFitParticlelightP_
 
TAbsFitParticlelightPBar_
 
TAbsFitParticlelightQ_
 
TAbsFitParticlelightQBar_
 
std::map< Constraint, TFitConstraintM * > massConstr_
 supported constraints More...
 
const std::vector< edm::ParameterSet > * udscResolutions_
 resolutions More...
 

Additional Inherited Members

- Protected Member Functions inherited from TopKinFitter
std::string param (const Param &param) const
 convert Param to human readable form More...
 
- Protected Attributes inherited from TopKinFitter
TKinFitterfitter_
 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...
 

Detailed Description

Definition at line 29 of file TtFullHadKinFitter.h.

Member Enumeration Documentation

◆ Constraint

supported constraints

Enumerator
kWPlusMass 
kWMinusMass 
kTopMass 
kTopBarMass 
kEqualTopMasses 

Definition at line 32 of file TtFullHadKinFitter.h.

Constructor & Destructor Documentation

◆ TtFullHadKinFitter() [1/3]

TtFullHadKinFitter::TtFullHadKinFitter ( )

default constructor

Definition at line 16 of file TtFullHadKinFitter.cc.

17  : TopKinFitter(),
18  b_(nullptr),
19  bBar_(nullptr),
20  lightQ_(nullptr),
21  lightQBar_(nullptr),
22  lightP_(nullptr),
23  lightPBar_(nullptr),
24  udscResolutions_(nullptr),
25  bResolutions_(nullptr),
28  jetParam_(kEMom) {
29  setupFitter();
30 }

References setupFitter().

Referenced by TtFullHadKinFitter::KinFit::KinFit().

◆ TtFullHadKinFitter() [2/3]

TtFullHadKinFitter::TtFullHadKinFitter ( int  jetParam,
int  maxNrIter,
double  maxDeltaS,
double  maxF,
const std::vector< unsigned int > &  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< double > *  jetEnergyResolutionScaleFactors = nullptr,
const std::vector< double > *  jetEnergyResolutionEtaBinning = nullptr 
)

constructor initialized with build-in types as custom parameters (only included to keep TtHadEvtSolutionMaker.cc running)

Definition at line 44 of file TtFullHadKinFitter.cc.

References setupFitter().

◆ TtFullHadKinFitter() [3/3]

TtFullHadKinFitter::TtFullHadKinFitter ( Param  jetParam,
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< double > *  jetEnergyResolutionScaleFactors = nullptr,
const std::vector< double > *  jetEnergyResolutionEtaBinning = nullptr 
)

constructor initialized with built-in types and class enum's custom parameters

constructor initialized with build-in types and class enum's custom parameters

Definition at line 72 of file TtFullHadKinFitter.cc.

References setupFitter().

◆ ~TtFullHadKinFitter()

TtFullHadKinFitter::~TtFullHadKinFitter ( )

default destructor

Definition at line 100 of file TtFullHadKinFitter.cc.

100  {
101  delete b_;
102  delete bBar_;
103  delete lightQ_;
104  delete lightQBar_;
105  delete lightP_;
106  delete lightPBar_;
107  delete covM_;
108  for (std::map<Constraint, TFitConstraintM*>::iterator it = massConstr_.begin(); it != massConstr_.end(); ++it)
109  delete it->second;
110 }

References b_, bBar_, covM_, lightP_, lightPBar_, lightQ_, lightQBar_, and massConstr_.

Member Function Documentation

◆ addKinFitInfo()

TtHadEvtSolution TtFullHadKinFitter::addKinFitInfo ( TtHadEvtSolution asol)

add kin fit information to the old event solution (in for legacy reasons)

Definition at line 312 of file TtFullHadKinFitter.cc.

312  {
313  TtHadEvtSolution fitsol(*asol);
314 
315  std::vector<pat::Jet> jets;
316  jets.resize(6);
317  jets[TtFullHadEvtPartons::LightQ] = fitsol.getCalHadp();
318  jets[TtFullHadEvtPartons::LightQBar] = fitsol.getCalHadq();
319  jets[TtFullHadEvtPartons::B] = fitsol.getCalHadb();
320  jets[TtFullHadEvtPartons::LightP] = fitsol.getCalHadj();
321  jets[TtFullHadEvtPartons::LightPBar] = fitsol.getCalHadk();
322  jets[TtFullHadEvtPartons::BBar] = fitsol.getCalHadbbar();
323 
324  fit(jets);
325 
326  // add fitted information to the solution
327  if (fitter_->getStatus() == 0) {
328  // finally fill the fitted particles
329  fitsol.setFitHadb(fittedB_);
330  fitsol.setFitHadp(fittedLightQ_);
331  fitsol.setFitHadq(fittedLightQBar_);
332  fitsol.setFitHadk(fittedLightP_);
333  fitsol.setFitHadj(fittedLightPBar_);
334  fitsol.setFitHadbbar(fittedBBar_);
335 
336  // store the fit's chi2 probability
337  fitsol.setProbChi2(fitProb());
338  }
339  return fitsol;
340 }

References TtFullHadEvtPartons::B, TtFullHadEvtPartons::BBar, fit(), TopKinFitter::fitProb(), fittedB_, fittedBBar_, fittedLightP_, fittedLightPBar_, fittedLightQ_, fittedLightQBar_, TopKinFitter::fitter_, TtHadEvtSolution::getCalHadb(), TtHadEvtSolution::getCalHadbbar(), TtHadEvtSolution::getCalHadj(), TtHadEvtSolution::getCalHadk(), TtHadEvtSolution::getCalHadp(), TtHadEvtSolution::getCalHadq(), TKinFitter::getStatus(), singleTopDQM_cfi::jets, TtFullHadEvtPartons::LightP, TtFullHadEvtPartons::LightPBar, TtFullHadEvtPartons::LightQ, TtFullHadEvtPartons::LightQBar, TtHadEvtSolution::setFitHadb(), TtHadEvtSolution::setFitHadbbar(), TtHadEvtSolution::setFitHadj(), TtHadEvtSolution::setFitHadk(), TtHadEvtSolution::setFitHadp(), TtHadEvtSolution::setFitHadq(), and TtHadEvtSolution::setProbChi2().

Referenced by TtHadEvtSolutionMaker::produce().

◆ fit()

int TtFullHadKinFitter::fit ( const std::vector< pat::Jet > &  jets)

kinematic fit interface

Definition at line 221 of file TtFullHadKinFitter.cc.

221  {
222  if (jets.size() < 6) {
223  throw edm::Exception(edm::errors::Configuration, "Cannot run the TtFullHadKinFitter with less than 6 jets");
224  }
225 
226  // get jets in right order
228  const pat::Jet& bBar = jets[TtFullHadEvtPartons::BBar];
229  const pat::Jet& lightQ = jets[TtFullHadEvtPartons::LightQ];
230  const pat::Jet& lightQBar = jets[TtFullHadEvtPartons::LightQBar];
231  const pat::Jet& lightP = jets[TtFullHadEvtPartons::LightP];
232  const pat::Jet& lightPBar = jets[TtFullHadEvtPartons::LightPBar];
233 
234  // initialize particles
235  const TLorentzVector p4B(b.px(), b.py(), b.pz(), b.energy());
236  const TLorentzVector p4BBar(bBar.px(), bBar.py(), bBar.pz(), bBar.energy());
237  const TLorentzVector p4LightQ(lightQ.px(), lightQ.py(), lightQ.pz(), lightQ.energy());
238  const TLorentzVector p4LightQBar(lightQBar.px(), lightQBar.py(), lightQBar.pz(), lightQBar.energy());
239  const TLorentzVector p4LightP(lightP.px(), lightP.py(), lightP.pz(), lightP.energy());
240  const TLorentzVector p4LightPBar(lightPBar.px(), lightPBar.py(), lightPBar.pz(), lightPBar.energy());
241 
242  // initialize covariance matrices
243  TMatrixD m1 = covM_->setupMatrix(lightQ, jetParam_);
244  TMatrixD m2 = covM_->setupMatrix(lightQBar, jetParam_);
245  TMatrixD m3 = covM_->setupMatrix(b, jetParam_, "bjets");
246  TMatrixD m4 = covM_->setupMatrix(lightP, jetParam_);
247  TMatrixD m5 = covM_->setupMatrix(lightPBar, jetParam_);
248  TMatrixD m6 = covM_->setupMatrix(bBar, jetParam_, "bjets");
249 
250  // set the kinematics of the objects to be fitted
251  b_->setIni4Vec(&p4B);
252  bBar_->setIni4Vec(&p4BBar);
253  lightQ_->setIni4Vec(&p4LightQ);
254  lightQBar_->setIni4Vec(&p4LightQBar);
255  lightP_->setIni4Vec(&p4LightP);
256  lightPBar_->setIni4Vec(&p4LightPBar);
257 
258  // initialize covariance matrices
259  lightQ_->setCovMatrix(&m1);
260  lightQBar_->setCovMatrix(&m2);
261  b_->setCovMatrix(&m3);
262  lightP_->setCovMatrix(&m4);
263  lightPBar_->setCovMatrix(&m5);
264  bBar_->setCovMatrix(&m6);
265 
266  // perform the fit!
267  fitter_->fit();
268 
269  // add fitted information to the solution
270  if (fitter_->getStatus() == 0) {
271  // read back jet kinematics
273  0,
275  b_->getCurr4Vec()->X(), b_->getCurr4Vec()->Y(), b_->getCurr4Vec()->Z(), b_->getCurr4Vec()->E()),
276  math::XYZPoint()));
279  lightQ_->getCurr4Vec()->Y(),
280  lightQ_->getCurr4Vec()->Z(),
281  lightQ_->getCurr4Vec()->E()),
282  math::XYZPoint()));
285  lightQBar_->getCurr4Vec()->Y(),
286  lightQBar_->getCurr4Vec()->Z(),
287  lightQBar_->getCurr4Vec()->E()),
288  math::XYZPoint()));
289 
291  0,
293  bBar_->getCurr4Vec()->X(), bBar_->getCurr4Vec()->Y(), bBar_->getCurr4Vec()->Z(), bBar_->getCurr4Vec()->E()),
294  math::XYZPoint()));
297  lightP_->getCurr4Vec()->Y(),
298  lightP_->getCurr4Vec()->Z(),
299  lightP_->getCurr4Vec()->E()),
300  math::XYZPoint()));
303  lightPBar_->getCurr4Vec()->Y(),
304  lightPBar_->getCurr4Vec()->Z(),
305  lightPBar_->getCurr4Vec()->E()),
306  math::XYZPoint()));
307  }
308  return fitter_->getStatus();
309 }

References TtFullHadEvtPartons::B, b, b_, TtFullHadEvtPartons::BBar, bBar_, edm::errors::Configuration, covM_, reco::LeafCandidate::energy(), Exception, TKinFitter::fit(), fittedB_, fittedBBar_, fittedLightP_, fittedLightPBar_, fittedLightQ_, fittedLightQBar_, TopKinFitter::fitter_, TAbsFitParticle::getCurr4Vec(), TKinFitter::getStatus(), jetParam_, singleTopDQM_cfi::jets, TtFullHadEvtPartons::LightP, lightP_, TtFullHadEvtPartons::LightPBar, lightPBar_, TtFullHadEvtPartons::LightQ, lightQ_, TtFullHadEvtPartons::LightQBar, lightQBar_, reco::LeafCandidate::px(), reco::LeafCandidate::py(), reco::LeafCandidate::pz(), TAbsFitParticle::setCovMatrix(), TAbsFitParticle::setIni4Vec(), and CovarianceMatrix::setupMatrix().

Referenced by addKinFitInfo(), and trackingPlots.Iteration::modules().

◆ fittedB()

const pat::Particle TtFullHadKinFitter::fittedB ( ) const
inline

return fitted b quark candidate

Definition at line 69 of file TtFullHadKinFitter.h.

69 { return (fitter_->getStatus() == 0 ? fittedB_ : pat::Particle()); };

References fittedB_, TopKinFitter::fitter_, and TKinFitter::getStatus().

◆ fittedBBar()

const pat::Particle TtFullHadKinFitter::fittedBBar ( ) const
inline

return fitted b quark candidate

Definition at line 71 of file TtFullHadKinFitter.h.

71 { return (fitter_->getStatus() == 0 ? fittedBBar_ : pat::Particle()); };

References fittedBBar_, TopKinFitter::fitter_, and TKinFitter::getStatus().

◆ fittedLightP()

const pat::Particle TtFullHadKinFitter::fittedLightP ( ) const
inline

return fitted light quark candidate

Definition at line 79 of file TtFullHadKinFitter.h.

79 { return (fitter_->getStatus() == 0 ? fittedLightP_ : pat::Particle()); };

References fittedLightP_, TopKinFitter::fitter_, and TKinFitter::getStatus().

◆ fittedLightPBar()

const pat::Particle TtFullHadKinFitter::fittedLightPBar ( ) const
inline

return fitted light quark candidate

Definition at line 81 of file TtFullHadKinFitter.h.

81  {
82  return (fitter_->getStatus() == 0 ? fittedLightPBar_ : pat::Particle());
83  };

References fittedLightPBar_, TopKinFitter::fitter_, and TKinFitter::getStatus().

◆ fittedLightQ()

const pat::Particle TtFullHadKinFitter::fittedLightQ ( ) const
inline

return fitted light quark candidate

Definition at line 73 of file TtFullHadKinFitter.h.

73 { return (fitter_->getStatus() == 0 ? fittedLightQ_ : pat::Particle()); };

References fittedLightQ_, TopKinFitter::fitter_, and TKinFitter::getStatus().

◆ fittedLightQBar()

const pat::Particle TtFullHadKinFitter::fittedLightQBar ( ) const
inline

return fitted light quark candidate

Definition at line 75 of file TtFullHadKinFitter.h.

75  {
76  return (fitter_->getStatus() == 0 ? fittedLightQBar_ : pat::Particle());
77  };

References fittedLightQBar_, TopKinFitter::fitter_, and TKinFitter::getStatus().

◆ intToConstraint()

std::vector< TtFullHadKinFitter::Constraint > TtFullHadKinFitter::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>))

Definition at line 33 of file TtFullHadKinFitter.cc.

34  {
35  std::vector<TtFullHadKinFitter::Constraint> cConstraints;
36  cConstraints.resize(constraints.size());
37  for (unsigned int i = 0; i < constraints.size(); ++i) {
38  cConstraints[i] = (Constraint)constraints[i];
39  }
40  return cConstraints;
41 }

References createBeamHaloJobs::constraints, and mps_fire::i.

◆ printSetup()

void TtFullHadKinFitter::printSetup ( ) const
private

print fitter setup

Definition at line 113 of file TtFullHadKinFitter.cc.

113  {
114  std::stringstream constr;
115  for (unsigned int i = 0; i < constraints_.size(); ++i) {
116  switch (constraints_[i]) {
117  case kWPlusMass:
118  constr << " * W+-mass (" << mW_ << " GeV) \n";
119  break;
120  case kWMinusMass:
121  constr << " * W--mass (" << mW_ << " GeV) \n";
122  break;
123  case kTopMass:
124  constr << " * t-mass (" << mTop_ << " GeV) \n";
125  break;
126  case kTopBarMass:
127  constr << " * tBar-mass (" << mTop_ << " GeV) \n";
128  break;
129  case kEqualTopMasses:
130  constr << " * equal t-masses \n";
131  break;
132  }
133  }
134  edm::LogVerbatim("TtFullHadKinFitter") << "\n"
135  << "+++++++++++ TtFullHadKinFitter Setup ++++++++++++ \n"
136  << " Parametrization: \n"
137  << " * jet : " << param(jetParam_) << "\n"
138  << " Constraints: \n"
139  << constr.str() << " Max(No iterations): " << maxNrIter_ << "\n"
140  << " Max(deltaS) : " << maxDeltaS_ << "\n"
141  << " Max(F) : " << maxF_ << "\n"
142  << "+++++++++++++++++++++++++++++++++++++++++++++++++ \n";
143 }

References constraints_, mps_fire::i, jetParam_, kEqualTopMasses, kTopBarMass, kTopMass, kWMinusMass, kWPlusMass, TopKinFitter::maxDeltaS_, TopKinFitter::maxF_, TopKinFitter::maxNrIter_, TopKinFitter::mTop_, TopKinFitter::mW_, and TopKinFitter::param().

Referenced by setupFitter().

◆ setupConstraints()

void TtFullHadKinFitter::setupConstraints ( )
private

initialize constraints

Definition at line 178 of file TtFullHadKinFitter.cc.

178  {
179  massConstr_[kWPlusMass] = new TFitConstraintM("WPlusMass", "WPlusMass", nullptr, nullptr, mW_);
180  massConstr_[kWMinusMass] = new TFitConstraintM("WMinusMass", "WMinusMass", nullptr, nullptr, mW_);
181  massConstr_[kTopMass] = new TFitConstraintM("TopMass", "TopMass", nullptr, nullptr, mTop_);
182  massConstr_[kTopBarMass] = new TFitConstraintM("TopBarMass", "TopBarMass", nullptr, nullptr, mTop_);
183  massConstr_[kEqualTopMasses] = new TFitConstraintM("EqualTopMasses", "EqualTopMasses", nullptr, nullptr, 0);
184 
185  massConstr_[kWPlusMass]->addParticles1(lightQ_, lightQBar_);
186  massConstr_[kWMinusMass]->addParticles1(lightP_, lightPBar_);
187  massConstr_[kTopMass]->addParticles1(b_, lightQ_, lightQBar_);
188  massConstr_[kTopBarMass]->addParticles1(bBar_, lightP_, lightPBar_);
189  massConstr_[kEqualTopMasses]->addParticles1(b_, lightQ_, lightQBar_);
191 }

References b_, bBar_, kEqualTopMasses, kTopBarMass, kTopMass, kWMinusMass, kWPlusMass, lightP_, lightPBar_, lightQ_, lightQBar_, massConstr_, TopKinFitter::mTop_, and TopKinFitter::mW_.

Referenced by setupFitter().

◆ setupFitter()

void TtFullHadKinFitter::setupFitter ( )
private

setup fitter

Definition at line 194 of file TtFullHadKinFitter.cc.

194  {
195  printSetup();
196  setupJets();
198 
199  // add measured particles
206 
207  // add constraints
208  for (unsigned int i = 0; i < constraints_.size(); i++) {
210  }
211 
212  // initialize helper class used to bring the resolutions into covariance matrices
213  if (!udscResolutions_->empty() && !bResolutions_->empty())
214  covM_ = new CovarianceMatrix(
216  else
217  covM_ = new CovarianceMatrix();
218 }

References TKinFitter::addConstraint(), TKinFitter::addMeasParticle(), b_, bBar_, bResolutions_, constraints_, covM_, TopKinFitter::fitter_, mps_fire::i, jetEnergyResolutionEtaBinning_, jetEnergyResolutionScaleFactors_, lightP_, lightPBar_, lightQ_, lightQBar_, massConstr_, printSetup(), setupConstraints(), setupJets(), and udscResolutions_.

Referenced by TtFullHadKinFitter().

◆ setupJets()

void TtFullHadKinFitter::setupJets ( )
private

initialize jet inputs

Definition at line 146 of file TtFullHadKinFitter.cc.

146  {
147  TMatrixD empty3x3(3, 3);
148  TMatrixD empty4x4(4, 4);
149  switch (jetParam_) { // setup jets according to parameterization
150  case kEMom:
151  b_ = new TFitParticleEMomDev("Jet1", "Jet1", nullptr, &empty4x4);
152  bBar_ = new TFitParticleEMomDev("Jet2", "Jet2", nullptr, &empty4x4);
153  lightQ_ = new TFitParticleEMomDev("Jet3", "Jet3", nullptr, &empty4x4);
154  lightQBar_ = new TFitParticleEMomDev("Jet4", "Jet4", nullptr, &empty4x4);
155  lightP_ = new TFitParticleEMomDev("Jet5", "Jet5", nullptr, &empty4x4);
156  lightPBar_ = new TFitParticleEMomDev("Jet6", "Jet6", nullptr, &empty4x4);
157  break;
158  case kEtEtaPhi:
159  b_ = new TFitParticleEtEtaPhi("Jet1", "Jet1", nullptr, &empty3x3);
160  bBar_ = new TFitParticleEtEtaPhi("Jet2", "Jet2", nullptr, &empty3x3);
161  lightQ_ = new TFitParticleEtEtaPhi("Jet3", "Jet3", nullptr, &empty3x3);
162  lightQBar_ = new TFitParticleEtEtaPhi("Jet4", "Jet4", nullptr, &empty3x3);
163  lightP_ = new TFitParticleEtEtaPhi("Jet5", "Jet5", nullptr, &empty3x3);
164  lightPBar_ = new TFitParticleEtEtaPhi("Jet6", "Jet6", nullptr, &empty3x3);
165  break;
166  case kEtThetaPhi:
167  b_ = new TFitParticleEtThetaPhi("Jet1", "Jet1", nullptr, &empty3x3);
168  bBar_ = new TFitParticleEtThetaPhi("Jet2", "Jet2", nullptr, &empty3x3);
169  lightQ_ = new TFitParticleEtThetaPhi("Jet3", "Jet3", nullptr, &empty3x3);
170  lightQBar_ = new TFitParticleEtThetaPhi("Jet4", "Jet4", nullptr, &empty3x3);
171  lightP_ = new TFitParticleEtThetaPhi("Jet5", "Jet5", nullptr, &empty3x3);
172  lightPBar_ = new TFitParticleEtThetaPhi("Jet6", "Jet6", nullptr, &empty3x3);
173  break;
174  }
175 }

References b_, bBar_, jetParam_, TopKinFitter::kEMom, TopKinFitter::kEtEtaPhi, TopKinFitter::kEtThetaPhi, lightP_, lightPBar_, lightQ_, and lightQBar_.

Referenced by setupFitter().

Member Data Documentation

◆ b_

TAbsFitParticle* TtFullHadKinFitter::b_
private

input particles

Definition at line 99 of file TtFullHadKinFitter.h.

Referenced by fit(), setupConstraints(), setupFitter(), setupJets(), and ~TtFullHadKinFitter().

◆ bBar_

TAbsFitParticle* TtFullHadKinFitter::bBar_
private

◆ bResolutions_

const std::vector<edm::ParameterSet>* TtFullHadKinFitter::bResolutions_
private

Definition at line 107 of file TtFullHadKinFitter.h.

Referenced by setupFitter().

◆ constraints_

std::vector<Constraint> TtFullHadKinFitter::constraints_
private

vector of constraints to be used

Definition at line 123 of file TtFullHadKinFitter.h.

Referenced by printSetup(), and setupFitter().

◆ covM_

CovarianceMatrix* TtFullHadKinFitter::covM_
private

get object resolutions and put them into a matrix

Definition at line 126 of file TtFullHadKinFitter.h.

Referenced by fit(), setupFitter(), and ~TtFullHadKinFitter().

◆ fittedB_

pat::Particle TtFullHadKinFitter::fittedB_
private

output particles

Definition at line 114 of file TtFullHadKinFitter.h.

Referenced by addKinFitInfo(), fit(), and fittedB().

◆ fittedBBar_

pat::Particle TtFullHadKinFitter::fittedBBar_
private

Definition at line 115 of file TtFullHadKinFitter.h.

Referenced by addKinFitInfo(), fit(), and fittedBBar().

◆ fittedLightP_

pat::Particle TtFullHadKinFitter::fittedLightP_
private

Definition at line 118 of file TtFullHadKinFitter.h.

Referenced by addKinFitInfo(), fit(), and fittedLightP().

◆ fittedLightPBar_

pat::Particle TtFullHadKinFitter::fittedLightPBar_
private

Definition at line 119 of file TtFullHadKinFitter.h.

Referenced by addKinFitInfo(), fit(), and fittedLightPBar().

◆ fittedLightQ_

pat::Particle TtFullHadKinFitter::fittedLightQ_
private

Definition at line 116 of file TtFullHadKinFitter.h.

Referenced by addKinFitInfo(), fit(), and fittedLightQ().

◆ fittedLightQBar_

pat::Particle TtFullHadKinFitter::fittedLightQBar_
private

Definition at line 117 of file TtFullHadKinFitter.h.

Referenced by addKinFitInfo(), fit(), and fittedLightQBar().

◆ jetEnergyResolutionEtaBinning_

const std::vector<double>* TtFullHadKinFitter::jetEnergyResolutionEtaBinning_
private

Definition at line 110 of file TtFullHadKinFitter.h.

Referenced by setupFitter().

◆ jetEnergyResolutionScaleFactors_

const std::vector<double>* TtFullHadKinFitter::jetEnergyResolutionScaleFactors_
private

scale factors for the jet energy resolution

Definition at line 109 of file TtFullHadKinFitter.h.

Referenced by setupFitter().

◆ jetParam_

Param TtFullHadKinFitter::jetParam_
private

jet parametrization

Definition at line 121 of file TtFullHadKinFitter.h.

Referenced by fit(), printSetup(), and setupJets().

◆ lightP_

TAbsFitParticle* TtFullHadKinFitter::lightP_
private

◆ lightPBar_

TAbsFitParticle* TtFullHadKinFitter::lightPBar_
private

◆ lightQ_

TAbsFitParticle* TtFullHadKinFitter::lightQ_
private

◆ lightQBar_

TAbsFitParticle* TtFullHadKinFitter::lightQBar_
private

◆ massConstr_

std::map<Constraint, TFitConstraintM*> TtFullHadKinFitter::massConstr_
private

supported constraints

Definition at line 112 of file TtFullHadKinFitter.h.

Referenced by setupConstraints(), setupFitter(), and ~TtFullHadKinFitter().

◆ udscResolutions_

const std::vector<edm::ParameterSet>* TtFullHadKinFitter::udscResolutions_
private

resolutions

Definition at line 106 of file TtFullHadKinFitter.h.

Referenced by setupFitter().

TtFullHadKinFitter::jetParam_
Param jetParam_
jet parametrization
Definition: TtFullHadKinFitter.h:121
TopKinFitter::kEtEtaPhi
Definition: TopKinFitter.h:20
TtFullHadKinFitter::fit
int fit(const std::vector< pat::Jet > &jets)
kinematic fit interface
Definition: TtFullHadKinFitter.cc:221
TFitParticleEMomDev
Definition: TFitParticleEMomDev.h:10
TtFullHadKinFitter::fittedLightQ_
pat::Particle fittedLightQ_
Definition: TtFullHadKinFitter.h:116
mps_fire.i
i
Definition: mps_fire.py:428
TopKinFitter::fitter_
TKinFitter * fitter_
kinematic fitter
Definition: TopKinFitter.h:47
TtFullHadKinFitter::covM_
CovarianceMatrix * covM_
get object resolutions and put them into a matrix
Definition: TtFullHadKinFitter.h:126
TopKinFitter::maxNrIter_
int maxNrIter_
maximal allowed number of iterations to be used for the fit
Definition: TopKinFitter.h:49
TtFullHadKinFitter::setupFitter
void setupFitter()
setup fitter
Definition: TtFullHadKinFitter.cc:194
TtFullHadKinFitProducer_cfi.udscResolutions
udscResolutions
Definition: TtFullHadKinFitProducer_cfi.py:83
StEvtSolProducer_cfi.maxNrIter
maxNrIter
Definition: StEvtSolProducer_cfi.py:24
TtFullHadKinFitter::kTopMass
Definition: TtFullHadKinFitter.h:32
TtFullHadEvtPartons::LightQ
Definition: TtFullHadEvtPartons.h:25
TtFullHadKinFitter::lightQBar_
TAbsFitParticle * lightQBar_
Definition: TtFullHadKinFitter.h:102
TtFullHadKinFitter::b_
TAbsFitParticle * b_
input particles
Definition: TtFullHadKinFitter.h:99
TFitConstraintM
Definition: TFitConstraintM.h:11
TtFullHadKinFitter::kWMinusMass
Definition: TtFullHadKinFitter.h:32
TopKinFitter::param
std::string param(const Param &param) const
convert Param to human readable form
Definition: TopKinFitter.cc:18
TtFullHadEvtPartons::LightP
Definition: TtFullHadEvtPartons.h:25
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
TtFullHadKinFitter::kEqualTopMasses
Definition: TtFullHadKinFitter.h:32
TtFullHadKinFitter::setupJets
void setupJets()
initialize jet inputs
Definition: TtFullHadKinFitter.cc:146
TopKinFitter::kEMom
Definition: TopKinFitter.h:20
TopKinFitter::fitProb
double fitProb() const
return fit probability
Definition: TopKinFitter.h:37
TtFullHadKinFitter::constraints_
std::vector< Constraint > constraints_
vector of constraints to be used
Definition: TtFullHadKinFitter.h:123
CovarianceMatrix
math::Error< 5 >::type CovarianceMatrix
Definition: SeedToTrackProducer.h:48
TopKinFitter::mW_
double mW_
W mass value used for constraints.
Definition: TopKinFitter.h:55
pat::Jet
Analysis-level calorimeter jet class.
Definition: Jet.h:77
TKinFitter::fit
Int_t fit()
Definition: TKinFitter.cc:318
TtFullHadKinFitter::massConstr_
std::map< Constraint, TFitConstraintM * > massConstr_
supported constraints
Definition: TtFullHadKinFitter.h:112
TtFullHadKinFitter::kTopBarMass
Definition: TtFullHadKinFitter.h:32
reco::LeafCandidate::py
double py() const final
y coordinate of momentum vector
Definition: LeafCandidate.h:142
TtFullHadKinFitter::udscResolutions_
const std::vector< edm::ParameterSet > * udscResolutions_
resolutions
Definition: TtFullHadKinFitter.h:106
TtFullHadKinFitter::printSetup
void printSetup() const
print fitter setup
Definition: TtFullHadKinFitter.cc:113
TtSemiLepHitFitProducer_Electrons_cfi.mTop
mTop
Definition: TtSemiLepHitFitProducer_Electrons_cfi.py:36
TtFullHadKinFitter::Constraint
Constraint
supported constraints
Definition: TtFullHadKinFitter.h:32
TopKinFitter::TopKinFitter
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
Definition: TopKinFitter.cc:4
TtFullHadKinFitter::lightPBar_
TAbsFitParticle * lightPBar_
Definition: TtFullHadKinFitter.h:104
TopKinFitter::maxDeltaS_
double maxDeltaS_
maximal allowed chi2 (not normalized to degrees of freedom)
Definition: TopKinFitter.h:51
b
double b
Definition: hdecay.h:118
TtFullHadKinFitter::fittedB_
pat::Particle fittedB_
output particles
Definition: TtFullHadKinFitter.h:114
TtFullHadKinFitter::bBar_
TAbsFitParticle * bBar_
Definition: TtFullHadKinFitter.h:100
TAbsFitParticle::getCurr4Vec
const TLorentzVector * getCurr4Vec()
Definition: TAbsFitParticle.h:31
TtSemiLepHitFitProducer_Electrons_cfi.mW
mW
Definition: TtSemiLepHitFitProducer_Electrons_cfi.py:35
TKinFitter::getStatus
Int_t getStatus()
Definition: TKinFitter.h:51
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
TtFullHadKinFitter::kWPlusMass
Definition: TtFullHadKinFitter.h:32
TtFullHadKinFitter::jetEnergyResolutionScaleFactors_
const std::vector< double > * jetEnergyResolutionScaleFactors_
scale factors for the jet energy resolution
Definition: TtFullHadKinFitter.h:109
TtFullHadEvtPartons::LightPBar
Definition: TtFullHadEvtPartons.h:25
TAbsFitParticle::setCovMatrix
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
Definition: TAbsFitParticle.cc:98
TtFullHadEvtPartons::LightQBar
Definition: TtFullHadEvtPartons.h:25
TtFullHadKinFitter::jetEnergyResolutionEtaBinning_
const std::vector< double > * jetEnergyResolutionEtaBinning_
Definition: TtFullHadKinFitter.h:110
TtFullHadKinFitter::bResolutions_
const std::vector< edm::ParameterSet > * bResolutions_
Definition: TtFullHadKinFitter.h:107
TtFullHadKinFitter::lightQ_
TAbsFitParticle * lightQ_
Definition: TtFullHadKinFitter.h:101
TtFullHadKinFitter::fittedLightPBar_
pat::Particle fittedLightPBar_
Definition: TtFullHadKinFitter.h:119
TtFullHadKinFitter::fittedLightP_
pat::Particle fittedLightP_
Definition: TtFullHadKinFitter.h:118
TtFullHadKinFitProducer_cfi.jetEnergyResolutionEtaBinning
jetEnergyResolutionEtaBinning
Definition: TtFullHadKinFitProducer_cfi.py:95
TopKinFitter::kEtThetaPhi
Definition: TopKinFitter.h:20
TtFullHadKinFitProducer_cfi.jetEnergyResolutionScaleFactors
jetEnergyResolutionScaleFactors
Definition: TtFullHadKinFitProducer_cfi.py:94
createBeamHaloJobs.constraints
string constraints
Definition: createBeamHaloJobs.py:229
StEvtSolProducer_cfi.maxDeltaS
maxDeltaS
Definition: StEvtSolProducer_cfi.py:25
TopKinFitter::mTop_
double mTop_
top mass value used for constraints
Definition: TopKinFitter.h:57
TKinFitter::addConstraint
void addConstraint(TAbsFitConstraint *constraint)
Definition: TKinFitter.cc:292
TtFullHadKinFitter::intToConstraint
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,...
Definition: TtFullHadKinFitter.cc:33
TopKinFitter::maxF_
double maxF_
maximal allowed distance from constraints
Definition: TopKinFitter.h:53
TtFullHadEvtPartons::BBar
Definition: TtFullHadEvtPartons.h:25
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
TtFullHadKinFitter::setupConstraints
void setupConstraints()
initialize constraints
Definition: TtFullHadKinFitter.cc:178
Exception
Definition: hltDiff.cc:246
TtFullHadKinFitProducer_cfi.bResolutions
bResolutions
Definition: TtFullHadKinFitProducer_cfi.py:84
TFitParticleEtEtaPhi
Definition: TFitParticleEtEtaPhi.h:8
TKinFitter::addMeasParticle
void addMeasParticle(TAbsFitParticle *particle)
Definition: TKinFitter.cc:194
TtFullHadKinFitter::lightP_
TAbsFitParticle * lightP_
Definition: TtFullHadKinFitter.h:103
TtFullHadKinFitter::fittedLightQBar_
pat::Particle fittedLightQBar_
Definition: TtFullHadKinFitter.h:117
reco::LeafCandidate::energy
double energy() const final
energy
Definition: LeafCandidate.h:125
CovarianceMatrix::setupMatrix
TMatrixD setupMatrix(const pat::PATObject< T > &object, const TopKinFitter::Param param, const std::string &resolutionProvider="")
return covariance matrix for a PAT object
Definition: CovarianceMatrix.h:87
reco::LeafCandidate
Definition: LeafCandidate.h:16
TFitParticleEtThetaPhi
Definition: TFitParticleEtThetaPhi.h:8
TopKinFitter::Param
Param
supported parameterizations
Definition: TopKinFitter.h:20
TtHadEvtSolution
Definition: TtHadEvtSolution.h:21
TtFullHadEvtPartons::B
Definition: TtFullHadEvtPartons.h:25
TAbsFitParticle::setIni4Vec
virtual void setIni4Vec(const TLorentzVector *pini)=0
StEvtSolProducer_cfi.maxF
maxF
Definition: StEvtSolProducer_cfi.py:26
reco::LeafCandidate::px
double px() const final
x coordinate of momentum vector
Definition: LeafCandidate.h:140
reco::LeafCandidate::pz
double pz() const final
z coordinate of momentum vector
Definition: LeafCandidate.h:144
edm::errors::Configuration
Definition: EDMException.h:36
pat::Particle
Analysis-level particle class.
Definition: Particle.h:30
TtFullHadKinFitter::fittedBBar_
pat::Particle fittedBBar_
Definition: TtFullHadKinFitter.h:115