CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
TtSemiLepKinFitter Class Reference

#include <TtSemiLepKinFitter.h>

Inheritance diagram for TtSemiLepKinFitter:
TopKinFitter

Public Types

enum  Constraint {
  kWHadMass = 1, kWLepMass, kTopHadMass, kTopLepMass,
  kNeutrinoMass, kEqualTopMasses
}
 supported constraints More...
 
- Public Types inherited from TopKinFitter
enum  Param { kEMom, kEtEtaPhi, kEtThetaPhi }
 supported parameterizations More...
 

Public Member Functions

TtSemiEvtSolution addKinFitInfo (TtSemiEvtSolution *asol)
 add kin fit information to the old event solution (in for legacy reasons) More...
 
template<class LeptonType >
int fit (const std::vector< pat::Jet > &jets, const pat::Lepton< LeptonType > &leps, const pat::MET &met)
 kinematic fit interface More...
 
const pat::Particle fittedHadB () const
 
const pat::Particle fittedHadP () const
 
const pat::Particle fittedHadQ () const
 
const pat::Particle fittedLepB () const
 
const pat::Particle fittedLepton () const
 
const pat::Particle fittedNeutrino () const
 
 TtSemiLepKinFitter ()
 default constructor More...
 
 TtSemiLepKinFitter (Param jetParam, Param lepParam, Param metParam, 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...
 
 ~TtSemiLepKinFitter ()
 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...
 
void setupLeptons ()
 initialize lepton inputs More...
 

Private Attributes

std::vector< ConstraintconstrList_
 vector of constraints to be used More...
 
pat::Particle fittedHadB_
 
pat::Particle fittedHadP_
 
pat::Particle fittedHadQ_
 
pat::Particle fittedLepB_
 
pat::Particle fittedLepton_
 
pat::Particle fittedNeutrino_
 
TAbsFitParticlehadB_
 
TAbsFitParticlehadP_
 
TAbsFitParticlehadQ_
 
Param jetParam_
 jet parametrization More...
 
TAbsFitParticlelepB_
 
Param lepParam_
 lepton parametrization More...
 
TAbsFitParticlelepton_
 
std::map< Constraint,
TFitConstraintM * > 
massConstr_
 
Param metParam_
 met parametrization More...
 
TAbsFitParticleneutrino_
 

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 26 of file TtSemiLepKinFitter.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

TtSemiLepKinFitter::TtSemiLepKinFitter ( )
explicit

default constructor

default configuration is: Parametrization kEMom, Max iterations = 200, deltaS<= 5e-5, maxF<= 1e-4, no constraints

Definition at line 15 of file TtSemiLepKinFitter.cc.

References setupFitter().

15  :
16  TopKinFitter(),
17  hadB_(0), hadP_(0), hadQ_(0), lepB_(0), lepton_(0), neutrino_(0),
19 {
20  setupFitter();
21 }
TAbsFitParticle * hadB_
TAbsFitParticle * neutrino_
TAbsFitParticle * hadQ_
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
Param lepParam_
lepton parametrization
TAbsFitParticle * lepton_
TAbsFitParticle * hadP_
Param jetParam_
jet parametrization
Param metParam_
met parametrization
void setupFitter()
setup fitter
TAbsFitParticle * lepB_
TtSemiLepKinFitter::TtSemiLepKinFitter ( Param  jetParam,
Param  lepParam,
Param  metParam,
int  maxNrIter,
double  maxDeltaS,
double  maxF,
std::vector< Constraint constraints,
double  mW = 80.4,
double  mTop = 173. 
)
explicit

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

Definition at line 23 of file TtSemiLepKinFitter.cc.

References setupFitter().

25  :
26  TopKinFitter(maxNrIter, maxDeltaS, maxF, mW, mTop),
27  hadB_(0), hadP_(0), hadQ_(0), lepB_(0), lepton_(0), neutrino_(0),
28  jetParam_(jetParam), lepParam_(lepParam), metParam_(metParam), constrList_(constraints)
29 {
30  setupFitter();
31 }
TAbsFitParticle * hadB_
TAbsFitParticle * neutrino_
TAbsFitParticle * hadQ_
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
Param lepParam_
lepton parametrization
TAbsFitParticle * lepton_
TAbsFitParticle * hadP_
Param jetParam_
jet parametrization
Param metParam_
met parametrization
std::vector< Constraint > constrList_
vector of constraints to be used
void setupFitter()
setup fitter
TAbsFitParticle * lepB_
TtSemiLepKinFitter::~TtSemiLepKinFitter ( )

default destructor

Definition at line 33 of file TtSemiLepKinFitter.cc.

References hadB_, hadP_, hadQ_, lepB_, lepton_, massConstr_, and neutrino_.

34 {
35  delete hadB_;
36  delete hadP_;
37  delete hadQ_;
38  delete lepB_;
39  delete lepton_;
40  delete neutrino_;
41  for(std::map<Constraint, TFitConstraintM*>::iterator it = massConstr_.begin(); it != massConstr_.end(); ++it)
42  delete it->second;
43 }
TAbsFitParticle * hadB_
TAbsFitParticle * neutrino_
TAbsFitParticle * hadQ_
TAbsFitParticle * lepton_
TAbsFitParticle * hadP_
std::map< Constraint, TFitConstraintM * > massConstr_
TAbsFitParticle * lepB_

Member Function Documentation

TtSemiEvtSolution TtSemiLepKinFitter::addKinFitInfo ( TtSemiEvtSolution asol)

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

Definition at line 225 of file TtSemiLepKinFitter.cc.

References fit(), TopKinFitter::fitProb(), fittedHadB(), fittedHadP(), fittedHadQ(), fittedLepB(), fittedLepton(), fittedNeutrino(), TopKinFitter::fitter_, TtSemiEvtSolution::getCalHadb(), TtSemiEvtSolution::getCalHadp(), TtSemiEvtSolution::getCalHadq(), TtSemiEvtSolution::getCalLepb(), TtSemiEvtSolution::getCalLepe(), TtSemiEvtSolution::getCalLepm(), TtSemiEvtSolution::getCalLepn(), TtSemiEvtSolution::getDecay(), TKinFitter::getStatus(), TtSemiLepEvtPartons::HadB, analyzePatCleaning_cfg::jets, TtSemiLepEvtPartons::LepB, TtSemiLepEvtPartons::LightQ, TtSemiLepEvtPartons::LightQBar, TtSemiEvtSolution::setFitHadb(), TtSemiEvtSolution::setFitHadp(), TtSemiEvtSolution::setFitHadq(), TtSemiEvtSolution::setFitLepb(), TtSemiEvtSolution::setFitLepl(), TtSemiEvtSolution::setFitLepn(), and TtSemiEvtSolution::setProbChi2().

Referenced by TtSemiEvtSolutionMaker::produce().

226 {
227 
228  TtSemiEvtSolution fitsol(*asol);
229 
230  std::vector<pat::Jet> jets;
231  jets.resize(4);
232  jets[TtSemiLepEvtPartons::LightQ ] = fitsol.getCalHadp();
233  jets[TtSemiLepEvtPartons::LightQBar] = fitsol.getCalHadq();
234  jets[TtSemiLepEvtPartons::HadB ] = fitsol.getCalHadb();
235  jets[TtSemiLepEvtPartons::LepB ] = fitsol.getCalLepb();
236 
237  // perform the fit, either using the electron or the muon
238  if(fitsol.getDecay() == "electron") fit( jets, fitsol.getCalLepe(), fitsol.getCalLepn() );
239  if(fitsol.getDecay() == "muon") fit( jets, fitsol.getCalLepm(), fitsol.getCalLepn() );
240 
241  // add fitted information to the solution
242  if (fitter_->getStatus() == 0) {
243  // fill the fitted particles
244  fitsol.setFitHadb( fittedHadB() );
245  fitsol.setFitHadp( fittedHadP() );
246  fitsol.setFitHadq( fittedHadQ() );
247  fitsol.setFitLepb( fittedLepB() );
248  fitsol.setFitLepl( fittedLepton() );
249  fitsol.setFitLepn( fittedNeutrino() );
250  // store the fit's chi2 probability
251  fitsol.setProbChi2( fitProb() );
252  }
253  return fitsol;
254 }
const pat::Particle fittedHadP() const
const pat::Particle fittedNeutrino() const
const pat::Particle fittedLepB() const
double fitProb() const
return fit probability
Definition: TopKinFitter.h:36
int fit(const std::vector< pat::Jet > &jets, const pat::Lepton< LeptonType > &leps, const pat::MET &met)
kinematic fit interface
Int_t getStatus()
Definition: TKinFitter.h:40
const pat::Particle fittedHadB() const
const pat::Particle fittedHadQ() const
const pat::Particle fittedLepton() const
TKinFitter * fitter_
Definition: TopKinFitter.h:44
template<class LeptonType >
int TtSemiLepKinFitter::fit ( const std::vector< pat::Jet > &  jets,
const pat::Lepton< LeptonType > &  leps,
const pat::MET met 
)

kinematic fit interface

Definition at line 155 of file TtSemiLepKinFitter.cc.

References edm::errors::Configuration, reco::LeafCandidate::energy(), reco::LeafCandidate::et(), TKinFitter::fit(), fittedHadB_, fittedHadP_, fittedHadQ_, fittedLepB_, fittedLepton_, fittedNeutrino_, TopKinFitter::fitter_, TAbsFitParticle::getCurr4Vec(), TKinFitter::getStatus(), TtSemiLepEvtPartons::HadB, hadB_, hadP_, hadQ_, jetParam_, TtSemiLepEvtPartons::LepB, lepB_, lepParam_, lepton_, TtSemiLepEvtPartons::LightQ, TtSemiLepEvtPartons::LightQBar, metParam_, neutrino_, reco::LeafCandidate::px(), reco::LeafCandidate::py(), reco::LeafCandidate::pz(), TAbsFitParticle::setCovMatrix(), TAbsFitParticle::setIni4Vec(), and CovarianceMatrix::setupMatrix().

Referenced by addKinFitInfo().

156 {
157  if( jets.size()<4 )
158  throw edm::Exception( edm::errors::Configuration, "Cannot run the TtSemiLepKinFitter with less than 4 jets" );
159 
160  // get jets in right order
165 
166  // initialize particles
167  TLorentzVector p4HadP( hadP.px(), hadP.py(), hadP.pz(), hadP.energy() );
168  TLorentzVector p4HadQ( hadQ.px(), hadQ.py(), hadQ.pz(), hadQ.energy() );
169  TLorentzVector p4HadB( hadB.px(), hadB.py(), hadB.pz(), hadB.energy() );
170  TLorentzVector p4LepB( lepB.px(), lepB.py(), lepB.pz(), lepB.energy() );
171  TLorentzVector p4Lepton ( lepton.px(), lepton.py(), lepton.pz(), lepton.energy() );
172  TLorentzVector p4Neutrino( neutrino.px(), neutrino.py(), 0, neutrino.et() );
173 
174  // initialize covariance matrices
175  CovarianceMatrix covM;
176  TMatrixD m1 = covM.setupMatrix(hadP, jetParam_);
177  TMatrixD m2 = covM.setupMatrix(hadQ, jetParam_);
178  TMatrixD m3 = covM.setupMatrix(hadB, jetParam_, "bjets");
179  TMatrixD m4 = covM.setupMatrix(lepB, jetParam_, "bjets");
180  TMatrixD m5 = covM.setupMatrix(lepton, lepParam_);
181  TMatrixD m6 = covM.setupMatrix(neutrino, metParam_);
182 
183  // set the kinematics of the objects to be fitted
184  hadP_->setIni4Vec( &p4HadP );
185  hadQ_->setIni4Vec( &p4HadQ );
186  hadB_->setIni4Vec( &p4HadB );
187  lepB_->setIni4Vec( &p4LepB );
188  lepton_->setIni4Vec( &p4Lepton );
189  neutrino_->setIni4Vec( &p4Neutrino );
190 
191  hadP_->setCovMatrix( &m1 );
192  hadQ_->setCovMatrix( &m2 );
193  hadB_->setCovMatrix( &m3 );
194  lepB_->setCovMatrix( &m4 );
195  lepton_->setCovMatrix( &m5 );
196  neutrino_->setCovMatrix( &m6 );
197 
198  // now do the fit
199  fitter_->fit();
200 
201  // read back the resulting particles if the fit converged
202  if(fitter_->getStatus()==0){
203  // read back jet kinematics
205  hadP_->getCurr4Vec()->Y(), hadP_->getCurr4Vec()->Z(), hadP_->getCurr4Vec()->E()), math::XYZPoint()));
207  hadQ_->getCurr4Vec()->Y(), hadQ_->getCurr4Vec()->Z(), hadQ_->getCurr4Vec()->E()), math::XYZPoint()));
209  hadB_->getCurr4Vec()->Y(), hadB_->getCurr4Vec()->Z(), hadB_->getCurr4Vec()->E()), math::XYZPoint()));
211  lepB_->getCurr4Vec()->Y(), lepB_->getCurr4Vec()->Z(), lepB_->getCurr4Vec()->E()), math::XYZPoint()));
212 
213  // read back lepton kinematics
215  lepton_->getCurr4Vec()->Y(), lepton_->getCurr4Vec()->Z(), lepton_->getCurr4Vec()->E()), math::XYZPoint()));
216 
217  // read back the MET kinematics
220 
221  }
222  return fitter_->getStatus();
223 }
TAbsFitParticle * hadB_
TAbsFitParticle * neutrino_
Int_t fit()
Definition: TKinFitter.cc:309
TAbsFitParticle * hadQ_
virtual void setIni4Vec(const TLorentzVector *pini)=0
TMatrixD setupMatrix(const pat::PATObject< ObjectType > &object, TopKinFitter::Param param, std::string resolutionProvider)
pat::Particle fittedHadP_
pat::Particle fittedLepB_
Param lepParam_
lepton parametrization
pat::Particle fittedHadB_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
virtual double energy() const
energy
TAbsFitParticle * lepton_
pat::Particle fittedLepton_
TAbsFitParticle * hadP_
Int_t getStatus()
Definition: TKinFitter.h:40
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
Param jetParam_
jet parametrization
Param metParam_
met parametrization
pat::Particle fittedHadQ_
virtual double px() const
x coordinate of momentum vector
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
Analysis-level particle class.
Definition: Particle.h:34
Analysis-level calorimeter jet class.
Definition: Jet.h:67
virtual double pz() const
z coordinate of momentum vector
const TLorentzVector * getCurr4Vec()
pat::Particle fittedNeutrino_
TKinFitter * fitter_
Definition: TopKinFitter.h:44
virtual double py() const
y coordinate of momentum vector
TAbsFitParticle * lepB_
const pat::Particle TtSemiLepKinFitter::fittedHadB ( ) const
inline

