File indexing completed on 2024-09-26 05:07:18
0001 #ifndef TtFullLepKinSolver_h
0002 #define TtFullLepKinSolver_h
0003
0004 #include "AnalysisDataFormats/TopObjects/interface/TtDilepEvtSolution.h"
0005 #include "DataFormats/Candidate/interface/LeafCandidate.h"
0006
0007 #include "TLorentzVector.h"
0008 #include "TMath.h"
0009
0010 class TF2;
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 class TtFullLepKinSolver {
0026 public:
0027
0028 struct NeutrinoSolution {
0029 double weight;
0030 reco::LeafCandidate neutrino;
0031 reco::LeafCandidate neutrinoBar;
0032 };
0033
0034
0035 TtFullLepKinSolver();
0036
0037 TtFullLepKinSolver(
0038 const double, const double, const double, const std::vector<double>&, const double = 80.4, const double = 4.8);
0039
0040 ~TtFullLepKinSolver();
0041
0042
0043 inline void useWeightFromMC(bool useMC) { useMCforBest_ = useMC; }
0044
0045 TtDilepEvtSolution addKinSolInfo(TtDilepEvtSolution* asol);
0046
0047 void SetConstraints(const double xx = 0, const double yy = 0);
0048
0049 NeutrinoSolution getNuSolution(const TLorentzVector& LV_l,
0050 const TLorentzVector& LV_l_,
0051 const TLorentzVector& LV_b,
0052 const TLorentzVector& LV_b_);
0053
0054 private:
0055
0056 void FindCoeff(const TLorentzVector& al,
0057 const TLorentzVector& l,
0058 const TLorentzVector& b_al,
0059 const TLorentzVector& b_l,
0060 const double mt,
0061 const double mat,
0062 const double pxboost,
0063 const double pyboost,
0064 double* q_coeff);
0065
0066 void TopRec(const TLorentzVector& al,
0067 const TLorentzVector& l,
0068 const TLorentzVector& b_al,
0069 const TLorentzVector& b_l,
0070 const double sol);
0071
0072 double WeightSolfromMC() const;
0073
0074 double WeightSolfromShape() const;
0075
0076 int quartic(double* q_coeff, double* q_sol) const;
0077
0078 unsigned int cubic(const double* c_coeff, double* c_sol) const;
0079
0080 double sqr(const double x) const { return (x * x); }
0081
0082 void SWAP(double& realone, double& realtwo) const;
0083
0084 private:
0085
0086 const double topmass_begin;
0087
0088 const double topmass_end;
0089
0090 const double topmass_step;
0091
0092 const double mw;
0093
0094 const double mb;
0095
0096 double pxmiss_, pymiss_;
0097
0098 double C;
0099 double D;
0100 double F;
0101 double pom;
0102 double k16;
0103 double k26;
0104 double k36;
0105 double k46;
0106 double k56;
0107 double k51;
0108 double k61;
0109 double m1;
0110 double m2;
0111 double m3;
0112 double n1;
0113 double n2;
0114 double n3;
0115
0116
0117 TLorentzVector LV_n, LV_n_, LV_t, LV_t_, LV_tt_t, LV_tt_t_;
0118
0119 TLorentzVector genLV_n, genLV_n_;
0120
0121
0122 bool useMCforBest_;
0123
0124 TF2* EventShape_;
0125 };
0126
0127 #endif