CMS 3D CMS Logo

TtFullLepKinSolver.h
Go to the documentation of this file.
1 #ifndef TtFullLepKinSolver_h
2 #define TtFullLepKinSolver_h
3 
6 
7 #include "TLorentzVector.h"
8 #include "TMath.h"
9 
10 class TF2;
11 
12 /*
13  \class TtFullLepKinSolver TtFullLepKinSolver.h "TopQuarkAnalysis/TopKinFitter/interface/TtFullLepKinSolver.h"
14 
15  \brief Class to calculate solutions for neutrino momenta in dileptonic ttbar events and related probability weights
16 
17  Class to calculate solutions for neutrino momenta in dileptonic ttbar events and related probability weights.
18  A fourth-order polynomial in p_x(nu) is used with coefficients that are functions of the top-quark mass.
19  If physical (non-imaginary) solutions are found, the neutrino momenta are compared to the expected neutrino spectrum
20  (from simulation) to obtain a probability weight for each solution.
21  This class is based on a code by Jan Valenta.
22 
23 **/
24 
26 public:
29  double weight;
32  };
33 
38  const double, const double, const double, const std::vector<double>&, const double = 80.4, const double = 4.8);
41 
43  inline void useWeightFromMC(bool useMC) { useMCforBest_ = useMC; }
47  void SetConstraints(const double xx = 0, const double yy = 0);
49  NeutrinoSolution getNuSolution(const TLorentzVector& LV_l,
50  const TLorentzVector& LV_l_,
51  const TLorentzVector& LV_b,
52  const TLorentzVector& LV_b_);
53 
54 private:
56  void FindCoeff(const TLorentzVector& al,
57  const TLorentzVector& l,
58  const TLorentzVector& b_al,
59  const TLorentzVector& b_l,
60  const double mt,
61  const double mat,
62  const double pxboost,
63  const double pyboost,
64  double* q_coeff);
66  void TopRec(const TLorentzVector& al,
67  const TLorentzVector& l,
68  const TLorentzVector& b_al,
69  const TLorentzVector& b_l,
70  const double sol);
72  double WeightSolfromMC() const;
74  double WeightSolfromShape() const;
76  int quartic(double* q_coeff, double* q_sol) const;
78  int cubic(const double* c_coeff, double* c_sol) const;
80  double sqr(const double x) const { return (x * x); }
82  void SWAP(double& realone, double& realtwo) const;
83 
84 private:
86  const double topmass_begin;
88  const double topmass_end;
90  const double topmass_step;
92  const double mw;
94  const double mb;
96  double pxmiss_, pymiss_;
97 
98  double C;
99  double D;
100  double F;
101  double pom;
102  double k16;
103  double k26;
104  double k36;
105  double k46;
106  double k56;
107  double k51;
108  double k61;
109  double m1;
110  double m2;
111  double m3;
112  double n1;
113  double n2;
114  double n3;
115 
117  TLorentzVector LV_n, LV_n_, LV_t, LV_t_, LV_tt_t, LV_tt_t_;
119  TLorentzVector genLV_n, genLV_n_;
120 
125 };
126 
127 #endif
TtFullLepKinSolver::~TtFullLepKinSolver
~TtFullLepKinSolver()
destructor
Definition: TtFullLepKinSolver.cc:22
TtFullLepKinSolver::LV_n
TLorentzVector LV_n
Definition: TtFullLepKinSolver.h:117
TtFullLepKinSolver::topmass_begin
const double topmass_begin
Definition: TtFullLepKinSolver.h:86
TtFullLepKinSolver::sqr
double sqr(const double x) const
Definition: TtFullLepKinSolver.h:80
TtFullLepKinSolver::m2
double m2
Definition: TtFullLepKinSolver.h:110
TtFullLepKinSolver::k46
double k46
Definition: TtFullLepKinSolver.h:105
TtFullLepKinSolver::mb
const double mb
Definition: TtFullLepKinSolver.h:94
TtFullLepKinSolver::addKinSolInfo
TtDilepEvtSolution addKinSolInfo(TtDilepEvtSolution *asol)
Definition: TtFullLepKinSolver.cc:24
TtFullLepKinSolver::useWeightFromMC
void useWeightFromMC(bool useMC)
Definition: TtFullLepKinSolver.h:43
TtFullLepKinSolver::pymiss_
double pymiss_
Definition: TtFullLepKinSolver.h:96
TtFullLepKinSolver::k61
double k61
Definition: TtFullLepKinSolver.h:108
TtFullLepKinSolver::SetConstraints
void SetConstraints(const double xx=0, const double yy=0)
Definition: TtFullLepKinSolver.cc:120
TtFullLepKinSolver::C
double C
Definition: TtFullLepKinSolver.h:98
TtFullLepKinSolver::NeutrinoSolution::neutrino
reco::LeafCandidate neutrino
Definition: TtFullLepKinSolver.h:30
DDAxes::x
PatBasicFWLiteJetAnalyzer_Selector_cfg.useMC
useMC
Definition: PatBasicFWLiteJetAnalyzer_Selector_cfg.py:36
TtFullLepKinSolver::useMCforBest_
bool useMCforBest_
flag to swith from WeightSolfromMC() to WeightSolfromShape()
Definition: TtFullLepKinSolver.h:122
TtFullLepKinSolver::genLV_n_
TLorentzVector genLV_n_
Definition: TtFullLepKinSolver.h:119
TtFullLepKinSolver::F
double F
Definition: TtFullLepKinSolver.h:100
TtFullLepKinSolver::D
double D
Definition: TtFullLepKinSolver.h:99
TtFullLepKinSolver::k16
double k16
Definition: TtFullLepKinSolver.h:102
TtFullLepKinSolver::NeutrinoSolution::weight
double weight
Definition: TtFullLepKinSolver.h:29
TtFullLepKinSolver::topmass_end
const double topmass_end
Definition: TtFullLepKinSolver.h:88
TtFullLepKinSolver::FindCoeff
void FindCoeff(const TLorentzVector &al, const TLorentzVector &l, const TLorentzVector &b_al, const TLorentzVector &b_l, const double mt, const double mat, const double pxboost, const double pyboost, double *q_coeff)
Definition: TtFullLepKinSolver.cc:157
TtFullLepKinSolver::pxmiss_
double pxmiss_
Definition: TtFullLepKinSolver.h:96
TtFullLepKinSolver::getNuSolution
NeutrinoSolution getNuSolution(const TLorentzVector &LV_l, const TLorentzVector &LV_l_, const TLorentzVector &LV_b, const TLorentzVector &LV_b_)
Definition: TtFullLepKinSolver.cc:125
TtFullLepKinSolver::NeutrinoSolution
Definition: TtFullLepKinSolver.h:28
TtFullLepKinSolver::LV_t
TLorentzVector LV_t
Definition: TtFullLepKinSolver.h:117
LeafCandidate.h
TtFullLepKinSolver::m1
double m1
Definition: TtFullLepKinSolver.h:109
TtFullLepKinSolver::mw
const double mw
Definition: TtFullLepKinSolver.h:92
TtFullLepKinSolver::k56
double k56
Definition: TtFullLepKinSolver.h:106
TtFullLepKinSolver::WeightSolfromMC
double WeightSolfromMC() const
Definition: TtFullLepKinSolver.cc:305
TtFullLepKinSolver::LV_n_
TLorentzVector LV_n_
Definition: TtFullLepKinSolver.h:117
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
TtFullLepKinSolver::quartic
int quartic(double *q_coeff, double *q_sol) const
Definition: TtFullLepKinSolver.cc:314
TtFullLepKinSolver::TtFullLepKinSolver
TtFullLepKinSolver()
default constructor
Definition: TtFullLepKinSolver.cc:4
TtFullLepKinSolver::NeutrinoSolution::neutrinoBar
reco::LeafCandidate neutrinoBar
Definition: TtFullLepKinSolver.h:31
TtFullLepKinSolver::LV_tt_t
TLorentzVector LV_tt_t
Definition: TtFullLepKinSolver.h:117
TtFullLepKinSolver::TopRec
void TopRec(const TLorentzVector &al, const TLorentzVector &l, const TLorentzVector &b_al, const TLorentzVector &b_l, const double sol)
Definition: TtFullLepKinSolver.cc:275
TtFullLepKinSolver::cubic
int cubic(const double *c_coeff, double *c_sol) const
Definition: TtFullLepKinSolver.cc:372
TtFullLepKinSolver::SWAP
void SWAP(double &realone, double &realtwo) const
Definition: TtFullLepKinSolver.cc:450
TtFullLepKinSolver::n3
double n3
Definition: TtFullLepKinSolver.h:114
TtFullLepKinSolver::n2
double n2
Definition: TtFullLepKinSolver.h:113
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
TtFullLepKinSolver::LV_tt_t_
TLorentzVector LV_tt_t_
Definition: TtFullLepKinSolver.h:117
TtFullLepKinSolver::genLV_n
TLorentzVector genLV_n
provisional
Definition: TtFullLepKinSolver.h:119
TtFullLepKinSolver::topmass_step
const double topmass_step
Definition: TtFullLepKinSolver.h:90
TtSemiLepEvtBuilder_cfi.mt
mt
Definition: TtSemiLepEvtBuilder_cfi.py:47
TtFullLepKinSolver::LV_t_
TLorentzVector LV_t_
Definition: TtFullLepKinSolver.h:117
TtFullLepKinSolver::k51
double k51
Definition: TtFullLepKinSolver.h:107
TtFullLepKinSolver::m3
double m3
Definition: TtFullLepKinSolver.h:111
reco::LeafCandidate
Definition: LeafCandidate.h:16
TtFullLepKinSolver::n1
double n1
Definition: TtFullLepKinSolver.h:112
TtFullLepKinSolver::k26
double k26
Definition: TtFullLepKinSolver.h:103
TtFullLepKinSolver::k36
double k36
Definition: TtFullLepKinSolver.h:104
TtFullLepKinSolver::WeightSolfromShape
double WeightSolfromShape() const
use the parametrized event shape to obtain the solution weight.
Definition: TtFullLepKinSolver.cc:312
TtFullLepKinSolver::pom
double pom
Definition: TtFullLepKinSolver.h:101
TtFullLepKinSolver::EventShape_
TF2 * EventShape_
Event shape.
Definition: TtFullLepKinSolver.h:124
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
TtFullLepKinSolver
Definition: TtFullLepKinSolver.h:25
TtDilepEvtSolution
Definition: TtDilepEvtSolution.h:25
TtDilepEvtSolution.h