Definition at line 45 of file TtSemiLepKinFitter.h.

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

Referenced by addKinFitInfo().

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

Definition at line 47 of file TtSemiLepKinFitter.h.

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

Referenced by addKinFitInfo().

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

Definition at line 49 of file TtSemiLepKinFitter.h.

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

Referenced by addKinFitInfo().

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

Definition at line 51 of file TtSemiLepKinFitter.h.

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

Referenced by addKinFitInfo().

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

Definition at line 53 of file TtSemiLepKinFitter.h.

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

Referenced by addKinFitInfo().

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

Definition at line 55 of file TtSemiLepKinFitter.h.

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

Referenced by addKinFitInfo().

55 { return (fitter_->getStatus()==0 ? fittedNeutrino_ : pat::Particle()); };
Int_t getStatus()
Definition: TKinFitter.h:40
Analysis-level particle class.
Definition: Particle.h:34
pat::Particle fittedNeutrino_
TKinFitter * fitter_
Definition: TopKinFitter.h:44
void TtSemiLepKinFitter::printSetup ( ) const
private

print fitter setup

Definition at line 45 of file TtSemiLepKinFitter.cc.

References constrList_, i, jetParam_, kEqualTopMasses, kNeutrinoMass, kTopHadMass, kTopLepMass, kWHadMass, kWLepMass, lepParam_, TopKinFitter::maxDeltaS_, TopKinFitter::maxF_, TopKinFitter::maxNrIter_, metParam_, TopKinFitter::mTop_, TopKinFitter::mW_, and TopKinFitter::param().

