#include <RecoVertex/TertiaryTracksVertexFinder/interface/VertexMass.h>
Public Member Functions | |
double | operator() (const TransientVertex &) const |
VertexMass (double pionMass) | |
VertexMass () | |
~VertexMass () | |
Private Attributes | |
double | thePionMass |
Definition at line 6 of file VertexMass.h.
VertexMass::VertexMass | ( | ) |
VertexMass::VertexMass | ( | double | pionMass | ) |
VertexMass::~VertexMass | ( | ) | [inline] |
double VertexMass::operator() | ( | const TransientVertex & | vtx | ) | const |
Definition at line 10 of file VertexMass.cc.
References TrajectoryStateOnSurface::globalMomentum(), reco::TransientTrack::impactPointState(), it, TransientVertex::originalTracks(), funct::sqrt(), thePionMass, track, tracks, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
00011 { 00012 00013 std::vector<reco::TransientTrack> tracks = vtx.originalTracks(); 00014 00015 double esum=0., pxsum=0., pysum=0., pzsum=0.; 00016 00017 for(std::vector<reco::TransientTrack>::const_iterator it=tracks.begin(); 00018 it!=tracks.end();it++) { 00019 reco::TransientTrack track = *it; 00020 00021 double px = track.impactPointState().globalMomentum().x(); 00022 double py = track.impactPointState().globalMomentum().y(); 00023 double pz = track.impactPointState().globalMomentum().z(); 00024 00025 pxsum += px; 00026 pysum += py; 00027 pzsum += pz; 00028 esum += sqrt(px*px + py*py + pz*pz + thePionMass*thePionMass); 00029 } 00030 00031 return sqrt(esum*esum - (pxsum*pxsum + pysum*pysum + pzsum*pzsum)); 00032 }
double VertexMass::thePionMass [private] |