CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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...
 
int fit (const std::vector< pat::Jet > &jets, const std::vector< edm::ParameterSet > udscResolutions, const std::vector< edm::ParameterSet > bResolutions, const double resolutionSmearFactor)
 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::Constraint
intToConstraint (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, std::vector< unsigned int > constraints, double mW=80.4, double mTop=173.)
 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, std::vector< Constraint > constraints, double mW=80.4, double mTop=173.)
 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...
 
 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_
 
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_
 
Param jetParam_
 jet parametrization More...
 
TAbsFitParticlelightP_
 
TAbsFitParticlelightPBar_
 
TAbsFitParticlelightQ_
 
TAbsFitParticlelightQBar_
 
std::map< Constraint,
TFitConstraintM * > 
massConstr_
 supported constraints 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_
 
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

Constructor & Destructor Documentation

TtFullHadKinFitter::TtFullHadKinFitter ( )

default constructor

Definition at line 16 of file TtFullHadKinFitter.cc.

References covM, and setupFitter().

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

16  :
17  TopKinFitter(),
18  b_(0), bBar_(0), lightQ_(0), lightQBar_(0), lightP_(0), lightPBar_(0),
20 {
21  setupFitter();
22  covM=0;
23 }
TAbsFitParticle * lightQ_
TAbsFitParticle * lightP_
CovarianceMatrix * covM
get object resolutions and put them into a matrix
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
TAbsFitParticle * b_
input particles
TAbsFitParticle * lightQBar_
Param jetParam_
jet parametrization
void setupFitter()
setup fitter
TAbsFitParticle * bBar_
TAbsFitParticle * lightPBar_
TtFullHadKinFitter::TtFullHadKinFitter ( int  jetParam,
int  maxNrIter,
double  maxDeltaS,
double  maxF,
std::vector< unsigned int >  constraints,
double  mW = 80.4,
double  mTop = 173. 
)

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

Definition at line 39 of file TtFullHadKinFitter.cc.

References covM, and setupFitter().

40  :
41  TopKinFitter(maxNrIter, maxDeltaS, maxF, mW, mTop),
42  b_(0), bBar_(0), lightQ_(0), lightQBar_(0), lightP_(0), lightPBar_(0),
44 {
45  setupFitter();
46  covM=0;
47 }
TAbsFitParticle * lightQ_
Param
supported parameterizations
Definition: TopKinFitter.h:22
TAbsFitParticle * lightP_
CovarianceMatrix * covM
get object resolutions and put them into a matrix
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
std::vector< TtFullHadKinFitter::Constraint > intToConstraint(std::vector< unsigned int > constraints)
used to convert vector of int&#39;s to vector of constraints (just used in TtFullHadKinFitter(int, int, double, double, std::vector&lt;unsigned int&gt;))
TAbsFitParticle * b_
input particles
TAbsFitParticle * lightQBar_
std::vector< Constraint > constraints_
vector of constraints to be used
Param jetParam_
jet parametrization
void setupFitter()
setup fitter
TAbsFitParticle * bBar_
TAbsFitParticle * lightPBar_
TtFullHadKinFitter::TtFullHadKinFitter ( Param  jetParam,
int  maxNrIter,
double  maxDeltaS,
double  maxF,
std::vector< Constraint constraints,
double  mW = 80.4,
double  mTop = 173. 
)

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 50 of file TtFullHadKinFitter.cc.

References covM, and setupFitter().

51  :
52  TopKinFitter(maxNrIter, maxDeltaS, maxF, mW, mTop),
53  b_(0), bBar_(0), lightQ_(0), lightQBar_(0), lightP_(0), lightPBar_(0),
55 {
56  setupFitter();
57  covM=0;
58 }
TAbsFitParticle * lightQ_
TAbsFitParticle * lightP_
CovarianceMatrix * covM
get object resolutions and put them into a matrix
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
TAbsFitParticle * b_
input particles
TAbsFitParticle * lightQBar_
std::vector< Constraint > constraints_
vector of constraints to be used
Param jetParam_
jet parametrization
void setupFitter()
setup fitter
TAbsFitParticle * bBar_
TAbsFitParticle * lightPBar_
TtFullHadKinFitter::~TtFullHadKinFitter ( )

default destructor

Definition at line 61 of file TtFullHadKinFitter.cc.

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

