laura is hosted by Hepforge, IPPP Durham
Laura++  v2r2p1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauKappaRes.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 "LauKappaRes.hh"
19 
21 
22 
23 LauKappaRes::LauKappaRes(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  mSum_(0.0),
27  mSumSq_(0.0),
28  sAdler_(0.0),
29  b1_(0.0),
30  b2_(0.0),
31  A_(0.0),
32  m0_(0.0),
33  m0Sq_(0.0),
34  denom_(0.0)
35 {
36  // Initialise various constants
38  mSumSq_ = mSum_*mSum_;
39  sAdler_ = LauConstants::mKSq - LauConstants::mPiSq*0.5; // Adler zero at (mK)^2 - 0.5*(mpi)^2
40 
41  // Default constant factors from BES data
42  Double_t b1 = 24.49;
43  Double_t b2 = 0.0;
44  Double_t A = 2.5;
45  Double_t m0 = 3.3;
46  this->setConstants( b1, b2, A, m0 );
47 }
48 
50 {
51 }
52 
54 {
55  this->checkDaughterTypes();
56 
57  Double_t resSpin = this->getSpin();
58  if (resSpin != 0) {
59  std::cerr << "ERROR in LauKappaRes : spin = " << resSpin << " is not zero!" << std::endl;
60  }
61 }
62 
63 void LauKappaRes::setConstants(const Double_t b1, const Double_t b2, const Double_t A, const Double_t m0)
64 {
65  b1_ = b1;
66  b2_ = b2;
67  A_ = A;
68  m0_ = m0;
69  m0Sq_ = m0_*m0_;
70  denom_ = m0Sq_ - sAdler_;
71 }
72 
74 {
75  // Check that the daughter tracks are K and pi. Otherwise issue a warning.
76  Int_t resPairAmpInt = this->getPairInt();
77  if (resPairAmpInt < 1 || resPairAmpInt > 3) {
78  std::cerr << "WARNING in LauKappaRes::checkDaughterTypes : resPairAmpInt = " << resPairAmpInt << " is out of the range [1,2,3]." << std::endl;
79  return;
80  }
81 
82  // Check that daughter types agree
83  const TString& nameDaug1 = this->getNameDaug1();
84  const TString& nameDaug2 = this->getNameDaug2();
85  if ( !( nameDaug1.Contains("pi", TString::kIgnoreCase) && nameDaug2.Contains("k", TString::kIgnoreCase) ) ) {
86  if ( !( nameDaug2.Contains("pi", TString::kIgnoreCase) && nameDaug1.Contains("k", TString::kIgnoreCase) ) ) {
87  std::cerr << "ERROR in LauKappaRes::checkDaughterTypes : Kappa model is using daughters \"" << nameDaug1 << "\" and \"" << nameDaug2 << "\" that are not a kaon and a pion." << std::endl;
88  }
89  }
90 }
91 
92 LauComplex LauKappaRes::resAmp(Double_t mass, Double_t spinTerm)
93 {
94  // This function returns the complex dynamical amplitude for a Kappa distribution
95  // given the invariant mass and cos(helicity) values.
96 
97  // First check that the appropriate daughters are either pi+pi- or K+K-
98  // Check that the daughter tracks are the same type. Otherwise issue a warning
99  // and set the type to be pion for the Kappa distribution. Returns the
100  // integer defined by the enum LauKappaRes::KappaPartType.
101 
102  Double_t s = mass*mass; // Invariant mass squared combination for the system
103  Double_t rho(0.0); // Phase-space factor
104  if (s > mSumSq_) {rho = TMath::Sqrt(1.0 - mSumSq_/s);}
105 
106  Double_t f = b2_*s + b1_; // f(s) function
107  Double_t numerator = s - sAdler_;
108  Double_t gamma(0.0);
109  if (TMath::Abs(denom_) > 1e-10 && TMath::Abs(A_) > 1e-10) {
110  // Decay width of the system
111  gamma = rho*(numerator/denom_)*f*TMath::Exp(-(s - m0Sq_)/A_);
112  }
113 
114  // Now form the complex amplitude - use relativistic BW form (without barrier factors)
115  // Note that the M factor in the denominator is not the "pole" at ~500 MeV, but is
116  // m0_ = 0.9264, the mass when the phase shift goes through 90 degrees.
117 
118  Double_t dMSq = m0Sq_ - s;
119  Double_t widthTerm = gamma*m0_;
120  LauComplex resAmplitude(dMSq, widthTerm);
121 
122  Double_t denomFactor = dMSq*dMSq + widthTerm*widthTerm;
123 
124  Double_t invDenomFactor = 0.0;
125  if (denomFactor > 1e-10) {invDenomFactor = 1.0/denomFactor;}
126 
127  resAmplitude.rescale(spinTerm*invDenomFactor);
128 
129  return resAmplitude;
130 
131 }
132 
133 void LauKappaRes::setResonanceParameter(const TString& name, const Double_t value)
134 {
135  // Set various parameters for the lineshape
136  if (name == "b1") {
137  this->setB1Value(value);
138  std::cout << "INFO in LauKappaRes::setResonanceParameter : Setting parameter b1 = " << this->getB1Value() << std::endl;
139  }
140  else if (name == "b2") {
141  this->setB2Value(value);
142  std::cout << "INFO in LauKappaRes::setResonanceParameter : Setting parameter b2 = " << this->getB2Value() << std::endl;
143  }
144  else if (name == "A") {
145  this->setAValue(value);
146  std::cout << "INFO in LauKappaRes::setResonanceParameter : Setting parameter A = " << this->getAValue() << std::endl;
147  }
148  else if (name == "m0") {
149  this->setM0Value(value);
150  std::cout << "INFO in LauKappaRes::setResonanceParameter : Setting parameter m0 = " << this->getM0Value() << std::endl;
151  }
152  else {
153  std::cerr << "WARNING in LauKappaRes::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
154  }
155 }
156 
Double_t m0Sq_
Square of m0.
Definition: LauKappaRes.hh:152
virtual void setResonanceParameter(const TString &name, const Double_t value)
Set value of the various parameters.
Definition: LauKappaRes.cc:133
ClassImp(LauAbsCoeffSet)
const TString & name() const
The parameter name.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:33
void setB2Value(const Double_t b2)
Set the b2 parameter.
Definition: LauKappaRes.hh:88
Double_t getAValue() const
Get the A parameter value.
Definition: LauKappaRes.hh:118
TString getNameDaug2() const
Get the name of the second daughter of the resonance.
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
Definition: LauKappaRes.cc:92
Double_t getB2Value() const
Get the b2 parameter value.
Definition: LauKappaRes.hh:112
void setM0Value(const Double_t m0)
Set the m0 parameter.
Definition: LauKappaRes.hh:100
Double_t sAdler_
Defined as mK*mK - 0.5*mPi*mPi.
Definition: LauKappaRes.hh:142
Int_t getPairInt() const
Get the integer to identify which DP axis the resonance belongs to.
void setB1Value(const Double_t b1)
Set the b1 parameter.
Definition: LauKappaRes.hh:82
const Double_t mPi
Mass of pi+- (GeV/c^2)
Definition: LauConstants.hh:40
Double_t A_
Factor from BES data.
Definition: LauKappaRes.hh:148
virtual void initialise()
Initialise the model.
Definition: LauKappaRes.cc:53
void setAValue(const Double_t A)
Set the A parameter.
Definition: LauKappaRes.hh:94
Class for defining the Kappa resonance model.
Definition: LauKappaRes.hh:32
const Double_t mPiSq
Square of pi+- mass.
Definition: LauConstants.hh:65
Double_t b1_
Factor from BES data.
Definition: LauKappaRes.hh:144
Double_t getM0Value() const
Get the m0 parameter value.
Definition: LauKappaRes.hh:124
Double_t mSumSq_
Square of mSum.
Definition: LauKappaRes.hh:140
void checkDaughterTypes() const
Check that Kappa daughters are K and pi.
Definition: LauKappaRes.cc:73
Double_t b2_
Factor from BES data.
Definition: LauKappaRes.hh:146
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.
Double_t denom_
Defined as m0Sq - sAdler.
Definition: LauKappaRes.hh:154
Class for defining a complex number.
Definition: LauComplex.hh:47
TString getNameDaug1() const
Get the name of the first daughter of the resonance.
Double_t value() const
The value of the parameter.
Double_t getB1Value() const
Get the b1 parameter value.
Definition: LauKappaRes.hh:106
Int_t getSpin() const
Get the spin of the resonance.
Double_t m0_
Factor from BES data.
Definition: LauKappaRes.hh:150
virtual ~LauKappaRes()
Destructor.
Definition: LauKappaRes.cc:49
void setConstants(const Double_t b1, const Double_t b2, const Double_t A, const Double_t m0)
Set the parameter values.
Definition: LauKappaRes.cc:63
const Double_t mK
Mass of K+- (GeV/c^2)
Definition: LauConstants.hh:44
File containing declaration of LauKappaRes class.
const Double_t mKSq
Square of K+- mass.
Definition: LauConstants.hh:69