StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjMCParticleToStMuTrackFourVec.h
1 // -*- mode:c++ -*-
2 
3 //
4 // Pibero Djawotho <pibero@tamu.edu>
5 // Texas A&M University
6 // 26 Jan 2011
7 //
8 
9 #ifndef STJ_MC_PARTICLE_TO_ST_MU_TRACK_FOUR_VEC_H
10 #define STJ_MC_PARTICLE_TO_ST_MU_TRACK_FOUR_VEC_H
11 
12 #include "TLorentzVector.h"
13 #include "StMuTrackFourVec.h"
14 #include "StjMCParticleList.h"
15 
17  StMuTrackFourVec* operator()(const StjMCParticle& mcparticle) const
18  {
19  TLorentzVector p;
20  p.SetPtEtaPhiM(mcparticle.pt,mcparticle.eta,mcparticle.phi,mcparticle.m);
21  StMcTrackEmu* mctrack = new StMcTrackEmu;
22  mctrack->_pt = mcparticle.pt;
23  mctrack->_eta = mcparticle.eta;
24  mctrack->_phi = mcparticle.phi;
25  mctrack->_m = mcparticle.m;
26  mctrack->_e = mcparticle.e;
27  mctrack->_id = mcparticle.mcparticleId;
28  mctrack->_pdg = mcparticle.pdg;
29  mctrack->_status = mcparticle.status;
30  mctrack->_firstMother = mcparticle.firstMotherId;
31  mctrack->_lastMother = mcparticle.lastMotherId;
32  mctrack->_firstDaughter = mcparticle.firstDaughterId;
33  mctrack->_lastDaughter = mcparticle.lastDaughterId;
34  return new StMuTrackFourVec(0,0,mctrack,p,0,mcparticle.mcparticleId-1,kUnknownId);
35  }
36 };
37 
38 #endif // STJ_MC_PARTICLE_TO_ST_MU_TRACK_FOUR_VEC_H