42 {
44 {
45
46 printf( "Make amplitude\n" );
47 unsigned i;
48 for ( i = 0; i < vv.size(); i++ ) printf(
"%s\n", vv[i].
c_str() );
49 printf( "\n" );
50 }
51
52 EvtAmplitude<EvtDalitzPoint>* amp = 0;
53 EvtPdf<EvtDalitzPoint>* pdf = 0;
54 std::string name;
55
56 int i;
57 if ( vv[0] == "PHASESPACE" )
58 {
59
60 pdf = new EvtDalitzFlatPdf( _dp );
61 amp = new EvtFlatAmp<EvtDalitzPoint>();
62 name = "NR";
63 }
64 else if ( vv[0] == "RESONANCE" )
65 {
66
67 EvtPto3PAmp* partAmp = 0;
68
69
70
73 double mR, gR;
74 name = vv[2];
76 if (
_verbose ) printf(
"Particles %s form resonance %s\n", vv[1].
c_str(), vv[2].
c_str() );
77
78
79
80
81 if ( resId.
getId() == -1 )
82 {
83
84 switch ( atoi( vv[2].
c_str() ) )
85 {
86
87 case 0: {
89 break;
90 }
91 case 1: {
93 break;
94 }
95 case 2: {
97 break;
98 }
99 case 3: {
101 break;
102 }
103 case 4: {
105 break;
106 }
107 default: {
108 assert( 0 );
109 break;
110 }
111 }
112
113 mR = strtod( vv[3].
c_str(), 0 );
114 gR = strtod( vv[4].
c_str(), 0 );
115 i = 4;
116 }
117 else
118 {
119
120
121
125 i = 2;
126
127
128
129
130 if ( vv[3] != "ANGULAR" )
131 {
132
134 printf(
"Setting m(%s)=%s g(%s)=%s\n", vv[2].
c_str(), vv[3].
c_str(), vv[2].
c_str(),
136
137 mR = strtod( vv[3].
c_str(), 0 );
138 gR = strtod( vv[4].
c_str(), 0 );
139 i = 4;
140 }
141 }
142
143
144
145 if ( vv[++i] != "ANGULAR" )
146 {
147
148 printf(
"%s instead of ANGULAR\n", vv[i].
c_str() );
149 exit( 0 );
150 }
152 if (
_verbose ) printf(
"Angle is measured between particles %s\n", vv[i].
c_str() );
153
154
155
156 assert( vv[++i] == "TYPE" );
157 std::string type = vv[++i];
158 if (
_verbose ) printf(
"Propagator type %s\n", vv[i].
c_str() );
159
160 if ( type == "NBW" )
161 {
162
163 EvtPropBreitWigner prop( mR, gR );
164 partAmp =
new EvtPto3PAmp( _dp, pairAng, pairRes, spinR, prop,
EvtPto3PAmp::NBW );
165 }
166 else if ( type == "RBW_ZEMACH" )
167 {
168
169 EvtPropBreitWignerRel prop( mR, gR );
171 }
172 else if ( type == "RBW_KUEHN" )
173 {
174
175 EvtPropBreitWignerRel prop( mR, gR );
177 }
178 else if ( type == "RBW_CLEO" )
179 {
180
181 EvtPropBreitWignerRel prop( mR, gR );
183 }
184 else assert( 0 );
185
186
187
188 if ( i < vv.size() - 1 )
189 {
190 if ( vv[i + 1] == "DVFF" )
191 {
192 i++;
193 if ( vv[++i] == "BLATTWEISSKOPF" )
194 {
195
196 double R = strtod( vv[++i].
c_str(), 0 );
198 }
199 else assert( 0 );
200 }
201 }
202
203 if ( i < vv.size() - 1 )
204 {
205 if ( vv[i + 1] == "BVFF" )
206 {
207 i++;
208 if ( vv[++i] == "BLATTWEISSKOPF" )
209 {
210
212 double R = strtod( vv[++i].
c_str(), 0 );
214 }
215 else assert( 0 );
216 }
217 }
218
219 i++;
220
221 pdf = new EvtDalitzResPdf( _dp, mR, gR, pairRes );
222 amp = partAmp;
223 }
224
225 assert( amp );
226 assert( pdf );
227
229 {
230
231 _amp->addOwnedTerm( c, amp );
232 _pc->addOwnedTerm(
abs2( c ), pdf );
233 }
234 else
235 {
236
238 delete pdf;
239 }
241}
Evt3Rank3C conj(const Evt3Rank3C &t2)
double abs2(const EvtComplex &c)
EvtPdfSum< EvtDalitzPoint > * _pc
EvtAmplitudeSum< EvtDalitzPoint > * _ampConj
EvtAmplitudeSum< EvtDalitzPoint > * _amp
std::vector< std::string > _names
static double getWidth(EvtId i)
static double getMeanMass(EvtId i)
static EvtSpinType::spintype getSpinType(EvtId i)
static EvtId getId(const std::string &name)
Pair strToPair(const char *str)
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)