Referenced by setupFitter().

46 {
47  std::stringstream constr;
48  for(unsigned int i=0; i<constrList_.size(); ++i){
49  switch(constrList_[i]){
50  case kWHadMass : constr << " * hadronic W-mass (" << mW_ << " GeV) \n"; break;
51  case kWLepMass : constr << " * leptonic W-mass (" << mW_ << " GeV) \n"; break;
52  case kTopHadMass : constr << " * hadronic t-mass (" << mTop_ << " GeV) \n"; break;
53  case kTopLepMass : constr << " * leptonic t-mass (" << mTop_ << " GeV) \n"; break;
54  case kNeutrinoMass : constr << " * neutrino mass (0 GeV) \n"; break;
55  case kEqualTopMasses : constr << " * equal t-masses \n"; break;
56  }
57  }
58  edm::LogVerbatim( "TtSemiLepKinFitter" )
59  << "\n"
60  << "+++++++++++ TtSemiLepKinFitter Setup ++++++++++++ \n"
61  << " Parametrization: \n"
62  << " * jet : " << param(jetParam_) << "\n"
63  << " * lep : " << param(lepParam_) << "\n"
64  << " * met : " << param(metParam_) << "\n"
65  << " Constraints: \n"
66  << constr.str()
67  << " Max(No iterations): " << maxNrIter_ << "\n"
68  << " Max(deltaS) : " << maxDeltaS_ << "\n"
69  << " Max(F) : " << maxF_ << "\n"
70  << "+++++++++++++++++++++++++++++++++++++++++++++++++ \n";
71 }
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
Param lepParam_
lepton parametrization
Param jetParam_
jet parametrization
double mW_
W mass value used for constraints.
Definition: TopKinFitter.h:52
Param metParam_
met parametrization
double maxDeltaS_
maximal allowed chi2 (not normalized to degrees of freedom)
Definition: TopKinFitter.h:48
std::vector< Constraint > constrList_
vector of constraints to be used
double mTop_
top mass value used for constraints
Definition: TopKinFitter.h:54
double maxF_
maximal allowed distance from constraints
Definition: TopKinFitter.h:50
void TtSemiLepKinFitter::setupConstraints ( )
private

