00001
00002
00003
00004
00006 #include <Stiostream.h>
00007 #include <math.h>
00008 #include "StPeCParticle.h"
00009 #include "tables/St_g2t_track_Table.h"
00010
00011
00012 ClassImp(StPeCParticle)
00013
00014 StPeCParticle::StPeCParticle() {
00015 }
00016
00017 StPeCParticle::~StPeCParticle() {
00018 }
00019
00020 #ifndef __CINT__
00021 StPeCParticle::StPeCParticle ( g2t_track_st* trk) {
00022 set ( trk ) ;
00023 }
00024 void StPeCParticle::set ( g2t_track_st* trk) {
00025
00026 pid = trk->ge_pid ;
00027 key = trk->id ;
00028 pt = trk->pt ;
00029 eta = trk->eta ;
00030 e = trk->e ;
00031 psi = atan2(trk->p[1],trk->p[0]);
00032 if ( psi < 0 ) psi += 2. * M_PI ;
00033 vertexId = trk->start_vertex_p ;
00034
00035 nTpcHits = trk->n_tpc_hit ;
00036 nFtpHits = trk->n_ftp_hit ;
00037 nSvtHits = trk->n_svt_hit ;
00038
00039 charge = (Short_t)trk->charge ;
00040 }
00041 #endif
00042
00043
00044
00045