laura is hosted by Hepforge, IPPP Durham
Laura++  v3r2
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  forceLegendre_(kTRUE)
33 {
34  TString parName = this->getSanitisedName();
35  parName += "_alpha";
36  alpha_ = resInfo->getExtraParameter( parName );
37  if ( alpha_ == 0 ) {
38  alpha_ = new LauParameter( parName, 0.0, 0.0, 10.0, kTRUE );
39  alpha_->secondStage(kTRUE);
40  resInfo->addExtraParameter( alpha_ );
41  }
42 }
43 
45 {
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  // Make the spin term purely the Legendre polynomial of the cos(helicity angle)
62  if ( forceLegendre_ ) {
64  }
65 }
66 
67 LauComplex LauBelleNR::resAmp(Double_t mass, Double_t spinTerm)
68 {
69  Double_t magnitude(1.0);
70 
71  Double_t alpha = this->getAlpha();
72 
74  magnitude = spinTerm * TMath::Exp(-alpha*mass*mass);
75  } else if ( model_ == LauAbsResonance::PowerLawNR ) {
76  magnitude = spinTerm * TMath::Power(mass*mass, -alpha);
77  }
78 
79  LauComplex resAmplitude(magnitude, 0.0);
80 
81  return resAmplitude;
82 }
83 
84 const std::vector<LauParameter*>& LauBelleNR::getFloatingParameters()
85 {
87 
88  if ( ! this->fixAlpha() ) {
90  }
91 
92  return this->getParameters();
93 }
94 
95 void LauBelleNR::setResonanceParameter(const TString& name, const Double_t value)
96 {
97  // Set various parameters for the lineshape
98  if (name == "alpha") {
99  this->setAlpha(value);
100  std::cout << "INFO in LauBelleNR::setResonanceParameter : Setting parameter alpha = " << this->getAlpha() << std::endl;
101  } else {
102  std::cerr << "WARNING in LauBelleNR::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
103  }
104 }
105 
107 {
108  if (name == "alpha") {
109  if ( alpha_->fixed() ) {
110  alpha_->fixed( kFALSE );
111  this->addFloatingParameter( alpha_ );
112  } else {
113  std::cerr << "WARNING in LauBelleNR::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
114  }
115  } else {
116  std::cerr << "WARNING in LauBelleNR::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
117  }
118 }
119 
121 {
122  if (name == "alpha") {
123  return alpha_;
124  } else {
125  std::cerr << "WARNING in LauBelleNR::getResonanceParameter: Parameter name not reconised." << std::endl;
126  return 0;
127  }
128 }
129 
130 void LauBelleNR::setAlpha(const Double_t alpha)
131 {
132  alpha_->value( alpha );
133  alpha_->genValue( alpha );
134  alpha_->initValue( alpha );
135 }
136 
LauParameter * alpha_
The range parameter.
Definition: LauBelleNR.hh:130
Bool_t fixed() const
Check whether the parameter is fixed or floated.
virtual ~LauBelleNR()
Destructor.
Definition: LauBelleNR.cc:44
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.
Bool_t forceLegendre_
Force use of Legendre spin factors.
Definition: LauBelleNR.hh:136
virtual void floatResonanceParameter(const TString &name)
Allow the various parameters to float in the fit.
Definition: LauBelleNR.cc:106
Double_t getAlpha() const
Get the effective range parameter.
Definition: LauBelleNR.hh:107
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
Definition: LauBelleNR.cc:67
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:84
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:95
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:35
Bool_t fixAlpha() const
See if the alpha parameter is fixed or floating.
Definition: LauBelleNR.hh:113
LauResonanceModel
Define the allowed resonance types.
virtual LauParameter * getResonanceParameter(const TString &name)
Access the given resonance parameter.
Definition: LauBelleNR.cc:120
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:130
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:133
void setSpinType(const LauSpinType spinType)
Set the spin formalism to be used.
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.