/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtStringParticle.cc

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 // Environment:
00004 //      This software is part of the EvtGen package developed jointly
00005 //      for the BaBar and CLEO collaborations.  If you use all or part
00006 //      of it, please give an appropriate acknowledgement.
00007 //
00008 // Copyright Information: See EvtGen/COPYRIGHT
00009 //      Copyright (C) 1998      Caltech, UCSB
00010 //
00011 // Module: EvtStringParticle.cc
00012 //
00013 // Description: Class to describe the partons that are produced in JetSet.
00014 //
00015 // Modification history:
00016 //
00017 //    RYD       Febuary 27,1998       Module created
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 

Generated on Tue Nov 29 23:12:15 2016 for BOSS_7.0.2 by  doxygen 1.4.7