laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
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 <iostream>
30 
31 #include "LauConstants.hh"
32 #include "LauFlatteRes.hh"
33 #include "LauResonanceInfo.hh"
34 
35 #include "TSystem.h"
36 
38 
39 
40 LauFlatteRes::LauFlatteRes(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, 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
65 
66  // Set values of mass and coupling constants from:
67  // Phys. Lett. B 607, 243 (2005)
68  resMass = 0.965; // 0.965 +/- 0.008 +/- 0.006 GeV/c^2
69  g1Val = 0.165; // 0.165 +/- 0.010 +/- 0.015 GeV^2
70  g2Val = 4.21*g1Val; // 4.21 +/- 0.25 +/- 0.21
71 
72  useAdlerTerm_ = kFALSE;
73  sA_ = 0.0;
74 
75  absorbM0_ = kTRUE;
76 
77  } else if ( resName == "K*0_0(1430)" ) {
78 
79  // Set the mass threshold values
84 
85  // Set values of mass and coupling constants from:
86  // Phys. Lett. B 572, 1 (2003)
87  resMass = 1.513; // GeV/c^2
88  g1Val = 0.304; // GeV
89  g2Val = 0.380; // GeV
90 
91  useAdlerTerm_ = kTRUE;
92  sA_ = 0.234;
93 
94  absorbM0_ = kFALSE;
95 
96  } else if ( resName == "K*+_0(1430)" || resName == "K*-_0(1430)" ) {
97 
98  // Set the mass threshold values
103 
104  // Set values of mass and coupling constants from:
105  // Phys. Lett. B 572, 1 (2003)
106  resMass = 1.513; // GeV/c^2
107  g1Val = 0.304; // GeV
108  g2Val = 0.380; // GeV
109 
110  useAdlerTerm_ = kTRUE;
111  sA_ = 0.234;
112 
113  absorbM0_ = kFALSE;
114 
115  } else if ( resName == "a0_0(980)" ) {
116 
117  // Set the mass threshold values
122 
123  // Set values of mass and coupling constants from:
124  // Phys. Rev. D 57, 3860 (1998)
125  resMass = 0.982; // 0.982 +/- 0.003 GeV/c^2
126  g1Val = 0.324*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)
127  g2Val = 1.03*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)
128 
129  useAdlerTerm_ = kFALSE;
130  sA_ = 0.0;
131 
132  absorbM0_ = kTRUE;
133 
134  } else if ( resName == "a+_0(980)" || resName == "a-_0(980)" ) {
135 
136  // Set the mass threshold values
141 
142  // Set values of mass and coupling constants from:
143  // Phys. Rev. D 57, 3860 (1998)
144  resMass = 0.982; // 0.982 +/- 0.003 GeV/c^2
145  g1Val = 0.324*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)
146  g2Val = 1.03*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)
147 
148  useAdlerTerm_ = kFALSE;
149  sA_ = 0.0;
150 
151  absorbM0_ = kTRUE;
152 
153  }
154 
155  const TString couplingUnits = (absorbM0_) ? "GeV^2" : "GeV";
156  std::cout << "INFO in LauFlatteRes::LauFlatteRes : Setting default parameters for " << resName << ":\n";
157  std::cout << " : mass = " << resMass << " GeV/c^2\n";
158  std::cout << " : g1 = " << g1Val << " " << couplingUnits << "\n";
159  std::cout << " : g2 = " << g2Val << " " << couplingUnits << "\n";
160  if ( absorbM0_ ) {
161  std::cout << " : Will absorb m0 into couplings\n";
162  } else {
163  std::cout << " : Will not absorb m0 into couplings\n";
164  }
165  if ( useAdlerTerm_ ) {
166  std::cout << " : Will use Adler zero term\n";
167  std::cout << " : sA = " << sA_ << " GeV^2/c^4\n";
168  } else {
169  std::cout << " : Will not use Adler zero term\n";
170  }
171 
172  // Set the mass value
173  LauParameter* massPar = this->getMassPar();
174  if ( massPar ) {
175  massPar->valueAndRange(resMass,0.0,3.0*resMass);
176  massPar->initValue(resMass);
177  massPar->genValue(resMass);
178  } else {
179  std::cerr << "ERROR in LauFlatteRes::LauFlatteRes : Unable to retrieve mass parameter" << std::endl;
180  }
181 
182  // Create the parameters for the coupling constants
183  const TString& parNameBase = this->getSanitisedName();
184 
185  TString g1Name(parNameBase);
186  g1Name += "_g1";
187  g1_ = resInfo->getExtraParameter( g1Name );
188  if ( g1_ == 0 ) {
189  g1_ = new LauParameter( g1Name, g1Val, 0.0, 10.0, kTRUE );
190  g1_->secondStage(kTRUE);
191  resInfo->addExtraParameter( g1_ );
192  }
193 
194  TString g2Name(parNameBase);
195  g2Name += "_g2";
196  g2_ = resInfo->getExtraParameter( g2Name );
197  if ( g2_ == 0 ) {
198  g2_ = new LauParameter( g2Name, g2Val, 0.0, 10.0, kTRUE );
199  g2_->secondStage(kTRUE);
200  resInfo->addExtraParameter( g2_ );
201  }
202 }
203 
205 {
206 }
207 
209 {
210  const TString& resName = this->getResonanceName();
211  if ( resName != "f_0(980)" && resName != "K*0_0(1430)" && resName != "K*+_0(1430)" && resName != "K*-_0(1430)" &&
212  resName != "a0_0(980)" && resName != "a+_0(980)" && resName != "a-_0(980)" ) {
213  std::cerr << "ERROR in LauFlatteRes::initialise : Unexpected resonance name \"" << resName << "\" for Flatte shape." << std::endl;
214  gSystem->Exit(EXIT_FAILURE);
215  }
216 
217  Int_t resSpin = this->getSpin();
218  if (resSpin != 0) {
219  std::cerr << "WARNING in LauFlatteRes::amplitude : Resonance spin is " << resSpin << "." << std::endl;
220  std::cerr << " : Flatte amplitude is only defined for scalers, resetting spin to 0." << std::endl;
221  this->changeResonance( -1.0, -1.0, 0 );
222  }
223 }
224 
225 LauComplex LauFlatteRes::resAmp(Double_t mass, Double_t spinTerm)
226 {
227  // This function returns the complex dynamical amplitude for a Flatte distribution
228  // given the invariant mass and cos(helicity) values.
229 
230  const Double_t resMass = this->getMass();
231  const Double_t resMassSq = resMass*resMass;
232  const Double_t s = mass*mass; // Invariant mass squared combination for the system
233 
234  const Double_t g1Val = this->getg1Parameter();
235  const Double_t g2Val = this->getg2Parameter();
236 
237  Double_t dMSq = resMassSq - s;
238  Double_t rho1(0.0), rho2(0.0);
239  if (s > mSumSq0_) {
240  rho1 = TMath::Sqrt(1.0 - mSumSq0_/s)/3.0;
241  if (s > mSumSq1_) {
242  rho1 += 2.0*TMath::Sqrt(1.0 - mSumSq1_/s)/3.0;
243  if (s > mSumSq2_) {
244  rho2 = 0.5*TMath::Sqrt(1.0 - mSumSq2_/s);
245  if (s > mSumSq3_) {
246  rho2 += 0.5*TMath::Sqrt(1.0 - mSumSq3_/s);
247  } else {
248  // Continue analytically below higher channel thresholds
249  // This contributes to the real part of the amplitude denominator
250  dMSq += g2Val*resMass*0.5*TMath::Sqrt(mSumSq3_/s - 1.0);
251  }
252  } else {
253  // Continue analytically below higher channel thresholds
254  // This contributes to the real part of the amplitude denominator
255  rho2 = 0.0;
256  dMSq += g2Val*resMass*(0.5*TMath::Sqrt(mSumSq2_/s - 1.0) + 0.5*TMath::Sqrt(mSumSq3_/s - 1.0));
257  }
258  } else {
259  // Continue analytically below higher channel thresholds
260  // This contributes to the real part of the amplitude denominator
261  dMSq += g1Val*resMass*2.0*TMath::Sqrt(mSumSq1_/s - 1.0)/3.0;
262  }
263  }
264 
265  Double_t massFactor = 1.0;
266  if ( ! absorbM0_ ) {
267  massFactor = resMass;
268  }
269  if (useAdlerTerm_) {
270  massFactor *= ( s - sA_ ) / ( resMassSq - sA_ );
271  }
272  const Double_t width1 = g1Val*rho1*massFactor;
273  const Double_t width2 = g2Val*rho2*massFactor;
274  const Double_t widthTerm = width1 + width2;
275 
276  LauComplex resAmplitude(dMSq, widthTerm);
277 
278  const Double_t denomFactor = dMSq*dMSq + widthTerm*widthTerm;
279 
280  Double_t invDenomFactor = 0.0;
281  if (denomFactor > 1e-10) {invDenomFactor = 1.0/denomFactor;}
282 
283  resAmplitude.rescale(spinTerm*invDenomFactor);
284 
285  return resAmplitude;
286 }
287 
288 const std::vector<LauParameter*>& LauFlatteRes::getFloatingParameters()
289 {
290  this->clearFloatingParameters();
291 
292  if ( ! this->fixMass() ) {
293  this->addFloatingParameter( this->getMassPar() );
294  }
295 
296  // NB the width is given in terms of g1 and g2 so the normal width
297  // parameter should be ignored, hence it is not added to the list
298 
299  if ( ! this->fixg1Parameter() ) {
300  this->addFloatingParameter( g1_ );
301  }
302 
303  if ( ! this->fixg2Parameter() ) {
304  this->addFloatingParameter( g2_ );
305  }
306 
307  return this->getParameters();
308 }
309 
310 void LauFlatteRes::setResonanceParameter(const TString& name, const Double_t value)
311 {
312  if (name == "g1") {
313  this->setg1Parameter(value);
314  std::cout << "INFO in LauFlatteRes::setResonanceParameter : Setting g1 parameter to " << this->getg1Parameter() << std::endl;
315  } else if (name == "g2") {
316  this->setg2Parameter(value);
317  std::cout << "INFO in LauFlatteRes::setResonanceParameter : Setting g2 parameter to " << this->getg2Parameter() << std::endl;
318  } else {
319  std::cerr << "WARNING in LauFlatteRes::setResonanceParameter : Parameter name \"" << name << "\" not recognised." << std::endl;
320  }
321 }
322 
324 {
325  if (name == "g1") {
326  if ( g1_->fixed() ) {
327  g1_->fixed( kFALSE );
328  this->addFloatingParameter( g1_ );
329  } else {
330  std::cerr << "WARNING in LauFlatteRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
331  }
332  } else if (name == "g2") {
333  if ( g2_->fixed() ) {
334  g2_->fixed( kFALSE );
335  this->addFloatingParameter( g2_ );
336  } else {
337  std::cerr << "WARNING in LauFlatteRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
338  }
339  } else {
340  std::cerr << "WARNING in LauFlatteRes::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
341  }
342 }
343 
345 {
346  if (name == "g1") {
347  return g1_;
348  } else if (name == "g2") {
349  return g2_;
350  } else {
351  std::cerr << "WARNING in LauFlatteRes::getResonanceParameter: Parameter name not reconised." << std::endl;
352  return 0;
353  }
354 }
355 
356 void LauFlatteRes::setg1Parameter(const Double_t g1)
357 {
358  g1_->value( g1 );
359  g1_->genValue( g1 );
360  g1_->initValue( g1 );
361 }
362 
363 void LauFlatteRes::setg2Parameter(const Double_t g2)
364 {
365  g2_->value( g2 );
366  g2_->genValue( g2 );
367  g2_->initValue( g2 );
368 }
369 
virtual LauParameter * getResonanceParameter(const TString &name)
Access the given resonance parameter.
const Double_t mEta
Mass of eta (GeV/c^2)
Definition: LauConstants.hh:62
LauParameter * getMassPar()
Get the mass parameter of the resonance.
virtual void initialise()
Initialise the model.
Bool_t fixed() const
Check whether the parameter is fixed or floated.
Bool_t absorbM0_
Flag to specify whether the couplings absorb the m_0 factor.
LauParameter * g2_
Channel 1 coupling parameter.
Double_t getMass() const
Get the mass of the resonance.
const TString & getResonanceName() const
Get the name of the resonance.
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.
File containing declaration of LauResonanceInfo class.
ClassImp(LauAbsCoeffSet)
const Double_t mK0
Mass of K0 (GeV/c^2)
Definition: LauConstants.hh:60
LauParameter()
Default constructor.
Definition: LauParameter.cc:44
Class for defining the properties of a resonant particle.
const TString & name() const
The parameter name.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:47
Double_t mSumSq1_
Channel 1, subchannel 2 invariant mass.
Double_t fixg2Parameter() const
See if the g2 parameter is fixed or floating.
void setg1Parameter(const Double_t g1)
Set the g1 parameter.
Double_t mSumSq3_
Channel 2, subchannel 2 invariant mass.
void setg2Parameter(const Double_t g2)
Set the g2 parameter.
Double_t sA_
The Adler zero.
void valueAndRange(Double_t newValue, Double_t newMinValue, Double_t newMaxValue)
Set the value and range for the parameter.
Bool_t fixMass() const
Get the status of resonance mass (fixed or released)
const Double_t mPi
Mass of pi+- (GeV/c^2)
Definition: LauConstants.hh:54
LauParameter * g1_
Channel 1 coupling parameter.
void addFloatingParameter(LauParameter *param)
Add parameter to the list of floating parameters.
Bool_t useAdlerTerm_
Flag to turn on Adler term in the width.
Double_t getg2Parameter() const
Get the g2 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.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:49
const Double_t mEtaPrime
Mass of eta&#39; (GeV/c^2)
Definition: LauConstants.hh:64
virtual ~LauFlatteRes()
Destructor.
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc...
void rescale(Double_t scaleVal)
Scale this by a factor.
Definition: LauComplex.hh:299
Double_t initValue() const
The initial value of the parameter.
virtual const std::vector< LauParameter * > & getFloatingParameters()
Retrieve the resonance parameters, e.g. so that they can be loaded into a fit.
Double_t mSumSq2_
Channel 2, subchannel 1 invariant mass.
virtual void setResonanceParameter(const TString &name, const Double_t value)
Set value of a resonance parameter.
File containing LauConstants namespace.
Class for defining a complex number.
Definition: LauComplex.hh:61
Double_t mSumSq0_
Channel 1, subchannel 1 invariant mass.
Double_t fixg1Parameter() const
See if the g1 parameter is fixed or floating.
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
Double_t value() const
The value of the parameter.
Int_t getSpin() const
Get the spin of the resonance.
Class for defining the Flatte resonance model.
Definition: LauFlatteRes.hh:45
Double_t genValue() const
The value generated for the parameter.
const Double_t mK
Mass of K+- (GeV/c^2)
Definition: LauConstants.hh:58
const Double_t mPi0
Mass of pi0 (GeV/c^2)
Definition: LauConstants.hh:56
File containing declaration of LauFlatteRes class.
void clearFloatingParameters()
Clear list of floating parameters.
Double_t getg1Parameter() const
Get the g1 parameter.