laura is hosted by Hepforge, IPPP Durham
Laura++  v3r2
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauLASSNRRes.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2008 - 2014.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
15 #include <iostream>
16 
17 #include "LauConstants.hh"
18 #include "LauLASSNRRes.hh"
19 #include "LauResonanceInfo.hh"
20 
22 
23 
24 LauLASSNRRes::LauLASSNRRes(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters) :
25  LauAbsResonance(resInfo, resPairAmpInt, daughters),
26  r_(0),
27  a_(0),
28  cutOff_(0.0)
29 {
30  // Default values for LASS parameters
31  cutOff_ = 1.8;
32  const Double_t rVal = 3.32;
33  const Double_t aVal = 2.07;
34 
35  const TString& parNameBase = this->getSanitisedName();
36 
37  TString rName(parNameBase);
38  rName += "_r";
39  r_ = resInfo->getExtraParameter( rName );
40  if ( r_ == 0 ) {
41  r_ = new LauParameter( rName, rVal, 0.0, 10.0, kTRUE );
42  r_->secondStage(kTRUE);
43  resInfo->addExtraParameter( r_ );
44  }
45 
46  TString aName(parNameBase);
47  aName += "_a";
48  a_ = resInfo->getExtraParameter( aName );
49  if ( a_ == 0 ) {
50  a_ = new LauParameter( aName, aVal, 0.0, 10.0, kTRUE );
51  a_->secondStage(kTRUE);
52  resInfo->addExtraParameter( a_ );
53  }
54 }
55 
57 {
58 }
59 
61 {
62  Int_t resSpin = this->getSpin();
63  if (resSpin != 0) {
64  std::cerr << "WARNING in LauLASSNRRes::amplitude : Resonance spin is " << resSpin << "." << std::endl;
65  std::cerr << " : LASS amplitude is only for scalers, resetting spin to 0." << std::endl;
66  this->changeResonance( -1.0, -1.0, 0 );
67  }
68 }
69 
70 LauComplex LauLASSNRRes::resAmp(Double_t mass, Double_t /*spinTerm*/)
71 {
72  LauComplex bkgAmplitude(0.0, 0.0);
73 
74  if (mass < 1e-10) {
75  std::cerr << "WARNING in LauLASSNRRes::amplitude : mass < 1e-10." << std::endl;
76  return LauComplex(0.0, 0.0);
77  }
78 
79  if (mass < cutOff_) {
80  // q is the momentum of either daughter in the resonance rest-frame
81  const Double_t q = this->getQ();
82 
83  // Calculate the phase shift term
84  const Double_t rVal = this->getEffectiveRange();
85  const Double_t aVal = this->getScatteringLength();
86  const Double_t qcotdeltaB = 1.0/aVal + (rVal*q*q)/2.0;
87 
88  // Compute the complex amplitude
89  bkgAmplitude = LauComplex(qcotdeltaB, q);
90 
91  // Scale by the numerator and denominator factors
92  bkgAmplitude.rescale(mass/(qcotdeltaB*qcotdeltaB + q*q));
93  }
94 
95  return bkgAmplitude;
96 
97 }
98 
99 const std::vector<LauParameter*>& LauLASSNRRes::getFloatingParameters()
100 {
101  this->clearFloatingParameters();
102 
103  if ( ! this->fixMass() ) {
104  this->addFloatingParameter( this->getMassPar() );
105  }
106 
107  if ( ! this->fixWidth() ) {
108  this->addFloatingParameter( this->getWidthPar() );
109  }
110 
111  if ( ! this->fixEffectiveRange() ) {
112  this->addFloatingParameter( r_ );
113  }
114 
115  if ( ! this->fixScatteringLength() ) {
116  this->addFloatingParameter( a_ );
117  }
118 
119  return this->getParameters();
120 }
121 
122 void LauLASSNRRes::setResonanceParameter(const TString& name, const Double_t value)
123 {
124  // Set various parameters for the LASS lineshape dynamics
125  if (name == "a") {
126  this->setScatteringLength(value);
127  std::cout << "INFO in LauLASSNRRes::setResonanceParameter : Setting LASS Scattering Length = " << this->getScatteringLength() << std::endl;
128  } else if (name == "r") {
129  this->setEffectiveRange(value);
130  std::cout << "INFO in LauLASSNRRes::setResonanceParameter : Setting LASS Effective Range = " << this->getEffectiveRange() << std::endl;
131  } else {
132  std::cerr << "WARNING in LauLASSNRRes::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
133  }
134 }
135 
137 {
138  if (name == "a") {
139  if ( a_->fixed() ) {
140  a_->fixed( kFALSE );
141  this->addFloatingParameter( a_ );
142  } else {
143  std::cerr << "WARNING in LauLASSNRRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
144  }
145  } else if (name == "r") {
146  if ( r_->fixed() ) {
147  r_->fixed( kFALSE );
148  this->addFloatingParameter( r_ );
149  } else {
150  std::cerr << "WARNING in LauLASSNRRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
151  }
152  } else {
153  std::cerr << "WARNING in LauLASSNRRes::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
154  }
155 }
156 
158 {
159  if (name == "a") {
160  return a_;
161  } else if (name == "r") {
162  return r_;
163  } else {
164  std::cerr << "WARNING in LauLASSNRRes::getResonanceParameter: Parameter name not reconised." << std::endl;
165  return 0;
166  }
167 }
168 
169 void LauLASSNRRes::setEffectiveRange(const Double_t r)
170 {
171  r_->value( r );
172  r_->genValue( r );
173  r_->initValue( r );
174 }
175 
176 void LauLASSNRRes::setScatteringLength(const Double_t a)
177 {
178  a_->value( a );
179  a_->genValue( a );
180  a_->initValue( a );
181 }
182 
Double_t getQ() const
Get the current value of the daughter momentum in the resonance rest frame.
LauParameter * getMassPar()
Get the mass parameter of the resonance.
Bool_t fixed() const
Check whether the parameter is fixed or floated.
Double_t getEffectiveRange() const
Get the effective range parameter.
Bool_t fixWidth() const
Get the status of resonance width (fixed or released)
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.
virtual const std::vector< LauParameter * > & getFloatingParameters()
Retrieve the resonance parameters, e.g. so that they can be loaded into a fit.
Definition: LauLASSNRRes.cc:99
File containing declaration of LauResonanceInfo class.
ClassImp(LauAbsCoeffSet)
LauParameter()
Default constructor.
Definition: LauParameter.cc:30
Double_t getScatteringLength() const
Get the scattering length range parameter.
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:33
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
Definition: LauLASSNRRes.cc:70
virtual void floatResonanceParameter(const TString &name)
Allow the various parameters to float in the fit.
void setScatteringLength(const Double_t a)
Set the scattering length parameter value.
Bool_t fixMass() const
Get the status of resonance mass (fixed or released)
Class for defining the non resonant part of the LASS model.
Definition: LauLASSNRRes.hh:31
virtual void setResonanceParameter(const TString &name, const Double_t value)
Set value of a resonance parameter.
void addFloatingParameter(LauParameter *param)
Add parameter to the list of floating parameters.
LauParameter * r_
LASS effective range parameter.
Bool_t fixEffectiveRange() const
See if the effective range parameter is fixed or floating.
std::vector< LauParameter * > & getParameters()
Access the list of floating parameters.
LauParameter * getWidthPar()
Get the width parameter of the resonance.
Bool_t fixScatteringLength() const
See if the scattering length parameter is fixed or floating.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:35
virtual ~LauLASSNRRes()
Destructor.
Definition: LauLASSNRRes.cc:56
Double_t cutOff_
LASS cut off.
File containing declaration of LauLASSNRRes class.
LauParameter * a_
LASS scattering length parameter.
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc...
virtual void initialise()
Initialise the model.
Definition: LauLASSNRRes.cc:60
Double_t initValue() const
The initial value of the parameter.
File containing LauConstants namespace.
Class for defining a complex number.
Definition: LauComplex.hh:47
void setEffectiveRange(const Double_t r)
Set the effective range parameter value.
Double_t value() const
The value of the parameter.
Int_t getSpin() const
Get the spin of the resonance.
Double_t genValue() const
The value generated for the parameter.
virtual LauParameter * getResonanceParameter(const TString &name)
Access the given resonance parameter.
void clearFloatingParameters()
Clear list of floating parameters.