laura is hosted by Hepforge, IPPP Durham
Laura++  v2r2p1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauLASSBWRes.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2008 - 2013.
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 "LauLASSBWRes.hh"
19 
21 
22 
23 LauLASSBWRes::LauLASSBWRes(TString resName, Double_t resMass, Double_t resWidth, Int_t resSpin,
24  Int_t resCharge, Int_t resPairAmpInt, const LauDaughters* daughters) :
25  LauAbsResonance(resName, resMass, resWidth, resSpin, resCharge, resPairAmpInt, daughters),
26  q0_(0.0),
27  mDaugSum_(0.0),
28  mDaugSumSq_(0.0),
29  mDaugDiff_(0.0),
30  mDaugDiffSq_(0.0),
31  resMassSq_(0.0),
32  r_(0.0),
33  a_(0.0),
34  B_(0.0),
35  R_(0.0),
36  phiB_(0.0),
37  phiR_(0.0),
38  cutOff_(0.0)
39 {
40  // Default values for LASS parameters
41  r_ = 3.32;
42  a_ = 2.07;
43  R_ = 1.0;
44  B_ = 1.0;
45  phiR_ = 0.0;
46  phiB_ = 0.0;
47  cutOff_ = 1.8;
48 }
49 
51 {
52 }
53 
55 {
56  // Create the mass sums and differences
57  Double_t massDaug1 = this->getMassDaug1();
58  Double_t massDaug2 = this->getMassDaug2();
59 
60  mDaugSum_ = massDaug1 + massDaug2;
62 
63  mDaugDiff_ = massDaug1 - massDaug2;
65 
66  // Decay momentum of either daughter in the resonance rest frame
67  // when resonance mass = rest-mass value, m_0 (PDG value)
68 
69  Double_t resMass = this->getMass();
70  resMassSq_ = resMass*resMass;
71 
72  q0_ = TMath::Sqrt((resMassSq_ - mDaugSumSq_)*(resMassSq_ - mDaugDiffSq_))/(2.0*resMass);
73 
74  Int_t resSpin = this->getSpin();
75  if (resSpin != 0) {
76  std::cerr << "WARNING in LauLASSBWRes::amplitude : Resonance spin is " << resSpin << "." << std::endl;
77  std::cerr << " : LASS amplitude is only for scalers, resetting spin to 0." << std::endl;
78  this->changeResonance( -1.0, -1.0, 0 );
79  }
80 }
81 
82 LauComplex LauLASSBWRes::resAmp(Double_t mass, Double_t spinTerm)
83 {
84  // This function returns the complex dynamical amplitude for a Breit-Wigner resonance,
85  // given the invariant mass and cos(helicity) values.
86 
87  LauComplex resAmplitude(0.0, 0.0);
88 
89  if (mass < 1e-10) {
90  std::cerr << "WARNING in LauLASSBWRes::amplitude : mass < 1e-10." << std::endl;
91  return LauComplex(0.0, 0.0);
92  }
93 
94  // Calculate the width of the resonance (as a function of mass)
95  // q is the momentum of either daughter in the resonance rest-frame
96  Double_t q = this->getQ();
97  Double_t resMass = this->getMass();
98  Double_t resWidth = this->getWidth();
99 
100  Double_t qRatio = q/q0_;
101  Double_t totWidth = resWidth*qRatio*(resMass/mass);
102 
103  Double_t massSq = mass*mass;
104  Double_t massSqTerm = resMassSq_ - massSq;
105 
106  // Compute the complex amplitude
107  resAmplitude = LauComplex(massSqTerm, resMass*totWidth);
108 
109  // Scale by the denominator factor
110  resAmplitude.rescale(spinTerm*(resMassSq_*resWidth/q0_)/(massSqTerm*massSqTerm + resMassSq_*totWidth*totWidth));
111 
112  // Calculate the phase shift term
113  Double_t deltaB = TMath::ATan((2.0*a_*q)/(2.0 + a_*r_*q*q));
114  Double_t cos2PhaseShift = TMath::Cos(2.0*(deltaB + phiB_));
115  Double_t sin2PhaseShift = TMath::Sin(2.0*(deltaB + phiB_));
116  LauComplex phaseShift(cos2PhaseShift, sin2PhaseShift);
117 
118  // Add in the R e^{i phiR} term
119  Double_t reR = R_ * TMath::Cos(phiR_);
120  Double_t imR = R_ * TMath::Sin(phiR_);
121  LauComplex R(reR, imR);
122 
123  // Multiply by the phase shift and R e^{i phiR}
124  resAmplitude = resAmplitude * phaseShift * R;
125 
126  // There is no spin term for the LASS shape
127  // Just set it 1.0 in case anyone decides to use it at a later date.
128  spinTerm = 1.0;
129 
130  return resAmplitude;
131 
132 }
133 
134 void LauLASSBWRes::setResonanceParameter(const TString& name, const Double_t value)
135 {
136  // Set various parameters for the LASS lineshape dynamics
137  if (name == "a") {
138  this->setScatteringLength(value);
139  std::cout << "INFO in LauLASSBWRes::setResonanceParameter : Setting LASS Scattering Length = " << this->getScatteringLength() << std::endl;
140  }
141  else if (name == "r") {
142  this->setEffectiveRange(value);
143  std::cout << "INFO in LauLASSBWRes::setResonanceParameter : Setting LASS Effective Range = " << this->getEffectiveRange() << std::endl;
144  }
145  else if (name == "R") {
146  this->setResonanceMag(value);
147  std::cout << "INFO in LauLASSBWRes::setResonanceParameter : Setting LASS Resonance Magnitude = " << this->getResonanceMag() << std::endl;
148  }
149  else if (name == "B") {
150  this->setBackgroundMag(value);
151  std::cout << "INFO in LauLASSBWRes::setResonanceParameter : Setting LASS Background Magnitude = " << this->getBackgroundMag() << std::endl;
152  }
153  else if (name == "phiR") {
154  this->setResonancePhase(value);
155  std::cout << "INFO in LauLASSBWRes::setResonanceParameter : Setting LASS Resonance Phase = " << this->getResonancePhase() << std::endl;
156  }
157  else if (name == "phiB") {
158  this->setBackgroundPhase(value);
159  std::cout << "INFO in LauLASSBWRes::setResonanceParameter : Setting LASS Background Phase = " << this->getBackgroundPhase() << std::endl;
160  }
161  else if (name == "cutOff") {
162  this->setCutOff(value);
163  std::cout << "INFO in LauLASSBWRes::setResonanceParameter : Setting LASS Cut Off = " << this->getCutOff() << std::endl;
164  }
165  else {
166  std::cerr << "WARNING in LauLASSBWRes::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
167  }
168 }
169 
Double_t getQ() const
Get the current value of the daughter momentum in the resonance rest frame.
virtual void setCutOff(Double_t cutOff)
Set the cut off parameter.
virtual ~LauLASSBWRes()
Definition: LauLASSBWRes.cc:50
Double_t mDaugDiff_
Difference between the daughter masses.
virtual Double_t getEffectiveRange()
Get the effective range parameter.
Definition: LauLASSBWRes.hh:64
Double_t getMass() const
Get the mass of the resonance.
virtual Double_t getBackgroundPhase()
Get the background phase.
Definition: LauLASSBWRes.hh:84
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 void setResonanceParameter(const TString &name, const Double_t value)
Set value of a resonance parameter.
ClassImp(LauAbsCoeffSet)
const TString & name() const
The parameter name.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:33
virtual Double_t getResonancePhase()
Get the resonance phase.
Definition: LauLASSBWRes.hh:89
Double_t phiR_
LASS resonance phase.
Double_t resMassSq_
Square of the resonance mass.
Double_t getMassDaug1() const
Get the mass of daughter 1.
virtual void setEffectiveRange(Double_t r)
Set the effective range parameter.
File containing declaration of LauLASSBWRes class.
Double_t getMassDaug2() const
Get the mass of daughter 2.
virtual void setBackgroundPhase(Double_t phiB)
Set the background phase.
virtual void setResonancePhase(Double_t phiR)
Set the resonance phase.
Double_t mDaugDiffSq_
Square of mDaugDiff.
virtual Double_t getScatteringLength()
Get the scattering length range parameter.
Definition: LauLASSBWRes.hh:69
Double_t r_
LASS effective range parameter.
Double_t R_
LASS resonance magnitude.
virtual void initialise()
Initialise the model.
Definition: LauLASSBWRes.cc:54
Double_t q0_
Decay momentum of either daughter in the resonance rest frame.
virtual void setScatteringLength(Double_t a)
Set the scattering length parameter.
virtual Double_t getResonanceMag()
Get the resonance magnitude.
Definition: LauLASSBWRes.hh:79
Double_t a_
LASS scattering length parameter.
Double_t phiB_
LASS background phase.
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
Definition: LauLASSBWRes.cc:82
virtual void setBackgroundMag(Double_t B)
Set the background magnitude.
virtual Double_t getCutOff()
Get the cut off parameter.
Definition: LauLASSBWRes.hh:94
Double_t getWidth() const
Get the width of the resonance.
Double_t mDaugSum_
Sum of the daughter masses.
virtual void setResonanceMag(Double_t R)
Set the resonance magnitude.
Double_t mDaugSumSq_
Square of mDaugSum.
Class for defining the resonant part of the LASS model.
Definition: LauLASSBWRes.hh:31
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:282
File containing LauConstants namespace.
virtual Double_t getBackgroundMag()
Get the background magnitude.
Definition: LauLASSBWRes.hh:74
Class for defining a complex number.
Definition: LauComplex.hh:47
Double_t value() const
The value of the parameter.
Int_t getSpin() const
Get the spin of the resonance.