CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/TopQuarkAnalysis/TopKinFitter/interface/TtFullLepKinSolver.h

Go to the documentation of this file.
00001 //based on a code by Jan Valenta
00002 #ifndef TtFullLepKinSolver_h
00003 #define TtFullLepKinSolver_h
00004 
00005 #include "AnalysisDataFormats/TopObjects/interface/TtDilepEvtSolution.h"
00006 #include "DataFormats/Candidate/interface/LeafCandidate.h"
00007 
00008 #include "TLorentzVector.h"
00009 #include "TMath.h"
00010 
00011 class TF2;
00012 
00013 class TtFullLepKinSolver {
00014 
00015  public:
00016  
00017   TtFullLepKinSolver();
00018   TtFullLepKinSolver(double,double,double,std::vector<double>);
00019   ~TtFullLepKinSolver();
00020   
00021   inline void useWeightFromMC(bool useMC) { useMCforBest_ = useMC; }
00022   TtDilepEvtSolution addKinSolInfo(TtDilepEvtSolution * asol); 
00023   
00024   void SetConstraints(double xx=0, double yy=0);
00025   
00026   struct NeutrinoSolution {
00027     double weight;
00028     reco::LeafCandidate neutrino;
00029     reco::LeafCandidate neutrinoBar; 
00030   };
00031   
00032   NeutrinoSolution getNuSolution(TLorentzVector LV_l, 
00033                                  TLorentzVector LV_l_, 
00034                                  TLorentzVector LV_b, 
00035                                  TLorentzVector LV_b_);                           
00036                              
00037  private:
00038   void FindCoeff(const TLorentzVector al, 
00039                  const TLorentzVector l,
00040                  const TLorentzVector b_al,
00041                  const TLorentzVector b_l,
00042                  double mt, double mat, double pxboost, double pyboost,
00043                  double* q_coeff);
00044   void TopRec(const TLorentzVector al, 
00045               const TLorentzVector l,
00046               const TLorentzVector b_al,
00047               const TLorentzVector b_l, double sol);
00048   double WeightSolfromMC();
00049   double WeightSolfromShape();
00050     
00051   int quartic(double* q_coeff, double* q_sol);
00052   int cubic(double* c_coeff, double* c_sol);
00053   
00054   //Utility Methods
00055   double sqr(double x) {return (x*x);}
00056   void SWAP(double& realone, double& realtwo);
00057     
00058  private:
00059   double topmass_begin;
00060   double topmass_end;
00061   double topmass_step;
00062   double pxmiss_, pymiss_;
00063   
00064   double mw, maw, mb, mab;
00065   
00066   double C;
00067   double D;
00068   double F;
00069   double pom;
00070   double k16;
00071   double k26;
00072   double k36;
00073   double k46;
00074   double k56;
00075   double k51;
00076   double k61;
00077   double m1;
00078   double m2;
00079   double m3;
00080   double n1;
00081   double n2;
00082   double n3;
00083   
00084   TLorentzVector LV_n, LV_n_, LV_t, LV_t_, LV_tt_t, LV_tt_t_;  
00085   //provisional
00086   TLorentzVector genLV_n, genLV_n_;  
00087     
00088   // flag to swith from WeightSolfromMC() to WeightSolfromShape()
00089   bool useMCforBest_;
00090   // Event shape
00091   TF2* EventShape_;  
00092 };
00093 
00094 
00095 #endif