BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPartProp.cc
Go to the documentation of this file.
1#include "EvtPatches.hh"
2//--------------------------------------------------------------------------
3//
4// Environment:
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.
8//
9// Copyright Information: See EvtGen/COPYRIGHT
10// Copyright (C) 1998 Caltech, UCSB
11//
12// Module: EvtPartProp.cc
13//
14// Description: Store particle properties for one particle.
15//
16// Modification history:
17//
18// RYD April 4, 1997 Module created
19//
20//------------------------------------------------------------------------
21//
22#include "EvtAbsLineShape.hh"
23#include "EvtFlatLineShape.hh"
25#include "EvtPartProp.hh"
27#include <ctype.h>
28#include <fstream>
29#include <iostream>
30#include <stdlib.h>
31#include <string>
32using std::fstream;
33
35 : _id( -1, -1 ), _idchgconj( -1, -1 ), _chg3( 0 ), _stdhep( 0 ), _lundkc( 0 ) {
36 _lineShape = 0;
37 _ctau = 0.0;
38 _name = "*******";
39 _spintype = EvtSpinType::SCALAR;
40}
41
43
44 if ( 0 != x._lineShape ) { _lineShape = x._lineShape->clone(); }
45 else { _lineShape = 0; }
46 _ctau = x._ctau;
47 _name = x._name;
48 _spintype = x._spintype;
49 _id = x._id;
50 _idchgconj = x._idchgconj;
51 _chg3 = x._chg3;
52 _stdhep = x._stdhep;
53 _lundkc = x._lundkc;
54}
55
57 if ( _lineShape ) delete _lineShape;
58 _lineShape = 0;
59}
60
61void EvtPartProp::setName( std::string pname ) { _name = pname; }
62
64
65 _lineShape = x._lineShape->clone();
66
67 _ctau = x._ctau;
68 _name = x._name;
69 _chg3 = x._chg3;
70 _spintype = x._spintype;
71 return *this;
72}
73
74void EvtPartProp::initLineShape( double mass, double width, double maxRange ) {
75
76 // _lineShape=new EvtAbsLineShape(mass,width,maxRange);
77 _lineShape = new EvtRelBreitWignerBarrierFact( mass, width, maxRange, _spintype );
78}
79
80void EvtPartProp::newLineShape( std::string type ) {
81
82 double m = _lineShape->getMass();
83 double w = _lineShape->getWidth();
84 double mR = _lineShape->getMaxRange();
85 EvtSpinType::spintype st = _lineShape->getSpinType();
86 delete _lineShape;
87 if ( type == "RELBW" ) { _lineShape = new EvtRelBreitWignerBarrierFact( m, w, mR, st ); }
88 if ( type == "NONRELBW" ) { _lineShape = new EvtAbsLineShape( m, w, mR, st ); }
89 if ( type == "FLAT" ) { _lineShape = new EvtFlatLineShape( m, w, mR, st ); }
90 if ( type == "MANYDELTAFUNC" )
91 { _lineShape = new EvtManyDeltaFuncLineShape( m, w, mR, st ); }
92}
93
94// void EvtPartProp::initLineShape(double mass, double width, double maxRange,
95// double mDaug1, double mDaug2, int l){
96//
97// _lineShape=new EvtRelBreitWignerBarrierFact(mass,width,maxRange,mDaug1,mDaug2,l);
98// }
99
101 if ( !_lineShape ) ::abort();
102 _lineShape->reSetMass( mass );
103}
104void EvtPartProp::reSetWidth( double width ) {
105 if ( !_lineShape ) ::abort();
106 _lineShape->reSetWidth( width );
107}
108
109void EvtPartProp::setPWForDecay( int spin, EvtId d1, EvtId d2 ) {
110 if ( !_lineShape ) ::abort();
111 _lineShape->setPWForDecay( spin, d1, d2 );
112}
113
114void EvtPartProp::setPWForBirthL( int spin, EvtId par, EvtId othD ) {
115 if ( !_lineShape ) ::abort();
116 _lineShape->setPWForBirthL( spin, par, othD );
117}
118
120 if ( !_lineShape ) ::abort();
121 _lineShape->reSetMassMin( mass );
122}
124 if ( !_lineShape ) ::abort();
125 _lineShape->reSetMassMax( mass );
126}
127void EvtPartProp::reSetBlatt( double blatt ) {
128 if ( !_lineShape ) ::abort();
129 _lineShape->reSetBlatt( blatt );
130}
132 if ( !_lineShape ) ::abort();
133 _lineShape->includeBirthFactor( yesno );
134}
136 if ( !_lineShape ) ::abort();
137 _lineShape->includeDecayFactor( yesno );
138}
139
140void EvtPartProp::addFactorPn( double factor = 0 ) {
141 if ( !_lineShape ) ::abort();
142 _lineShape->addFactorPn( factor );
143}
double mass
double w
virtual EvtAbsLineShape * clone()
Definition EvtId.hh:27
void initLineShape(double mass, double width, double maxRange)
void reSetBlatt(double blatt)
void setName(std::string pname)
void reSetMassMin(double mass)
void setPWForDecay(int spin, EvtId d1, EvtId d2)
void setPWForBirthL(int spin, EvtId par, EvtId othD)
void addFactorPn(double factor)
void includeDecayFactor(bool yesno)
void includeBirthFactor(bool yesno)
EvtPartProp & operator=(const EvtPartProp &x)
void reSetMass(double mass)
void reSetWidth(double width)
void newLineShape(std::string type)
void reSetMassMax(double mass)