62 {
63  delete b_;
64  delete bBar_;
65  delete lightQ_;
66  delete lightQBar_;
67  delete lightP_;
68  delete lightPBar_;
69  delete covM;
70  for(std::map<Constraint, TFitConstraintM*>::iterator it = massConstr_.begin(); it != massConstr_.end(); ++it)
71  delete it->second;
72 }
TAbsFitParticle * lightQ_
TAbsFitParticle * lightP_
CovarianceMatrix * covM
get object resolutions and put them into a matrix
TAbsFitParticle * b_
input particles
std::map< Constraint, TFitConstraintM * > massConstr_
supported constraints
TAbsFitParticle * lightQBar_
TAbsFitParticle * bBar_
TAbsFitParticle * lightPBar_

Member Function Documentation

TtHadEvtSolution TtFullHadKinFitter::addKinFitInfo ( TtHadEvtSolution asol)

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

Definition at line 253 of file TtFullHadKinFitter.cc.

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(), analyzePatCleaning_cfg::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().

254 {
255  TtHadEvtSolution fitsol(*asol);
256 
257  std::vector<pat::Jet> jets;
258  jets.resize(6);
259  jets[TtFullHadEvtPartons::LightQ ] = fitsol.getCalHadp();
260  jets[TtFullHadEvtPartons::LightQBar] = fitsol.getCalHadq();
261  jets[TtFullHadEvtPartons::B ] = fitsol.getCalHadb();
262  jets[TtFullHadEvtPartons::LightP ] = fitsol.getCalHadj();
263  jets[TtFullHadEvtPartons::LightPBar] = fitsol.getCalHadk();
264  jets[TtFullHadEvtPartons::BBar ] = fitsol.getCalHadbbar();
265 
266  fit( jets );
267 
268  // add fitted information to the solution
269  if (fitter_->getStatus() == 0) {
270  // finally fill the fitted particles
271  fitsol.setFitHadb(fittedB_);
272  fitsol.setFitHadp(fittedLightQ_);
273  fitsol.setFitHadq(fittedLightQBar_);
274  fitsol.setFitHadk(fittedLightP_);
275  fitsol.setFitHadj(fittedLightPBar_);
276  fitsol.setFitHadbbar(fittedBBar_);
277 
278  // store the fit's chi2 probability
279  fitsol.setProbChi2( fitProb() );
280  }
281  return fitsol;
282 }
pat::Particle fittedLightPBar_
pat::Particle fittedB_
output particles
int fit(const std::vector< pat::Jet > &jets)
kinematic fit interface
pat::Particle fittedLightQBar_
double fitProb() const
return fit probability
Definition: TopKinFitter.h:36
Int_t getStatus()
Definition: TKinFitter.h:40
pat::Particle fittedLightP_
pat::Particle fittedBBar_
pat::Particle fittedLightQ_
TKinFitter * fitter_
Definition: TopKinFitter.h:44
int TtFullHadKinFitter::fit ( const std::vector< pat::Jet > &  jets)

kinematic fit interface

Definition at line 245 of file TtFullHadKinFitter.cc.

Referenced by addKinFitInfo().

246 {
247  const std::vector<edm::ParameterSet> emptyResolutionVector;
248  return fit(jets, emptyResolutionVector, emptyResolutionVector);
249 }
int fit(const std::vector< pat::Jet > &jets)
kinematic fit interface
int TtFullHadKinFitter::fit ( const std::vector< pat::Jet > &  jets,
const std::vector< edm::ParameterSet udscResolutions,
const std::vector< edm::ParameterSet bResolutions,
const double  resolutionSmearFactor = 1. 
)

kinematic fit interface

Definition at line 178 of file TtFullHadKinFitter.cc.

References TtFullHadEvtPartons::B, b, b_, TtFullHadEvtPartons::BBar, bBar_, edm::errors::Configuration, covM, reco::LeafCandidate::energy(), edm::hlt::Exception, TKinFitter::fit(), fittedB_, fittedBBar_, fittedLightP_, fittedLightPBar_, fittedLightQ_, fittedLightQBar_, TopKinFitter::fitter_, TAbsFitParticle::getCurr4Vec(), TKinFitter::getStatus(), jetParam_, 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().

