laura is hosted by Hepforge, IPPP Durham
Laura++  v2r2p1
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 - 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 "LauLASSNRRes.hh"
19 
21 
22 
23 LauLASSNRRes::LauLASSNRRes(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 LauLASSNRRes::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 LauLASSNRRes::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 totAmplitude(0.0, 0.0);
88  LauComplex bkgAmplitude(0.0, 0.0);
89 
90  if (mass < 1e-10) {
91  std::cerr << "WARNING in LauLASSNRRes::amplitude : mass < 1e-10." << std::endl;
92  return LauComplex(0.0, 0.0);
93  }
94 
95  // q is the momentum of either daughter in the resonance rest-frame
96  Double_t q = this->getQ();
97 
98  // Calculate the phase shift term
99  Double_t deltaB = TMath::ATan((2.0*a_*q)/(2.0 + a_*r_*q*q));
100 
101  // Form the real and imaginary parts
102  Double_t realTerm = q/TMath::Tan(deltaB + phiB_);
103  Double_t imagTerm = q;
104 
105  // Compute the complex amplitude
106  bkgAmplitude = LauComplex(realTerm, imagTerm);
107 
108  // Scale by the numerator and denominator factors
109  bkgAmplitude.rescale(spinTerm*mass*B_/(realTerm*realTerm + imagTerm*imagTerm));
110 
111  if (mass < cutOff_) {
112  totAmplitude = bkgAmplitude;
113  }
114 
115  // There is no spin term for the LASS shape
116  // Just set it 1.0 in case anyone decides to use it at a later date.
117  spinTerm = 1.0;
118 
119  return totAmplitude;
120 
121 }
122 
123 void LauLASSNRRes::setResonanceParameter(const TString& name, const Double_t value)
124 {
125  // Set various parameters for the LASS lineshape dynamics
126  if (name == "a") {
127  this->setScatteringLength(value);
128  std::cout << "INFO in LauLASSNRRes::setResonanceParameter : Setting LASS Scattering Length = " << this->getScatteringLength() << std::endl;
129  }
130  else if (name == "r") {
131  this->setEffectiveRange(value);
132  std::cout << "INFO in LauLASSNRRes::setResonanceParameter : Setting LASS Effective Range = " << this->getEffectiveRange() << std::endl;
133  }
134  else if (name == "R") {
135  this->setResonanceMag(value);
136  std::cout << "INFO in LauLASSNRRes::setResonanceParameter : Setting LASS Resonance Magnitude = " << this->getResonanceMag() << std::endl;
137  }
138  else if (name == "B") {
139  this->setBackgroundMag(value);
140  std::cout << "INFO in LauLASSNRRes::setResonanceParameter : Setting LASS Background Magnitude = " << this->getBackgroundMag() << std::endl;
141  }
142  else if (name == "phiR") {
143  this->setResonancePhase(value);
144  std::cout << "INFO in LauLASSNRRes::setResonanceParameter : Setting LASS Resonance Phase = " << this->getResonancePhase() << std::endl;
145  }
146  else if (name == "phiB") {
147  this->setBackgroundPhase(value);
148  std::cout << "INFO in LauLASSNRRes::setResonanceParameter : Setting LASS Background Phase = " << this->getBackgroundPhase() << std::endl;
149  }
150  else if (name == "cutOff") {
151  this->setCutOff(value);
152  std::cout << "INFO in LauLASSNRRes::setResonanceParameter : Setting LASS Cut Off = " << this->getCutOff() << std::endl;
153  }
154  else {
155  std::cerr << "WARNING in LauLASSNRRes::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
156  }
157 }
158 
Double_t getQ() const
Get the current value of the daughter momentum in the resonance rest frame.
virtual Double_t getEffectiveRange()
Get the effective range parameter.
Definition: LauLASSNRRes.hh:64
virtual void setResonancePhase(Double_t phiR)
Set the resonance phase.
virtual Double_t getBackgroundPhase()
Get the background phase.
Definition: LauLASSNRRes.hh:84
Double_t getMass() const
Get the mass of the resonance.
virtual void setEffectiveRange(Double_t r)
Set the effective range parameter.
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.
ClassImp(LauAbsCoeffSet)
Double_t r_
LASS effective range parameter.
virtual void setScatteringLength(Double_t a)
Set the scattering length parameter.
virtual Double_t getBackgroundMag()
Get the background magnitude.
Definition: LauLASSNRRes.hh:74
const TString & name() const
The parameter name.
Double_t mDaugSum_
Sum of the daughter masses.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:33
virtual void setBackgroundMag(Double_t B)
Set the background magnitude.
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
Definition: LauLASSNRRes.cc:82
virtual Double_t getScatteringLength()
Get the scattering length range parameter.
Definition: LauLASSNRRes.hh:69
Double_t getMassDaug1() const
Get the mass of daughter 1.
Double_t a_
LASS scattering length parameter.
Double_t getMassDaug2() const
Get the mass of daughter 2.
Double_t mDaugDiff_
Difference between the daughter masses.
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.
Double_t mDaugDiffSq_
Square of mDaugDiff.
virtual Double_t getResonanceMag()
Get the resonance magnitude.
Definition: LauLASSNRRes.hh:79
Double_t q0_
Decay momentum of either daughter in the resonance rest frame.
virtual Double_t getResonancePhase()
Get the resonance phase.
Definition: LauLASSNRRes.hh:89
Double_t mDaugSumSq_
Square of mDaugSum.
Double_t resMassSq_
Square of the resonance mass.
virtual ~LauLASSNRRes()
Destructor.
Definition: LauLASSNRRes.cc:50
Double_t cutOff_
LASS cut off parameter.
File containing declaration of LauLASSNRRes class.
virtual void setBackgroundPhase(Double_t phiB)
Set the background phase.
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc...
virtual void initialise()
Initialise the model.
Definition: LauLASSNRRes.cc:54
void rescale(Double_t scaleVal)
Scale this by a factor.
Definition: LauComplex.hh:282
Double_t B_
LASS background magnitude.
Double_t phiB_
LASS background phase.
File containing LauConstants namespace.
Class for defining a complex number.
Definition: LauComplex.hh:47
virtual void setCutOff(Double_t cutOff)
Set the cut off parameter.
virtual Double_t getCutOff()
Get the cut off parameter.
Definition: LauLASSNRRes.hh:94
Double_t value() const
The value of the parameter.
virtual void setResonanceMag(Double_t R)
Set the resonance magnitude.
Int_t getSpin() const
Get the spin of the resonance.