HackAnalysis
2
include
kinematics.h
1
#pragma once
2
/*
3
4
Routines for computing various kinematic variables of use
5
6
*/
7
8
#include "heputil.h"
9
#include "math.h"
10
11
12
/*
13
double mct_330 (const LorentzTransverseVector& a,
14
const LorentzTransverseVector& b) {
15
const double mctsq = mct_330_Sq(a, b);
16
// if less than zero, this is only evidence of inexact maths:
17
if (mctsq<=0) {
18
return 0;
19
} else {
20
return sqrt(mctsq);
21
}
22
}
23
24
double mct_330_Sq(const LorentzTransverseVector& a,
25
const LorentzTransverseVector& b) {
26
return a.masssq() + b.masssq() + 2.0*a.contralinearDot(b);
27
}
28
29
*/
30
31
32
namespace
HEP
{
33
34
35
/*
36
double mTcalc(MALorentzVector &v1, MALorentzVector &v2)
37
{
38
// m_T^2(p_1, p_2) =& m_1^2 + m_2^2 + 2 m_T^{(1)} m_T^{(2)} - 2 |p_T^{(1)}| |p_T^{(2)}| \cos \phi_{12}
39
40
41
42
return sqrt(v1.M2()+v2.M2() + 2.0*mT(v1)*mT(v2) - 2.0*v1.Pt()*v2.Pt()*cos(v1.DeltaPhi(v2)));
43
44
};
45
*/
46
47
/*
48
// we only use mTcalc for leptonp and pTmiss so fudge it
49
double mTcalc(MALorentzVector &v1, MALorentzVector &v2)
50
{
51
// m_T^2(p_1, p_2) =& m_1^2 + m_2^2 + 2 m_T^{(1)} m_T^{(2)} - 2 |p_T^{(1)}| >
52
return sqrt(v1.M2() + 2.0*mT(v1)*v2.Pt() - 2.0*v1.Pt()*v2.Pt()*cos(v1.DeltaPhi(v2)));
53
54
55
};
56
*/
57
58
/* mT is defined in Vectors.h
59
double mT(MALorentzVector &v1)
60
{
61
return sqrt(v1.M2() + v1.Perp2());
62
}
63
*/
64
65
66
double
mCT2(
const
HEP::P4
&v1,
const
HEP::P4
&v2);
67
68
double
mCT(
const
HEP::P4
&v1,
const
HEP::P4
&v2);
69
70
71
72
73
//double HTjets(HEP::Event* event);
74
75
template
<
typename
T1>
double
HT(std::vector<T1*> v1)
// should be a vector of something that has the pT() method
76
{
77
double
ht=0.0;
78
79
for
(
auto
tv : v1)
80
{
81
ht += tv->pT();
82
}
83
return
ht;
84
85
}
86
87
88
89
};
HEP::P4
A 4-momentum class for vectors.
Definition:
Vectors.h:45
HEP
Modified by Mark Goodsell goodsell@lpthe.jussieu.fr
Definition:
ATLAS_SUSY_2018_16.cc:27
Generated by
1.9.1