00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "EvtGenBase/EvtPatches.hh"
00022 #include <iostream>
00023 #include <math.h>
00024 #include <stdlib.h>
00025 #include "EvtGenBase/EvtStringParticle.hh"
00026 #include "EvtGenBase/EvtVector4R.hh"
00027
00028
00029 EvtStringParticle::~EvtStringParticle(){
00030
00031 if (_npartons!=0){
00032
00033 delete [] _p4partons;
00034 delete [] _idpartons;
00035
00036 }
00037
00038 }
00039
00040
00041 EvtStringParticle::EvtStringParticle(){
00042
00043 _p4partons=0;
00044 _idpartons=0;
00045 _npartons=0;
00046
00047 return;
00048
00049 }
00050
00051 void EvtStringParticle::init(EvtId id, const EvtVector4R& p4){
00052
00053 _validP4=true;
00054 setp(p4);
00055 setpart_num(id);
00056
00057 }
00058
00059
00060 void EvtStringParticle::initPartons(int npartons,
00061 EvtVector4R* p4partons,EvtId* idpartons){
00062
00063 _p4partons = new EvtVector4R[npartons];
00064 _idpartons = new EvtId[npartons];
00065
00066 int i;
00067
00068 _npartons=npartons;
00069
00070 for(i=0;i<npartons;i++){
00071
00072 _p4partons[i]=p4partons[i];
00073 _idpartons[i]=idpartons[i];
00074
00075 }
00076
00077 }
00078
00079 int EvtStringParticle::getNPartons(){
00080
00081 return _npartons;
00082
00083 }
00084
00085 EvtId EvtStringParticle::getIdParton(int i){
00086
00087 return _idpartons[i];
00088
00089 }
00090
00091 EvtVector4R EvtStringParticle::getP4Parton(int i){
00092
00093 return _p4partons[i];
00094
00095 }
00096
00097 EvtSpinDensity EvtStringParticle::rotateToHelicityBasis() const{
00098
00099 report(ERROR,"EvtGen") << "rotateToHelicityBasis not implemented for strin particle.";
00100 report(ERROR,"EvtGen") << "Will terminate execution.";
00101
00102 ::abort();
00103
00104 EvtSpinDensity rho;
00105 return rho;
00106
00107 }
00108
00109 EvtSpinDensity EvtStringParticle::rotateToHelicityBasis(double alpha,
00110 double beta,
00111 double gamma) const{
00112
00113 report(ERROR,"EvtGen") << "rotateToHelicityBasis(alpha,beta,gamma) not implemented for string particle.";
00114 report(ERROR,"EvtGen") << "Will terminate execution.";
00115
00116 ::abort();
00117
00118 EvtSpinDensity rho;
00119 return rho;
00120
00121 }
00122
00123