initialize constraints

Definition at line 114 of file TtSemiLepKinFitter.cc.

References hadB_, hadP_, hadQ_, kEqualTopMasses, kNeutrinoMass, kTopHadMass, kTopLepMass, kWHadMass, kWLepMass, lepB_, lepton_, massConstr_, TopKinFitter::mTop_, TopKinFitter::mW_, and neutrino_.

Referenced by setupFitter().

115 {
116  massConstr_[kWHadMass ] = new TFitConstraintM("WMassHad", "WMassHad", 0, 0, mW_ );
117  massConstr_[kWLepMass ] = new TFitConstraintM("WMassLep", "WMassLep", 0, 0, mW_ );
118  massConstr_[kTopHadMass ] = new TFitConstraintM("TopMassHad", "TopMassHad", 0, 0, mTop_);
119  massConstr_[kTopLepMass ] = new TFitConstraintM("TopMassLep", "TopMassLep", 0, 0, mTop_);
120  massConstr_[kNeutrinoMass ] = new TFitConstraintM("NeutrinoMass", "NeutrinoMass", 0, 0, 0.);
121  massConstr_[kEqualTopMasses] = new TFitConstraintM("EqualTopMasses","EqualTopMasses",0, 0, 0.);
122 
123  massConstr_[kWHadMass ]->addParticles1(hadP_, hadQ_ );
124  massConstr_[kWLepMass ]->addParticles1(lepton_, neutrino_);
125  massConstr_[kTopHadMass ]->addParticles1(hadP_, hadQ_, hadB_);
126  massConstr_[kTopLepMass ]->addParticles1(lepton_, neutrino_, lepB_);
127  massConstr_[kNeutrinoMass ]->addParticle1 (neutrino_);
128  massConstr_[kEqualTopMasses]->addParticles1(hadP_, hadQ_, hadB_);
130 }
TAbsFitParticle * hadB_
TAbsFitParticle * neutrino_
TAbsFitParticle * hadQ_
TAbsFitParticle * lepton_
TAbsFitParticle * hadP_
double mW_
W mass value used for constraints.
Definition: TopKinFitter.h:52
std::map< Constraint, TFitConstraintM * > massConstr_
double mTop_
top mass value used for constraints
Definition: TopKinFitter.h:54
TAbsFitParticle * lepB_
void TtSemiLepKinFitter::setupFitter ( )
private

