laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauRescattering2Res.cc
Go to the documentation of this file.
1 
2 /*
3 Copyright 2018 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
29 #include "LauRescattering2Res.hh"
30 
31 #include "LauConstants.hh"
32 #include "LauResonanceInfo.hh"
33 
34 #include <iostream>
35 
37  const Int_t resPairAmpInt,
38  const LauDaughters* daughters ) :
39  LauAbsResonance( resInfo, resPairAmpInt, daughters ),
40  B1_( 0 ),
41  B2_( 0 ),
42  B3_( 0 ),
43  C1_( 0 ),
44  C2_( 0 ),
45  C3_( 0 ),
46  C4_( 0 ),
47  C5_( 0 ),
48  D0_( 0 ),
49  D1_( 0 ),
50  D2_( 0 ),
51  D3_( 0 ),
52  F1_( 0 ),
53  F2_( 0 ),
54  F3_( 0 ),
55  F4_( 0 )
56 {
57  // Default values for parameters, taken from
58  const Double_t B1Val( 23.6 );
59  const Double_t B2Val( 29.4 );
60  const Double_t B3Val( 0.6 );
61  const Double_t C1Val( 34.39 );
62  const Double_t C2Val( 4.4 );
63  const Double_t C3Val( -32.9 );
64  const Double_t C4Val( -16. );
65  const Double_t C5Val( 7.4 );
66  const Double_t D0Val( 0.59 );
67  const Double_t D1Val( -0.38 );
68  const Double_t D2Val( 0.12 );
69  const Double_t D3Val( -0.09 );
70  const Double_t F1Val( -0.043 );
71  const Double_t F2Val( -0.008 );
72  const Double_t F3Val( -0.28 );
73  const Double_t F4Val( 0.026 );
74  const TString& parNameBase = this->getSanitisedName();
75 
76  TString B1Name( parNameBase );
77  B1Name += "_B1";
78  B1_ = resInfo->getExtraParameter( B1Name );
79  if ( B1_ == 0 ) {
80  B1_ = new LauParameter( B1Name, B1Val, -100., 100., kTRUE );
81  B1_->secondStage( kTRUE );
82  resInfo->addExtraParameter( B1_ );
83  }
84  TString B2Name( parNameBase );
85  B2Name += "_B2";
86  B2_ = resInfo->getExtraParameter( B2Name );
87  if ( B2_ == 0 ) {
88  B2_ = new LauParameter( B2Name, B2Val, -100., 100., kTRUE );
89  B2_->secondStage( kTRUE );
90  resInfo->addExtraParameter( B2_ );
91  }
92  TString B3Name( parNameBase );
93  B3Name += "_B3";
94  B3_ = resInfo->getExtraParameter( B3Name );
95  if ( B3_ == 0 ) {
96  B3_ = new LauParameter( B3Name, B3Val, -100., 100., kTRUE );
97  B3_->secondStage( kTRUE );
98  resInfo->addExtraParameter( B3_ );
99  }
100 
101  TString C1Name( parNameBase );
102  C1Name += "_C1";
103  C1_ = resInfo->getExtraParameter( C1Name );
104  if ( C1_ == 0 ) {
105  C1_ = new LauParameter( C1Name, C1Val, -100., 100., kTRUE );
106  C1_->secondStage( kTRUE );
107  resInfo->addExtraParameter( C1_ );
108  }
109  TString C2Name( parNameBase );
110  C2Name += "_C2";
111  C2_ = resInfo->getExtraParameter( C2Name );
112  if ( C2_ == 0 ) {
113  C2_ = new LauParameter( C2Name, C2Val, -100., 100., kTRUE );
114  C2_->secondStage( kTRUE );
115  resInfo->addExtraParameter( C2_ );
116  }
117  TString C3Name( parNameBase );
118  C3Name += "_C3";
119  C3_ = resInfo->getExtraParameter( C3Name );
120  if ( C3_ == 0 ) {
121  C3_ = new LauParameter( C3Name, C3Val, -100., 100., kTRUE );
122  C3_->secondStage( kTRUE );
123  resInfo->addExtraParameter( C3_ );
124  }
125  TString C4Name( parNameBase );
126  C4Name += "_C4";
127  C4_ = resInfo->getExtraParameter( C4Name );
128  if ( C4_ == 0 ) {
129  C4_ = new LauParameter( C4Name, C4Val, -100., 100., kTRUE );
130  C4_->secondStage( kTRUE );
131  resInfo->addExtraParameter( C4_ );
132  }
133  TString C5Name( parNameBase );
134  C5Name += "_C5";
135  C5_ = resInfo->getExtraParameter( C5Name );
136  if ( C5_ == 0 ) {
137  C5_ = new LauParameter( C5Name, C5Val, -100., 100., kTRUE );
138  C5_->secondStage( kTRUE );
139  resInfo->addExtraParameter( C5_ );
140  }
141 
142  TString D0Name( parNameBase );
143  D0Name += "_D0";
144  D0_ = resInfo->getExtraParameter( D0Name );
145  if ( D0_ == 0 ) {
146  D0_ = new LauParameter( D0Name, D0Val, -100., 100., kTRUE );
147  D0_->secondStage( kTRUE );
148  resInfo->addExtraParameter( D0_ );
149  }
150  TString D1Name( parNameBase );
151  D1Name += "_D1";
152  D1_ = resInfo->getExtraParameter( D1Name );
153  if ( D1_ == 0 ) {
154  D1_ = new LauParameter( D1Name, D1Val, -100., 100., kTRUE );
155  D1_->secondStage( kTRUE );
156  resInfo->addExtraParameter( D1_ );
157  }
158  TString D2Name( parNameBase );
159  D2Name += "_D2";
160  D2_ = resInfo->getExtraParameter( D2Name );
161  if ( D2_ == 0 ) {
162  D2_ = new LauParameter( D2Name, D2Val, -100., 100., kTRUE );
163  D2_->secondStage( kTRUE );
164  resInfo->addExtraParameter( D2_ );
165  }
166  TString D3Name( parNameBase );
167  D3Name += "_D3";
168  D3_ = resInfo->getExtraParameter( D3Name );
169  if ( D3_ == 0 ) {
170  D3_ = new LauParameter( D3Name, D3Val, -100., 100., kTRUE );
171  D3_->secondStage( kTRUE );
172  resInfo->addExtraParameter( D3_ );
173  }
174  TString F1Name( parNameBase );
175  F1Name += "_F1";
176  F1_ = resInfo->getExtraParameter( F1Name );
177  if ( F1_ == 0 ) {
178  F1_ = new LauParameter( F1Name, F1Val, -100., 100., kTRUE );
179  F1_->secondStage( kTRUE );
180  resInfo->addExtraParameter( F1_ );
181  }
182  TString F2Name( parNameBase );
183  F2Name += "_F2";
184  F2_ = resInfo->getExtraParameter( F2Name );
185  if ( F2_ == 0 ) {
186  F2_ = new LauParameter( F2Name, F2Val, -100., 100., kTRUE );
187  F2_->secondStage( kTRUE );
188  resInfo->addExtraParameter( F2_ );
189  }
190  TString F3Name( parNameBase );
191  F3Name += "_F3";
192  F3_ = resInfo->getExtraParameter( F3Name );
193  if ( F3_ == 0 ) {
194  F3_ = new LauParameter( F3Name, F3Val, -100., 100., kTRUE );
195  F3_->secondStage( kTRUE );
196  resInfo->addExtraParameter( F3_ );
197  }
198  TString F4Name( parNameBase );
199  F4Name += "_F4";
200  F4_ = resInfo->getExtraParameter( F4Name );
201  if ( F4_ == 0 ) {
202  F4_ = new LauParameter( F4Name, F4Val, -100., 100., kTRUE );
203  F4_->secondStage( kTRUE );
204  resInfo->addExtraParameter( F4_ );
205  }
206 }
207 
209 {
210  delete B1_;
211  delete B2_;
212  delete B3_;
213  delete C1_;
214  delete C2_;
215  delete C3_;
216  delete C4_;
217  delete C5_;
218  delete D0_;
219  delete D1_;
220  delete D2_;
221  delete D3_;
222  delete F1_;
223  delete F2_;
224  delete F3_;
225  delete F4_;
226 }
227 
229 {
230  sqr_tmin[1] = 2.00 * LauConstants::mK;
231  sqr_tmin[2] = 1.47;
232  sqr_tmax[1] = 1.47;
233  sqr_tmax[2] = 2.00;
234 
235  B0_ = 226.5 * TMath::Pi() / 180.0 + B1_->value() - B2_->value() + B3_->value();
236  C0_ = phi00( sqr_tmax[1] * sqr_tmax[1], 1 ) + C1_->value() - C2_->value() + C3_->value() -
237  C4_->value() + C5_->value();
238  F0_ = g00( sqr_tmax[1] * sqr_tmax[1], 1 ) + F1_->value() - F2_->value() + F3_->value() -
239  F4_->value();
240 
241  std::cout << "##### B = " << this->B1_->value() << ", " << this->B2_->value() << ", "
242  << this->B3_->value() << std::endl;
243  std::cout << "##### C = " << this->C1_->value() << ", " << this->C2_->value() << ", "
244  << this->C3_->value() << ", " << this->C4_->value() << ", " << this->C5_->value()
245  << std::endl;
246  std::cout << "##### D = " << this->D0_->value() << ", " << this->D1_->value() << ", "
247  << this->D2_->value() << ", " << this->D3_->value() << std::endl;
248  std::cout << "##### F = " << this->F1_->value() << ", " << this->F2_->value() << ", "
249  << this->F3_->value() << ", " << this->F4_->value() << std::endl;
250 }
251 
252 LauComplex LauRescattering2Res::resAmp( Double_t mass, Double_t )
253 {
254  Int_t i = 0;
255  if ( mass < sqr_tmax[1] )
256  i = 1;
257  if ( mass > sqr_tmax[1] && mass < sqr_tmax[2] )
258  i = 2;
259  if ( i == 0 ) {
260  std::cout << " ERROR MASS = " << mass << " out of limmits mI, mII" << std::endl;
261  return LauComplex( 0, 0 );
262  }
263 
264  Double_t sqr_t = mass;
265  Double_t mag = this->g00( sqr_t, i );
266  Double_t phase = this->phi00( sqr_t, i );
267 
268  return LauComplex( mag * TMath::Cos( phase ), mag * TMath::Sin( phase ) );
269 }
270 
271 Double_t LauRescattering2Res::pn( const Double_t x_, const Double_t n ) const
272 {
273  if ( n == 0 )
274  return 1.0;
275  if ( n == 1 )
276  return x_;
277  return 2 * x_ * pn( x_, n - 1 ) - pn( x_, n - 2 );
278 }
279 
280 Double_t LauRescattering2Res::x( const Double_t sqr_t, const Int_t i ) const
281 {
282  return 2.0 * ( sqr_t - sqr_tmin[i] ) / ( sqr_tmax[i] - sqr_tmin[i] ) - 1.0;
283 }
284 
285 Double_t LauRescattering2Res::phi00( const Double_t sqr_t, const Int_t i ) const
286 {
287  Double_t x_t = x( sqr_t, i );
288 
289  if ( i == 1 )
290  return B0_ * this->pn( x_t, 0 ) + B1_->value() * this->pn( x_t, 1 ) +
291  B2_->value() * this->pn( x_t, 2 ) + B3_->value() * this->pn( x_t, 3 );
292 
293  if ( i == 2 )
294  return C0_ * this->pn( x_t, 0 ) + C1_->value() * this->pn( x_t, 1 ) +
295  C2_->value() * this->pn( x_t, 2 ) + C3_->value() * this->pn( x_t, 3 ) +
296  C4_->value() * this->pn( x_t, 4 ) + C5_->value() * this->pn( x_t, 5 );
297 
298  return 0;
299 }
300 
301 Double_t LauRescattering2Res::g00( const Double_t sqr_t, const Int_t i ) const
302 {
303  Double_t x_t = x( sqr_t, i );
304 
305  if ( i == 1 )
306  return D0_->value() * this->pn( x_t, 0 ) + D1_->value() * this->pn( x_t, 1 ) +
307  D2_->value() * this->pn( x_t, 2 ) + D3_->value() * this->pn( x_t, 3 );
308 
309  if ( i == 2 )
310  return F0_ * this->pn( x_t, 0 ) + F1_->value() * this->pn( x_t, 1 ) +
311  F2_->value() * this->pn( x_t, 2 ) + F3_->value() * this->pn( x_t, 3 ) +
312  F4_->value() * this->pn( x_t, 4 );
313 
314  return 0;
315 }
316 
317 // TODO up to here!
318 const std::vector<LauParameter*>& LauRescattering2Res::getFloatingParameters()
319 {
320  this->clearFloatingParameters();
321 
322  if ( ! this->fixB1Parameter() ) {
323  this->addFloatingParameter( B1_ );
324  }
325  if ( ! this->fixB2Parameter() ) {
326  this->addFloatingParameter( B2_ );
327  }
328  if ( ! this->fixB3Parameter() ) {
329  this->addFloatingParameter( B3_ );
330  }
331 
332  if ( ! this->fixC1Parameter() ) {
333  this->addFloatingParameter( C1_ );
334  }
335  if ( ! this->fixC2Parameter() ) {
336  this->addFloatingParameter( C2_ );
337  }
338  if ( ! this->fixC3Parameter() ) {
339  this->addFloatingParameter( C3_ );
340  }
341  if ( ! this->fixC4Parameter() ) {
342  this->addFloatingParameter( C4_ );
343  }
344  if ( ! this->fixC5Parameter() ) {
345  this->addFloatingParameter( C5_ );
346  }
347 
348  if ( ! this->fixD0Parameter() ) {
349  this->addFloatingParameter( D0_ );
350  }
351  if ( ! this->fixD1Parameter() ) {
352  this->addFloatingParameter( D1_ );
353  }
354  if ( ! this->fixD2Parameter() ) {
355  this->addFloatingParameter( D2_ );
356  }
357  if ( ! this->fixD3Parameter() ) {
358  this->addFloatingParameter( D3_ );
359  }
360 
361  if ( ! this->fixF1Parameter() ) {
362  this->addFloatingParameter( F1_ );
363  }
364 
365  if ( ! this->fixF2Parameter() ) {
366  this->addFloatingParameter( F2_ );
367  }
368 
369  if ( ! this->fixF3Parameter() ) {
370  this->addFloatingParameter( F3_ );
371  }
372 
373  if ( ! this->fixF4Parameter() ) {
374  this->addFloatingParameter( F4_ );
375  }
376 
377  return this->getParameters();
378 }
379 
380 void LauRescattering2Res::setResonanceParameter( const TString& name, const Double_t value )
381 {
382  // Set various parameters for the NRAmplitude lineshape dynamics
383  if ( name == "B1" ) {
384  this->setB1Parameter( value );
385  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude B1 = "
386  << this->getB1Parameter() << std::endl;
387  } else if ( name == "B2" ) {
388  this->setB2Parameter( value );
389  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude B2 = "
390  << this->getB2Parameter() << std::endl;
391  } else if ( name == "B3" ) {
392  this->setB3Parameter( value );
393  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude B3 = "
394  << this->getB3Parameter() << std::endl;
395  } else if ( name == "C1" ) {
396  this->setC1Parameter( value );
397  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude C1 = "
398  << this->getC1Parameter() << std::endl;
399  } else if ( name == "C2" ) {
400  this->setC2Parameter( value );
401  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude C2 = "
402  << this->getC2Parameter() << std::endl;
403  } else if ( name == "C3" ) {
404  this->setC3Parameter( value );
405  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude C3 = "
406  << this->getC3Parameter() << std::endl;
407  } else if ( name == "C4" ) {
408  this->setC4Parameter( value );
409  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude C4 = "
410  << this->getC4Parameter() << std::endl;
411  } else if ( name == "C5" ) {
412  this->setC5Parameter( value );
413  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude C5 = "
414  << this->getC5Parameter() << std::endl;
415  } else if ( name == "D0" ) {
416  this->setD0Parameter( value );
417  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude D0 = "
418  << this->getD0Parameter() << std::endl;
419  } else if ( name == "D1" ) {
420  this->setD1Parameter( value );
421  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude D1 = "
422  << this->getD1Parameter() << std::endl;
423  } else if ( name == "D2" ) {
424  this->setD2Parameter( value );
425  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude D2 = "
426  << this->getD2Parameter() << std::endl;
427  } else if ( name == "D3" ) {
428  this->setD3Parameter( value );
429  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude D3 = "
430  << this->getD3Parameter() << std::endl;
431  } else if ( name == "F1" ) {
432  this->setF1Parameter( value );
433  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude F1 = "
434  << this->getF1Parameter() << std::endl;
435  } else if ( name == "F2" ) {
436  this->setF2Parameter( value );
437  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude F2 = "
438  << this->getF2Parameter() << std::endl;
439  } else if ( name == "F3" ) {
440  this->setF3Parameter( value );
441  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude F3 = "
442  << this->getF3Parameter() << std::endl;
443  } else if ( name == "F4" ) {
444  this->setF4Parameter( value );
445  std::cout << "INFO in LauRescattering2Res::setResonanceParameter : Setting NRAmplitude F4 = "
446  << this->getF4Parameter() << std::endl;
447  } else {
448  std::cerr << "WARNING in LauRescattering2Res::setResonanceParameter: Parameter name not reconised. No parameter changes made."
449  << std::endl;
450  }
451 }
452 
454 {
455  if ( name == "B1" ) {
456  if ( B1_->fixed() ) {
457  B1_->fixed( kFALSE );
458  this->addFloatingParameter( B1_ );
459  } else {
460  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
461  << std::endl;
462  }
463  } else if ( name == "B2" ) {
464  if ( B2_->fixed() ) {
465  B2_->fixed( kFALSE );
466  this->addFloatingParameter( B2_ );
467  } else {
468  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
469  << std::endl;
470  }
471  } else if ( name == "B3" ) {
472  if ( B3_->fixed() ) {
473  B3_->fixed( kFALSE );
474  this->addFloatingParameter( B3_ );
475  } else {
476  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
477  << std::endl;
478  }
479  } else if ( name == "C1" ) {
480  if ( C1_->fixed() ) {
481  C1_->fixed( kFALSE );
482  this->addFloatingParameter( C1_ );
483  } else {
484  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
485  << std::endl;
486  }
487  } else if ( name == "C2" ) {
488  if ( C2_->fixed() ) {
489  C2_->fixed( kFALSE );
490  this->addFloatingParameter( C2_ );
491  } else {
492  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
493  << std::endl;
494  }
495  } else if ( name == "C3" ) {
496  if ( C3_->fixed() ) {
497  C3_->fixed( kFALSE );
498  this->addFloatingParameter( C3_ );
499  } else {
500  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
501  << std::endl;
502  }
503  } else if ( name == "C4" ) {
504  if ( C4_->fixed() ) {
505  C4_->fixed( kFALSE );
506  this->addFloatingParameter( C4_ );
507  } else {
508  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
509  << std::endl;
510  }
511  } else if ( name == "C5" ) {
512  if ( C5_->fixed() ) {
513  C5_->fixed( kFALSE );
514  this->addFloatingParameter( C5_ );
515  } else {
516  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
517  << std::endl;
518  }
519  } else if ( name == "D0" ) {
520  if ( D0_->fixed() ) {
521  D0_->fixed( kFALSE );
522  this->addFloatingParameter( D0_ );
523  } else {
524  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
525  << std::endl;
526  }
527  } else if ( name == "D1" ) {
528  if ( D1_->fixed() ) {
529  D1_->fixed( kFALSE );
530  this->addFloatingParameter( D1_ );
531  } else {
532  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
533  << std::endl;
534  }
535  } else if ( name == "D2" ) {
536  if ( D2_->fixed() ) {
537  D2_->fixed( kFALSE );
538  this->addFloatingParameter( D2_ );
539  } else {
540  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
541  << std::endl;
542  }
543  } else if ( name == "D3" ) {
544  if ( D3_->fixed() ) {
545  D3_->fixed( kFALSE );
546  this->addFloatingParameter( D3_ );
547  } else {
548  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
549  << std::endl;
550  }
551  } else if ( name == "F1" ) {
552  if ( F1_->fixed() ) {
553  F1_->fixed( kFALSE );
554  this->addFloatingParameter( F1_ );
555  } else {
556  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
557  << std::endl;
558  }
559  } else if ( name == "F2" ) {
560  if ( F2_->fixed() ) {
561  F2_->fixed( kFALSE );
562  this->addFloatingParameter( F2_ );
563  } else {
564  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
565  << std::endl;
566  }
567  } else if ( name == "F3" ) {
568  if ( F3_->fixed() ) {
569  F3_->fixed( kFALSE );
570  this->addFloatingParameter( F3_ );
571  } else {
572  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
573  << std::endl;
574  }
575  } else if ( name == "4F" ) {
576  if ( F4_->fixed() ) {
577  F4_->fixed( kFALSE );
578  this->addFloatingParameter( F4_ );
579  } else {
580  std::cerr << "WARNING in LauRescattering2Res::floatResonanceParameter: Parameter already floating. No parameter changes made."
581  << std::endl;
582  }
583  } else {
584  std::cerr << "WARNING in LauRescattering2Res::fixResonanceParameter: Parameter name not reconised. No parameter changes made."
585  << std::endl;
586  }
587 }
588 
590 {
591  if ( name == "B1" ) {
592  return B1_;
593  } else if ( name == "B2" ) {
594  return B2_;
595  } else if ( name == "B3" ) {
596  return B3_;
597  } else if ( name == "C1" ) {
598  return C1_;
599  } else if ( name == "C2" ) {
600  return C2_;
601  } else if ( name == "C3" ) {
602  return C3_;
603  } else if ( name == "C4" ) {
604  return C4_;
605  } else if ( name == "C5" ) {
606  return C5_;
607  } else if ( name == "D0" ) {
608  return D0_;
609  } else if ( name == "D1" ) {
610  return D1_;
611  } else if ( name == "D2" ) {
612  return D2_;
613  } else if ( name == "D3" ) {
614  return D3_;
615  } else if ( name == "F1" ) {
616  return F1_;
617  } else if ( name == "F2" ) {
618  return F2_;
619  } else if ( name == "F3" ) {
620  return F3_;
621  } else if ( name == "F4" ) {
622  return F4_;
623  } else {
624  std::cerr << "WARNING in LauRescattering2Res::getResonanceParameter: Parameter name not reconised."
625  << std::endl;
626  return 0;
627  }
628 }
629 
630 void LauRescattering2Res::setB1Parameter( const Double_t B1 )
631 {
632  B1_->value( B1 );
633  B1_->genValue( B1 );
634  B1_->initValue( B1 );
635 }
636 
637 void LauRescattering2Res::setB2Parameter( const Double_t B2 )
638 {
639  B2_->value( B2 );
640  B2_->genValue( B2 );
641  B2_->initValue( B2 );
642 }
643 
644 void LauRescattering2Res::setB3Parameter( const Double_t B3 )
645 {
646  B3_->value( B3 );
647  B3_->genValue( B3 );
648  B3_->initValue( B3 );
649 }
650 
651 void LauRescattering2Res::setC1Parameter( const Double_t C1 )
652 {
653  C1_->value( C1 );
654  C1_->genValue( C1 );
655  C1_->initValue( C1 );
656 }
657 
658 void LauRescattering2Res::setC2Parameter( const Double_t C2 )
659 {
660  C2_->value( C2 );
661  C2_->genValue( C2 );
662  C2_->initValue( C2 );
663 }
664 
665 void LauRescattering2Res::setC3Parameter( const Double_t C3 )
666 {
667  C3_->value( C3 );
668  C3_->genValue( C3 );
669  C3_->initValue( C3 );
670 }
671 
672 void LauRescattering2Res::setC4Parameter( const Double_t C4 )
673 {
674  C4_->value( C4 );
675  C4_->genValue( C4 );
676  C4_->initValue( C4 );
677 }
678 
679 void LauRescattering2Res::setC5Parameter( const Double_t C5 )
680 {
681  C5_->value( C5 );
682  C5_->genValue( C5 );
683  C5_->initValue( C5 );
684 }
685 
686 void LauRescattering2Res::setD0Parameter( const Double_t D0 )
687 {
688  D0_->value( D0 );
689  D0_->genValue( D0 );
690  D0_->initValue( D0 );
691 }
692 
693 void LauRescattering2Res::setD1Parameter( const Double_t D1 )
694 {
695  D1_->value( D1 );
696  D1_->genValue( D1 );
697  D1_->initValue( D1 );
698 }
699 
700 void LauRescattering2Res::setD2Parameter( const Double_t D2 )
701 {
702  D2_->value( D2 );
703  D2_->genValue( D2 );
704  D2_->initValue( D2 );
705 }
706 
707 void LauRescattering2Res::setD3Parameter( const Double_t D3 )
708 {
709  D3_->value( D3 );
710  D3_->genValue( D3 );
711  D3_->initValue( D3 );
712 }
713 
714 void LauRescattering2Res::setF1Parameter( const Double_t F1 )
715 {
716  F1_->value( F1 );
717  F1_->genValue( F1 );
718  F1_->initValue( F1 );
719 }
720 
721 void LauRescattering2Res::setF2Parameter( const Double_t F2 )
722 {
723  F2_->value( F2 );
724  F2_->genValue( F2 );
725  F2_->initValue( F2 );
726 }
727 
728 void LauRescattering2Res::setF3Parameter( const Double_t F3 )
729 {
730  F3_->value( F3 );
731  F3_->genValue( F3 );
732  F3_->initValue( F3 );
733 }
734 
735 void LauRescattering2Res::setF4Parameter( const Double_t F4 )
736 {
737  F4_->value( F4 );
738  F4_->genValue( F4 );
739  F4_->initValue( F4 );
740 }
File containing declaration of LauResonanceInfo class.
const TString & getSanitisedName() const
Get the name of the resonance.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:49
Double_t value() const
The value of the parameter.
virtual void floatResonanceParameter(const TString &name)
Allow the various parameters to float in the fit.
std::vector< LauParameter * > & getParameters()
Access the list of floating parameters.
LauParameter * getExtraParameter(const TString &parName)
Retrieve an extra parameter of the resonance.
virtual void initialise()
Initialise the model.
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
This is not meant to be called.
virtual const std::vector< LauParameter * > & getFloatingParameters()
Retrieve the resonance parameters, e.g. so that they can be loaded into a fit.
Bool_t secondStage() const
Check whether the parameter should be floated only in the second stage of a two stage fit.
LauParameter * B1_
Parameter.
Class for defining a complex number.
Definition: LauComplex.hh:61
void addFloatingParameter(LauParameter *param)
Add parameter to the list of floating parameters.
virtual LauParameter * getResonanceParameter(const TString &name)
Access the given resonance parameter.
File containing declaration of LauRescattering2Res class.
void addExtraParameter(LauParameter *param, const Bool_t independentPar=kFALSE)
Add an extra parameter of the resonance.
Bool_t fixed() const
Check whether the parameter is fixed or floated.
LauParameter()
Default constructor.
Definition: LauParameter.cc:40
Class for defining the properties of a resonant particle.
File containing LauConstants namespace.
virtual void setResonanceParameter(const TString &name, const Double_t value)
Set value of a resonance parameter.
const TString & name() const
The parameter name.
const Double_t mK
Mass of K+- (GeV/c^2)
Definition: LauConstants.hh:59
LauRescattering2Res(LauResonanceInfo *resInfo, const Int_t resPairAmpInt, const LauDaughters *daughters)
Constructor.
void clearFloatingParameters()
Clear list of floating parameters.
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc....
Double_t genValue() const
The value generated for the parameter.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:47
virtual ~LauRescattering2Res()
Destructor.
Double_t initValue() const
The initial value of the parameter.