Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoVertex
TertiaryTracksVertexFinder
src
VertexMass.cc
Go to the documentation of this file.
1
#include "
RecoVertex/TertiaryTracksVertexFinder/interface/VertexMass.h
"
2
3
#include "
RecoVertex/VertexPrimitives/interface/TransientVertex.h
"
4
#include "
TrackingTools/TransientTrack/interface/TransientTrack.h
"
5
6
VertexMass::VertexMass
() : thePionMass(0.13957) {}
7
8
VertexMass::VertexMass
(
double
pionMass) : thePionMass(pionMass) {}
9
10
double
VertexMass::operator()
(
const
TransientVertex
& vtx)
const
11
{
12
13
std::vector<reco::TransientTrack>
tracks
= vtx.
originalTracks
();
14
15
double
esum=0., pxsum=0., pysum=0., pzsum=0.;
16
17
for
(std::vector<reco::TransientTrack>::const_iterator it=tracks.begin();
18
it!=tracks.end();it++) {
19
reco::TransientTrack
track = *it;
20
21
double
px = track.
impactPointState
().
globalMomentum
().
x
();
22
double
py = track.
impactPointState
().
globalMomentum
().
y
();
23
double
pz = track.
impactPointState
().
globalMomentum
().
z
();
24
25
pxsum += px;
26
pysum += py;
27
pzsum += pz;
28
esum +=
sqrt
(px*px + py*py + pz*pz +
thePionMass
*
thePionMass
);
29
}
30
31
return
sqrt
(esum*esum - (pxsum*pxsum + pysum*pysum + pzsum*pzsum));
32
}
TransientTrack.h
PV3DBase::y
T y() const
Definition:
PV3DBase.h:63
VertexMass.h
TransientVertex.h
TransientVertex::originalTracks
std::vector< reco::TransientTrack > const & originalTracks() const
Definition:
TransientVertex.h:140
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:48
PV3DBase::z
T z() const
Definition:
PV3DBase.h:64
reco::TransientTrack
Definition:
TransientTrack.h:21
testEve_cfg.tracks
tuple tracks
Definition:
testEve_cfg.py:39
TransientVertex
Definition:
TransientVertex.h:17
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition:
TrajectoryStateOnSurface.h:147
VertexMass::thePionMass
double thePionMass
Definition:
VertexMass.h:20
VertexMass::operator()
double operator()(const TransientVertex &) const
Definition:
VertexMass.cc:10
reco::TransientTrack::impactPointState
TrajectoryStateOnSurface impactPointState() const
Definition:
TransientTrack.h:94
PV3DBase::x
T x() const
Definition:
PV3DBase.h:62
VertexMass::VertexMass
VertexMass()
Definition:
VertexMass.cc:6
Generated for CMSSW Reference Manual by
1.8.5