File indexing completed on 2025-08-05 08:19:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "JetScapeEvent.h"
0017 #include <iostream>
0018
0019 using namespace std;
0020
0021 namespace Jetscape {
0022
0023 JetScapeEvent::JetScapeEvent() {}
0024
0025 JetScapeEvent::JetScapeEvent(const JetScapeEvent &c) {
0026 partonCollection.clear();
0027 const vector<Parton> tmp = c.getPartonCollection();
0028 for (unsigned int ipart = 0; ipart < tmp.size(); ipart++) {
0029 partonCollection.push_back(c.getParton(ipart));
0030 }
0031 }
0032
0033 JetScapeEvent::~JetScapeEvent() { partonCollection.clear(); }
0034
0035 const vector<Parton> &JetScapeEvent::getPartonCollection() const {
0036 return partonCollection;
0037 }
0038
0039 const Parton &JetScapeEvent::getParton(int idx) const {
0040 return partonCollection.at(idx);
0041 }
0042
0043 void JetScapeEvent::addParton(Parton &p) { partonCollection.push_back(p); }
0044
0045 void JetScapeEvent::addPartonShower(shared_ptr<PartonShower> ps) {
0046 for (unsigned int ipart = 0; ipart < ps->GetNumberOfPartons(); ipart++) {
0047 partonCollection.push_back(*(ps->GetPartonAt(ipart)));
0048 }
0049 }
0050
0051 void JetScapeEvent::deleteParton(int idx) {
0052 partonCollection.erase(partonCollection.begin() + idx);
0053 }
0054
0055 }