179 {
180  if( jets.size()<6 ){
181  throw edm::Exception( edm::errors::Configuration, "Cannot run the TtFullHadKinFitter with less than 6 jets" );
182  }
183 
184  // get jets in right order
191 
192  // initialize particles
193  TLorentzVector p4B( b.px(), b.py(), b.pz(), b.energy() );
194  TLorentzVector p4BBar( bBar.px(), bBar.py(), bBar.pz(), bBar.energy() );
195  TLorentzVector p4LightQ( lightQ.px(), lightQ.py(), lightQ.pz(), lightQ.energy() );
196  TLorentzVector p4LightQBar( lightQBar.px(), lightQBar.py(), lightQBar.pz(), lightQBar.energy() );
197  TLorentzVector p4LightP( lightP.px(), lightP.py(), lightP.pz(), lightP.energy() );
198  TLorentzVector p4LightPBar( lightPBar.px(), lightPBar.py(), lightPBar.pz(), lightPBar.energy() );
199 
200  // initialize covariance matrices
201  if(!covM) covM = new CovarianceMatrix(udscResolutions, bResolutions);
202  TMatrixD m1 = resolutionSmearFactor * resolutionSmearFactor * covM->setupMatrix(lightQ, jetParam_);
203  TMatrixD m2 = resolutionSmearFactor * resolutionSmearFactor * covM->setupMatrix(lightQBar, jetParam_);
204  TMatrixD m3 = resolutionSmearFactor * resolutionSmearFactor * covM->setupMatrix(b, jetParam_, "bjets");
205  TMatrixD m4 = resolutionSmearFactor * resolutionSmearFactor * covM->setupMatrix(lightP, jetParam_);
206  TMatrixD m5 = resolutionSmearFactor * resolutionSmearFactor * covM->setupMatrix(lightPBar, jetParam_);
207  TMatrixD m6 = resolutionSmearFactor * resolutionSmearFactor * covM->setupMatrix(bBar , jetParam_, "bjets");
208 
209  // set the kinematics of the objects to be fitted
210  b_ ->setIni4Vec(&p4B );
211  bBar_ ->setIni4Vec(&p4BBar );
212  lightQ_ ->setIni4Vec(&p4LightQ );
213  lightQBar_->setIni4Vec(&p4LightQBar);
214  lightP_ ->setIni4Vec(&p4LightP );
215  lightPBar_->setIni4Vec(&p4LightPBar);
216 
217  // initialize covariance matrices
218  lightQ_ ->setCovMatrix( &m1);
219  lightQBar_->setCovMatrix( &m2);
220  b_ ->setCovMatrix( &m3);
221  lightP_ ->setCovMatrix( &m4);
222  lightPBar_->setCovMatrix( &m5);
223  bBar_ ->setCovMatrix( &m6);
224 
225  // perform the fit!
226  fitter_->fit();
227 
228  // add fitted information to the solution
229  if( fitter_->getStatus()==0 ){
230  // read back jet kinematics
234 
235 
239  }
240  return fitter_->getStatus();
241 }
TAbsFitParticle * lightQ_
TAbsFitParticle * lightP_
Int_t fit()
Definition: TKinFitter.cc:309
virtual void setIni4Vec(const TLorentzVector *pini)=0
pat::Particle fittedLightPBar_
TMatrixD setupMatrix(const pat::PATObject< ObjectType > &object, TopKinFitter::Param param, std::string resolutionProvider)
pat::Particle fittedB_
output particles
CovarianceMatrix * covM
get object resolutions and put them into a matrix
pat::Particle fittedLightQBar_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
virtual double energy() const
energy
TAbsFitParticle * b_
input particles
Int_t getStatus()
Definition: TKinFitter.h:40
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
pat::Particle fittedLightP_
TAbsFitParticle * lightQBar_
pat::Particle fittedBBar_
Param jetParam_
jet parametrization
pat::Particle fittedLightQ_
virtual double px() const
x coordinate of momentum vector
TAbsFitParticle * bBar_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
Analysis-level particle class.
Definition: Particle.h:34
double b
Definition: hdecay.h:120
Analysis-level calorimeter jet class.
Definition: Jet.h:67
virtual double pz() const
z coordinate of momentum vector
const TLorentzVector * getCurr4Vec()
TKinFitter * fitter_
Definition: TopKinFitter.h:44
virtual double py() const
y coordinate of momentum vector
TAbsFitParticle * lightPBar_
const pat::Particle TtFullHadKinFitter::fittedB ( ) const
inline

return fitted b quark candidate

Definition at line 53 of file TtFullHadKinFitter.h.

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

53 { return (fitter_->getStatus()==0 ? fittedB_ : pat::Particle()); };
pat::Particle fittedB_
output particles
Int_t getStatus()
Definition: TKinFitter.h:40
Analysis-level particle class.
Definition: Particle.h:34
TKinFitter * fitter_
Definition: TopKinFitter.h:44
const pat::Particle TtFullHadKinFitter::fittedBBar ( ) const
inline

