StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTrackToFourVec.cxx
1 // $Id: StjTrackToFourVec.cxx,v 1.1 2008/11/27 07:09:37 tai Exp $
2 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
3 #include "StjTrackToFourVec.h"
4 
5 ClassImp(StjTrackToFourVec)
6 
7 #include "StjTrackList.h"
8 #include "StjFourVecList.h"
9 
10 StjFourVec StjTrackToFourVec::operator()(const StjTrack& track)
11 {
12  StjFourVec ret;
13  ret.runNumber = track.runNumber;
14  ret.eventId = track.eventId;
15  ret.type = 1;
16  ret.detectorId = track.detectorId;
17  ret.trackId = track.id;
18  ret.towerId = 0;
19  ret.vertexZ = track.vertexZ;
20 
21  TLorentzVector p4(_track2tlorentzvector(track));
22  ret.pt = p4.Pt();
23  ret.eta = p4.Eta();
24  ret.phi = p4.Phi();
25  ret.m = p4.M();
26  return ret;
27 }