00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include "StPythiaEvent.h"
00039
00040 ClassImp(StPythiaEvent);
00041
00042 StPythiaEvent::StPythiaEvent()
00043 {
00044 mParticles = new TClonesArray("TParticle");
00045
00046 Clear();
00047 }
00048
00049 StPythiaEvent::~StPythiaEvent()
00050 {
00051 Clear();
00052
00053 if (mParticles) { delete mParticles; mParticles = 0; }
00054 }
00055
00056 StPythiaEvent::StPythiaEvent(const StPythiaEvent& t)
00057 {
00058 mRunId = t.mRunId;
00059 mEventId = t.mEventId;
00060 mProcessId = t.mProcessId;
00061 mTune = t.mTune;
00062 mVertex = t.mVertex;
00063 mS = t.mS;
00064 mT = t.mT;
00065 mU = t.mU;
00066 mPt = t.mPt;
00067 mCosTheta = t.mCosTheta;
00068 mX1 = t.mX1;
00069 mX2 = t.mX2;
00070 mMstu72 = t.mMstu72;
00071 mMstu73 = t.mMstu73;
00072 mMstp111 = t.mMstp111;
00073 mPartonALL = t.mPartonALL;
00074
00075 for(int i=0; i<NPDF; i++) {
00076 mDF1[i] = t.mDF1[i];
00077 mDF2[i] = t.mDF2[i];
00078 }
00079
00080 for(int i=0; i<2; i++) {
00081 mF1[i] = t.mF1[i];
00082 mF2[i] = t.mF2[i];
00083 }
00084
00085 mParticles = new TClonesArray("TParticle");
00086
00087 for (int i = 0; i < t.mParticles->GetEntriesFast(); ++i) {
00088 TParticle* p = (TParticle*)t.mParticles->At(i);
00089 new ((*mParticles)[i]) TParticle(*p);
00090 }
00091 }
00092
00093 StPythiaEvent& StPythiaEvent::operator=(const StPythiaEvent& rhs)
00094 {
00095 if(this == &rhs) return *this;
00096
00097 mRunId = rhs.mRunId;
00098 mEventId = rhs.mEventId;
00099 mProcessId = rhs.mProcessId;
00100 mTune = rhs.mTune;
00101 mVertex = rhs.mVertex;
00102 mS = rhs.mS;
00103 mT = rhs.mT;
00104 mU = rhs.mU;
00105 mPt = rhs.mPt;
00106 mCosTheta = rhs.mCosTheta;
00107 mX1 = rhs.mX1;
00108 mX2 = rhs.mX2;
00109 mMstu72 = rhs.mMstu72;
00110 mMstu73 = rhs.mMstu73;
00111 mMstp111 = rhs.mMstp111;
00112 mPartonALL = rhs.mPartonALL;
00113
00114 for(int i=0; i<NPDF; i++) {
00115 mDF1[i] = rhs.mDF1[i];
00116 mDF2[i] = rhs.mDF2[i];
00117 }
00118
00119 for(int i=0; i<2; i++) {
00120 mF1[i] = rhs.mF1[i];
00121 mF2[i] = rhs.mF2[i];
00122 }
00123
00124 mParticles->Clear();
00125
00126 for (int i = 0; i < rhs.mParticles->GetEntriesFast(); ++i) {
00127 TParticle* p = (TParticle*)rhs.mParticles->At(i);
00128 new ((*mParticles)[i]) TParticle(*p);
00129 }
00130
00131 return *this;
00132 }