Page MenuHomeHEPForge

No OneTemporary

diff --git a/inc/LauDabbaRes.hh b/inc/LauDabbaRes.hh
index 3599574..3e45d48 100644
--- a/inc/LauDabbaRes.hh
+++ b/inc/LauDabbaRes.hh
@@ -1,132 +1,162 @@
// Copyright University of Warwick 2010 - 2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file LauDabbaRes.hh
\brief File containing declaration of LauDabbaRes class.
*/
/*! \class LauDabbaRes
\brief Class for defining the Dabba resonance model
Class for defining the Dabba resonance model
Formulae and data values from arXiv:0901.2217 - author D.V.Bugg
*/
#ifndef LAU_DABBA_RES
#define LAU_DABBA_RES
#include "TString.h"
#include "LauAbsResonance.hh"
#include "LauComplex.hh"
class LauDabbaRes : public LauAbsResonance {
public:
//! Constructor
/*!
\param [in] resInfo the object containing information on the resonance name, mass, width, spin, charge, etc.
\param [in] resPairAmpInt the number of the daughter not produced by the resonance
\param [in] daughters the daughter particles
*/
LauDabbaRes(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters);
//! Destructor
virtual ~LauDabbaRes();
//! Initialise the model
virtual void initialise();
//! Get the resonance model type
/*!
\return the resonance model type
*/
virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return LauAbsResonance::Dabba;}
//! Set value of the various parameters
/*!
\param [in] name the name of the parameter to be changed
\param [in] value the new parameter value
*/
virtual void setResonanceParameter(const TString& name, const Double_t value);
- protected:
- //! Set the parameter values
+ //! Allow the various parameters to float in the fit
/*!
- \param [in] b constant factor
- \param [in] alpha constant factor
- \param [in] beta constant factor
- */
- void setConstants(Double_t b, Double_t alpha, Double_t beta);
+ \param [in] name the name of the parameter to be floated
+ */
+ virtual void floatResonanceParameter(const TString& name);
+
+ //! Access the given resonance parameter
+ /*!
+ \param [in] name the name of the parameter
+ \return the corresponding parameter
+ */
+ virtual LauParameter* getResonanceParameter(const TString& name);
+ //! Retrieve the resonance parameters, e.g. so that they can be loaded into a fit
+ /*!
+ \return floating parameters of the resonance
+ */
+ virtual const std::vector<LauParameter*>& getFloatingParameters();
+
+ protected:
//! Set the b parameter
/*!
\param [in] b new value for b parameter
*/
- void setBValue(const Double_t b) { b_ = b; }
+ void setBValue(const Double_t b);
//! Set the alpha parameter
/*!
\param [in] alpha new value for alpha parameter
*/
- void setAlphaValue(const Double_t alpha) { alpha_ = alpha; }
+ void setAlphaValue(const Double_t alpha);
//! Set the beta parameter
/*!
\param [in] beta new value for beta parameter
*/
- void setBetaValue(const Double_t beta) { beta_ = beta; }
+ void setBetaValue(const Double_t beta);
//! Get the b parameter value
/*!
\return value of the b parameter
*/
- Double_t getBValue() const { return b_; }
+ Double_t getBValue() const { return (b_!=0) ? b_->value() : 0.0; }
//! Get the alpha parameter value
/*!
\return value of the alpha parameter
*/
- Double_t getAlphaValue() const { return alpha_; }
+ Double_t getAlphaValue() const { return (alpha_!=0) ? alpha_->value() : 0.0; }
//! Get the beta parameter value
/*!
\return value of the beta parameter
*/
- Double_t getBetaValue() const { return beta_; }
+ Double_t getBetaValue() const { return (beta_!=0) ? beta_->value() : 0.0; }
+
+ //! Fix the b parameter value
+ /*!
+ \return kTRUE if the b parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fixBValue() const { return (b_!=0) ? b_->fixed() : 0.0; }
+
+ //! Fix the alpha parameter value
+ /*!
+ \return kTRUE if the alpha parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fixAlphaValue() const { return (alpha_!=0) ? alpha_->fixed() : 0.0; }
+
+ //! Fix the beta parameter value
+ /*!
+ \return kTRUE if the beta parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fixBetaValue() const { return (beta_!=0) ? beta_->fixed() : 0.0; }
//! Complex resonant amplitude
/*!
\param [in] mass appropriate invariant mass for the resonance
\param [in] spinTerm Zemach spin term
*/
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm);
//! Check that the daughter particles are D and pi
void checkDaughterTypes() const;
private:
//! Defined as mD + mPi all squared
Double_t mSumSq_;
//! Defined as mD*mD - 0.5*mPi*mPi
Double_t sAdler_;
+
//! Constant factor
- Double_t b_;
+ LauParameter* b_;
//! Constant factor
- Double_t alpha_;
+ LauParameter* alpha_;
//! Constant factor
- Double_t beta_;
+ LauParameter* beta_;
ClassDef(LauDabbaRes,0) // Dabba resonance model
};
#endif
diff --git a/inc/LauSigmaRes.hh b/inc/LauSigmaRes.hh
index a181b08..2d98d19 100644
--- a/inc/LauSigmaRes.hh
+++ b/inc/LauSigmaRes.hh
@@ -1,151 +1,182 @@
// Copyright University of Warwick 2004 - 2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file LauSigmaRes.hh
\brief File containing declaration of LauSigmaRes class.
*/
/*! \class LauSigmaRes
\brief Class for defining the Sigma resonance model
Class for defining the Sigma resonance model. Formulae and data values from
Phys.Lett.B 572, 1 (2003) - author D.V.Bugg
*/
#ifndef LAU_SIGMA_RES
#define LAU_SIGMA_RES
#include "TString.h"
#include "LauAbsResonance.hh"
#include "LauComplex.hh"
class LauSigmaRes : public LauAbsResonance {
public:
//! Constructor
/*!
\param [in] resInfo the object containing information on the resonance name, mass, width, spin, charge, etc.
\param [in] resPairAmpInt the number of the daughter not produced by the resonance
\param [in] daughters the daughter particles
*/
LauSigmaRes(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters);
//! Destructor
virtual ~LauSigmaRes();
//! Initialise the model
virtual void initialise();
//! Get the resonance model type
/*!
\return the resonance model type
*/
virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return LauAbsResonance::Sigma;}
//! Set value of the various parameters
/*!
\param [in] name the name of the parameter to be changed
\param [in] value the new parameter value
*/
virtual void setResonanceParameter(const TString& name, const Double_t value);
- protected:
- //! Set the parameter values
+ //! Allow the various parameters to float in the fit
+ /*!
+ \param [in] name the name of the parameter to be floated
+ */
+ virtual void floatResonanceParameter(const TString& name);
+
+ //! Access the given resonance parameter
+ /*!
+ \param [in] name the name of the parameter
+ \return the corresponding parameter
+ */
+ virtual LauParameter* getResonanceParameter(const TString& name);
+
+ //! Retrieve the resonance parameters, e.g. so that they can be loaded into a fit
/*!
- \param [in] b1 factor from BES data
- \param [in] b2 factor from BES data
- \param [in] A factor from BES data
- \param [in] m0 factor from BES data
+ \return floating parameters of the resonance
*/
- void setConstants(Double_t b1, Double_t b2, Double_t A, Double_t m0);
+ virtual const std::vector<LauParameter*>& getFloatingParameters();
+ protected:
//! Set the b1 parameter
/*!
\param [in] b1 new value for b1 parameter
*/
- void setB1Value(const Double_t b1) { b1_ = b1; }
+ void setB1Value(const Double_t b1);
//! Set the b2 parameter
/*!
\param [in] b2 new value for b2 parameter
*/
- void setB2Value(const Double_t b2) { b2_ = b2; }
+ void setB2Value(const Double_t b2);
//! Set the A parameter
/*!
\param [in] A new value for A parameter
*/
- void setAValue(const Double_t A) { A_ = A; }
+ void setAValue(const Double_t A);
//! Set the m0 parameter
/*!
\param [in] m0 new value for m0 parameter
*/
- void setM0Value(const Double_t m0) { m0_ = m0; m0Sq_ = m0*m0; denom_ = m0Sq_ - sAdler_; }
+ void setM0Value(const Double_t m0);
//! Get the b1 parameter value
/*!
\return value of the b1 parameter
*/
- Double_t getB1Value() const { return b1_; }
+ Double_t getB1Value() const { return (b1_!=0) ? b1_->value() : 0.0; }
//! Get the b2 parameter value
/*!
\return value of the b2 parameter
*/
- Double_t getB2Value() const { return b2_; }
+ Double_t getB2Value() const { return (b2_!=0) ? b2_->value() : 0.0; }
//! Get the A parameter value
/*!
\return value of the A parameter
*/
- Double_t getAValue() const { return A_; }
+ Double_t getAValue() const { return (a_!=0) ? a_->value() : 0.0; }
//! Get the m0 parameter value
/*!
\return value of the m0 parameter
*/
- Double_t getM0Value() const { return m0_; }
+ Double_t getM0Value() const { return (m0_!=0) ? m0_->value() : 0.0; }
+
+ //! Fix the b1 parameter value
+ /*!
+ \return kTRUE if the b1 parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fixB1Value() const { return (b1_!=0) ? b1_->fixed() : 0.0; }
+
+ //! Fix the b2 parameter value
+ /*!
+ \return kTRUE if the b2 parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fixB2Value() const { return (b2_!=0) ? b2_->fixed() : 0.0; }
+
+ //! Fix the A parameter value
+ /*!
+ \return kTRUE if the A parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fixAValue() const { return (a_!=0) ? a_->fixed() : 0.0; }
+
+ //! Fix the m0 parameter value
+ /*!
+ \return kTRUE if the m0 parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fixM0Value() const { return (m0_!=0) ? m0_->fixed() : 0.0; }
//! Complex resonant ampltiude
/*!
\param [in] mass appropriate invariant mass for the resonance
\param [in] spinTerm Zemach spin term
*/
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm);
//! Check that both daughters are the same type of particle
void checkDaughterTypes() const;
private:
//! Defined as 4*mPi*mPi
Double_t mPiSq4_;
//! Defined as 0.5*mPi*mPi
Double_t sAdler_;
+
//! Factor from BES data
- Double_t b1_;
+ LauParameter* b1_;
//! Factor from BES data
- Double_t b2_;
+ LauParameter* b2_;
//! Factor from BES data
- Double_t A_;
+ LauParameter* a_;
//! Factor from BES data
- Double_t m0_;
- //! Defined as m0 squared
- Double_t m0Sq_;
- //! Defined as m0Sq - sAdler
- Double_t denom_;
+ LauParameter* m0_;
ClassDef(LauSigmaRes,0) // Sigma resonance model
};
#endif
diff --git a/src/LauDabbaRes.cc b/src/LauDabbaRes.cc
index 8612e64..a8f1341 100644
--- a/src/LauDabbaRes.cc
+++ b/src/LauDabbaRes.cc
@@ -1,139 +1,250 @@
// Copyright University of Warwick 2010 - 2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file LauDabbaRes.cc
\brief File containing implementation of LauDabbaRes class.
Formulae and data values from arXiv:0901.2217 - author D.V.Bugg
*/
#include <iostream>
#include "LauConstants.hh"
#include "LauDabbaRes.hh"
+#include "LauResonanceInfo.hh"
ClassImp(LauDabbaRes)
LauDabbaRes::LauDabbaRes(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters) :
LauAbsResonance(resInfo, resPairAmpInt, daughters),
mSumSq_(0.0),
sAdler_(0.0),
- b_(24.49),
- alpha_(0.1),
- beta_(0.1)
+ b_(0),
+ alpha_(0),
+ beta_(0)
{
+ // Default constant factors
+ const Double_t bVal = 24.49;
+ const Double_t alphaVal = 0.1;
+ const Double_t betaVal = 0.1;
+
+ const TString& parNameBase = this->getSanitisedName();
+
+ TString bName(parNameBase);
+ bName += "_b";
+ b_ = resInfo->getExtraParameter( bName );
+ if ( b_ == 0 ) {
+ b_ = new LauParameter( bName, bVal, 0.0, 100.0, kTRUE );
+ resInfo->addExtraParameter( b_ );
+ }
+
+ TString alphaName(parNameBase);
+ alphaName += "_alpha";
+ alpha_ = resInfo->getExtraParameter( alphaName );
+ if ( alpha_ == 0 ) {
+ alpha_ = new LauParameter( alphaName, alphaVal, 0.0, 10.0, kTRUE );
+ resInfo->addExtraParameter( alpha_ );
+ }
+
+ TString betaName(parNameBase);
+ betaName += "_beta";
+ beta_ = resInfo->getExtraParameter( betaName );
+ if ( beta_ == 0 ) {
+ beta_ = new LauParameter( betaName, betaVal, 0.0, 10.0, kTRUE );
+ resInfo->addExtraParameter( beta_ );
+ }
}
LauDabbaRes::~LauDabbaRes()
{
}
void LauDabbaRes::initialise()
{
// check that we have a D and a pi
this->checkDaughterTypes();
// Initialise various constants
Double_t massDaug1 = this->getMassDaug1();
Double_t massDaug2 = this->getMassDaug2();
Double_t mSum = massDaug1 + massDaug2;
mSumSq_ = mSum*mSum;
Double_t massDaug1Sq = massDaug1*massDaug1;
Double_t massDaug2Sq = massDaug2*massDaug2;
sAdler_ = TMath::Max(massDaug1Sq,massDaug2Sq) - 0.5*TMath::Min(massDaug1Sq,massDaug2Sq); // Adler zero at (mD)^2 - 0.5*(mpi)^2
Int_t resSpin = this->getSpin();
if (resSpin != 0) {
std::cerr << "WARNING in LauDabbaRes::initialise : Spin = " << resSpin << " is not zero! It will be ignored anyway!" << std::endl;
}
}
-void LauDabbaRes::setConstants(Double_t b, Double_t alpha, Double_t beta) {
- b_ = b;
- alpha_ = alpha;
- beta_ = beta;
-}
-
void LauDabbaRes::checkDaughterTypes() const
{
// Check that the daughter tracks are D and pi. Otherwise issue a warning.
Int_t resPairAmpInt = this->getPairInt();
if (resPairAmpInt < 1 || resPairAmpInt > 3) {
std::cerr << "WARNING in LauDabbaRes::checkDaughterTypes : resPairAmpInt = " << resPairAmpInt << " is out of the range [1,2,3]." << std::endl;
return;
}
// Check that daughter types agree
const TString& nameDaug1 = this->getNameDaug1();
const TString& nameDaug2 = this->getNameDaug2();
if ( !( nameDaug1.Contains("pi", TString::kIgnoreCase) && nameDaug2.Contains("d", TString::kIgnoreCase) ) ) {
if ( !( nameDaug2.Contains("pi", TString::kIgnoreCase) && nameDaug1.Contains("d", TString::kIgnoreCase) ) ) {
std::cerr << "ERROR in LauDabbaRes::checkDaughterTypes : Dabba model is using daughters \"" << nameDaug1 << "\" and \"" << nameDaug2 << "\" that are not a D meson and a pion." << std::endl;
}
}
}
LauComplex LauDabbaRes::resAmp(Double_t mass, Double_t spinTerm)
{
// This function returns the complex dynamical amplitude for a Dabba distribution
// given the invariant mass and cos(helicity) values.
// Invariant mass squared combination for the system
Double_t s = mass*mass;
// Dabba is spin zero - so there are no helicity factors.
// Just set it to 1.0 in case anyone decides to use it at a later date.
spinTerm = 1.0;
// Phase-space factor
Double_t rho(0.0);
Double_t sDiff = s - mSumSq_;
if ( sDiff > 0.0 ) {
rho = TMath::Sqrt(1.0 - mSumSq_/s);
}
- Double_t realPart = 1.0 - beta_ * sDiff;
+ const Double_t bVal = this->getBValue();
+ const Double_t alphaVal = this->getAlphaValue();
+ const Double_t betaVal = this->getBetaValue();
+
+ Double_t realPart = 1.0 - betaVal * sDiff;
- Double_t imagPart = b_ * TMath::Exp( - alpha_ * sDiff ) * ( s - sAdler_ ) * rho;
+ Double_t imagPart = bVal * TMath::Exp( - alphaVal * sDiff ) * ( s - sAdler_ ) * rho;
LauComplex resAmplitude( realPart, imagPart );
Double_t denomFactor = realPart*realPart + imagPart*imagPart;
Double_t invDenomFactor = 0.0;
if (denomFactor > 1e-10) {invDenomFactor = 1.0/denomFactor;}
resAmplitude.rescale(spinTerm*invDenomFactor);
return resAmplitude;
}
+const std::vector<LauParameter*>& LauDabbaRes::getFloatingParameters()
+{
+ this->clearFloatingParameters();
+
+ if ( ! this->fixBValue() ) {
+ this->addFloatingParameter( b_ );
+ }
+
+ if ( ! this->fixAlphaValue() ) {
+ this->addFloatingParameter( alpha_ );
+ }
+
+ if ( ! this->fixBetaValue() ) {
+ this->addFloatingParameter( beta_ );
+ }
+
+ return this->getParameters();
+}
+
void LauDabbaRes::setResonanceParameter(const TString& name, const Double_t value)
{
// Set various parameters for the lineshape
if (name == "b") {
this->setBValue(value);
std::cout << "INFO in LauDabbaRes::setResonanceParameter : Setting parameter b = " << this->getBValue() << std::endl;
}
else if (name == "alpha") {
this->setAlphaValue(value);
std::cout << "INFO in LauDabbaRes::setResonanceParameter : Setting parameter alpha = " << this->getAlphaValue() << std::endl;
}
else if (name == "beta") {
this->setBetaValue(value);
std::cout << "INFO in LauDabbaRes::setResonanceParameter : Setting parameter beta = " << this->getBetaValue() << std::endl;
}
else {
std::cerr << "WARNING in LauDabbaRes::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
}
}
+void LauDabbaRes::floatResonanceParameter(const TString& name)
+{
+ if (name == "b") {
+ if ( b_->fixed() ) {
+ b_->fixed( kFALSE );
+ this->addFloatingParameter( b_ );
+ } else {
+ std::cerr << "WARNING in LauDabbaRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else if (name == "alpha") {
+ if ( alpha_->fixed() ) {
+ alpha_->fixed( kFALSE );
+ this->addFloatingParameter( alpha_ );
+ } else {
+ std::cerr << "WARNING in LauDabbaRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else if (name == "beta") {
+ if ( beta_->fixed() ) {
+ beta_->fixed( kFALSE );
+ this->addFloatingParameter( beta_ );
+ } else {
+ std::cerr << "WARNING in LauDabbaRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else {
+ std::cerr << "WARNING in LauDabbaRes::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
+ }
+}
+
+LauParameter* LauDabbaRes::getResonanceParameter(const TString& name)
+{
+ if (name == "b") {
+ return b_;
+ } else if (name == "alpha") {
+ return alpha_;
+ } else if (name == "beta") {
+ return beta_;
+ } else {
+ std::cerr << "WARNING in LauDabbaRes::getResonanceParameter: Parameter name not reconised." << std::endl;
+ return 0;
+ }
+}
+
+void LauDabbaRes::setBValue(const Double_t b)
+{
+ b_->value( b );
+ b_->genValue( b );
+ b_->initValue( b );
+}
+
+void LauDabbaRes::setAlphaValue(const Double_t alpha)
+{
+ alpha_->value( alpha );
+ alpha_->genValue( alpha );
+ alpha_->initValue( alpha );
+}
+
+void LauDabbaRes::setBetaValue(const Double_t beta)
+{
+ beta_->value( beta );
+ beta_->genValue( beta );
+ beta_->initValue( beta );
+}
+
diff --git a/src/LauSigmaRes.cc b/src/LauSigmaRes.cc
index d5a69d7..2485a8a 100644
--- a/src/LauSigmaRes.cc
+++ b/src/LauSigmaRes.cc
@@ -1,154 +1,288 @@
// Copyright University of Warwick 2004 - 2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file LauSigmaRes.cc
\brief File containing implementation of LauSigmaRes class.
*/
#include <iostream>
#include "LauConstants.hh"
#include "LauSigmaRes.hh"
+#include "LauResonanceInfo.hh"
ClassImp(LauSigmaRes)
LauSigmaRes::LauSigmaRes(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters) :
LauAbsResonance(resInfo, resPairAmpInt, daughters),
- mPiSq4_(0.0),
- sAdler_(0.0),
- b1_(0.0),
- b2_(0.0),
- A_(0.0),
- m0_(0.0),
- m0Sq_(0.0),
- denom_(0.0)
+ mPiSq4_(4.0*LauConstants::mPiSq),
+ sAdler_(LauConstants::mPiSq*0.5),
+ b1_(0),
+ b2_(0),
+ a_(0),
+ m0_(0)
{
// Initialise various constants
mPiSq4_ = 4.0*LauConstants::mPiSq;
sAdler_ = LauConstants::mPiSq*0.5; // Adler zero at 0.5*(mpi)^2
// constant factors from BES data
- Double_t b1 = 0.5843;
- Double_t b2 = 1.6663;
- Double_t A = 1.082;
- Double_t m0 = 0.9264;
+ const Double_t b1Val = 0.5843;
+ const Double_t b2Val = 1.6663;
+ const Double_t aVal = 1.082;
+ const Double_t m0Val = 0.9264;
- this->setConstants(b1, b2, A, m0);
+ const TString& parNameBase = this->getSanitisedName();
+
+ TString b1Name(parNameBase);
+ b1Name += "_b1";
+ b1_ = resInfo->getExtraParameter( b1Name );
+ if ( b1_ == 0 ) {
+ b1_ = new LauParameter( b1Name, b1Val, 0.0, 100.0, kTRUE );
+ resInfo->addExtraParameter( b1_ );
+ }
+
+ TString b2Name(parNameBase);
+ b2Name += "_b2";
+ b2_ = resInfo->getExtraParameter( b2Name );
+ if ( b2_ == 0 ) {
+ b2_ = new LauParameter( b2Name, b2Val, 0.0, 100.0, kTRUE );
+ resInfo->addExtraParameter( b2_ );
+ }
+
+ TString aName(parNameBase);
+ aName += "_A";
+ a_ = resInfo->getExtraParameter( aName );
+ if ( a_ == 0 ) {
+ a_ = new LauParameter( aName, aVal, 0.0, 10.0, kTRUE );
+ resInfo->addExtraParameter( a_ );
+ }
+
+ TString m0Name(parNameBase);
+ m0Name += "_m0";
+ m0_ = resInfo->getExtraParameter( m0Name );
+ if ( m0_ == 0 ) {
+ m0_ = new LauParameter( m0Name, m0Val, 0.0, 10.0, kTRUE );
+ resInfo->addExtraParameter( m0_ );
+ }
}
LauSigmaRes::~LauSigmaRes()
{
}
void LauSigmaRes::initialise()
{
this->checkDaughterTypes();
Double_t resSpin = this->getSpin();
if (resSpin != 0) {
- std::cerr << "ERROR in LauSigmaRes : spin = " << resSpin << " is not zero!" << std::endl;
+ std::cerr << "WARNING in LauSigmaRes::initialise : Resonance spin is " << resSpin << "." << std::endl;
+ std::cerr << " : Sigma amplitude is only for scalers, resetting spin to 0." << std::endl;
+ this->changeResonance( -1.0, -1.0, 0 );
}
}
-void LauSigmaRes::setConstants(Double_t b1, Double_t b2, Double_t A, Double_t m0) {
- b1_ = b1;
- b2_ = b2;
- A_ = A;
- m0_ = m0;
- m0Sq_ = m0_*m0_;
- denom_ = m0Sq_ - sAdler_;
-}
-
void LauSigmaRes::checkDaughterTypes() const
{
// Check that the daughter tracks are the same type. Otherwise issue a warning
// and set the type to be pion for the Sigma distribution.
Int_t resPairAmpInt = this->getPairInt();
if (resPairAmpInt < 1 || resPairAmpInt > 3) {
std::cerr << "WARNING in LauSigmaRes::checkDaughterTypes : resPairAmpInt = " << resPairAmpInt << " is out of the range [1,2,3]." << std::endl;
return;
}
const TString& nameDaug1 = this->getNameDaug1();
const TString& nameDaug2 = this->getNameDaug2();
if (!nameDaug1.CompareTo(nameDaug2, TString::kExact)) {
// Daughter types agree. Find out if we have pion or kaon system
if (!nameDaug1.Contains("pi")) {
std::cerr << "ERROR in LauSigmaRes::checkDaughterTypes : Sigma model is using daughters \""<<nameDaug1<<"\" and \""<<nameDaug2<<"\", which are not pions." << std::endl;
}
}
}
LauComplex LauSigmaRes::resAmp(Double_t mass, Double_t spinTerm)
{
// This function returns the complex dynamical amplitude for a Sigma distribution
// given the invariant mass and cos(helicity) values.
// First check that the appropriate daughters are either pi+pi- or K+K-
// Check that the daughter tracks are the same type. Otherwise issue a warning
// and set the type to be pion for the Sigma distribution. Returns the
// integer defined by the enum LauSigmaRes::SigmaPartType.
Double_t s = mass*mass; // Invariant mass squared combination for the system
Double_t rho(0.0); // Phase-space factor
if (s > mPiSq4_) {rho = TMath::Sqrt(1.0 - mPiSq4_/s);}
- Double_t f = b2_*s + b1_; // f(s) function
+ const Double_t m0Val = this->getM0Value();
+ const Double_t m0Sq = m0Val * m0Val;
+
+ const Double_t aVal = this->getAValue();
+ const Double_t b1Val = this->getB1Value();
+ const Double_t b2Val = this->getB2Value();
+
+ Double_t f = b2Val*s + b1Val; // f(s) function
Double_t numerator = s - sAdler_;
+ Double_t denom = m0Sq - sAdler_;
Double_t gamma(0.0);
- if (TMath::Abs(denom_) > 1e-10 && TMath::Abs(A_) > 1e-10) {
+ if (TMath::Abs(denom) > 1e-10 && TMath::Abs(aVal) > 1e-10) {
// Decay width of the system
- gamma = rho*(numerator/denom_)*f*TMath::Exp(-(s - m0Sq_)/A_);
+ gamma = rho*(numerator/denom)*f*TMath::Exp(-(s - m0Sq)/aVal);
}
// Now form the complex amplitude - use relativistic BW form (without barrier factors)
// Note that the M factor in the denominator is not the "pole" at ~500 MeV, but is
// m0_ = 0.9264, the mass when the phase shift goes through 90 degrees.
- Double_t dMSq = m0Sq_ - s;
- Double_t widthTerm = gamma*m0_;
+ Double_t dMSq = m0Sq - s;
+ Double_t widthTerm = gamma*m0Val;
LauComplex resAmplitude(dMSq, widthTerm);
Double_t denomFactor = dMSq*dMSq + widthTerm*widthTerm;
Double_t invDenomFactor = 0.0;
if (denomFactor > 1e-10) {invDenomFactor = 1.0/denomFactor;}
resAmplitude.rescale(spinTerm*invDenomFactor);
return resAmplitude;
}
+const std::vector<LauParameter*>& LauSigmaRes::getFloatingParameters()
+{
+ this->clearFloatingParameters();
+
+ if ( ! this->fixB1Value() ) {
+ this->addFloatingParameter( b1_ );
+ }
+
+ if ( ! this->fixB2Value() ) {
+ this->addFloatingParameter( b2_ );
+ }
+
+ if ( ! this->fixAValue() ) {
+ this->addFloatingParameter( a_ );
+ }
+
+ if ( ! this->fixM0Value() ) {
+ this->addFloatingParameter( m0_ );
+ }
+
+ return this->getParameters();
+}
+
void LauSigmaRes::setResonanceParameter(const TString& name, const Double_t value)
{
// Set various parameters for the lineshape
if (name == "b1") {
this->setB1Value(value);
std::cout << "INFO in LauSigmaRes::setResonanceParameter : Setting parameter b1 = " << this->getB1Value() << std::endl;
}
else if (name == "b2") {
this->setB2Value(value);
std::cout << "INFO in LauSigmaRes::setResonanceParameter : Setting parameter b2 = " << this->getB2Value() << std::endl;
}
else if (name == "A") {
this->setAValue(value);
std::cout << "INFO in LauSigmaRes::setResonanceParameter : Setting parameter A = " << this->getAValue() << std::endl;
}
else if (name == "m0") {
this->setM0Value(value);
std::cout << "INFO in LauSigmaRes::setResonanceParameter : Setting parameter m0 = " << this->getM0Value() << std::endl;
}
else {
std::cerr << "WARNING in LauSigmaRes::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
}
}
+void LauSigmaRes::floatResonanceParameter(const TString& name)
+{
+ if (name == "b1") {
+ if ( b1_->fixed() ) {
+ b1_->fixed( kFALSE );
+ this->addFloatingParameter( b1_ );
+ } else {
+ std::cerr << "WARNING in LauSigmaRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else if (name == "b2") {
+ if ( b2_->fixed() ) {
+ b2_->fixed( kFALSE );
+ this->addFloatingParameter( b2_ );
+ } else {
+ std::cerr << "WARNING in LauSigmaRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else if (name == "A") {
+ if ( a_->fixed() ) {
+ a_->fixed( kFALSE );
+ this->addFloatingParameter( a_ );
+ } else {
+ std::cerr << "WARNING in LauSigmaRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else if (name == "m0") {
+ if ( m0_->fixed() ) {
+ m0_->fixed( kFALSE );
+ this->addFloatingParameter( m0_ );
+ } else {
+ std::cerr << "WARNING in LauSigmaRes::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else {
+ std::cerr << "WARNING in LauSigmaRes::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
+ }
+}
+
+LauParameter* LauSigmaRes::getResonanceParameter(const TString& name)
+{
+ if (name == "b1") {
+ return b1_;
+ } else if (name == "b2") {
+ return b2_;
+ } else if (name == "A") {
+ return a_;
+ } else if (name == "m0") {
+ return m0_;
+ } else {
+ std::cerr << "WARNING in LauSigmaRes::getResonanceParameter: Parameter name not reconised." << std::endl;
+ return 0;
+ }
+}
+
+void LauSigmaRes::setB1Value(const Double_t b1)
+{
+ b1_->value( b1 );
+ b1_->genValue( b1 );
+ b1_->initValue( b1 );
+}
+
+void LauSigmaRes::setB2Value(const Double_t b2)
+{
+ b2_->value( b2 );
+ b2_->genValue( b2 );
+ b2_->initValue( b2 );
+}
+
+void LauSigmaRes::setAValue(const Double_t A)
+{
+ a_->value( A );
+ a_->genValue( A );
+ a_->initValue( A );
+}
+
+void LauSigmaRes::setM0Value(const Double_t m0)
+{
+ m0_->value( m0 );
+ m0_->genValue( m0 );
+ m0_->initValue( m0 );
+}
+

File Metadata

Mime Type
text/x-diff
Expires
Wed, May 14, 11:09 AM (19 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5111356
Default Alt Text
(28 KB)

Event Timeline