return fitted b quark candidate

Definition at line 55 of file TtFullHadKinFitter.h.

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

55 { return (fitter_->getStatus()==0 ? fittedBBar_ : pat::Particle()); };
Int_t getStatus()
Definition: TKinFitter.h:40
pat::Particle fittedBBar_
Analysis-level particle class.
Definition: Particle.h:34
TKinFitter * fitter_
Definition: TopKinFitter.h:44
const pat::Particle TtFullHadKinFitter::fittedLightP ( ) const
inline

return fitted light quark candidate

Definition at line 61 of file TtFullHadKinFitter.h.

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

61 { return (fitter_->getStatus()==0 ? fittedLightP_ : pat::Particle()); };
Int_t getStatus()
Definition: TKinFitter.h:40
pat::Particle fittedLightP_
Analysis-level particle class.
Definition: Particle.h:34
TKinFitter * fitter_
Definition: TopKinFitter.h:44
const pat::Particle TtFullHadKinFitter::fittedLightPBar ( ) const
inline

return fitted light quark candidate

Definition at line 63 of file TtFullHadKinFitter.h.

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

63 { return (fitter_->getStatus()==0 ? fittedLightPBar_ : pat::Particle()); };
pat::Particle fittedLightPBar_
Int_t getStatus()
Definition: TKinFitter.h:40
Analysis-level particle class.
Definition: Particle.h:34
TKinFitter * fitter_
Definition: TopKinFitter.h:44
const pat::Particle TtFullHadKinFitter::fittedLightQ ( ) const
inline

return fitted light quark candidate

Definition at line 57 of file TtFullHadKinFitter.h.

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

57 { return (fitter_->getStatus()==0 ? fittedLightQ_ : pat::Particle()); };
Int_t getStatus()
Definition: TKinFitter.h:40
pat::Particle fittedLightQ_
Analysis-level particle class.
Definition: Particle.h:34
TKinFitter * fitter_
Definition: TopKinFitter.h:44
const pat::Particle TtFullHadKinFitter::fittedLightQBar ( ) const
inline

return fitted light quark candidate

Definition at line 59 of file TtFullHadKinFitter.h.

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

