Go to the documentation of this file.00001 #ifndef TtSemiLepKinFitter_h
00002 #define TtSemiLepKinFitter_h
00003
00004 #include <vector>
00005
00006 #include "TLorentzVector.h"
00007
00008 #include "DataFormats/PatCandidates/interface/Lepton.h"
00009
00010 #include "AnalysisDataFormats/TopObjects/interface/TtSemiEvtSolution.h"
00011
00012 #include "TopQuarkAnalysis/TopKinFitter/interface/TopKinFitter.h"
00013
00014 class TAbsFitParticle;
00015 class TFitConstraintM;
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 class TtSemiLepKinFitter : public TopKinFitter {
00027
00028 public:
00029
00031 enum Constraint { kWHadMass = 1, kWLepMass, kTopHadMass, kTopLepMass, kNeutrinoMass, kEqualTopMasses };
00032
00033 public:
00035 explicit TtSemiLepKinFitter();
00037 explicit TtSemiLepKinFitter(Param jetParam, Param lepParam, Param metParam, int maxNrIter, double maxDeltaS, double maxF,
00038 std::vector<Constraint> constraints, double mW=80.4, double mTop=173.);
00040 ~TtSemiLepKinFitter();
00041
00043 template <class LeptonType> int fit(const std::vector<pat::Jet>& jets, const pat::Lepton<LeptonType>& leps, const pat::MET& met, const double jetResolutionSmearFactor);
00044
00045 const pat::Particle fittedHadB() const { return (fitter_->getStatus()==0 ? fittedHadB_ : pat::Particle()); };
00046
00047 const pat::Particle fittedHadP() const { return (fitter_->getStatus()==0 ? fittedHadP_ : pat::Particle()); };
00048
00049 const pat::Particle fittedHadQ() const { return (fitter_->getStatus()==0 ? fittedHadQ_ : pat::Particle()); };
00050
00051 const pat::Particle fittedLepB() const { return (fitter_->getStatus()==0 ? fittedLepB_ : pat::Particle()); };
00052
00053 const pat::Particle fittedLepton() const { return (fitter_->getStatus()==0 ? fittedLepton_ : pat::Particle()); };
00054
00055 const pat::Particle fittedNeutrino() const { return (fitter_->getStatus()==0 ? fittedNeutrino_ : pat::Particle()); };
00057 TtSemiEvtSolution addKinFitInfo(TtSemiEvtSolution* asol, const double jetResolutionSmearFactor=1.);
00058
00059 private:
00061 void printSetup() const;
00063 void setupFitter();
00065 void setupJets();
00067 void setupLeptons();
00069 void setupConstraints();
00070
00071 private:
00072
00073 TAbsFitParticle* hadB_;
00074 TAbsFitParticle* hadP_;
00075 TAbsFitParticle* hadQ_;
00076 TAbsFitParticle* lepB_;
00077 TAbsFitParticle* lepton_;
00078 TAbsFitParticle* neutrino_;
00079
00080 std::map<Constraint, TFitConstraintM*> massConstr_;
00081
00082 pat::Particle fittedHadB_;
00083 pat::Particle fittedHadP_;
00084 pat::Particle fittedHadQ_;
00085 pat::Particle fittedLepB_;
00086 pat::Particle fittedLepton_;
00087 pat::Particle fittedNeutrino_;
00089 Param jetParam_;
00091 Param lepParam_;
00093 Param metParam_;
00095 std::vector<Constraint> constrList_;
00096 };
00097
00098 #endif