laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauRelBreitWignerRes.cc
Go to the documentation of this file.
1 
2 /*
3 Copyright 2004 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
29 #include <iostream>
30 
31 #include "LauConstants.hh"
32 #include "LauRelBreitWignerRes.hh"
33 
35 
36 
37 LauRelBreitWignerRes::LauRelBreitWignerRes(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters) :
38  LauAbsResonance(resInfo, resPairAmpInt, daughters),
39  q0_(0.0),
40  p0_(0.0),
41  pstar0_(0.0),
42  erm0_(0.0),
43  resMass_(0.0),
44  resMassSq_(0.0),
45  resWidth_(0.0),
46  resRadius_(0.0),
47  parRadius_(0.0),
48  mDaugSum_(0.0),
49  mDaugSumSq_(0.0),
50  mDaugDiff_(0.0),
51  mDaugDiffSq_(0.0),
52  mParentSq_(0.0),
53  mBachSq_(0.0),
54  FR0_(1.0),
55  FP0_(1.0)
56 {
57 }
58 
60 {
61 }
62 
64 {
65  // Set-up various constants. This must be called again if the mass/width/spin
66  // of a resonance changes...
67 
68  resMass_ = this->getMass();
69  resWidth_ = this->getWidth();
70  resRadius_ = this->getResRadius();
71  parRadius_ = this->getParRadius();
72 
73  Double_t massDaug1 = this->getMassDaug1();
74  Double_t massDaug2 = this->getMassDaug2();
75  Double_t massBachelor = this->getMassBachelor();
76  Double_t massParent = this->getMassParent();
77 
78  // Create the mass squares, sums, differences etc.
80  mDaugSum_ = massDaug1 + massDaug2;
82  mDaugDiff_ = massDaug1 - massDaug2;
84  mParentSq_ = massParent*massParent;
85  mBachSq_ = massBachelor*massBachelor;
86 
87  // Create an effective resonance pole mass to protect against resonances
88  // that are below threshold
89  Double_t effResMass = resMass_;
90  Double_t effResMassSq = resMassSq_;
91  if (resMassSq_ - mDaugSumSq_ < 0.0 || resMass_ > massParent - massBachelor){
92  Double_t minMass = mDaugSum_;
93  Double_t maxMass = massParent - massBachelor;
94  Double_t tanhTerm = std::tanh( (resMass_ - ((minMass + maxMass)/2))/(maxMass-minMass));
95  effResMass = minMass + (maxMass-minMass)*(1+tanhTerm)/2;
96  effResMassSq = effResMass*effResMass;
97  }
98 
99  // Decay momentum of either daughter in the resonance rest frame
100  // when resonance mass = rest-mass value, m_0 (PDG value)
101  Double_t term1 = effResMassSq - mDaugSumSq_;
102  Double_t term2 = effResMassSq - mDaugDiffSq_;
103  Double_t term12 = term1*term2;
104  if (term12 > 0.0) {
105  q0_ = TMath::Sqrt(term12)/(2.0*effResMass);
106  } else {
107  q0_ = 0.0;
108  }
109 
110  // Momentum of the bachelor particle in the resonance rest frame
111  // when resonance mass = rest-mass value, m_0 (PDG value)
112  Double_t eBach = (mParentSq_ - effResMassSq - mBachSq_)/(2.0*effResMass);
113  Double_t termBach = eBach*eBach - mBachSq_;
114  if ( eBach<0.0 || termBach<0.0 ) {
115  p0_ = 0.0;
116  } else {
117  p0_ = TMath::Sqrt( termBach );
118  }
119 
120  // Momentum of the bachelor particle in the parent rest frame
121  // when resonance mass = rest-mass value, m_0 (PDG value)
122  Double_t eStarBach = (mParentSq_ + mBachSq_ - effResMassSq)/(2.0*massParent);
123  Double_t termStarBach = eStarBach*eStarBach - mBachSq_;
124  if ( eStarBach<0.0 || termStarBach<0.0 ) {
125  pstar0_ = 0.0;
126  } else {
127  pstar0_ = TMath::Sqrt( termStarBach );
128  }
129 
130  // Covariant factor when resonance mass = rest-mass value, m_0 (PDF value)
131  erm0_ = (mParentSq_ + effResMassSq - mBachSq_)/(2.0*massParent*effResMass);
132  this->calcCovFactor( erm0_ );
133 
134  // Calculate the Blatt-Weisskopf form factor for the case when m = m_0
135  FR0_ = 1.0;
136  FP0_ = 1.0;
137  const Int_t resSpin = this->getSpin();
138  if ( resSpin > 0 ) {
139  const LauBlattWeisskopfFactor* resBWFactor = this->getResBWFactor();
140  const LauBlattWeisskopfFactor* parBWFactor = this->getParBWFactor();
141  FR0_ = (resBWFactor!=0) ? resBWFactor->calcFormFactor(q0_) : 1.0;
142  switch ( parBWFactor->getRestFrame() ) {
144  FP0_ = (parBWFactor!=0) ? parBWFactor->calcFormFactor(p0_) : 1.0;
145  break;
147  FP0_ = (parBWFactor!=0) ? parBWFactor->calcFormFactor(pstar0_) : 1.0;
148  break;
150  {
151  Double_t covFactor = this->getCovFactor();
152  if ( resSpin > 2 ) {
153  covFactor = TMath::Power( covFactor, 1.0/resSpin );
154  } else if ( resSpin == 2 ) {
155  covFactor = TMath::Sqrt( covFactor );
156  }
157  FP0_ = (parBWFactor!=0) ? parBWFactor->calcFormFactor(pstar0_*covFactor) : 1.0;
158  break;
159  }
160  }
161  }
162 }
163 
164 LauComplex LauRelBreitWignerRes::resAmp(Double_t mass, Double_t spinTerm)
165 {
166  // This function returns the complex dynamical amplitude for a Breit-Wigner resonance,
167  // given the invariant mass and cos(helicity) values.
168 
169  LauComplex resAmplitude(0.0, 0.0);
170 
171  if (mass < 1e-10) {
172  std::cerr << "WARNING in LauRelBreitWignerRes::amplitude : mass < 1e-10." << std::endl;
173  return LauComplex(0.0, 0.0);
174  } else if (q0_ < 1e-30) {
175  return LauComplex(0.0, 0.0);
176  }
177 
178  // Calculate the width of the resonance (as a function of mass)
179  // First, calculate the various form factors.
180  // NB
181  // q is the momentum of either daughter in the resonance rest-frame,
182  // p is the momentum of the bachelor in the resonance rest-frame,
183  // pstar is the momentum of the bachelor in the parent rest-frame.
184  // These quantities have been calculate in LauAbsResonance::amplitude(...)
185 
186  const Double_t resMass = this->getMass();
187  const Double_t resWidth = this->getWidth();
188  const Double_t resRadius = this->getResRadius();
189  const Double_t parRadius = this->getParRadius();
190 
191  // If the mass is floating and its value has changed we need to
192  // recalculate everything that assumes that value
193  // Similarly for the BW radii
194  if ( ( (!this->fixMass()) && resMass != resMass_ ) ||
195  ( (!this->fixResRadius()) && resRadius != resRadius_ ) ||
196  ( (!this->fixParRadius()) && parRadius != parRadius_ ) ) {
197 
198  this->initialise();
199  }
200 
201  const Int_t resSpin = this->getSpin();
202  const Double_t q = this->getQ();
203  const Double_t p = this->getP();
204  const Double_t pstar = this->getPstar();
205 
206  // Get barrier scaling factors
207  Double_t fFactorR(1.0);
208  Double_t fFactorB(1.0);
209  if ( resSpin > 0 ) {
210  const LauBlattWeisskopfFactor* resBWFactor = this->getResBWFactor();
211  const LauBlattWeisskopfFactor* parBWFactor = this->getParBWFactor();
212  fFactorR = (resBWFactor!=0) ? resBWFactor->calcFormFactor(q) : 1.0;
213  switch ( parBWFactor->getRestFrame() ) {
215  fFactorB = (parBWFactor!=0) ? parBWFactor->calcFormFactor(p) : 1.0;
216  break;
218  fFactorB = (parBWFactor!=0) ? parBWFactor->calcFormFactor(pstar) : 1.0;
219  break;
221  {
222  Double_t covFactor = this->getCovFactor();
223  if ( resSpin > 2 ) {
224  covFactor = TMath::Power( covFactor, 1.0/resSpin );
225  } else if ( resSpin == 2 ) {
226  covFactor = TMath::Sqrt( covFactor );
227  }
228  fFactorB = (parBWFactor!=0) ? parBWFactor->calcFormFactor(pstar*covFactor) : 1.0;
229  break;
230  }
231  }
232  }
233  const Double_t fFactorRRatio = fFactorR/FR0_;
234  const Double_t fFactorBRatio = fFactorB/FP0_;
235 
236  // If ignoreMomenta is set, set the total width simply as the pole width, and do
237  // not include any momentum-dependent barrier factors (set them to unity)
238  Double_t totWidth(resWidth);
239 
240  if (!this->ignoreMomenta()) {
241 
242  const Double_t qRatio = q/q0_;
243  Double_t qTerm(0.0);
244  if (resSpin == 0) {
245  qTerm = qRatio;
246  } else if (resSpin == 1) {
247  qTerm = qRatio*qRatio*qRatio;
248  } else if (resSpin == 2) {
249  qTerm = qRatio*qRatio*qRatio*qRatio*qRatio;
250  } else {
251  qTerm = TMath::Power(qRatio, 2.0*resSpin + 1.0);
252  }
253 
254  totWidth = resWidth*qTerm*(resMass/mass)*fFactorRRatio*fFactorRRatio;
255 
256  }
257 
258  const Double_t massSq = mass*mass;
259  const Double_t massSqTerm = resMassSq_ - massSq;
260 
261  // Compute the complex amplitude
262  resAmplitude = LauComplex(massSqTerm, resMass*totWidth);
263 
264  // Scale by the denominator factor, as well as the spin term
265  Double_t scale = spinTerm/(massSqTerm*massSqTerm + resMassSq_*totWidth*totWidth);
266 
267  // Include Blatt-Weisskopf barrier factors
268  if (!this->ignoreBarrierScaling()) {
269  scale *= fFactorRRatio*fFactorBRatio;
270  }
271 
272  resAmplitude.rescale(scale);
273 
274  return resAmplitude;
275 }
276 
277 const std::vector<LauParameter*>& LauRelBreitWignerRes::getFloatingParameters()
278 {
279  this->clearFloatingParameters();
280 
281  if ( ! this->fixMass() ) {
282  this->addFloatingParameter( this->getMassPar() );
283  }
284  if ( ! this->fixWidth() ) {
285  this->addFloatingParameter( this->getWidthPar() );
286  }
287  if ( ! this->fixResRadius() ) {
288  this->addFloatingParameter( this->getResBWFactor()->getRadiusParameter() );
289  }
290  if ( ! this->fixParRadius() ) {
291  this->addFloatingParameter( this->getParBWFactor()->getRadiusParameter() );
292  }
293 
294  return this->getParameters();
295 }
296 
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.
Double_t getMassBachelor() const
Get the mass of the bachelor daughter.
Bool_t fixWidth() const
Get the status of resonance width (fixed or released)
Double_t getMass() const
Get the mass of the resonance.
void calcCovFactor(const Double_t erm)
Calculate the spin-dependent covariant factor.
ClassImp(LauAbsCoeffSet)
Double_t q0_
Momentum of the daughters in the resonance rest frame (at pole mass)
Double_t getMassParent() const
Get the parent particle mass.
Double_t resMassSq_
Square of the resonance mass.
Class for defining the properties of a resonant particle.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:47
Double_t resRadius_
The resonance barrier radius.
Double_t calcFormFactor(const Double_t p) const
Calculate form factor value.
Double_t getPstar() const
Get the current value of the bachelor momentum in the parent rest frame.
virtual ~LauRelBreitWignerRes()
Destructor.
Double_t getP() const
Get the current value of the bachelor momentum in the resonance rest frame.
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
Double_t parRadius_
The parent barrier radius.
Double_t mDaugSum_
Sum of the two daughter masses.
Double_t resMass_
The resonance mass.
Double_t getMassDaug1() const
Get the mass of daughter 1.
RestFrame getRestFrame() const
Retrieve the rest frame information.
Bool_t fixResRadius() const
Get the status of resonance barrier radius (fixed or released)
Double_t getParRadius() const
Get the radius of the parent barrier factor.
Double_t resWidth_
The resonance width.
File containing declaration of LauRelBreitWignerRes class.
Bool_t fixMass() const
Get the status of resonance mass (fixed or released)
Double_t getMassDaug2() const
Get the mass of daughter 2.
Double_t FR0_
Value of the form factor for resonance decay (at pole mass)
Double_t mParentSq_
Square of the parent mass.
Double_t mBachSq_
Square of the bachelor mass.
void addFloatingParameter(LauParameter *param)
Add parameter to the list of floating parameters.
LauBlattWeisskopfFactor * getParBWFactor()
Get the centrifugal barrier for the parent decay.
Double_t p0_
Momentum of the bachelor in the resonance rest frame (at pole mass)
Double_t pstar0_
Momentum of the bachelor in the parent rest frame (at pole mass)
std::vector< LauParameter * > & getParameters()
Access the list of floating parameters.
LauParameter * getWidthPar()
Get the width parameter of the resonance.
Double_t erm0_
Covariant factor (at pole mass)
Class for defining the relativistic Breit-Wigner resonance model.
Bool_t ignoreMomenta() const
Get the ignore momenta flag.
Double_t mDaugDiff_
Difference of the two daughter masses.
Double_t mDaugDiffSq_
Square of the difference of the two daughter masses.
Double_t getResRadius() const
Get the radius of the resonance barrier factor.
Double_t getWidth() const
Get the width of the resonance.
Bool_t fixParRadius() const
Get the status of parent barrier radius (fixed or released)
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc...
Double_t getCovFactor() const
Get the current value of the full spin-dependent covariant factor.
void rescale(Double_t scaleVal)
Scale this by a factor.
Definition: LauComplex.hh:299
File containing LauConstants namespace.
Double_t mDaugSumSq_
Square of the sum of the two daughter masses.
virtual void initialise()
Initialise the model.
LauBlattWeisskopfFactor * getResBWFactor()
Get the centrifugal barrier for the resonance decay.
Class for defining a complex number.
Definition: LauComplex.hh:61
Class that implements the Blatt-Weisskopf barrier factor.
virtual const std::vector< LauParameter * > & getFloatingParameters()
Retrieve the resonance parameters, e.g. so that they can be loaded into a fit.
Int_t getSpin() const
Get the spin of the resonance.
Bool_t ignoreBarrierScaling() const
Get the ignore barrier factor scaling flag.
void clearFloatingParameters()
Clear list of floating parameters.
Double_t FP0_
Value of the form factor for parent decay (at pole mass)