CMS 3D CMS Logo

Public Member Functions | Private Attributes

VertexMass Class Reference

#include <VertexMass.h>

List of all members.

Public Member Functions

double operator() (const TransientVertex &) const
 VertexMass (double pionMass)
 VertexMass ()
 ~VertexMass ()

Private Attributes

double thePionMass

Detailed Description

Definition at line 6 of file VertexMass.h.


Constructor & Destructor Documentation

VertexMass::VertexMass ( )

Definition at line 6 of file VertexMass.cc.

: thePionMass(0.13957) {}
VertexMass::VertexMass ( double  pionMass)

Definition at line 8 of file VertexMass.cc.

: thePionMass(pionMass) {}
VertexMass::~VertexMass ( ) [inline]

Definition at line 14 of file VertexMass.h.

{};

Member Function Documentation

double VertexMass::operator() ( const TransientVertex vtx) const

Definition at line 10 of file VertexMass.cc.

References TrajectoryStateOnSurface::globalMomentum(), reco::TransientTrack::impactPointState(), TransientVertex::originalTracks(), mathSSE::sqrt(), thePionMass, testEve_cfg::tracks, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

{

  std::vector<reco::TransientTrack> tracks = vtx.originalTracks();

  double esum=0., pxsum=0., pysum=0., pzsum=0.;

  for(std::vector<reco::TransientTrack>::const_iterator it=tracks.begin();
      it!=tracks.end();it++) {
    reco::TransientTrack track = *it;

    double px = track.impactPointState().globalMomentum().x();
    double py = track.impactPointState().globalMomentum().y();
    double pz = track.impactPointState().globalMomentum().z();

    pxsum += px;
    pysum += py;
    pzsum += pz;
    esum += sqrt(px*px + py*py + pz*pz + thePionMass*thePionMass);
  }
  
  return sqrt(esum*esum - (pxsum*pxsum + pysum*pysum + pzsum*pzsum));
}

Member Data Documentation

double VertexMass::thePionMass [private]

Definition at line 20 of file VertexMass.h.

Referenced by operator()().