laura is hosted by Hepforge, IPPP Durham
Laura++  v1r0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauLASSRes.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2004 - 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 "LauLASSRes.hh"
19 
20 ClassImp(LauLASSRes)
21 
22 
23 LauLASSRes::LauLASSRes(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 LauLASSRes::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 LauLASSRes::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  LauComplex bkgAmplitude(0.0, 0.0);
89  LauComplex totAmplitude(0.0, 0.0);
90 
91  if (mass < 1e-10) {
92  std::cerr << "WARNING in LauLASSRes::amplitude : mass < 1e-10." << std::endl;
93  return LauComplex(0.0, 0.0);
94  }
95 
96  //---------------------------
97  // First do the resonant part
98  //---------------------------
99 
100  // Calculate the width of the resonance (as a function of mass)
101  // q is the momentum of either daughter in the resonance rest-frame
102  Double_t q = this->getQ();
103  Double_t resMass = this->getMass();
104  Double_t resWidth = this->getWidth();
105 
106  Double_t qRatio = q/q0_;
107  Double_t totWidth = resWidth*qRatio*(resMass/mass);
108 
109  Double_t massSq = mass*mass;
110  Double_t massSqTerm = resMassSq_ - massSq;
111 
112  // Compute the complex amplitude
113  resAmplitude = LauComplex(massSqTerm, resMass*totWidth);
114 
115  // Scale by the denominator factor
116  resAmplitude.rescale(spinTerm*(resMassSq_*resWidth/q0_)/(massSqTerm*massSqTerm + resMassSq_*totWidth*totWidth));
117 
118  // Calculate the phase shift term
119  Double_t deltaB = TMath::ATan((2.0*a_*q)/(2.0 + a_*r_*q*q));
120  Double_t cos2PhaseShift = TMath::Cos(2.0*(deltaB + phiB_));
121  Double_t sin2PhaseShift = TMath::Sin(2.0*(deltaB + phiB_));
122  LauComplex phaseShift(cos2PhaseShift, sin2PhaseShift);
123 
124  // Add in the R e^{i phiR} term
125  Double_t reR = R_ * TMath::Cos(phiR_);
126  Double_t imR = R_ * TMath::Sin(phiR_);
127  LauComplex R(reR, imR);
128 
129  // Multiply by the phase shift and R e^{i phiR}
130  resAmplitude = resAmplitude * phaseShift * R;
131 
132 
133  //--------------------------------
134  // Now do the effective range part
135  //--------------------------------
136 
137  // Form the real and imaginary parts
138  Double_t realTerm = q/TMath::Tan(deltaB + phiB_);
139  Double_t imagTerm = q;
140 
141  // Compute the complex amplitude
142  bkgAmplitude = LauComplex(realTerm, imagTerm);
143 
144  // Scale by the numerator and denominator factors
145  bkgAmplitude.rescale(mass*B_/(realTerm*realTerm + imagTerm*imagTerm));
146 
147 
148  //------------------
149  // Add them together
150  //------------------
151 
152  if (mass > cutOff_) {
153  totAmplitude = resAmplitude;
154  } else {
155  totAmplitude = bkgAmplitude + resAmplitude;
156  }
157 
158  // There is no spin term for the LASS shape
159  // Just set it 1.0 in case anyone decides to use it at a later date.
160  spinTerm = 1.0;
161 
162  return totAmplitude;
163 
164 }
165 
166 void LauLASSRes::setResonanceParameter(Double_t value, const TString& name)
167 {
168  // Set various parameters for the LASS lineshape dynamics
169  if (name == "a") {
170  this->setScatteringLength(value);
171  std::cout << "INFO in LauLASSRes::setResonanceParameter : Setting LASS Scattering Length = " << this->getScatteringLength() << std::endl;
172  }
173  else if (name == "r") {
174  this->setEffectiveRange(value);
175  std::cout << "INFO in LauLASSRes::setResonanceParameter : Setting LASS Effective Range = " << this->getEffectiveRange() << std::endl;
176  }
177  else if (name == "R") {
178  this->setResonanceMag(value);
179  std::cout << "INFO in LauLASSRes::setResonanceParameter : Setting LASS Resonance Magnitude = " << this->getResonanceMag() << std::endl;
180  }
181  else if (name == "B") {
182  this->setBackgroundMag(value);
183  std::cout << "INFO in LauLASSRes::setResonanceParameter : Setting LASS Background Magnitude = " << this->getBackgroundMag() << std::endl;
184  }
185  else if (name == "phiR") {
186  this->setResonancePhase(value);
187  std::cout << "INFO in LauLASSRes::setResonanceParameter : Setting LASS Resonance Phase = " << this->getResonancePhase() << std::endl;
188  }
189  else if (name == "phiB") {
190  this->setBackgroundPhase(value);
191  std::cout << "INFO in LauLASSRes::setResonanceParameter : Setting LASS Background Phase = " << this->getBackgroundPhase() << std::endl;
192  }
193  else if (name == "cutOff") {
194  this->setCutOff(value);
195  std::cout << "INFO in LauLASSRes::setResonanceParameter : Setting LASS Cut Off = " << this->getCutOff() << std::endl;
196  }
197  else {
198  std::cerr << "WARNING in LauLASSRes::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
199  }
200 }
201 
Double_t getQ() const
Get the current value of the daughter momentum in the resonance rest frame.
Class for defining the LASS resonance model.
Definition: LauLASSRes.hh:31
Double_t a_
LASS scattering length parameter.
Definition: LauLASSRes.hh:163
Double_t getMass() const
Get the mass of the resonance.
const TString & name() const
The parameter name.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:33
virtual Double_t getEffectiveRange()
Get the effective range parameter.
Definition: LauLASSRes.hh:64
Double_t r_
LASS effective range parameter.
Definition: LauLASSRes.hh:161
Double_t mDaugDiffSq_
Square of mDaugDiff.
Definition: LauLASSRes.hh:157
virtual void setCutOff(Double_t cutOff)
Set the cut off parameter.
Definition: LauLASSRes.hh:130
virtual Double_t getCutOff()
Get the cut off parameter.
Definition: LauLASSRes.hh:94
Double_t getMassDaug1() const
Get the mass of daughter 1.
virtual void setBackgroundPhase(Double_t phiB)
Set the background phase.
Definition: LauLASSRes.hh:120
Double_t getMassDaug2() const
Get the mass of daughter 2.
Double_t R_
LASS resonance magnitude.
Definition: LauLASSRes.hh:167
virtual Double_t getBackgroundPhase()
Get the background phase.
Definition: LauLASSRes.hh:84
Double_t B_
LASS background magnitude.
Definition: LauLASSRes.hh:165
Double_t q0_
Decay momentum of either daughter in the resonance rest frame.
Definition: LauLASSRes.hh:149
Double_t resMassSq_
Square of the resonance mass.
Definition: LauLASSRes.hh:159
virtual void initialise()
Initialise the model.
Definition: LauLASSRes.cc:54
virtual void setEffectiveRange(Double_t r)
Set the effective range parameter.
Definition: LauLASSRes.hh:100
Double_t phiR_
LASS resonance phase.
Definition: LauLASSRes.hh:171
virtual Double_t getResonanceMag()
Get the resonance magnitude.
Definition: LauLASSRes.hh:79
virtual void setScatteringLength(Double_t a)
Set the scattering length parameter.
Definition: LauLASSRes.hh:105
Double_t mDaugDiff_
Difference between the daughter masses.
Definition: LauLASSRes.hh:155
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
Definition: LauLASSRes.cc:82
File containing declaration of LauLASSRes class.
Double_t mDaugSum_
Sum of the daughter masses.
Definition: LauLASSRes.hh:151
virtual Double_t getScatteringLength()
Get the scattering length range parameter.
Definition: LauLASSRes.hh:69
Double_t getWidth() const
Get the width of the resonance.
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc...
virtual Double_t getBackgroundMag()
Get the background magnitude.
Definition: LauLASSRes.hh:74
Double_t cutOff_
LASS cut off parameter.
Definition: LauLASSRes.hh:173
void rescale(Double_t scaleVal)
Scale this by a factor.
Definition: LauComplex.hh:282
File containing LauConstants namespace.
Class for defining a complex number.
Definition: LauComplex.hh:47
virtual void setResonanceMag(Double_t R)
Set the resonance magnitude.
Definition: LauLASSRes.hh:115
virtual void setResonancePhase(Double_t phiR)
Set the resonance phase.
Definition: LauLASSRes.hh:125
Double_t value() const
The value of the parameter.
Double_t phiB_
LASS background phase.
Definition: LauLASSRes.hh:169
void changeResonance(Double_t newMass, Double_t newWidth, Int_t newSpin)
Allow the mass, width and spin of the resonance to be changed.
virtual Double_t getResonancePhase()
Get the resonance phase.
Definition: LauLASSRes.hh:89
Double_t mDaugSumSq_
Square of mDaugSum.
Definition: LauLASSRes.hh:153
Int_t getSpin() const
Get the spin of the resonance.
virtual void setBackgroundMag(Double_t B)
Set the background magnitude.
Definition: LauLASSRes.hh:110
virtual ~LauLASSRes()
Destructor.
Definition: LauLASSRes.cc:50
virtual void setResonanceParameter(Double_t value, const TString &name)
Set value of the various parameters.
Definition: LauLASSRes.cc:166