laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauFlatteRes.cc
Go to the documentation of this file.
1 
2 /*
3 Copyright 2004 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 "LauFlatteRes.hh"
30 
31 #include "LauConstants.hh"
32 #include "LauResonanceInfo.hh"
33 
34 #include "TSystem.h"
35 
36 #include <iostream>
37 
39  const Int_t resPairAmpInt,
40  const LauDaughters* daughters ) :
41  LauAbsResonance( resInfo, resPairAmpInt, daughters ),
42  g1_( 0 ),
43  g2_( 0 ),
44  mSumSq0_( 0.0 ),
45  mSumSq1_( 0.0 ),
46  mSumSq2_( 0.0 ),
47  mSumSq3_( 0.0 ),
48  useAdlerTerm_( kFALSE ),
49  sA_( 0.0 ),
50  absorbM0_( kFALSE )
51 {
52  Double_t resMass( 0.0 );
53  Double_t g1Val( 0.0 );
54  Double_t g2Val( 0.0 );
55 
56  const TString& resName = this->getResonanceName();
57 
58  if ( resName == "f_0(980)" ) {
59 
60  // Set the mass threshold values
68 
69  // Set values of mass and coupling constants from:
70  // Phys. Lett. B 607, 243 (2005)
71  resMass = 0.965; // 0.965 +/- 0.008 +/- 0.006 GeV/c^2
72  g1Val = 0.165; // 0.165 +/- 0.010 +/- 0.015 GeV^2
73  g2Val = 4.21 * g1Val; // 4.21 +/- 0.25 +/- 0.21
74 
75  useAdlerTerm_ = kFALSE;
76  sA_ = 0.0;
77 
78  absorbM0_ = kTRUE;
79 
80  } else if ( resName == "K*0_0(1430)" ) {
81 
82  // Set the mass threshold values
91 
92  // Set values of mass and coupling constants from:
93  // Phys. Lett. B 572, 1 (2003)
94  resMass = 1.513; // GeV/c^2
95  g1Val = 0.304; // GeV
96  g2Val = 0.380; // GeV
97 
98  useAdlerTerm_ = kTRUE;
99  sA_ = 0.234;
100 
101  absorbM0_ = kFALSE;
102 
103  } else if ( resName == "K*+_0(1430)" || resName == "K*-_0(1430)" ) {
104 
105  // Set the mass threshold values
114 
115  // Set values of mass and coupling constants from:
116  // Phys. Lett. B 572, 1 (2003)
117  resMass = 1.513; // GeV/c^2
118  g1Val = 0.304; // GeV
119  g2Val = 0.380; // GeV
120 
121  useAdlerTerm_ = kTRUE;
122  sA_ = 0.234;
123 
124  absorbM0_ = kFALSE;
125 
126  } else if ( resName == "a0_0(980)" ) {
127 
128  // Set the mass threshold values
136 
137  // Set values of mass and coupling constants from:
138  // Phys. Rev. D 57, 3860 (1998)
139  resMass = 0.982; // 0.982 +/- 0.003 GeV/c^2
140  g1Val = 0.324 *
141  0.324; // 0.324 +/- 0.015 GeV (NB this value needs to be squared since the paper uses g_1^2 and g_2^2)
142  g2Val = 1.03 *
143  g1Val; // 1.03 +/- 0.14 (NB this is indeed the ratio of what the paper refers to as g_2^2 and g_1^2, so can be used unchanged here)
144 
145  useAdlerTerm_ = kFALSE;
146  sA_ = 0.0;
147 
148  absorbM0_ = kTRUE;
149 
150  } else if ( resName == "a+_0(980)" || resName == "a-_0(980)" ) {
151 
152  // Set the mass threshold values
161 
162  // Set values of mass and coupling constants from:
163  // Phys. Rev. D 57, 3860 (1998)
164  resMass = 0.982; // 0.982 +/- 0.003 GeV/c^2
165  g1Val = 0.324 *
166  0.324; // 0.324 +/- 0.015 GeV (NB this value needs to be squared since the paper uses g_1^2 and g_2^2)
167  g2Val = 1.03 *
168  g1Val; // 1.03 +/- 0.14 (NB this is indeed the ratio of what the paper refers to as g_2^2 and g_1^2, so can be used unchanged here)
169 
170  useAdlerTerm_ = kFALSE;
171  sA_ = 0.0;
172 
173  absorbM0_ = kTRUE;
174  }
175 
176  const TString couplingUnits = ( absorbM0_ ) ? "GeV^2" : "GeV";
177  std::cout << "INFO in LauFlatteRes::LauFlatteRes : Setting default parameters for " << resName
178  << ":\n";
179  std::cout << " : mass = " << resMass << " GeV/c^2\n";
180  std::cout << " : g1 = " << g1Val << " " << couplingUnits
181  << "\n";
182  std::cout << " : g2 = " << g2Val << " " << couplingUnits
183  << "\n";
184  if ( absorbM0_ ) {
185  std::cout << " : Will absorb m0 into couplings\n";
186  } else {
187  std::cout << " : Will not absorb m0 into couplings\n";
188  }
189  if ( useAdlerTerm_ ) {
190  std::cout << " : Will use Adler zero term\n";
191  std::cout << " : sA = " << sA_ << " GeV^2/c^4\n";
192  } else {
193  std::cout << " : Will not use Adler zero term\n";
194  }
195 
196  // Set the mass value
197  LauParameter* massPar = this->getMassPar();
198  if ( massPar ) {
199  massPar->valueAndRange( resMass, 0.0, 3.0 * resMass );
200  massPar->initValue( resMass );
201  massPar->genValue( resMass );
202  } else {
203  std::cerr << "ERROR in LauFlatteRes::LauFlatteRes : Unable to retrieve mass parameter"
204  << std::endl;
205  }
206 
207  // Create the parameters for the coupling constants
208  const TString& parNameBase = this->getSanitisedName();
209 
210  TString g1Name( parNameBase );
211  g1Name += "_g1";
212  g1_ = resInfo->getExtraParameter( g1Name );
213  if ( g1_ == 0 ) {
214  g1_ = new LauParameter( g1Name, g1Val, 0.0, 10.0, kTRUE );
215  g1_->secondStage( kTRUE );
216  resInfo->addExtraParameter( g1_ );
217  }
218 
219  TString g2Name( parNameBase );
220  g2Name += "_g2";
221  g2_ = resInfo->getExtraParameter( g2Name );
222  if ( g2_ == 0 ) {
223  g2_ = new LauParameter( g2Name, g2Val, 0.0, 10.0, kTRUE );
224  g2_->secondStage( kTRUE );
225  resInfo->addExtraParameter( g2_ );
226  }
227 }
228 
230 {
231 }
232 
234 {
235  const TString& resName = this->getResonanceName();
236  if ( resName != "f_0(980)" && resName != "K*0_0(1430)" && resName != "K*+_0(1430)" &&
237  resName != "K*-_0(1430)" && resName != "a0_0(980)" && resName != "a+_0(980)" &&
238  resName != "a-_0(980)" ) {
239  std::cerr << "ERROR in LauFlatteRes::initialise : Unexpected resonance name \"" << resName
240  << "\" for Flatte shape." << std::endl;
241  gSystem->Exit( EXIT_FAILURE );
242  }
243 
244  Int_t resSpin = this->getSpin();
245  if ( resSpin != 0 ) {
246  std::cerr << "WARNING in LauFlatteRes::amplitude : Resonance spin is " << resSpin << "."
247  << std::endl;
248  std::cerr << " : Flatte amplitude is only defined for scalers, resetting spin to 0."
249  << std::endl;
250  this->changeResonance( -1.0, -1.0, 0 );
251  }
252 }
253 
254 LauComplex LauFlatteRes::resAmp( Double_t mass, Double_t spinTerm )
255 {
256  // This function returns the complex dynamical amplitude for a Flatte distribution
257  // given the invariant mass and cos(helicity) values.
258 
259  const Double_t resMass = this->getMass();
260  const Double_t resMassSq = resMass * resMass;
261  const Double_t s = mass * mass; // Invariant mass squared combination for the system
262 
263  const Double_t g1Val = this->getg1Parameter();
264  const Double_t g2Val = this->getg2Parameter();
265 
266  Double_t dMSq = resMassSq - s;
267  Double_t rho1( 0.0 ), rho2( 0.0 );
268  if ( s > mSumSq0_ ) {
269  rho1 = TMath::Sqrt( 1.0 - mSumSq0_ / s ) / 3.0;
270  if ( s > mSumSq1_ ) {
271  rho1 += 2.0 * TMath::Sqrt( 1.0 - mSumSq1_ / s ) / 3.0;
272  if ( s > mSumSq2_ ) {
273  rho2 = 0.5 * TMath::Sqrt( 1.0 - mSumSq2_ / s );
274  if ( s > mSumSq3_ ) {
275  rho2 += 0.5 * TMath::Sqrt( 1.0 - mSumSq3_ / s );
276  } else {
277  // Continue analytically below higher channel thresholds
278  // This contributes to the real part of the amplitude denominator
279  dMSq += g2Val * resMass * 0.5 * TMath::Sqrt( mSumSq3_ / s - 1.0 );
280  }
281  } else {
282  // Continue analytically below higher channel thresholds
283  // This contributes to the real part of the amplitude denominator
284  rho2 = 0.0;
285  dMSq += g2Val * resMass *
286  ( 0.5 * TMath::Sqrt( mSumSq2_ / s - 1.0 ) +
287  0.5 * TMath::Sqrt( mSumSq3_ / s - 1.0 ) );
288  }
289  } else {
290  // Continue analytically below higher channel thresholds
291  // This contributes to the real part of the amplitude denominator
292  dMSq += g1Val * resMass * 2.0 * TMath::Sqrt( mSumSq1_ / s - 1.0 ) / 3.0;
293  }
294  }
295 
296  Double_t massFactor = 1.0;
297  if ( ! absorbM0_ ) {
298  massFactor = resMass;
299  }
300  if ( useAdlerTerm_ ) {
301  massFactor *= ( s - sA_ ) / ( resMassSq - sA_ );
302  }
303  const Double_t width1 = g1Val * rho1 * massFactor;
304  const Double_t width2 = g2Val * rho2 * massFactor;
305  const Double_t widthTerm = width1 + width2;
306 
307  LauComplex resAmplitude( dMSq, widthTerm );
308 
309  const Double_t denomFactor = dMSq * dMSq + widthTerm * widthTerm;
310 
311  Double_t invDenomFactor = 0.0;
312  if ( denomFactor > 1e-10 ) {
313  invDenomFactor = 1.0 / denomFactor;
314  }
315 
316  resAmplitude.rescale( spinTerm * invDenomFactor );
317 
318  return resAmplitude;
319 }
320 
321 const std::vector<LauParameter*>& LauFlatteRes::getFloatingParameters()
322 {
323  this->clearFloatingParameters();
324 
325  if ( ! this->fixMass() ) {
326  this->addFloatingParameter( this->getMassPar() );
327  }
328 
329  // NB the width is given in terms of g1 and g2 so the normal width
330  // parameter should be ignored, hence it is not added to the list
331 
332  if ( ! this->fixg1Parameter() ) {
333  this->addFloatingParameter( g1_ );
334  }
335 
336  if ( ! this->fixg2Parameter() ) {
337  this->addFloatingParameter( g2_ );
338  }
339 
340  return this->getParameters();
341 }
342 
343 void LauFlatteRes::setResonanceParameter( const TString& name, const Double_t value )
344 {
345  if ( name == "g1" ) {
346  this->setg1Parameter( value );
347  std::cout << "INFO in LauFlatteRes::setResonanceParameter : Setting g1 parameter to "
348  << this->getg1Parameter() << std::endl;
349  } else if ( name == "g2" ) {
350  this->setg2Parameter( value );
351  std::cout << "INFO in LauFlatteRes::setResonanceParameter : Setting g2 parameter to "
352  << this->getg2Parameter() << std::endl;
353  } else {
354  std::cerr << "WARNING in LauFlatteRes::setResonanceParameter : Parameter name \"" << name
355  << "\" not recognised." << std::endl;
356  }
357 }
358 
360 {
361  if ( name == "g1" ) {
362  if ( g1_->fixed() ) {
363  g1_->fixed( kFALSE );
364  this->addFloatingParameter( g1_ );
365  } else {
366  std::cerr << "WARNING in LauFlatteRes::floatResonanceParameter: Parameter already floating. No parameter changes made."
367  << std::endl;
368  }
369  } else if ( name == "g2" ) {
370  if ( g2_->fixed() ) {
371  g2_->fixed( kFALSE );
372  this->addFloatingParameter( g2_ );
373  } else {
374  std::cerr << "WARNING in LauFlatteRes::floatResonanceParameter: Parameter already floating. No parameter changes made."
375  << std::endl;
376  }
377  } else {
378  std::cerr << "WARNING in LauFlatteRes::fixResonanceParameter: Parameter name not reconised. No parameter changes made."
379  << std::endl;
380  }
381 }
382 
384 {
385  if ( name == "g1" ) {
386  return g1_;
387  } else if ( name == "g2" ) {
388  return g2_;
389  } else {
390  std::cerr << "WARNING in LauFlatteRes::getResonanceParameter: Parameter name not reconised."
391  << std::endl;
392  return 0;
393  }
394 }
395 
396 void LauFlatteRes::setg1Parameter( const Double_t g1 )
397 {
398  g1_->value( g1 );
399  g1_->genValue( g1 );
400  g1_->initValue( g1 );
401 }
402 
403 void LauFlatteRes::setg2Parameter( const Double_t g2 )
404 {
405  g2_->value( g2 );
406  g2_->genValue( g2 );
407  g2_->initValue( g2 );
408 }
Bool_t useAdlerTerm_
Flag to turn on Adler term in the width.
virtual void floatResonanceParameter(const TString &name)
Allow the various parameters to float in the fit.
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
const TString & getResonanceName() const
Get the name of the resonance.
Double_t getg1Parameter() const
Get the g1 parameter.
LauParameter * getMassPar()
Get the mass parameter of the resonance.
Double_t value() const
The value of the parameter.
Double_t mSumSq1_
Channel 1, subchannel 2 invariant mass.
virtual ~LauFlatteRes()
Destructor.
std::vector< LauParameter * > & getParameters()
Access the list of floating parameters.
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
LauParameter * g1_
Channel 1 coupling parameter.
virtual const std::vector< LauParameter * > & getFloatingParameters()
Retrieve the resonance parameters, e.g. so that they can be loaded into a fit.
LauParameter * getExtraParameter(const TString &parName)
Retrieve an extra parameter of the resonance.
virtual void setResonanceParameter(const TString &name, const Double_t value)
Set value of a resonance parameter.
const Double_t mEta
Mass of eta (GeV/c^2)
Definition: LauConstants.hh:63
LauFlatteRes(LauResonanceInfo *resInfo, const Int_t resPairAmpInt, const LauDaughters *daughters)
Constructor.
Definition: LauFlatteRes.cc:38
void setg2Parameter(const Double_t g2)
Set the g2 parameter.
Int_t getSpin() const
Get the spin of the resonance.
Bool_t secondStage() const
Check whether the parameter should be floated only in the second stage of a two stage fit.
Double_t mSumSq0_
Channel 1, subchannel 1 invariant mass.
Double_t sA_
The Adler zero.
Class for defining a complex number.
Definition: LauComplex.hh:61
void changeResonance(const Double_t newMass, const Double_t newWidth, const Int_t newSpin)
Allow the mass, width and spin of the resonance to be changed.
void addFloatingParameter(LauParameter *param)
Add parameter to the list of floating parameters.
Double_t getg2Parameter() const
Get the g2 parameter.
void rescale(Double_t scaleVal)
Scale this by a factor.
Definition: LauComplex.hh:301
Double_t fixg2Parameter() const
See if the g2 parameter is fixed or floating.
const Double_t mK0
Mass of K0 (GeV/c^2)
Definition: LauConstants.hh:61
Double_t fixg1Parameter() const
See if the g1 parameter is fixed or floating.
Double_t getMass() const
Get the mass of the resonance.
virtual LauParameter * getResonanceParameter(const TString &name)
Access the given resonance parameter.
Bool_t absorbM0_
Flag to specify whether the couplings absorb the m_0 factor.
virtual void initialise()
Initialise the model.
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.
File containing declaration of LauFlatteRes class.
const TString & name() const
The parameter name.
const Double_t mPi0
Mass of pi0 (GeV/c^2)
Definition: LauConstants.hh:57
const Double_t mK
Mass of K+- (GeV/c^2)
Definition: LauConstants.hh:59
Bool_t fixMass() const
Get the status of resonance mass (fixed or released)
Double_t mSumSq2_
Channel 2, subchannel 1 invariant mass.
void setg1Parameter(const Double_t g1)
Set the g1 parameter.
void clearFloatingParameters()
Clear list of floating parameters.
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc....
Double_t mSumSq3_
Channel 2, subchannel 2 invariant mass.
Double_t genValue() const
The value generated for the parameter.
const Double_t mPi
Mass of pi+- (GeV/c^2)
Definition: LauConstants.hh:55
const Double_t mEtaPrime
Mass of eta' (GeV/c^2)
Definition: LauConstants.hh:65
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:47
void valueAndRange(Double_t newValue, Double_t newMinValue, Double_t newMaxValue)
Set the value and range for the parameter.
Double_t initValue() const
The initial value of the parameter.
LauParameter * g2_
Channel 1 coupling parameter.