3 #include "StProtoJet.h"
7 StProtoJet::StProtoJet()
8 : mPx(0), mPy(0), mPz(0), mE(0)
17 : mPx(particle->px()), mPy(particle->py()), mPz(particle->pz()), mE(particle->e())
18 , mArea(-1.), mAreaError(-1.)
19 , _charge(particle->charge())
21 _particleList.push_back(particle);
24 StProtoJet::~StProtoJet()
28 void StProtoJet::update()
30 mPx = mPy = mPz = mE = _charge = 0.;
32 for (FourVecList::const_iterator particle = _particleList.begin(); particle != _particleList.end(); ++particle) {
33 mPx += (*particle)->px();
34 mPy += (*particle)->py();
35 mPz += (*particle)->pz();
36 mE += (*particle)->e();
37 _charge += (*particle)->charge();
41 void StProtoJet::add(
const StProtoJet& protoJet)
47 _charge += protoJet._charge;
48 for (FourVecList::const_iterator particle = protoJet._particleList.begin(); particle != protoJet._particleList.end(); ++particle) {
49 _particleList.push_back(*particle);
59 _charge += particle.charge();
62 void StProtoJet::merge(
const StProtoJet& protoJet)
64 for (FourVecList::const_iterator particle = protoJet._particleList.begin(); particle != protoJet._particleList.end(); ++particle) {
65 _particleList.push_back(*particle);
66 mPx += (*particle)->px();
67 mPy += (*particle)->py();
68 mPz += (*particle)->pz();
69 mE += (*particle)->e();
70 _charge += (*particle)->charge();
74 void StProtoJet::clear()
76 _particleList.clear();
77 mPx = mPy = mPz = mE = _charge = 0;