59 { return (fitter_->getStatus()==0 ? fittedLightQBar_ : pat::Particle()); };
pat::Particle fittedLightQBar_
Int_t getStatus()
Definition: TKinFitter.h:40
Analysis-level particle class.
Definition: Particle.h:34
TKinFitter * fitter_
Definition: TopKinFitter.h:44
std::vector< TtFullHadKinFitter::Constraint > TtFullHadKinFitter::intToConstraint ( 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 27 of file TtFullHadKinFitter.cc.

References i.

28 {
29  std::vector<TtFullHadKinFitter::Constraint> cConstraints;
30  cConstraints.resize(constraints.size());
31  for(unsigned int i=0;i<constraints.size();++i)
32  {
33  cConstraints[i]=(Constraint)constraints[i];
34  }
35  return cConstraints;
36 }
int i
Definition: DBlmapReader.cc:9
Constraint
supported constraints
void TtFullHadKinFitter::printSetup ( ) const
private

print fitter setup

Definition at line 76 of file TtFullHadKinFitter.cc.

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

Referenced by setupFitter().

77 {
78  std::stringstream constr;
79  for(unsigned int i=0; i<constraints_.size(); ++i){
80  switch(constraints_[i]){
81  case kWPlusMass : constr << " * W+-mass (" << mW_ << " GeV) \n"; break;
82  case kWMinusMass : constr << " * W--mass (" << mW_ << " GeV) \n"; break;
83  case kTopMass : constr << " * t-mass (" << mTop_ << " GeV) \n"; break;
84  case kTopBarMass : constr << " * tBar-mass (" << mTop_ << " GeV) \n"; break;
85  case kEqualTopMasses : constr << " * equal t-masses \n"; break;
86  }
87  }
88  edm::LogVerbatim( "TtFullHadKinFitter" )
89  << "\n"
90  << "+++++++++++ TtFullHadKinFitter Setup ++++++++++++ \n"
91  << " Parametrization: \n"
92  << " * jet : " << param(jetParam_) << "\n"
93  << " Constraints: \n"
94  << constr.str()
95  << " Max(No iterations): " << maxNrIter_ << "\n"
96  << " Max(deltaS) : " << maxDeltaS_ << "\n"
97  << " Max(F) : " << maxF_ << "\n"
98  << "+++++++++++++++++++++++++++++++++++++++++++++++++ \n";
99 }
int i
Definition: DBlmapReader.cc:9
std::string param(const Param &param) const
convert Param to human readable form
Definition: TopKinFitter.cc:23
int maxNrIter_
maximal allowed number of iterations to be used for the fit
Definition: TopKinFitter.h:46
double mW_
W mass value used for constraints.
Definition: TopKinFitter.h:52
double maxDeltaS_
maximal allowed chi2 (not normalized to degrees of freedom)
Definition: TopKinFitter.h:48
std::vector< Constraint > constraints_
vector of constraints to be used
Param jetParam_
jet parametrization
double mTop_
top mass value used for constraints
Definition: TopKinFitter.h:54
double maxF_
maximal allowed distance from constraints
Definition: TopKinFitter.h:50
void TtFullHadKinFitter::setupConstraints ( )
private

initialize constraints

Definition at line 137 of file TtFullHadKinFitter.cc.

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

Referenced by setupFitter().

138 {
139  massConstr_[kWPlusMass ] = new TFitConstraintM("WPlusMass" , "WPlusMass" , 0, 0, mW_ );
140  massConstr_[kWMinusMass ] = new TFitConstraintM("WMinusMass" , "WMinusMass" , 0, 0, mW_ );
141  massConstr_[kTopMass ] = new TFitConstraintM("TopMass" , "TopMass" , 0, 0, mTop_ );
142  massConstr_[kTopBarMass ] = new TFitConstraintM("TopBarMass" , "TopBarMass" , 0, 0, mTop_ );
143  massConstr_[kEqualTopMasses] = new TFitConstraintM("EqualTopMasses", "EqualTopMasses" , 0, 0, 0 );
144 
145  massConstr_[kWPlusMass ]->addParticles1(lightQ_, lightQBar_);
146  massConstr_[kWMinusMass ]->addParticles1(lightP_, lightPBar_);
147  massConstr_[kTopMass ]->addParticles1(b_, lightQ_, lightQBar_);
148  massConstr_[kTopBarMass ]->addParticles1(bBar_, lightP_, lightPBar_);
149  massConstr_[kEqualTopMasses]->addParticles1(b_, lightQ_, lightQBar_);
151 
152 }
TAbsFitParticle * lightQ_
TAbsFitParticle * lightP_
TAbsFitParticle * b_
input particles
double mW_
W mass value used for constraints.
Definition: TopKinFitter.h:52
std::map< Constraint, TFitConstraintM * > massConstr_
supported constraints
TAbsFitParticle * lightQBar_
TAbsFitParticle * bBar_
double mTop_
top mass value used for constraints
Definition: TopKinFitter.h:54
TAbsFitParticle * lightPBar_
void TtFullHadKinFitter::setupFitter ( )
private

setup fitter

Definition at line 156 of file TtFullHadKinFitter.cc.

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

Referenced by TtFullHadKinFitter().

157 {
158  printSetup();
159  setupJets();
161 
162  // add measured particles
169 
170  // add constraints
171  for(unsigned int i=0; i<constraints_.size(); i++){
173  }
174 }
TAbsFitParticle * lightQ_
int i
Definition: DBlmapReader.cc:9
void setupConstraints()
initialize constraints
TAbsFitParticle * lightP_
void printSetup() const
print fitter setup
void addConstraint(TAbsFitConstraint *constraint)
Definition: TKinFitter.cc:281
TAbsFitParticle * b_
input particles
void addMeasParticle(TAbsFitParticle *particle)
Definition: TKinFitter.cc:209
std::map< Constraint, TFitConstraintM * > massConstr_
supported constraints
TAbsFitParticle * lightQBar_
std::vector< Constraint > constraints_
vector of constraints to be used
TAbsFitParticle * bBar_
void setupJets()
initialize jet inputs
TKinFitter * fitter_
Definition: TopKinFitter.h:44
TAbsFitParticle * lightPBar_
void TtFullHadKinFitter::setupJets ( )
private

initialize jet inputs

Definition at line 103 of file TtFullHadKinFitter.cc.

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

Referenced by setupFitter().

104 {
105  TMatrixD empty3x3(3,3);
106  TMatrixD empty4x4(4,4);
107  switch(jetParam_){ // setup jets according to parameterization
108  case kEMom :
109  b_ = new TFitParticleEMomDev ("Jet1", "Jet1", 0, &empty4x4);
110  bBar_ = new TFitParticleEMomDev ("Jet2", "Jet2", 0, &empty4x4);
111  lightQ_ = new TFitParticleEMomDev ("Jet3", "Jet3", 0, &empty4x4);
112  lightQBar_= new TFitParticleEMomDev ("Jet4", "Jet4", 0, &empty4x4);
113  lightP_ = new TFitParticleEMomDev ("Jet5", "Jet5", 0, &empty4x4);
114  lightPBar_= new TFitParticleEMomDev ("Jet6", "Jet6", 0, &empty4x4);
115  break;
116  case kEtEtaPhi :
117  b_ = new TFitParticleEtEtaPhi ("Jet1", "Jet1", 0, &empty3x3);
118  bBar_ = new TFitParticleEtEtaPhi ("Jet2", "Jet2", 0, &empty3x3);
119  lightQ_ = new TFitParticleEtEtaPhi ("Jet3", "Jet3", 0, &empty3x3);
120  lightQBar_= new TFitParticleEtEtaPhi ("Jet4", "Jet4", 0, &empty3x3);
121  lightP_ = new TFitParticleEtEtaPhi ("Jet5", "Jet5", 0, &empty3x3);
122  lightPBar_= new TFitParticleEtEtaPhi ("Jet6", "Jet6", 0, &empty3x3);
123  break;
124  case kEtThetaPhi :
125  b_ = new TFitParticleEtThetaPhi("Jet1", "Jet1", 0, &empty3x3);
126  bBar_ = new TFitParticleEtThetaPhi("Jet2", "Jet2", 0, &empty3x3);
127  lightQ_ = new TFitParticleEtThetaPhi("Jet3", "Jet3", 0, &empty3x3);
128  lightQBar_= new TFitParticleEtThetaPhi("Jet4", "Jet4", 0, &empty3x3);
129  lightP_ = new TFitParticleEtThetaPhi("Jet5", "Jet5", 0, &empty3x3);
130  lightPBar_= new TFitParticleEtThetaPhi("Jet6", "Jet6", 0, &empty3x3);
131  break;
132  }
133 }
TAbsFitParticle * lightQ_
TAbsFitParticle * lightP_
TAbsFitParticle * b_
input particles
TAbsFitParticle * lightQBar_
Param jetParam_
jet parametrization
TAbsFitParticle * bBar_
TAbsFitParticle * lightPBar_

Member Data Documentation

TAbsFitParticle* TtFullHadKinFitter::b_
private

input particles

Definition at line 79 of file TtFullHadKinFitter.h.

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

TAbsFitParticle* TtFullHadKinFitter::bBar_
private
std::vector<Constraint> TtFullHadKinFitter::constraints_
private

vector of constraints to be used

Definition at line 97 of file TtFullHadKinFitter.h.

Referenced by printSetup(), and setupFitter().

CovarianceMatrix* TtFullHadKinFitter::covM
private

get object resolutions and put them into a matrix

Definition at line 100 of file TtFullHadKinFitter.h.

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

pat::Particle TtFullHadKinFitter::fittedB_
private

output particles

Definition at line 88 of file TtFullHadKinFitter.h.

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

pat::Particle TtFullHadKinFitter::fittedBBar_
private

Definition at line 89 of file TtFullHadKinFitter.h.

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

pat::Particle TtFullHadKinFitter::fittedLightP_
private

Definition at line 92 of file TtFullHadKinFitter.h.

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

pat::Particle TtFullHadKinFitter::fittedLightPBar_
private

Definition at line 93 of file TtFullHadKinFitter.h.

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

pat::Particle TtFullHadKinFitter::fittedLightQ_
private

Definition at line 90 of file TtFullHadKinFitter.h.

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

pat::Particle TtFullHadKinFitter::fittedLightQBar_
private

Definition at line 91 of file TtFullHadKinFitter.h.

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

Param TtFullHadKinFitter::jetParam_
private

jet parametrization

Definition at line 95 of file TtFullHadKinFitter.h.

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

TAbsFitParticle* TtFullHadKinFitter::lightP_
private
TAbsFitParticle* TtFullHadKinFitter::lightPBar_
private
TAbsFitParticle* TtFullHadKinFitter::lightQ_
private
TAbsFitParticle* TtFullHadKinFitter::lightQBar_
private
std::map<Constraint, TFitConstraintM*> TtFullHadKinFitter::massConstr_
private

supported constraints

Definition at line 86 of file TtFullHadKinFitter.h.

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