2 #include "StjMCParticleListReader.h"
14 tree->SetBranchAddress(
"eventId" , &_eventId );
15 tree->SetBranchAddress(
"nMCParticles" , &_nMCParticles );
16 tree->SetBranchAddress(
"mcparticleId" , _mcparticleId );
17 tree->SetBranchAddress(
"status" , _status );
18 tree->SetBranchAddress(
"pdg" , _pdg );
19 tree->SetBranchAddress(
"pt" , _pt );
20 tree->SetBranchAddress(
"eta" , _eta );
21 tree->SetBranchAddress(
"phi" , _phi );
22 tree->SetBranchAddress(
"m" , _m );
23 tree->SetBranchAddress(
"e" , _e );
24 tree->SetBranchAddress(
"firstMotherId" , _firstMotherId );
25 tree->SetBranchAddress(
"lastMotherId" , _lastMotherId );
26 tree->SetBranchAddress(
"firstDaughterId" , _firstDaughterId );
27 tree->SetBranchAddress(
"lastDaughterId" , _lastDaughterId );
28 tree->SetBranchAddress(
"vertexZ" , &_vertexZ );
29 tree->SetBranchAddress(
"runNumber" , &_runNumber );
32 void StjMCParticleListReader::clearEntry()
37 void StjMCParticleListReader::readEntry()
41 for(
int i = 0; i < _nMCParticles; ++i) {
45 mcparticle.runNumber = _runNumber;
46 mcparticle.eventId = _eventId;
47 mcparticle.mcparticleId = _mcparticleId[i];
48 mcparticle.pdg = _pdg[i];
49 mcparticle.firstMotherId = _firstMotherId[i];
50 mcparticle.lastMotherId = _lastMotherId[i];
51 mcparticle.firstDaughterId = _firstDaughterId[i];
52 mcparticle.lastDaughterId = _lastDaughterId[i];
53 mcparticle.pt = _pt[i];
54 mcparticle.eta = _eta[i];
55 mcparticle.phi = _phi[i];
58 mcparticle.status = _status[i];
59 mcparticle.vertexZ = _vertexZ;
61 _list.push_back(mcparticle);