laura is hosted by Hepforge, IPPP Durham
Laura++  v3r0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauBelleNR.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2004 - 2014.
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 "TMath.h"
18 
19 #include "LauBelleNR.hh"
20 #include "LauDaughters.hh"
21 #include "LauParameter.hh"
22 #include "LauResonanceInfo.hh"
23 
25 
26 
28  const Int_t resPairAmpInt, const LauDaughters* daughters) :
29  LauAbsResonance(resInfo, resPairAmpInt, daughters),
30  alpha_(0),
31  model_(resType)
32 {
33  TString parName = this->getSanitisedName();
34  parName += "_alpha";
35  alpha_ = resInfo->getExtraParameter( parName );
36  if ( alpha_ == 0 ) {
37  alpha_ = new LauParameter( parName, 0.0, 0.0, 10.0, kTRUE );
38  alpha_->secondStage(kTRUE);
39  resInfo->addExtraParameter( alpha_ );
40  }
41 }
42 
44 {
45  delete alpha_;
46 }
47 
49 {
50  const LauDaughters* daughters = this->getDaughters();
51  Int_t resPairAmpInt = this->getPairInt();
52  if ( daughters->gotSymmetricalDP() && resPairAmpInt != 3 ) {
53  std::cerr << "WARNING in LauBelleNR::initialise : Dalitz plot is symmetric - this lineshape is not appropriate." << std::endl;
54  }
55 
57  std::cerr << "WARNING in LauBelleNR::initialise : Unknown model requested, defaulting to exponential." << std::endl;
59  }
60 
61  // TODO - should the BelleNR ignore the momenta in the spin term?
62 }
63 
64 LauComplex LauBelleNR::resAmp(Double_t mass, Double_t spinTerm)
65 {
66  Double_t magnitude(1.0);
67 
68  Double_t alpha = this->getAlpha();
69 
71  magnitude = spinTerm * TMath::Exp(-alpha*mass*mass);
72  } else if ( model_ == LauAbsResonance::PowerLawNR ) {
73  magnitude = spinTerm * TMath::Power(mass*mass, -alpha);
74  }
75 
76  LauComplex resAmplitude(magnitude, 0.0);
77 
78  return resAmplitude;
79 }
80 
81 const std::vector<LauParameter*>& LauBelleNR::getFloatingParameters()
82 {
84 
85  if ( ! this->fixAlpha() ) {
87  }
88 
89  return this->getParameters();
90 }
91 
92 void LauBelleNR::setResonanceParameter(const TString& name, const Double_t value)
93 {
94  // Set various parameters for the lineshape
95  if (name == "alpha") {
96  this->setAlpha(value);
97  std::cout << "INFO in LauBelleNR::setResonanceParameter : Setting parameter alpha = " << this->getAlpha() << std::endl;
98  } else {
99  std::cerr << "WARNING in LauBelleNR::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
100  }
101 }
102 
104 {
105  if (name == "alpha") {
106  if ( alpha_->fixed() ) {
107  alpha_->fixed( kFALSE );
108  this->addFloatingParameter( alpha_ );
109  } else {
110  std::cerr << "WARNING in LauBelleNR::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
111  }
112  } else {
113  std::cerr << "WARNING in LauBelleNR::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
114  }
115 }
116 
118 {
119  if (name == "alpha") {
120  return alpha_;
121  } else {
122  std::cerr << "WARNING in LauBelleNR::getResonanceParameter: Parameter name not reconised." << std::endl;
123  return 0;
124  }
125 }
126 
127 void LauBelleNR::setAlpha(const Double_t alpha)
128 {
129  alpha_->value( alpha );
130  alpha_->genValue( alpha );
131  alpha_->initValue( alpha );
132 }
133 
LauParameter * alpha_
The range parameter.
Definition: LauBelleNR.hh:119
Bool_t fixed() const
Check whether the parameter is fixed or floated.
virtual ~LauBelleNR()
Destructor.
Definition: LauBelleNR.cc:43
File containing declaration of LauResonanceInfo class.
ClassImp(LauAbsCoeffSet)
LauParameter()
Default constructor.
Definition: LauParameter.cc:30
Class for defining the properties of a resonant particle.
const TString & name() const
The parameter name.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:33
File containing declaration of LauBelleNR class.
File containing declaration of LauDaughters class.
virtual void floatResonanceParameter(const TString &name)
Allow the various parameters to float in the fit.
Definition: LauBelleNR.cc:103
Double_t getAlpha() const
Get the effective range parameter.
Definition: LauBelleNR.hh:96
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
Definition: LauBelleNR.cc:64
const LauDaughters * getDaughters() const
Access the daughters object.
Int_t getPairInt() const
Get the integer to identify which DP axis the resonance belongs to.
virtual const std::vector< LauParameter * > & getFloatingParameters()
Retrieve the resonance parameters, e.g. so that they can be loaded into a fit.
Definition: LauBelleNR.cc:81
void addFloatingParameter(LauParameter *param)
Add parameter to the list of floating parameters.
Bool_t gotSymmetricalDP() const
Is Dalitz plot symmetric, i.e. 2 identical particles.
Definition: LauDaughters.hh:66
virtual void setResonanceParameter(const TString &name, const Double_t value)
Set value of the various parameters.
Definition: LauBelleNR.cc:92
virtual void initialise()
Initialise the model.
Definition: LauBelleNR.cc:48
Class for defining the Belle nonresonant model.
Definition: LauBelleNR.hh:34
File containing declaration of LauParameter class.
std::vector< LauParameter * > & getParameters()
Access the list of floating parameters.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:34
Bool_t fixAlpha() const
See if the alpha parameter is fixed or floating.
Definition: LauBelleNR.hh:102
LauResonanceModel
Define the allowed resonance types.
virtual LauParameter * getResonanceParameter(const TString &name)
Access the given resonance parameter.
Definition: LauBelleNR.cc:117
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc...
void setAlpha(const Double_t alpha)
Set the parameter alpha, the effective range.
Definition: LauBelleNR.cc:127
Double_t initValue() const
The initial value of the parameter.
Class for defining a complex number.
Definition: LauComplex.hh:47
LauAbsResonance::LauResonanceModel model_
The model to use.
Definition: LauBelleNR.hh:122
Double_t value() const
The value of the parameter.
Double_t genValue() const
The value generated for the parameter.
void clearFloatingParameters()
Clear list of floating parameters.