setup fitter

Definition at line 132 of file TtSemiLepKinFitter.cc.

References TKinFitter::addConstraint(), TKinFitter::addMeasParticle(), constrList_, TopKinFitter::fitter_, hadB_, hadP_, hadQ_, i, lepB_, lepton_, massConstr_, neutrino_, printSetup(), setupConstraints(), setupJets(), and setupLeptons().

Referenced by TtSemiLepKinFitter().

133 {
134  printSetup();
135 
136  setupJets();
137  setupLeptons();
139 
140  // add measured particles
147 
148  // add constraints
149  for(unsigned int i=0; i<constrList_.size(); i++){
151  }
152 }
int i
Definition: DBlmapReader.cc:9
TAbsFitParticle * hadB_
TAbsFitParticle * neutrino_
TAbsFitParticle * hadQ_
TAbsFitParticle * lepton_
void setupJets()
initialize jet inputs
void printSetup() const
print fitter setup
void addConstraint(TAbsFitConstraint *constraint)
Definition: TKinFitter.cc:281
TAbsFitParticle * hadP_
void addMeasParticle(TAbsFitParticle *particle)
Definition: TKinFitter.cc:209
std::map< Constraint, TFitConstraintM * > massConstr_
void setupConstraints()
initialize constraints
std::vector< Constraint > constrList_
vector of constraints to be used
void setupLeptons()
initialize lepton inputs
TKinFitter * fitter_
Definition: TopKinFitter.h:44
TAbsFitParticle * lepB_
void TtSemiLepKinFitter::setupJets ( )
private

