Page MenuHomeHEPForge

No OneTemporary

diff --git a/inc/LauRescatterThreshold.hh b/inc/LauRescatterThreshold.hh
new file mode 100644
index 0000000..f6406e5
--- /dev/null
+++ b/inc/LauRescatterThreshold.hh
@@ -0,0 +1,220 @@
+
+/*
+Copyright 2004 University of Warwick
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+/*
+Laura++ package authors:
+John Back
+Paul Harrison
+Thomas Latham
+*/
+
+/*! \file LauRescatterThreshold.hh
+ \brief File containing declaration of LauRescatterThreshold class.
+*/
+
+/*! \class LauRescatterThreshold
+ \brief Class for defining the threshold-rescattering model.
+
+ Defines a threshold-rescattering model.
+*/
+
+#ifndef LAU_RESCATTER_THRESHOLD
+#define LAU_RESCATTER_THRESHOLD
+
+#include "TString.h"
+
+#include "LauComplex.hh"
+#include "LauAbsResonance.hh"
+
+class LauKinematics;
+class LauParameter;
+
+
+class LauRescatterThreshold : public LauAbsResonance {
+
+ public:
+ //! Constructor
+ /*!
+ \param [in] resInfo the object containing information on the resonance name, mass, width, spin, charge, etc.
+ \param [in] resType the model of the resonance
+ \param [in] resPairAmpInt the number of the daughter not produced by the resonance
+ \param [in] daughters the daughter particles
+ */
+ LauRescatterThreshold(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters);
+
+ //! Destructor
+ virtual ~LauRescatterThreshold();
+
+ //! Override the enforcement of pure Legendre polynomial spin factors
+ /*!
+ By default this model uses pure Legendre polynomial
+ spin factors, regardless of the default type set in
+ LauResonanceMaker or any specific request from the user.
+ This function allows the enforcement to be overridden.
+
+ \param [in] forceLegendre boolean flag (kTRUE, the default, implies enforcement of pure Legendre spin factors, kFALSE overrides this to allow use of other formalisms)
+ */
+ void enforceLegendreSpinFactors( const Bool_t forceLegendre ) { forceLegendre_ = forceLegendre; }
+
+ //! Initialise the model
+ virtual void initialise();
+
+ //! Get the resonance model type
+ /*!
+ \return the resonance model type
+ */
+ virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return LauAbsResonance::RescatterThreshold;}
+
+ //! Compute phasespace factor
+ virtual LauComplex phspFactor(const Double_t mass, const Double_t m1, const Double_t m2);
+
+ //! 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);
+
+ //! 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
+ /*!
+ \return floating parameters of the resonance
+ */
+ virtual const std::vector<LauParameter*>& getFloatingParameters();
+
+ protected:
+ //! Set the parameter c11, the coupling strength for self-scattering from/to the near-threshold channel
+ /*!
+ \param [in] c11, the new coupling strength value
+ */
+ void set_c11(const Double_t c11);
+
+ //! Set the parameter c12, the coupling strength for scattering from the near-threshold channel to the observation channel
+ /*!
+ \param [in] c12, the new coupling strength value
+ */
+ void set_c12(const Double_t c12);
+
+ //! Set the parameter rescatterChannel_massDaug1, the mass of the first (of two) members of the near-threshold channel
+ /*!
+ \param [in] rescatterChannel_massDaug1, the new mass of the first member of the near-threshold channel
+ */
+ void set_rescatterChannel_massDaug1(const Double_t rescatterChannel_massDaug1);
+
+ //! Set the parameter rescatterChannel_massDaug2, the mass of the second (of two) members of the near-threshold channel
+ /*!
+ \param [in] rescatterChannel_massDaug2, the new mass of the second member of the near-threshold channel
+ */
+ void set_rescatterChannel_massDaug2(const Double_t rescatterChannel_massDaug2);
+
+ //! Get the c11 coupling strength parameter
+ /*!
+ \return the c11 coupling strength parameter
+ */
+ Double_t get_c11() const {return (_c11!=0) ? _c11->unblindValue() : 0.0;}
+
+ //! Get the c12 coupling strength parameter
+ /*!
+ \return the c12 coupling strength parameter
+ */
+ Double_t get_c12() const {return (_c12!=0) ? _c12->unblindValue() : 0.0;}
+
+ //! Get the rescatterChannel_massDaug1 coupling strength parameter
+ /*!
+ \return the rescatterChannel_massDaug1 coupling strength parameter
+ */
+ Double_t get_rescatterChannel_massDaug1() const {return (_rescatterChannel_massDaug1!=0) ? _rescatterChannel_massDaug1->unblindValue() : 0.0;}
+
+ //! Get the rescatterChannel_massDaug2 coupling strength parameter
+ /*!
+ \return the rescatterChannel_massDaug2 coupling strength parameter
+ */
+ Double_t get_rescatterChannel_massDaug2() const {return (_rescatterChannel_massDaug2!=0) ? _rescatterChannel_massDaug2->unblindValue() : 0.0;}
+
+ //! See if the c11 parameter is fixed or floating
+ /*!
+ \return kTRUE if the c11 coupling strength parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fix_c11() const {return (_c11!=0) ? _c11->fixed() : kTRUE;}
+
+ //! See if the c12 parameter is fixed or floating
+ /*!
+ \return kTRUE if the c12 coupling strength parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fix_c12() const {return (_c12!=0) ? _c12->fixed() : kTRUE;}
+
+ //! See if the rescatterChannel_massDaug1 parameter is fixed or floating
+ /*!
+ \return kTRUE if the rescatterChannel_massDaug1 mass parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fix_rescatterChannel_massDaug1() const {return (_rescatterChannel_massDaug1!=0) ? _rescatterChannel_massDaug1->fixed() : kTRUE;}
+
+ //! See if the rescatterChannel_massDaug2 parameter is fixed or floating
+ /*!
+ \return kTRUE if the rescatterChannel_massDaug2 mass parameter is fixed, kFALSE otherwise
+ */
+ Bool_t fix_rescatterChannel_massDaug2() const {return (_rescatterChannel_massDaug2!=0) ? _rescatterChannel_massDaug2->fixed() : kTRUE;}
+
+ //! Complex resonant amplitude
+ /*!
+ \param [in] mass appropriate invariant mass for the resonance
+ \param [in] spinTerm spin term
+ */
+ virtual LauComplex resAmp(Double_t mass, Double_t spinTerm);
+
+ private:
+ //! Copy constructor (not implemented)
+ LauRescatterThreshold(const LauRescatterThreshold& rhs);
+
+ //! Copy assignment operator (not implemented)
+ LauRescatterThreshold& operator=(const LauRescatterThreshold& rhs);
+
+ //! The c11 parameter
+ LauParameter* _c11;
+
+ //! The c12 parameter
+ LauParameter* _c12;
+
+ //! The rescatterChannel_massDaug1 parameter
+ LauParameter* _rescatterChannel_massDaug1;
+
+ //! The rescatterChannel_massDaug2 parameter
+ LauParameter* _rescatterChannel_massDaug2;
+
+ //! Force use of Legendre spin factors
+ Bool_t forceLegendre_;
+
+ //! Mass of daughters
+ Double_t _massDaug1;
+ Double_t _massDaug2;
+
+ ClassDef(LauRescatterThreshold,0)
+};
+
+#endif
diff --git a/src/LauRescatterThreshold.cc b/src/LauRescatterThreshold.cc
new file mode 100644
index 0000000..ef0ed37
--- /dev/null
+++ b/src/LauRescatterThreshold.cc
@@ -0,0 +1,267 @@
+
+/*
+Copyright 2004 University of Warwick
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+/*
+Laura++ package authors:
+John Back
+Paul Harrison
+Thomas Latham
+*/
+
+/*! \file LauRescatterThreshold.cc
+ \brief File containing implementation of LauRescatterThreshold class.
+*/
+
+#include <iostream>
+#include "LauRescatterThreshold.hh"
+#include "LauDaughters.hh"
+#include "LauParameter.hh"
+#include "LauResonanceInfo.hh"
+
+ClassImp(LauRescatterThreshold)
+
+
+LauRescatterThreshold::LauRescatterThreshold(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters) :
+ LauAbsResonance(resInfo, resPairAmpInt, daughters),
+ _c11(0),
+ _c12(0),
+ _rescatterChannel_massDaug1(0),
+ _rescatterChannel_massDaug2(0),
+ forceLegendre_(kTRUE)
+{
+ TString baseParName = this->getSanitisedName();
+
+ TString parName = baseParName+"_c11";
+ _c11 = resInfo->getExtraParameter( parName );
+ if ( _c11 == 0 ) {
+ _c11 = new LauParameter( parName, 0.0, -1.0, 1.0, kTRUE );
+ _c11->secondStage(kTRUE);
+ resInfo->addExtraParameter( _c11 );
+ }
+
+ parName = baseParName+"_c12";
+ _c12 = resInfo->getExtraParameter( parName );
+ if ( _c12 == 0 ) {
+ _c12 = new LauParameter( parName, 0.0, -2.0, 10.0, kTRUE );
+ _c12->secondStage(kTRUE);
+ resInfo->addExtraParameter( _c12 );
+ }
+
+ parName = baseParName+"_rescatterChannel_massDaug1";
+ _rescatterChannel_massDaug1 = resInfo->getExtraParameter( parName );
+ if ( _rescatterChannel_massDaug1 == 0 ) {
+ _rescatterChannel_massDaug1 = new LauParameter( parName, 0.0, 0.0, 10.0, kTRUE );
+ _rescatterChannel_massDaug1->secondStage(kTRUE);
+ resInfo->addExtraParameter( _rescatterChannel_massDaug1 );
+ }
+
+ parName = baseParName+"_rescatterChannel_massDaug2";
+ _rescatterChannel_massDaug2 = resInfo->getExtraParameter( parName );
+ if ( _rescatterChannel_massDaug2 == 0 ) {
+ _rescatterChannel_massDaug2 = new LauParameter( parName, 0.0, 0.0, 10.0, kTRUE );
+ _rescatterChannel_massDaug2->secondStage(kTRUE);
+ resInfo->addExtraParameter( _rescatterChannel_massDaug2 );
+ }
+}
+
+LauRescatterThreshold::~LauRescatterThreshold()
+{
+}
+
+void LauRescatterThreshold::initialise()
+{
+ _massDaug1 = this->getMassDaug1();
+ _massDaug2 = this->getMassDaug2();
+}
+
+LauComplex LauRescatterThreshold::resAmp(Double_t mass, Double_t spinTerm)
+{
+ // This function returns the complex dynamical amplitude for a rescattering channel near-threshold,
+ // given the invariant mass .
+
+ // need:
+ // - coupling strength: near-threshold channel self-coupling [p0]
+ // - coupling strength: near-treshold channel -> observation channel [p1]
+ // - phasespace factor: near-threshold channel
+ // - mass
+ // - masses of near-threshold channel particles (will need to be set) [p2,p3]
+ // - masses of observation-channel particles (use daughters)
+
+ //std::cout<< "Params - c11: " << _c11->value() << std::endl;
+ //std::cout<< "Params - c12: " << _c12->value() << std::endl;
+ //std::cout<< "Params - rescatterChannel_massDaug1: " << _rescatterChannel_massDaug1->value() << std::endl;
+ //std::cout<< "Params - rescatterChannel_massDaug2: " << _rescatterChannel_massDaug2->value() << std::endl;
+
+ //std::cout<< "ResProps - massResDaug1: " << _massDaug1 << std::endl;
+ //std::cout<< "ResProps - massResDaug2: " << _massDaug2 << std::endl;
+
+ //std::cout<< "Calc - mass: " << mass << std::endl;
+ //std::cout<< "Calc - spinTerm: " << spinTerm << std::endl;
+
+ LauComplex phspFactor1 = phspFactor(mass,_rescatterChannel_massDaug1->value(),_rescatterChannel_massDaug2->value());
+ LauComplex phspFactor2 = phspFactor(mass,_massDaug1,_massDaug2);
+
+ //std::cout<< "Calc - phspFactor1: " << phspFactor1 << std::endl;
+ //std::cout<< "Calc - phspFactor2: " << phspFactor2 << std::endl;
+
+ LauComplex num = LauComplex(-_c12->value(),0) / phspFactor2 ;
+ LauComplex im(0,1);
+ LauComplex den = LauComplex( _c11->value(),0) - im*phspFactor1 - im*LauComplex(_c12->value()*_c12->value(),0)/phspFactor2 ;
+
+ LauComplex resAmplitude = num / den ;
+
+ //std::cout<< "Calc - num: " << num << std::endl;
+ //std::cout<< "Calc - den: " << den << std::endl;
+
+ //std::cout<< "Calc - amp before scale: " << resAmplitude << std::endl;
+
+ resAmplitude.rescale(spinTerm);
+
+ //std::cout<< "Calc - amp after scale: " << resAmplitude << std::endl;
+
+ return resAmplitude;
+}
+
+LauComplex LauRescatterThreshold::phspFactor(Double_t mass, Double_t m1, Double_t m2)
+{
+ LauComplex phspFactor(1,0);
+ Double_t _fact = (mass*mass - (m1+m2)*(m1+m2)) * (mass*mass - (m1-m2)*(m1-m2));
+ if (_fact>0) phspFactor = LauComplex(std::sqrt(_fact),0);
+ else phspFactor = LauComplex(0,std::sqrt(-1*_fact));
+ phspFactor.rescale(1./mass);
+
+ return phspFactor;
+}
+
+const std::vector<LauParameter*>& LauRescatterThreshold::getFloatingParameters()
+{
+ this->clearFloatingParameters();
+
+ if ( ! this->fix_c11() ) {
+ this->addFloatingParameter( _c11 );
+ }
+ if ( ! this->fix_c12() ) {
+ this->addFloatingParameter( _c12 );
+ }
+ if ( ! this->fix_rescatterChannel_massDaug1() ) {
+ this->addFloatingParameter( _rescatterChannel_massDaug1 );
+ }
+ if ( ! this->fix_rescatterChannel_massDaug2() ) {
+ this->addFloatingParameter( _rescatterChannel_massDaug2 );
+ }
+
+ return this->getParameters();
+}
+
+void LauRescatterThreshold::setResonanceParameter(const TString& name, const Double_t value)
+{
+ // Set various parameters for the lineshape
+ if (name == "c11") {
+ this->set_c11(value);
+ std::cout << "INFO in LauRescatterThreshold::setResonanceParameter : Setting parameter c11 = " << this->get_c11() << std::endl;
+ } else if (name == "c12") {
+ this->set_c12(value);
+ std::cout << "INFO in LauRescatterThreshold::setResonanceParameter : Setting parameter c12 = " << this->get_c12() << std::endl;
+ } else if (name == "rescatterChannel_massDaug1") {
+ this->set_rescatterChannel_massDaug1(value);
+ std::cout << "INFO in LauRescatterThreshold::setResonanceParameter : Setting parameter rescatterChannel_massDaug1 = " << this->get_rescatterChannel_massDaug1() << std::endl;
+ } else if (name == "rescatterChannel_massDaug2") {
+ this->set_rescatterChannel_massDaug2(value);
+ std::cout << "INFO in LauRescatterThreshold::setResonanceParameter : Setting parameter rescatterChannel_massDaug2 = " << this->get_rescatterChannel_massDaug2() << std::endl;
+ } else {
+ std::cerr << "WARNING in LauRescatterThreshold::setResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
+ }
+}
+
+void LauRescatterThreshold::floatResonanceParameter(const TString& name)
+{
+ if (name == "c11") {
+ if ( _c11->fixed() ) {
+ _c11->fixed( kFALSE );
+ this->addFloatingParameter( _c11 );
+ } else {
+ std::cerr << "WARNING in LauRescatterThreshold::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else if (name == "c12") {
+ if ( _c12->fixed() ) {
+ _c12->fixed( kFALSE );
+ this->addFloatingParameter( _c12 );
+ } else {
+ std::cerr << "WARNING in LauRescatterThreshold::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else if (name == "rescatterChannel_massDaug1") {
+ if ( _rescatterChannel_massDaug1->fixed() ) {
+ _rescatterChannel_massDaug1->fixed( kFALSE );
+ this->addFloatingParameter( _rescatterChannel_massDaug1 );
+ } else {
+ std::cerr << "WARNING in LauRescatterThreshold::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else if (name == "rescatterChannel_massDaug2") {
+ if ( _rescatterChannel_massDaug2->fixed() ) {
+ _rescatterChannel_massDaug2->fixed( kFALSE );
+ this->addFloatingParameter( _rescatterChannel_massDaug2 );
+ } else {
+ std::cerr << "WARNING in LauRescatterThreshold::floatResonanceParameter: Parameter already floating. No parameter changes made." << std::endl;
+ }
+ } else {
+ std::cerr << "WARNING in LauRescatterThreshold::fixResonanceParameter: Parameter name not reconised. No parameter changes made." << std::endl;
+ }
+}
+
+LauParameter* LauRescatterThreshold::getResonanceParameter(const TString& name)
+{
+ if (name == "c11") {
+ return _c11;
+ } else if (name == "c12") {
+ return _c12;
+ } else if (name == "rescatterChannel_massDaug1") {
+ return _rescatterChannel_massDaug1;
+ } else if (name == "rescatterChannel_massDaug2") {
+ return _rescatterChannel_massDaug2;
+ } else {
+ std::cerr << "WARNING in LauRescatterThreshold::getResonanceParameter: Parameter name not reconised." << std::endl;
+ return 0;
+ }
+}
+
+void LauRescatterThreshold::set_c11(const Double_t c11)
+{
+ _c11->value( c11 );
+ _c11->genValue( c11 );
+ _c11->initValue( c11 );
+}
+
+void LauRescatterThreshold::set_c12(const Double_t c12)
+{
+ _c12->value( c12 );
+ _c12->genValue( c12 );
+ _c12->initValue( c12 );
+}
+
+void LauRescatterThreshold::set_rescatterChannel_massDaug1(const Double_t rescatterChannel_massDaug1)
+{
+ _rescatterChannel_massDaug1->value( rescatterChannel_massDaug1 );
+ _rescatterChannel_massDaug1->genValue( rescatterChannel_massDaug1 );
+ _rescatterChannel_massDaug1->initValue( rescatterChannel_massDaug1 );
+}
+
+void LauRescatterThreshold::set_rescatterChannel_massDaug2(const Double_t rescatterChannel_massDaug2)
+{
+ _rescatterChannel_massDaug2->value( rescatterChannel_massDaug2 );
+ _rescatterChannel_massDaug2->genValue( rescatterChannel_massDaug2 );
+ _rescatterChannel_massDaug2->initValue( rescatterChannel_massDaug2 );
+}
\ No newline at end of file

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 6:21 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3805565
Default Alt Text
(17 KB)

Event Timeline