CMS 3D CMS Logo

VertexMass Class Reference

#include <RecoVertex/TertiaryTracksVertexFinder/interface/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.

00006 : thePionMass(0.13957) {}

VertexMass::VertexMass ( double  pionMass  ) 

Definition at line 8 of file VertexMass.cc.

00008 : thePionMass(pionMass) {}

VertexMass::~VertexMass (  )  [inline]

Definition at line 14 of file VertexMass.h.

00014 {};


Member Function Documentation

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 }


Member Data Documentation

double VertexMass::thePionMass [private]

Definition at line 20 of file VertexMass.h.

Referenced by operator()().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:35:00 2009 for CMSSW by  doxygen 1.5.4