initialize jet inputs

Definition at line 73 of file TtSemiLepKinFitter.cc.

References hadB_, hadP_, hadQ_, jetParam_, TopKinFitter::kEMom, TopKinFitter::kEtEtaPhi, TopKinFitter::kEtThetaPhi, and lepB_.

Referenced by setupFitter().

74 {
75  TMatrixD empty3x3(3,3);
76  TMatrixD empty4x4(4,4);
77  switch(jetParam_){ // setup jets according to parameterization
78  case kEMom :
79  hadB_= new TFitParticleEMomDev ("Jet1", "Jet1", 0, &empty4x4);
80  hadP_= new TFitParticleEMomDev ("Jet2", "Jet2", 0, &empty4x4);
81  hadQ_= new TFitParticleEMomDev ("Jet3", "Jet3", 0, &empty4x4);
82  lepB_= new TFitParticleEMomDev ("Jet4", "Jet4", 0, &empty4x4);
83  break;
84  case kEtEtaPhi :
85  hadB_= new TFitParticleEtEtaPhi ("Jet1", "Jet1", 0, &empty3x3);
86  hadP_= new TFitParticleEtEtaPhi ("Jet2", "Jet2", 0, &empty3x3);
87  hadQ_= new TFitParticleEtEtaPhi ("Jet3", "Jet3", 0, &empty3x3);
88  lepB_= new TFitParticleEtEtaPhi ("Jet4", "Jet4", 0, &empty3x3);
89  break;
90  case kEtThetaPhi :
91  hadB_= new TFitParticleEtThetaPhi("Jet1", "Jet1", 0, &empty3x3);
92  hadP_= new TFitParticleEtThetaPhi("Jet2", "Jet2", 0, &empty3x3);
93  hadQ_= new TFitParticleEtThetaPhi("Jet3", "Jet3", 0, &empty3x3);
94  lepB_= new TFitParticleEtThetaPhi("Jet4", "Jet4", 0, &empty3x3);
95  break;
96  }
97 }
TAbsFitParticle * hadB_
TAbsFitParticle * hadQ_
TAbsFitParticle * hadP_
Param jetParam_
jet parametrization
TAbsFitParticle * lepB_
void TtSemiLepKinFitter::setupLeptons ( )
private

