00001 #include "EvtGenBase/EvtPatches.hh"
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <iostream>
00023 #include <fstream>
00024 #include <stdlib.h>
00025 #include <ctype.h>
00026 #include "EvtGenBase/EvtPartProp.hh"
00027 #include "EvtGenBase/EvtAbsLineShape.hh"
00028 #include "EvtGenBase/EvtFlatLineShape.hh"
00029 #include "EvtGenBase/EvtManyDeltaFuncLineShape.hh"
00030 #include "EvtGenBase/EvtRelBreitWignerBarrierFact.hh"
00031 #include <string>
00032 using std::fstream;
00033
00034 EvtPartProp::EvtPartProp():
00035 _id(-1,-1)
00036 ,_idchgconj(-1,-1)
00037 ,_chg3(0)
00038 ,_stdhep(0)
00039 ,_lundkc(0)
00040 {
00041 _lineShape=0;
00042 _ctau=0.0;
00043 _name="*******";
00044 _spintype=EvtSpinType::SCALAR;
00045 }
00046
00047 EvtPartProp::EvtPartProp(const EvtPartProp& x){
00048
00049 if (0!=x._lineShape){
00050 _lineShape=x._lineShape->clone();
00051 }
00052 else{
00053 _lineShape=0;
00054 }
00055 _ctau=x._ctau;
00056 _name=x._name;
00057 _spintype=x._spintype;
00058 _id=x._id;
00059 _idchgconj=x._idchgconj;
00060 _chg3=x._chg3;
00061 _stdhep=x._stdhep;
00062 _lundkc=x._lundkc;
00063
00064 }
00065
00066 EvtPartProp::~EvtPartProp() {
00067 if ( _lineShape ) delete _lineShape;
00068 _lineShape=0;
00069 }
00070
00071
00072 void EvtPartProp::setName(std::string pname) {
00073
00074 _name=pname;
00075
00076 }
00077
00078
00079 EvtPartProp& EvtPartProp::operator=(const EvtPartProp& x){
00080
00081 _lineShape=x._lineShape->clone();
00082
00083 _ctau=x._ctau;
00084 _name=x._name;
00085 _chg3=x._chg3;
00086 _spintype=x._spintype;
00087 return *this;
00088 }
00089
00090 void EvtPartProp::initLineShape(double mass, double width, double maxRange){
00091
00092
00093 _lineShape=new EvtRelBreitWignerBarrierFact(mass,width,maxRange,_spintype);
00094 }
00095
00096 void EvtPartProp::newLineShape(std::string type){
00097
00098 double m=_lineShape->getMass();
00099 double w=_lineShape->getWidth();
00100 double mR=_lineShape->getMaxRange();
00101 EvtSpinType::spintype st=_lineShape->getSpinType();
00102 delete _lineShape;
00103 if ( type == "RELBW" ) {
00104 _lineShape=new EvtRelBreitWignerBarrierFact(m,w,mR,st);
00105 }
00106 if ( type == "NONRELBW" ) {
00107 _lineShape = new EvtAbsLineShape(m,w,mR,st);
00108 }
00109 if ( type == "FLAT" ) {
00110 _lineShape = new EvtFlatLineShape(m,w,mR,st);
00111 }
00112 if ( type == "MANYDELTAFUNC" ) {
00113 _lineShape = new EvtManyDeltaFuncLineShape(m,w,mR,st);
00114 }
00115 }
00116
00117
00118
00119
00120
00121
00122
00123 void EvtPartProp::reSetMass(double mass) {
00124 if (!_lineShape) ::abort();
00125 _lineShape->reSetMass(mass);
00126 }
00127 void EvtPartProp::reSetWidth(double width){
00128 if (!_lineShape) ::abort();
00129 _lineShape->reSetWidth(width);
00130 }
00131
00132 void EvtPartProp::setPWForDecay( int spin, EvtId d1, EvtId d2) {
00133 if (!_lineShape) ::abort();
00134 _lineShape->setPWForDecay(spin,d1,d2);
00135 }
00136
00137 void EvtPartProp::setPWForBirthL( int spin, EvtId par, EvtId othD) {
00138 if (!_lineShape) ::abort();
00139 _lineShape->setPWForBirthL(spin,par,othD);
00140 }
00141
00142
00143 void EvtPartProp::reSetMassMin(double mass){
00144 if (!_lineShape) ::abort();
00145 _lineShape->reSetMassMin(mass);
00146 }
00147 void EvtPartProp::reSetMassMax(double mass){
00148 if (!_lineShape) ::abort();
00149 _lineShape->reSetMassMax(mass);
00150 }
00151 void EvtPartProp::reSetBlatt(double blatt){
00152 if (!_lineShape) ::abort();
00153 _lineShape->reSetBlatt(blatt);
00154 }
00155 void EvtPartProp::includeBirthFactor(bool yesno){
00156 if (!_lineShape) ::abort();
00157 _lineShape->includeBirthFactor(yesno);
00158 }
00159 void EvtPartProp::includeDecayFactor(bool yesno){
00160 if (!_lineShape) ::abort();
00161 _lineShape->includeDecayFactor(yesno);
00162 }
00163
00164 void EvtPartProp::addFactorPn(double factor=0){
00165 if (!_lineShape) ::abort();
00166 _lineShape->addFactorPn(factor);
00167
00168 }
00169
00170
00171
00172