1 #include "EvtGenBase/EvtPatches.hh"
2 //--------------------------------------------------------------------------
5 // This software is part of the EvtGen package developed jointly
6 // for the BaBar and CLEO collaborations. If you use all or part
7 // of it, please give an appropriate acknowledgement.
9 // Copyright Information: See EvtGen/COPYRIGHT
10 // Copyright (C) 1998 Caltech, UCSB
12 // Module: EvtPartProp.cc
14 // Description: Store particle properties for one particle.
16 // Modification history:
18 // RYD April 4, 1997 Module created
20 //------------------------------------------------------------------------
26 #include "EvtGenBase/EvtPartProp.hh"
27 #include "EvtGenBase/EvtAbsLineShape.hh"
28 #include "EvtGenBase/EvtFlatLineShape.hh"
29 #include "EvtGenBase/EvtManyDeltaFuncLineShape.hh"
30 #include "EvtGenBase/EvtRelBreitWignerBarrierFact.hh"
34 EvtPartProp::EvtPartProp():
44 _spintype=EvtSpinType::SCALAR;
47 EvtPartProp::EvtPartProp(const EvtPartProp& x){
50 _lineShape=x._lineShape->clone();
57 _spintype=x._spintype;
59 _idchgconj=x._idchgconj;
66 EvtPartProp::~EvtPartProp() {
67 if ( _lineShape ) delete _lineShape;
72 void EvtPartProp::setName(std::string pname) {
79 EvtPartProp& EvtPartProp::operator=(const EvtPartProp& x){
81 _lineShape=x._lineShape->clone();
86 _spintype=x._spintype;
90 void EvtPartProp::initLineShape(double mass, double width, double maxRange){
92 _lineShape=new EvtRelBreitWignerBarrierFact(mass,width,maxRange,_spintype);
96 void EvtPartProp::newLineShape(std::string type){
98 double m=_lineShape->getMass();
99 double w=_lineShape->getWidth();
100 double mR=_lineShape->getMaxRange();
101 EvtSpinType::spintype st=_lineShape->getSpinType();
103 if ( type == "RELBW" ) {
104 _lineShape=new EvtRelBreitWignerBarrierFact(m,w,mR,st);
106 if ( type == "NONRELBW" ) {
107 _lineShape = new EvtAbsLineShape(m,w,mR,st);
109 if ( type == "FLAT" ) {
110 _lineShape = new EvtFlatLineShape(m,w,mR,st);
112 if ( type == "MANYDELTAFUNC" ) {
113 _lineShape = new EvtManyDeltaFuncLineShape(m,w,mR,st);
118 void EvtPartProp::reSetMass(double mass) {
119 if (!_lineShape) ::abort();
120 _lineShape->reSetMass(mass);
122 void EvtPartProp::reSetWidth(double width){
123 if (!_lineShape) ::abort();
124 _lineShape->reSetWidth(width);
127 void EvtPartProp::setPWForDecay( int spin, EvtId d1, EvtId d2) {
128 if (!_lineShape) ::abort();
129 _lineShape->setPWForDecay(spin,d1,d2);
132 void EvtPartProp::setPWForBirthL( int spin, EvtId par, EvtId othD) {
133 if (!_lineShape) ::abort();
134 _lineShape->setPWForBirthL(spin,par,othD);
138 void EvtPartProp::reSetMassMin(double mass){
139 if (!_lineShape) ::abort();
140 _lineShape->reSetMassMin(mass);
142 void EvtPartProp::reSetMassMax(double mass){
143 if (!_lineShape) ::abort();
144 _lineShape->reSetMassMax(mass);
146 void EvtPartProp::reSetBlatt(double blatt){
147 if (!_lineShape) ::abort();
148 _lineShape->reSetBlatt(blatt);
150 void EvtPartProp::includeBirthFactor(bool yesno){
151 if (!_lineShape) ::abort();
152 _lineShape->includeBirthFactor(yesno);
154 void EvtPartProp::includeDecayFactor(bool yesno){
155 if (!_lineShape) ::abort();
156 _lineShape->includeDecayFactor(yesno);