StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjMCParticleListToFourVecList.cxx
1 // $Id: StjMCParticleListToFourVecList.cxx,v 1.1 2008/11/27 07:40:06 tai Exp $
2 #include "StjMCParticleListToFourVecList.h"
3 
4 #include "StjMCParticleToFourVec.h"
5 
7 
8 StjFourVecList StjMCParticleListToFourVecList::operator()(const StjMCParticleList& mcparticleList)
9 {
10  StjFourVecList ret;
11 
12  StjMCParticleToFourVec mcparticle2four;
13 
14  int fourvecId(1);
15  for(StjMCParticleList::const_iterator mcparticle = mcparticleList.begin(); mcparticle != mcparticleList.end(); ++mcparticle) {
16  StjFourVec four = mcparticle2four(*mcparticle);
17  four.fourvecId = fourvecId++;
18  ret.push_back(four);
19  }
20 
21 
22  return ret;
23 }