initialize lepton inputs

Definition at line 99 of file TtSemiLepKinFitter.cc.

References TopKinFitter::kEMom, TopKinFitter::kEtEtaPhi, TopKinFitter::kEtThetaPhi, lepParam_, lepton_, metParam_, and neutrino_.

Referenced by setupFitter().

100 {
101  TMatrixD empty3x3(3,3);
102  switch(lepParam_){ // setup lepton according to parameterization
103  case kEMom : lepton_ = new TFitParticleEScaledMomDev("Lepton", "Lepton", 0, &empty3x3); break;
104  case kEtEtaPhi : lepton_ = new TFitParticleEtEtaPhi ("Lepton", "Lepton", 0, &empty3x3); break;
105  case kEtThetaPhi : lepton_ = new TFitParticleEtThetaPhi ("Lepton", "Lepton", 0, &empty3x3); break;
106  }
107  switch(metParam_){ // setup neutrino according to parameterization
108  case kEMom : neutrino_= new TFitParticleEScaledMomDev("Neutrino", "Neutrino", 0, &empty3x3); break;
109  case kEtEtaPhi : neutrino_= new TFitParticleEtEtaPhi ("Neutrino", "Neutrino", 0, &empty3x3); break;
110  case kEtThetaPhi : neutrino_= new TFitParticleEtThetaPhi ("Neutrino", "Neutrino", 0, &empty3x3); break;
111  }
112 }
TAbsFitParticle * neutrino_
Param lepParam_
lepton parametrization
TAbsFitParticle * lepton_
Param metParam_
met parametrization

Member Data Documentation

std::vector<Constraint> TtSemiLepKinFitter::constrList_
private

vector of constraints to be used

Definition at line 95 of file TtSemiLepKinFitter.h.

Referenced by printSetup(), and setupFitter().

pat::Particle TtSemiLepKinFitter::fittedHadB_
private

Definition at line 82 of file TtSemiLepKinFitter.h.

Referenced by fit(), and fittedHadB().

pat::Particle TtSemiLepKinFitter::fittedHadP_
private

Definition at line 83 of file TtSemiLepKinFitter.h.

Referenced by fit(), and fittedHadP().

pat::Particle TtSemiLepKinFitter::fittedHadQ_
private

Definition at line 84 of file TtSemiLepKinFitter.h.

Referenced by fit(), and fittedHadQ().

pat::Particle TtSemiLepKinFitter::fittedLepB_
private

Definition at line 85 of file TtSemiLepKinFitter.h.

Referenced by fit(), and fittedLepB().

pat::Particle TtSemiLepKinFitter::fittedLepton_
private

Definition at line 86 of file TtSemiLepKinFitter.h.

Referenced by fit(), and fittedLepton().

pat::Particle TtSemiLepKinFitter::fittedNeutrino_
private

Definition at line 87 of file TtSemiLepKinFitter.h.

Referenced by fit(), and fittedNeutrino().

TAbsFitParticle* TtSemiLepKinFitter::hadB_
private
TAbsFitParticle* TtSemiLepKinFitter::hadP_
private
TAbsFitParticle* TtSemiLepKinFitter::hadQ_
private
Param TtSemiLepKinFitter::jetParam_
private

jet parametrization

Definition at line 89 of file TtSemiLepKinFitter.h.

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

TAbsFitParticle* TtSemiLepKinFitter::lepB_
private
Param TtSemiLepKinFitter::lepParam_
private

lepton parametrization

Definition at line 91 of file TtSemiLepKinFitter.h.

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

TAbsFitParticle* TtSemiLepKinFitter::lepton_
private
std::map<Constraint, TFitConstraintM*> TtSemiLepKinFitter::massConstr_
private

Definition at line 80 of file TtSemiLepKinFitter.h.

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

Param TtSemiLepKinFitter::metParam_
private

met parametrization

Definition at line 93 of file TtSemiLepKinFitter.h.

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

TAbsFitParticle* TtSemiLepKinFitter::neutrino_
private