diff --git a/inc/LauKMatrixProdPole.hh b/inc/LauKMatrixProdPole.hh index a16341f..4e4b96d 100644 --- a/inc/LauKMatrixProdPole.hh +++ b/inc/LauKMatrixProdPole.hh @@ -1,103 +1,105 @@ /* Copyright 2008 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 LauKMatrixProdPole.hh \brief File containing declaration of LauKMatrixProdPole class. */ /*! \class LauKMatrixProdPole \brief Class for defining a K-matrix production pole amplitude term. Class for defining a K-matrix production pole amplitude term */ #ifndef LAU_KMATRIX_PROD_POLE #define LAU_KMATRIX_PROD_POLE #include "LauAbsResonance.hh" #include "TString.h" class LauKMatrixPropagator; class LauDaughters; class LauKinematics; class LauKMatrixProdPole : public LauAbsResonance { - public: + public: //! Constructor /*! \param [in] poleName name of the pole \param [in] poleIndex number of pole \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] propagator a K-matrix propagator \param [in] daughters the daughter particles \param [in] useProdAdler boolean to turn on/off the production Adler zero factor */ - LauKMatrixProdPole(const TString& poleName, Int_t poleIndex, Int_t resPairAmpInt, - LauKMatrixPropagator* propagator, const LauDaughters* daughters, - Bool_t useProdAdler = kFALSE); + LauKMatrixProdPole( const TString& poleName, Int_t poleIndex, Int_t resPairAmpInt, + LauKMatrixPropagator* propagator, const LauDaughters* daughters, + Bool_t useProdAdler = kFALSE); //! Destructor - virtual ~LauKMatrixProdPole(); + virtual ~LauKMatrixProdPole(); // Initialise the model - virtual void initialise() {return;} + virtual void initialise() {return;} //! The amplitude calculation /*! \param [in] kinematics the kinematic variables of the current event \return the complex amplitude */ - virtual LauComplex amplitude(const LauKinematics* kinematics); + virtual LauComplex amplitude(const LauKinematics* kinematics); //! Get the resonance model type - /*! - \return the resonance model type - */ + /*! + \return the resonance model type + */ virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return LauAbsResonance::KMatrix;} + virtual const std::vector& getFloatingParameters(); + protected: //! Function not meant to be called, amplitude is called directly in this case - virtual LauComplex resAmp(Double_t mass, Double_t spinTerm); + virtual LauComplex resAmp(Double_t mass, Double_t spinTerm); - private: + private: //! Copy constructor (not implemented) LauKMatrixProdPole(const LauKMatrixProdPole& rhs); //! Copy assignment operator (not implemented) LauKMatrixProdPole& operator=(const LauKMatrixProdPole& rhs); //! The K-matrix propagator - LauKMatrixPropagator* thePropagator_; + LauKMatrixPropagator* thePropagator_; //! The number of the pole Int_t poleIndex_; - //! Boolean to turn on/off the production Adler zero factor - Bool_t useProdAdler_; + //! Boolean to turn on/off the production Adler zero factor + Bool_t useProdAdler_; - ClassDef(LauKMatrixProdPole, 0) // K-matrix production pole + ClassDef(LauKMatrixProdPole, 0) // K-matrix production pole }; #endif diff --git a/inc/LauKMatrixProdSVP.hh b/inc/LauKMatrixProdSVP.hh index 2006183..781973e 100644 --- a/inc/LauKMatrixProdSVP.hh +++ b/inc/LauKMatrixProdSVP.hh @@ -1,103 +1,105 @@ /* Copyright 2008 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 LauKMatrixProdSVP.hh \brief File containing declaration of LauKMatrixProdSVP class. */ /*! \class LauKMatrixProdSVP \brief Class for defining a K-matrix production "slowly-varying part" (SVP) amplitude Class for defining a K-matrix production "slowly-varying part" (SVP) amplitude */ #ifndef LAU_KMATRIX_PROD_SVP #define LAU_KMATRIX_PROD_SVP #include "LauAbsResonance.hh" #include "TString.h" class LauKMatrixPropagator; class LauDaughters; class LauKinematics; class LauKMatrixProdSVP : public LauAbsResonance { public: //! Constructor /*! \param [in] SVPName name of the slowly varying part (SVP) \param [in] channelIndex the channel number \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] propagator a K-matrix propagator \param [in] daughters the daughter particles \param [in] useProdAdler boolean to turn on/off the production Adler zero factor */ LauKMatrixProdSVP(const TString& SVPName, Int_t channelIndex, Int_t resPairAmpInt, LauKMatrixPropagator* propagator, const LauDaughters* daughters, Bool_t useProdAdler = kFALSE); //! Destructor virtual ~LauKMatrixProdSVP(); //! Initialise the model virtual void initialise() {return;} //! The amplitude calculation /*! \param [in] kinematics the kinematic variables of the current event \return the complex amplitude */ virtual LauComplex amplitude(const LauKinematics* kinematics); //! Get the resonance model type /*! \return the resonance model type */ virtual LauAbsResonance::LauResonanceModel getResonanceModel() const {return LauAbsResonance::KMatrix;} + + const std::vector& getFloatingParameters(); protected: //! Function not meant to be called virtual LauComplex resAmp(Double_t mass, Double_t spinTerm); private: //! Copy constructor (not implemented) LauKMatrixProdSVP(const LauKMatrixProdSVP& rhs); //! Copy assignment operator (not implemented) LauKMatrixProdSVP& operator=(const LauKMatrixProdSVP& rhs); //! The K-matrix propagator LauKMatrixPropagator* thePropagator_; //! The number of the channel Int_t channelIndex_; //! Boolean to turn on/off the production Adler zero factor Bool_t useProdAdler_; ClassDef(LauKMatrixProdSVP, 0) // K-matrix production SVP term }; #endif diff --git a/inc/LauKMatrixPropagator.hh b/inc/LauKMatrixPropagator.hh index fb974f2..520ed24 100644 --- a/inc/LauKMatrixPropagator.hh +++ b/inc/LauKMatrixPropagator.hh @@ -1,499 +1,561 @@ /* Copyright 2008 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 LauKMatrixPropagator.hh \brief File containing declaration of LauKMatrixPropagator class. */ /*! \class LauKMatrixPropagator \brief Class for defining a K-matrix propagator. Class used to define a K-matrix propagator. See the following papers for info: hep-ph/0204328, hep-ex/0312040, [hep-ex]0804.2089 and hep-ph/9705401. */ #ifndef LAU_KMATRIX_PROPAGATOR #define LAU_KMATRIX_PROPAGATOR #include "LauComplex.hh" #include "LauKinematics.hh" #include "LauParameter.hh" #include "TMatrixD.h" #include "TString.h" #include #include class LauKMatrixPropagator { - public: + public: //! Constructor /*! \param [in] name name of the propagator \param [in] paramFileName the parameter file name \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] nChannels the number of channels \param [in] nPoles the number of poles \param [in] rowIndex this specifies which row of the propagator should be used when summing over the amplitude channels */ - LauKMatrixPropagator(const TString& name, const TString& paramFileName, - Int_t resPairAmpInt, Int_t nChannels, Int_t nPoles, - Int_t rowIndex = 1); + LauKMatrixPropagator( const TString& name, const TString& paramFileName, + Int_t resPairAmpInt, Int_t nChannels, Int_t nPoles, + Int_t rowIndex = 1 ); //! Destructor - virtual ~LauKMatrixPropagator(); + virtual ~LauKMatrixPropagator(); //! Calculate the invariant mass squared s /*! \param [in] kinematics the kinematics of the current event */ void updatePropagator(const LauKinematics* kinematics); //! Calculate the K-matrix propagator for the given s value /*! \param [in] s the invariant mass squared */ void updatePropagator(Double_t s); //! Read an input file to set parameters /*! \param [in] inputFile name of the input file */ - void setParameters(const TString& inputFile); + void setParameters(const TString& inputFile); - //! Get the scattering K matrix - /*! - \return the real, symmetric scattering K matrix + //! Get the scattering K matrix + /*! + \return the real, symmetric scattering K matrix */ - TMatrixD getKMatrix() const {return ScattKMatrix_;} + TMatrixD getKMatrix() const {return ScattKMatrix_;} - //! Get the real part of the propagator full matrix - /*! - \return the real part of the propagator full matrix - */ - TMatrixD getRealPropMatrix() const {return realProp_;} + //! Get the real part of the propagator full matrix + /*! + \return the real part of the propagator full matrix + */ + TMatrixD getRealPropMatrix() const {return realProp_;} - //! Get the negative imaginary part of the full propagator matrix - /*! - \return the negative imaginary part of the full propagator matrix - */ - TMatrixD getNegImagPropMatrix() const {return negImagProp_;} + //! Get the negative imaginary part of the full propagator matrix + /*! + \return the negative imaginary part of the full propagator matrix + */ + TMatrixD getNegImagPropMatrix() const {return negImagProp_;} //! Get the real part of the term of the propagator /*! \param [in] channelIndex the channel number \return the real part of the propagator term */ Double_t getRealPropTerm(Int_t channelIndex) const; //! Get the imaginary part of the term of the propagator /*! \param [in] channelIndex the channel number \return the imaginiary part of the propagator term */ Double_t getImagPropTerm(Int_t channelIndex) const; //! Get the 1/(m_pole^2 -s) terms for the scattering and production K-matrix formulae /*! \param [in] poleIndex the number of the pole required \return the value of 1/(m_pole^2 -s) */ Double_t getPoleDenomTerm(Int_t poleIndex) const; //! Get coupling constants that were loaded from the input file /*! \param [in] poleIndex number of the required pole \param [in] channelIndex number of the required channel \return the value of the coupling constant */ Double_t getCouplingConstant(Int_t poleIndex, Int_t channelIndex) const; + //! Get coupling parameters, set according to the input file + /*! + \param [in] poleIndex number of the required pole + \param [in] channelIndex number of the required channel + \return the parameter of the coupling constant + */ + LauParameter& getCouplingParameter(Int_t poleIndex, Int_t channelIndex); + //! Get scattering constants that were loaded from the input file /*! \param [in] channel1Index number of the first channel index \param [in] channel2Index number of the second channel index \return the value of the scattering constant */ Double_t getScatteringConstant(Int_t channel1Index, Int_t channel2Index) const; //! Get the "slowly-varying part" term of the amplitude /*! \return the svp term */ + + //! Get scattering parameters, set according to the input file + /*! + \param [in] channel1Index number of the first channel index + \param [in] channel2Index number of the second channel index + \return the parameter of the scattering constant + */ + LauParameter& getScatteringParameter(Int_t channel1Index, Int_t channel2Index); + + //! Get s0 production parameter + /*! + \return the s0Prod parameter + */ + LauParameter& gets0Prod() {return s0Prod_;} + Double_t getProdSVPTerm() const {return prodSVP_;} //! Get the full complex propagator term for a given channel /*! \param [in] channelIndex the number of the required channel \return the complex propagator term */ LauComplex getPropTerm(Int_t channelIndex) const; //! Get the DP axis identifier /*! - /return the value to identify the DP axis in question + \return the value to identify the DP axis in question */ Int_t getResPairAmpInt() const {return resPairAmpInt_;} //! Get the number of channels /*! - /return the number of channels + \return the number of channels */ Int_t getNChannels() const {return nChannels_;} //! Get the number of poles /*! - /return the number of poles + \return the number of poles */ Int_t getNPoles() const {return nPoles_;} //! Get the propagator name /*! - /return the name of the propagator + \return the name of the propagator */ TString getName() const {return name_;} - //! Get the unitary transition amplitude for the given channel - /*! - \param [in] s The invariant mass squared - \param [in] channel The index number of the channel process - \return the complex amplitude T + //! Get the unitary transition amplitude for the given channel + /*! + \param [in] s The invariant mass squared + \param [in] channel The index number of the channel process + \return the complex amplitude T */ - LauComplex getTransitionAmp(Double_t s, Int_t channel); + LauComplex getTransitionAmp(Double_t s, Int_t channel); - - //! Get the complex phase space term for the given channel and invariant mass squared - /*! - \param [in] s The invariant mass squared - \param [in] channel The index number of the channel process - \return the complex phase space term rho(channel, channel) + //! Get the complex phase space term for the given channel and invariant mass squared + /*! + \param [in] s The invariant mass squared + \param [in] channel The index number of the channel process + \return the complex phase space term rho(channel, channel) */ - LauComplex getPhaseSpaceTerm(Double_t s, Int_t channel); + LauComplex getPhaseSpaceTerm(Double_t s, Int_t channel); - //! Get the Adler zero factor, which is set when updatePropagator is called - /*! - \return the Adler zero factor + //! Get the Adler zero factor, which is set when updatePropagator is called + /*! + \return the Adler zero factor */ - Double_t getAdlerZero() const {return adlerZeroFactor_;} + Double_t getAdlerZero() const {return adlerZeroFactor_;} - //! Get the THat amplitude for the given s and channel number - /*! - \param [in] s The invariant mass squared + //! Get the THat amplitude for the given s and channel number + /*! + \param [in] s The invariant mass squared \param [in] channel The index number of the channel process \return the complex THat amplitude */ - LauComplex getTHat(Double_t s, Int_t channel); - + LauComplex getTHat(Double_t s, Int_t channel); - protected: + protected: //! Calculate the scattering K-matrix for the given value of s /*! \param [in] s the invariant mass squared */ void calcScattKMatrix(Double_t s); //! Calculate the real and imaginary part of the phase space density diagonal matrix /*! \param [in] s the invariant mass squared */ void calcRhoMatrix(Double_t s); + //! Calculate the real and imaginary part of the gamma angular-momentum barrier matrix + /*! + \param [in] s the invariant mass squared + */ + void calcGammaMatrix(Double_t s); + + //! Calculate the DK P-wave gamma angular-momentum barrier + /*! + \param [in] s the invariant mass squared + */ + Double_t calcD0KPwaveGamma(Double_t s) const; + //! Calulate the term 1/(m_pole^2 - s) for the scattering and production K-matrix formulae /*! \param [in] s the invariant mass squared */ void calcPoleDenomVect(Double_t s); + //! Calculate the D0K+ phase space factor + /*! + \param [in] s the invariant mass squared + \return the complex phase space factor + */ + LauComplex calcD0KRho(Double_t s) const; + + //! Calculate the D*0K+ phase space factor + /*! + \param [in] s the invariant mass squared + \return the complex phase space factor + */ + LauComplex calcDstar0KRho(Double_t s) const; + //! Calculate the pipi phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcPiPiRho(Double_t s) const; //! Calculate the KK phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcKKRho(Double_t s) const; //! Calculate the 4 pi phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcFourPiRho(Double_t s) const; //! Calculate the eta-eta phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcEtaEtaRho(Double_t s) const; //! Calculate the eta-eta' phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcEtaEtaPRho(Double_t s) const; //! Calculate the Kpi phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcKPiRho(Double_t s) const; //! Calculate the K-eta' phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcKEtaPRho(Double_t s) const; //! Calculate the Kpipipi phase space factor /*! \param [in] s the invariant mass squared \return the complex phase space factor */ LauComplex calcKThreePiRho(Double_t s) const; //! Calculate the "slow-varying part" /*! \param [in] s the invariant mass squared \param [in] s0 the invariant mass squared at the Adler zero \return the SVP term */ Double_t calcSVPTerm(Double_t s, Double_t s0) const; //! Update the scattering "slowly-varying part" /*! \param [in] s the invariant mass squared */ void updateScattSVPTerm(Double_t s); //! Update the production "slowly-varying part" /*! \param [in] s the invariant mass squared */ void updateProdSVPTerm(Double_t s); //! Calculate the multiplicative factor containing severa Adler zero constants /*! \param [in] s the invariant mass squared */ void updateAdlerZeroFactor(Double_t s); //! Check the phase space factors that need to be used /*! \param [in] phaseSpaceInt phase space types \return true of false */ Bool_t checkPhaseSpaceType(Int_t phaseSpaceInt) const; - //! Get the unitary transition amplitude matrix for the given kinematics - /*! - \param [in] kinematics The pointer to the constant kinematics + //! Get the unitary transition amplitude matrix for the given kinematics + /*! + \param [in] kinematics The pointer to the constant kinematics */ - void getTMatrix(const LauKinematics* kinematics); + void getTMatrix(const LauKinematics* kinematics); - //! Get the unitary transition amplitude matrix for the given kinematics - /*! - \param [in] s The invariant mass squared of the system + //! Get the unitary transition amplitude matrix for the given kinematics + /*! + \param [in] s The invariant mass squared of the system */ - void getTMatrix(Double_t s); + void getTMatrix(Double_t s); - //! Get the square root of the phase space matrix - void getSqrtRhoMatrix(); - - private: + //! Get the square root of the phase space matrix + void getSqrtRhoMatrix(); + + private: //! Copy constructor (not implemented) LauKMatrixPropagator(const LauKMatrixPropagator& rhs); //! Copy assignment operator (not implemented) LauKMatrixPropagator& operator=(const LauKMatrixPropagator& rhs); //! Create a map for the K-matrix parameters - typedef std::map > KMatrixParamMap; + typedef std::map > KMatrixParamMap; - //! Initialise and set the dimensions for the internal matrices and parameter arrays - void initialiseMatrices(); + //! Initialise and set the dimensions for the internal matrices and parameter arrays + void initialiseMatrices(); - //! Store the (phase space) channel indices from a line in the parameter file - /*! - \param [in] theLine Vector of strings corresponding to the line from the parameter file + //! Store the (phase space) channel indices from a line in the parameter file + /*! + \param [in] theLine Vector of strings corresponding to the line from the parameter file */ - void storeChannels(const std::vector& theLine); + void storeChannels(const std::vector& theLine); - //! Store the pole mass and couplings from a line in the parameter file - /*! - \param [in] theLine Vector of strings corresponding to the line from the parameter file + //! Store the pole mass and couplings from a line in the parameter file + /*! + \param [in] theLine Vector of strings corresponding to the line from the parameter file */ - void storePole(const std::vector& theLine); + void storePole(const std::vector& theLine); - //! Store the scattering coefficients from a line in the parameter file - /*! - \param [in] theLine Vector of strings corresponding to the line from the parameter file + //! Store the scattering coefficients from a line in the parameter file + /*! + \param [in] theLine Vector of strings corresponding to the line from the parameter file */ - void storeScattering(const std::vector& theLine); + void storeScattering(const std::vector& theLine); - //! Store miscelleanous parameters from a line in the parameter file - /*! - \param [in] keyword the name of the parameter to be set - \param [in] parString the string containing the value of the parameter + //! Store miscelleanous parameters from a line in the parameter file + /*! + \param [in] keyword the name of the parameter to be set + \param [in] parString the string containing the value of the parameter */ - void storeParameter(const TString& keyword, const TString& parString); + void storeParameter(const TString& keyword, const TString& parString); - //! String to store the propagator name + //! String to store the propagator name TString name_; //! Name of the input parameter file TString paramFileName_; //! Number to identify the DP axis in question Int_t resPairAmpInt_; //! Row index - 1 Int_t index_; //! s value of the previous pole Double_t previousS_; //! "slowly-varying part" for the scattering K-matrix Double_t scattSVP_; //! "slowly-varying part" for the production K-matrix Double_t prodSVP_; //! Real part of the propagator matrix TMatrixD realProp_; //! Imaginary part of the propagator matrix TMatrixD negImagProp_; // Integers to specify the allowed channels for the phase space calculations. // Please keep Zero at the start and leave TotChannels at the end // whenever more channels are added to this. //! Integers to specify the allowed channels for the phase space calculations enum KMatrixChannels {Zero, PiPi, KK, FourPi, EtaEta, EtaEtaP, - KPi, KEtaP, KThreePi, TotChannels}; + KPi, KEtaP, KThreePi, D0K_Pwave, Dstar0K_Swave, TotChannels}; //! Scattering K-matrix TMatrixD ScattKMatrix_; //! Real part of the phase space density diagonal matrix TMatrixD ReRhoMatrix_; //! Imaginary part of the phase space density diagonal matrix TMatrixD ImRhoMatrix_; + //! Gmma angular-momentum barrier matrix + TMatrixD GammaMatrix_; //! Identity matrix TMatrixD IMatrix_; //! Null matrix TMatrixD zeroMatrix_; //! Real part of the square root of the phase space density diagonal matrix TMatrixD ReSqrtRhoMatrix_; //! Imaginary part of the square root of the phase space density diagonal matrix TMatrixD ImSqrtRhoMatrix_; - //! Real part of the unitary T matrix - TMatrixD ReTMatrix_; - //! Imaginary part of the unitary T matrix - TMatrixD ImTMatrix_; + //! Real part of the unitary T matrix + TMatrixD ReTMatrix_; + //! Imaginary part of the unitary T matrix + TMatrixD ImTMatrix_; //! Number of channels Int_t nChannels_; //! Number of poles Int_t nPoles_; //! Vector of squared pole masses - std::vector mSqPoles_; + std::vector mSqPoles_; + + //! All parameters of the propagator (copuling/scattering constants) + std::vector propParameters_; //! Array of coupling constants - LauParArray gCouplings_; + LauParArray gCouplings_; //! Array of scattering SVP values - LauParArray fScattering_; + LauParArray fScattering_; //! Vector of phase space types std::vector phaseSpaceTypes_; + //! Vector of angular momentum states + std::vector angMomStates_; //! Vector of squared masses std::vector mSumSq_; //! Vector of mass differences std::vector mDiffSq_; //! Vector of 1/(m_pole^2 - s) terms for scattering and production K-matrix formulae std::vector poleDenomVect_; //! Constant from input file LauParameter mSq0_; //! Constant from input file LauParameter s0Scatt_; //! Constant from input file LauParameter s0Prod_; //! Constant from input file LauParameter sA_; //! Constant from input file LauParameter sA0_; //! Defined as 0.5*sA*mPi*mPi Double_t sAConst_; //! Defined as 4*mPi*mPi Double_t m2piSq_; //! Defined as 4*mK*mK Double_t m2KSq_; //! Defined as 4*mEta*mEta Double_t m2EtaSq_; //! Defined as (mEta+mEta')^2 Double_t mEtaEtaPSumSq_; //! Defined as (mEta-mEta')^2 Double_t mEtaEtaPDiffSq_; //! Defined as (mK+mPi)^2 Double_t mKpiSumSq_; //! Defined as (mK-mPi)^2 Double_t mKpiDiffSq_; //! Defined as (mK+mEta')^2 Double_t mKEtaPSumSq_; //! Defined as (mK-mEta')^2 Double_t mKEtaPDiffSq_; //! Defined as (mK-3*mPi)^2 Double_t mK3piDiffSq_; //! Factor used to calculate the Kpipipi phase space term Double_t k3piFactor_; //! Factor used to calculate the pipipipi phase space term Double_t fourPiFactor1_; //! Factor used to calculate the pipipipi phase space term Double_t fourPiFactor2_; + //! Defined as (mD0+mK)^2 + Double_t mD0KSumSq_; + //! Defined as (mD0-mK)^2 + Double_t mD0KDiffSq_; + //! Defined as (mD*0+mK)^2 + Double_t mDstar0KSumSq_; + //! Defined as (mD*0-mK)^2 + Double_t mDstar0KDiffSq_; //! Multiplicative factor containing various Adler zero constants Double_t adlerZeroFactor_; //! Tracks if all params have been set Bool_t parametersSet_; //! Control the output of the functions Bool_t verbose_; - //! Control if scattering constants are channel symmetric: f_ji = f_ij - Bool_t scattSymmetry_; + //! Control if scattering constants are channel symmetric: f_ji = f_ij + Bool_t scattSymmetry_; ClassDef(LauKMatrixPropagator,0) // K-matrix amplitude model }; #endif diff --git a/src/LauKMatrixProdPole.cc b/src/LauKMatrixProdPole.cc index 3223f8c..b4eac66 100644 --- a/src/LauKMatrixProdPole.cc +++ b/src/LauKMatrixProdPole.cc @@ -1,108 +1,126 @@ /* Copyright 2008 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 LauKMatrixProdPole.cc \brief File containing implementation of LauKMatrixProdPole class. */ #include "LauKMatrixProdPole.hh" #include "LauKMatrixPropagator.hh" #include ClassImp(LauKMatrixProdPole) LauKMatrixProdPole::LauKMatrixProdPole(const TString& poleName, Int_t poleIndex, Int_t resPairAmpInt, LauKMatrixPropagator* propagator, const LauDaughters* daughters, Bool_t useProdAdler) : LauAbsResonance(poleName, resPairAmpInt, daughters), thePropagator_(propagator), poleIndex_(poleIndex - 1), // poleIndex goes from 1 to nPoles useProdAdler_(useProdAdler) { if (useProdAdler_) { std::cout<<"Creating K matrix production pole "<updatePropagator(kinematics); // Sum the pole denominator terms over all channels j, multiplying by // the propagator terms. Note that we do not sum over poles, since we // only want one of the production pole terms. Int_t nChannels = thePropagator_->getNChannels(); Int_t jChannel; for (jChannel = 0; jChannel < nChannels; jChannel++) { Double_t gj = thePropagator_->getCouplingConstant(poleIndex_, jChannel); LauComplex prodTerm = thePropagator_->getPropTerm(jChannel); prodTerm.rescale(gj); amp += prodTerm; } Double_t poleDenom = thePropagator_->getPoleDenomTerm(poleIndex_); // Include Adler zero factor if requested Double_t adlerZero(1.0); if (useProdAdler_) {adlerZero = thePropagator_->getAdlerZero();} amp.rescale(poleDenom*adlerZero); return amp; } + +const std::vector& LauKMatrixProdPole::getFloatingParameters() +{ + + this->clearFloatingParameters(); + + Int_t nChannels = thePropagator_->getNChannels(); + + for (int jChannel = 0 ; jChannel < nChannels ; jChannel++) + { + LauParameter& par_gj_ = thePropagator_->getCouplingParameter(poleIndex_, jChannel); + if ( !par_gj_.fixed() ) + this->addFloatingParameter( &par_gj_ ); + } + + return this->getParameters(); + +} \ No newline at end of file diff --git a/src/LauKMatrixProdSVP.cc b/src/LauKMatrixProdSVP.cc index 7ad3c35..1a93c8a 100644 --- a/src/LauKMatrixProdSVP.cc +++ b/src/LauKMatrixProdSVP.cc @@ -1,96 +1,119 @@ /* Copyright 2008 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 LauKMatrixProdSVP.cc \brief File containing implementation of LauKMatrixProdSVP class. */ #include "LauKMatrixProdSVP.hh" #include "LauKMatrixPropagator.hh" #include ClassImp(LauKMatrixProdSVP) LauKMatrixProdSVP::LauKMatrixProdSVP(const TString& SVPName, Int_t channelIndex, Int_t resPairAmpInt, LauKMatrixPropagator* propagator, const LauDaughters* daughters, Bool_t useProdAdler) : LauAbsResonance(SVPName, resPairAmpInt, daughters), thePropagator_(propagator), channelIndex_(channelIndex - 1), // channelIndex goes from 1 to nChannels. useProdAdler_(useProdAdler) { // Constructor if (useProdAdler_) { std::cout<<"Creating K matrix production SVP "<updatePropagator(kinematics); Double_t SVPTerm = thePropagator_->getProdSVPTerm(); amp = thePropagator_->getPropTerm(channelIndex_); // Include Adler zero factor if requested Double_t adlerZero(1.0); if (useProdAdler_) {adlerZero = thePropagator_->getAdlerZero();} amp.rescale(SVPTerm*adlerZero); return amp; } +const std::vector& LauKMatrixProdSVP::getFloatingParameters() +{ + + this->clearFloatingParameters(); + + Int_t nChannels = thePropagator_->getNChannels(); + + for (int jChannel = 0 ; jChannel < nChannels ; jChannel++) + { + LauParameter& par_f_ = thePropagator_->getScatteringParameter(channelIndex_, jChannel); + if ( !par_f_.fixed() ) + this->addFloatingParameter( &par_f_ ); + } + + LauParameter& par_s0Prod_ = thePropagator_->gets0Prod(); + if ( !par_s0Prod_.fixed() ) + { + this->addFloatingParameter( &par_s0Prod_ ); + } + + return this->getParameters(); + +} \ No newline at end of file diff --git a/src/LauKMatrixPropagator.cc b/src/LauKMatrixPropagator.cc index 80bafff..875e401 100644 --- a/src/LauKMatrixPropagator.cc +++ b/src/LauKMatrixPropagator.cc @@ -1,1133 +1,1156 @@ /* Copyright 2008 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 LauKMatrixPropagator.cc \brief File containing implementation of LauKMatrixPropagator class. */ #include "LauKMatrixPropagator.hh" #include "LauConstants.hh" #include "LauTextFileParser.hh" #include "TMath.h" #include "TSystem.h" #include #include #include #include using std::cout; using std::endl; using std::cerr; ClassImp(LauKMatrixPropagator) LauKMatrixPropagator::LauKMatrixPropagator(const TString& name, const TString& paramFile, - Int_t resPairAmpInt, Int_t nChannels, + Int_t resPairAmpInt, Int_t nChannels, Int_t nPoles, Int_t rowIndex) : name_(name), paramFileName_(paramFile), resPairAmpInt_(resPairAmpInt), index_(rowIndex - 1), previousS_(0.0), scattSVP_(0.0), prodSVP_(0.0), nChannels_(nChannels), nPoles_(nPoles), sAConst_(0.0), m2piSq_(4.0*LauConstants::mPiSq), m2KSq_( 4.0*LauConstants::mKSq), m2EtaSq_(4.0*LauConstants::mEtaSq), mEtaEtaPSumSq_((LauConstants::mEta + LauConstants::mEtaPrime)*(LauConstants::mEta + LauConstants::mEtaPrime)), mEtaEtaPDiffSq_((LauConstants::mEta - LauConstants::mEtaPrime)*(LauConstants::mEta - LauConstants::mEtaPrime)), mKpiSumSq_((LauConstants::mK + LauConstants::mPi)*(LauConstants::mK + LauConstants::mPi)), mKpiDiffSq_((LauConstants::mK - LauConstants::mPi)*(LauConstants::mK - LauConstants::mPi)), mKEtaPSumSq_((LauConstants::mK + LauConstants::mEtaPrime)*(LauConstants::mK + LauConstants::mEtaPrime)), mKEtaPDiffSq_((LauConstants::mK - LauConstants::mEtaPrime)*(LauConstants::mK - LauConstants::mEtaPrime)), mK3piDiffSq_((LauConstants::mK - 3.0*LauConstants::mPi)*(LauConstants::mK - 3.0*LauConstants::mPi)), k3piFactor_(TMath::Power((1.44 - mK3piDiffSq_)/1.44, -2.5)), fourPiFactor1_(16.0*LauConstants::mPiSq), fourPiFactor2_(TMath::Sqrt(1.0 - fourPiFactor1_)), adlerZeroFactor_(0.0), parametersSet_(kFALSE), verbose_(kFALSE), scattSymmetry_(kTRUE) { // Constructor // Check that the index is OK if (index_ < 0 || index_ >= nChannels_) { std::cerr << "ERROR in LauKMatrixPropagator constructor. The rowIndex, which is set to " << rowIndex << ", must be between 1 and the number of channels " << nChannels_ << std::endl; gSystem->Exit(EXIT_FAILURE); } this->setParameters(paramFile); } LauKMatrixPropagator::~LauKMatrixPropagator() { // Destructor realProp_.Clear(); negImagProp_.Clear(); ScattKMatrix_.Clear(); ReRhoMatrix_.Clear(); ImRhoMatrix_.Clear(); ReTMatrix_.Clear(); ImTMatrix_.Clear(); IMatrix_.Clear(); zeroMatrix_.Clear(); } LauComplex LauKMatrixPropagator::getPropTerm(Int_t channel) const { // Get the (i,j) = (index_, channel) term of the propagator // matrix. This allows us not to return the full propagator matrix. Double_t realTerm = this->getRealPropTerm(channel); Double_t imagTerm = this->getImagPropTerm(channel); LauComplex propTerm(realTerm, imagTerm); return propTerm; } Double_t LauKMatrixPropagator::getRealPropTerm(Int_t channel) const { // Get the real part of the (i,j) = (index_, channel) term of the propagator // matrix. This allows us not to return the full propagator matrix. if (parametersSet_ == kFALSE) {return 0.0;} Double_t propTerm = realProp_[index_][channel]; return propTerm; } Double_t LauKMatrixPropagator::getImagPropTerm(Int_t channel) const { // Get the imaginary part of the (i,j) = (index_, channel) term of the propagator // matrix. This allows us not to return the full propagator matrix. if (parametersSet_ == kFALSE) {return 0.0;} Double_t imagTerm = -1.0*negImagProp_[index_][channel]; return imagTerm; } void LauKMatrixPropagator::updatePropagator(const LauKinematics* kinematics) { // Calculate the K-matrix propagator for the given s value. // The K-matrix amplitude is given by // T_i = sum_{ij} (I - iK*rho)^-1 * P_j, where P is the production K-matrix. // i = index for the state (e.g. S-wave index = 0). // Here, we only find the (I - iK*rho)^-1 matrix part. if (!kinematics) {return;} // Get the invariant mass squared (s) from the kinematics object. // Use the resPairAmpInt to find which mass-squared combination to use. Double_t s(0.0); if (resPairAmpInt_ == 1) { s = kinematics->getm23Sq(); } else if (resPairAmpInt_ == 2) { s = kinematics->getm13Sq(); } else if (resPairAmpInt_ == 3) { s = kinematics->getm12Sq(); } this->updatePropagator(s); } void LauKMatrixPropagator::updatePropagator(Double_t s) { // Calculate the K-matrix propagator for the given s value. // The K-matrix amplitude is given by // T_i = sum_{ij} (I - iK*rho)^-1 * P_j, where P is the production K-matrix. // i = index for the state (e.g. S-wave index = 0). // Here, we only find the (I - iK*rho)^-1 matrix part. // Check if we have almost the same s value as before. If so, don't re-calculate // the propagator nor any of the pole mass summation terms. if (TMath::Abs(s - previousS_) < 1e-6*s) { //cout<<"Already got propagator for s = "<calcPoleDenomVect(s); this->updateAdlerZeroFactor(s); // Calculate the scattering K-matrix (real and symmetric) this->calcScattKMatrix(s); // Calculate the phase space density matrix, which is diagonal, but can be complex // if the quantity s is below various threshold values (analytic continuation). this->calcRhoMatrix(s); // Calculate K*rho (real and imaginary parts, since rho can be complex) TMatrixD K_realRho(ScattKMatrix_); K_realRho *= ReRhoMatrix_; TMatrixD K_imagRho(ScattKMatrix_); K_imagRho *= ImRhoMatrix_; // A = I + K*Imag(rho), B = -K*Real(Rho) // Calculate C and D matrices such that (A + iB)*(C + iD) = I, // ie. C + iD = (I - i K*rho)^-1, separated into real and imaginary parts. // realProp C = (A + B A^-1 B)^-1, imagProp D = -A^-1 B C TMatrixD A(IMatrix_); A += K_imagRho; TMatrixD B(zeroMatrix_); B -= K_realRho; TMatrixD invA(TMatrixD::kInverted, A); TMatrixD invA_B(invA); invA_B *= B; TMatrixD B_invA_B(B); B_invA_B *= invA_B; TMatrixD invC(A); invC += B_invA_B; // Set the real part of the propagator matrix ("C") realProp_ = TMatrixD(TMatrixD::kInverted, invC); // Set the (negative) imaginary part of the propagator matrix ("-D") TMatrixD BC(B); BC *= realProp_; negImagProp_ = TMatrixD(invA); negImagProp_ *= BC; // Also calculate the production SVP term, since this uses Adler-zero parameters // defined in the parameter file. this->updateProdSVPTerm(s); // Finally, keep track of the value of s we just used. previousS_ = s; } void LauKMatrixPropagator::setParameters(const TString& inputFile) { // Read an input file that specifies the values of the coupling constants g_i for // the given number of poles and their (bare) masses. Also provided are the f_{ab} // slow-varying constants. The input file should also provide the Adler zero // constants s_0, s_A and s_A0. parametersSet_ = kFALSE; cout<<"Initialising K-matrix propagator "<Exit(EXIT_FAILURE); } UInt_t iLine(0); for (iLine = 1; iLine <= nTotLines; iLine++) { // Get the line of strings std::vector theLine = readFile.getLine(iLine); // There should always be at least two strings: a keyword and at least 1 value if (theLine.size() < 2) {continue;} TString keyword(theLine[0].c_str()); keyword.ToLower(); // Use lowercase if (!keyword.CompareTo("channels")) { // Channel indices for phase-space factors this->storeChannels(theLine); } else if (!keyword.CompareTo("pole")) { // Pole terms this->storePole(theLine); } else if (!keyword.CompareTo("scatt")) { // Scattering terms this->storeScattering(theLine); } else { // Usually Adler-zero constants TString parString(theLine[1].c_str()); this->storeParameter(keyword, parString); } } sAConst_ = 0.5*sA_.unblindValue()*LauConstants::mPiSq; // Symmetrise scattering parameters if enabled if (scattSymmetry_ == kTRUE) { for (Int_t iChannel = 0; iChannel < nChannels_; iChannel++) { for (Int_t jChannel = iChannel; jChannel < nChannels_; jChannel++) { LauParameter fPar = fScattering_[iChannel][jChannel]; fScattering_[jChannel][iChannel] = LauParameter(fPar); } } } // All required parameters have been set parametersSet_ = kTRUE; cout<<"Finished initialising K-matrix propagator "< >. // Set their sizes using the number of poles and channels defined in the constructor gCouplings_.clear(); gCouplings_.resize(nPoles_); for (Int_t iPole = 0; iPole < nPoles_; iPole++) { gCouplings_[iPole].resize(nChannels_); } fScattering_.clear(); fScattering_.resize(nChannels_); for (Int_t iChannel = 0; iChannel < nChannels_; iChannel++) { fScattering_[iChannel].resize(nChannels_); } // Clear other vectors phaseSpaceTypes_.clear(); phaseSpaceTypes_.resize(nChannels_); mSqPoles_.clear(); mSqPoles_.resize(nPoles_); } void LauKMatrixPropagator::storeChannels(const std::vector& theLine) { // Get the list of channel indices to specify what phase space factors should be used // e.g. pipi, Kpi, eta eta', 4pi etc.. // Check that the line has nChannels_+1 strings Int_t nTypes = static_cast(theLine.size()) - 1; if (nTypes != nChannels_) { cerr<<"Error in LauKMatrixPropagator::storeChannels. The input file defines " <checkPhaseSpaceType(phaseSpaceInt); if (checkChannel == kTRUE) { cout<<"Adding phase space channel index "<& theLine) { // Store the pole mass and its coupling constants for each channel. // Each line will contain: Pole poleNumber poleMass poleCouplingsPerChannel // Check that the line has nChannels_ + 3 strings Int_t nWords = static_cast(theLine.size()); Int_t nExpect = nChannels_ + 3; if (nWords == nExpect) { Int_t poleIndex = std::atoi(theLine[1].c_str()) - 1; if (poleIndex >= 0 && poleIndex < nPoles_) { Double_t poleMass = std::atof(theLine[2].c_str()); Double_t poleMassSq = poleMass*poleMass; LauParameter mPoleParam(poleMassSq); mSqPoles_[poleIndex] = mPoleParam; cout<<"Added bare pole mass "<& theLine) { // Store the scattering constants (along one of the channel rows). // Each line will contain: Scatt ScattIndex ScattConstantsPerChannel // Check that the line has nChannels_ + 2 strings Int_t nWords = static_cast(theLine.size()); Int_t nExpect = nChannels_ + 2; if (nWords == nExpect) { Int_t scattIndex = std::atoi(theLine[1].c_str()) - 1; if (scattIndex >= 0 && scattIndex < nChannels_) { for (Int_t iChannel = 0; iChannel < nChannels_; iChannel++) { Double_t scattConst = std::atof(theLine[iChannel+2].c_str()); LauParameter scattParam(scattConst); fScattering_[scattIndex][iChannel] = scattParam; cout<<"Added scattering parameter f("<updateScattSVPTerm(s); // Now loop over iChannel, jChannel to calculate Kij = Kji. for (iChannel = 0; iChannel < nChannels_; iChannel++) { // Scattering matrix is real and symmetric. Start j loop from i. for (jChannel = iChannel; jChannel < nChannels_; jChannel++) { Double_t Kij(0.0); // Calculate pole mass summation term for (iPole = 0; iPole < nPoles_; iPole++) { Double_t g_i = this->getCouplingConstant(iPole, iChannel); Double_t g_j = this->getCouplingConstant(iPole, jChannel); Kij += poleDenomVect_[iPole]*g_i*g_j; if (verbose_) {cout<<"1: Kij for i = "<getScatteringConstant(iChannel, jChannel); Kij += fij*scattSVP_; Kij *= adlerZeroFactor_; if (verbose_) {cout<<"2: Kij for i = "< 1.0e-6) {invPoleTerm = 1.0/poleTerm;} poleDenomVect_.push_back(invPoleTerm); } } Double_t LauKMatrixPropagator::getPoleDenomTerm(Int_t poleIndex) const { if (parametersSet_ == kFALSE) {return 0.0;} Double_t poleDenom(0.0); poleDenom = poleDenomVect_[poleIndex]; return poleDenom; } Double_t LauKMatrixPropagator::getCouplingConstant(Int_t poleIndex, Int_t channelIndex) const { if (parametersSet_ == kFALSE) {return 0.0;} if (poleIndex < 0 || poleIndex >= nPoles_) {return 0.0;} if (channelIndex < 0 || channelIndex >= nChannels_) {return 0.0;} Double_t couplingConst = gCouplings_[poleIndex][channelIndex].unblindValue(); return couplingConst; } +LauParameter& LauKMatrixPropagator::getCouplingParameter(Int_t poleIndex, Int_t channelIndex) +{ + + if ( (parametersSet_ == kFALSE) || (poleIndex < 0 || poleIndex >= nPoles_) || (channelIndex < 0 || channelIndex >= nChannels_) ) { + std::cerr << "ERROR from LauKMatrixPropagator::getCouplingParameter(). Invalid coupling." << std::endl; + gSystem->Exit(EXIT_FAILURE); + } + + //std::cout << "Minvalue + range for " << poleIndex << ", " << channelIndex << ": " << gCouplings_[poleIndex][channelIndex].minValue() << " => + " << gCouplings_[poleIndex][channelIndex].range() << + // " and init value: " << gCouplings_[poleIndex][channelIndex].initValue() << std::endl; + return gCouplings_[poleIndex][channelIndex]; +} Double_t LauKMatrixPropagator::getScatteringConstant(Int_t channel1Index, Int_t channel2Index) const { if (parametersSet_ == kFALSE) {return 0.0;} if (channel1Index < 0 || channel1Index >= nChannels_) {return 0.0;} if (channel2Index < 0 || channel2Index >= nChannels_) {return 0.0;} Double_t scatteringConst = fScattering_[channel1Index][channel2Index].unblindValue(); return scatteringConst; } +LauParameter& LauKMatrixPropagator::getScatteringParameter(Int_t channel1Index, Int_t channel2Index) +{ + + if ( (parametersSet_ == kFALSE) || (channel1Index < 0 || channel1Index >= nChannels_) || (channel2Index < 0 || channel2Index >= nChannels_) ) { + std::cerr << "ERROR from LauKMatrixPropagator::getScatteringParameter(). Invalid chanel index." << std::endl; + gSystem->Exit(EXIT_FAILURE); + } + + return fScattering_[channel1Index][channel2Index]; +} + Double_t LauKMatrixPropagator::calcSVPTerm(Double_t s, Double_t s0) const { if (parametersSet_ == kFALSE) {return 0.0;} // Calculate the "slowly-varying part" (SVP) Double_t result(0.0); Double_t deltaS = s - s0; if (TMath::Abs(deltaS) > 1.0e-6) { result = (mSq0_.unblindValue() - s0)/deltaS; } return result; } void LauKMatrixPropagator::updateScattSVPTerm(Double_t s) { // Update the scattering "slowly-varying part" (SVP) Double_t s0Scatt = s0Scatt_.unblindValue(); scattSVP_ = this->calcSVPTerm(s, s0Scatt); } void LauKMatrixPropagator::updateProdSVPTerm(Double_t s) { // Update the production "slowly-varying part" (SVP) Double_t s0Prod = s0Prod_.unblindValue(); prodSVP_ = this->calcSVPTerm(s, s0Prod); } void LauKMatrixPropagator::updateAdlerZeroFactor(Double_t s) { // Calculate the multiplicative factor containing various Adler zero // constants. adlerZeroFactor_ = 0.0; Double_t sA0Val = sA0_.unblindValue(); Double_t deltaS = s - sA0Val; if (TMath::Abs(deltaS) > 1e-6) { adlerZeroFactor_ = (s - sAConst_)*(1.0 - sA0Val)/deltaS; } } void LauKMatrixPropagator::calcRhoMatrix(Double_t s) { // Calculate the real and imaginary part of the phase space density // diagonal matrix for the given invariant mass squared quantity, s. // The matrix can be complex if s is below threshold (so that // the amplitude continues analytically). // Initialise all entries to zero ReRhoMatrix_.Zero(); ImRhoMatrix_.Zero(); LauComplex rho(0.0, 0.0); Int_t phaseSpaceIndex(0); for (Int_t iChannel (0); iChannel < nChannels_; ++iChannel) { phaseSpaceIndex = phaseSpaceTypes_[iChannel]; if (phaseSpaceIndex == LauKMatrixPropagator::PiPi) { rho = this->calcPiPiRho(s); } else if (phaseSpaceIndex == LauKMatrixPropagator::KK) { rho = this->calcKKRho(s); } else if (phaseSpaceIndex == LauKMatrixPropagator::FourPi) { rho = this->calcFourPiRho(s); } else if (phaseSpaceIndex == LauKMatrixPropagator::EtaEta) { rho = this->calcEtaEtaRho(s); } else if (phaseSpaceIndex == LauKMatrixPropagator::EtaEtaP) { rho = this->calcEtaEtaPRho(s); } else if (phaseSpaceIndex == LauKMatrixPropagator::KPi) { rho = this->calcKPiRho(s); } else if (phaseSpaceIndex == LauKMatrixPropagator::KEtaP) { rho = this->calcKEtaPRho(s); } else if (phaseSpaceIndex == LauKMatrixPropagator::KThreePi) { rho = this->calcKThreePiRho(s); } if (verbose_) { cout<<"ReRhoMatrix("< 4pi state). // The normalisation term rho_0 is found by ensuring that the phase space integral // at s = 1 is equal to sqrt(1.0 - 16*mpiSq/s). Note that the exponent for this // factor in hep-ph/0204328 is wrong; it should be 0.5, i.e. sqrt, not n = 1 to 5. // Plotting the value of this double integral as a function of s can then be fitted // to a 6th-order polynomial (for s < 1), which is the result used below LauComplex rho(0.0, 0.0); if (TMath::Abs(s) < 1e-10) {return rho;} if (s <= 1.0) { Double_t rhoTerm = ((1.07885*s + 0.13655)*s - 0.29744)*s - 0.20840; rhoTerm = ((rhoTerm*s + 0.13851)*s - 0.01933)*s + 0.00051; // For some values of s (below 2*mpi), this term is a very small // negative number. Check for this and set the rho term to zero. if (rhoTerm < 0.0) {rhoTerm = 0.0;} rho.setRealPart( rhoTerm ); } else { rho.setRealPart( TMath::Sqrt(1.0 - (fourPiFactor1_/s)) ); } return rho; } LauComplex LauKMatrixPropagator::calcEtaEtaRho(Double_t s) const { // Calculate the eta-eta phase space factor LauComplex rho(0.0, 0.0); if (TMath::Abs(s) < 1e-10) {return rho;} Double_t sqrtTerm = (-m2EtaSq_/s) + 1.0; if (sqrtTerm < 0.0) { rho.setImagPart( TMath::Sqrt(-sqrtTerm) ); } else { rho.setRealPart( TMath::Sqrt(sqrtTerm) ); } return rho; } LauComplex LauKMatrixPropagator::calcEtaEtaPRho(Double_t s) const { // Calculate the eta-eta' phase space factor. Note that the // mass difference term m_eta - m_eta' is not included, // since this corresponds to a "t or u-channel crossing", // which means that we cannot simply analytically continue // this part of the phase space factor below threshold, which // we can do for s-channel contributions. This is actually an // unsolved problem, e.g. see Guo et al 1409.8652, and // Danilkin et al 1409.7708. Anisovich and Sarantsev in // hep-ph/0204328 "solve" this issue by setting the mass // difference term to unity, which is what we do here... LauComplex rho(0.0, 0.0); if (TMath::Abs(s) < 1e-10) {return rho;} Double_t sqrtTerm = (-mEtaEtaPSumSq_/s) + 1.0; if (sqrtTerm < 0.0) { rho.setImagPart( TMath::Sqrt(-sqrtTerm) ); } else { rho.setRealPart( TMath::Sqrt(sqrtTerm) ); } return rho; } LauComplex LauKMatrixPropagator::calcKPiRho(Double_t s) const { // Calculate the K-pi phase space factor LauComplex rho(0.0, 0.0); if (TMath::Abs(s) < 1e-10) {return rho;} Double_t sqrtTerm1 = (-mKpiSumSq_/s) + 1.0; Double_t sqrtTerm2 = (-mKpiDiffSq_/s) + 1.0; Double_t sqrtTerm = sqrtTerm1*sqrtTerm2; if (sqrtTerm < 0.0) { rho.setImagPart( TMath::Sqrt(-sqrtTerm) ); } else { rho.setRealPart( TMath::Sqrt(sqrtTerm) ); } return rho; } LauComplex LauKMatrixPropagator::calcKEtaPRho(Double_t s) const { // Calculate the K-eta' phase space factor LauComplex rho(0.0, 0.0); if (TMath::Abs(s) < 1e-10) {return rho;} Double_t sqrtTerm1 = (-mKEtaPSumSq_/s) + 1.0; Double_t sqrtTerm2 = (-mKEtaPDiffSq_/s) + 1.0; Double_t sqrtTerm = sqrtTerm1*sqrtTerm2; if (sqrtTerm < 0.0) { rho.setImagPart( TMath::Sqrt(-sqrtTerm) ); } else { rho.setRealPart( TMath::Sqrt(sqrtTerm) ); } return rho; } LauComplex LauKMatrixPropagator::calcKThreePiRho(Double_t s) const { // Calculate the Kpipipi + multimeson phase space factor. // Use the simplest definition in hep-ph/9705401 (Eq 14), which is the form // used for the rest of that paper (thankfully, the amplitude does not depend // significantly on the form used for the K3pi phase space factor). LauComplex rho(0.0, 0.0); if (TMath::Abs(s) < 1e-10) {return rho;} if (s < 1.44) { Double_t powerTerm = (-mK3piDiffSq_/s) + 1.0; if (powerTerm < 0.0) { rho.setImagPart( k3piFactor_*TMath::Power(-powerTerm, 2.5) ); } else { rho.setRealPart( k3piFactor_*TMath::Power(powerTerm, 2.5) ); } } else { rho.setRealPart( 1.0 ); } return rho; } Bool_t LauKMatrixPropagator::checkPhaseSpaceType(Int_t phaseSpaceInt) const { Bool_t passed(kFALSE); if (phaseSpaceInt >= 1 && phaseSpaceInt < LauKMatrixPropagator::TotChannels) { passed = kTRUE; } return passed; } LauComplex LauKMatrixPropagator::getTransitionAmp(Double_t s, Int_t channel) { // Get the complex (unitary) transition amplitude T for the given channel LauComplex TAmp(0.0, 0.0); channel -= 1; if (channel < 0 || channel >= nChannels_) {return TAmp;} this->getTMatrix(s); TAmp.setRealPart(ReTMatrix_[index_][channel]); TAmp.setImagPart(ImTMatrix_[index_][channel]); return TAmp; } LauComplex LauKMatrixPropagator::getPhaseSpaceTerm(Double_t s, Int_t channel) { // Get the complex (unitary) transition amplitude T for the given channel LauComplex rho(0.0, 0.0); channel -= 1; if (channel < 0 || channel >= nChannels_) {return rho;} // If s has changed from the previous value, recalculate rho if (TMath::Abs(s - previousS_) > 1e-6*s) { this->calcRhoMatrix(s); } rho.setRealPart(ReRhoMatrix_[channel][channel]); rho.setImagPart(ImRhoMatrix_[channel][channel]); return rho; } void LauKMatrixPropagator::getTMatrix(const LauKinematics* kinematics) { // Find the unitary T matrix, where T = [sqrt(rho)]^{*} T_hat sqrt(rho), // and T_hat = (I - i K rho)^-1 * K is the Lorentz-invariant T matrix, // which has phase-space factors included (rho). This function is not // needed to calculate the K-matrix amplitudes, but allows us // to check the variation of T as a function of s (kinematics) if (!kinematics) {return;} // Get the invariant mass squared (s) from the kinematics object. // Use the resPairAmpInt to find which mass-squared combination to use. Double_t s(0.0); if (resPairAmpInt_ == 1) { s = kinematics->getm23Sq(); } else if (resPairAmpInt_ == 2) { s = kinematics->getm13Sq(); } else if (resPairAmpInt_ == 3) { s = kinematics->getm12Sq(); } this->getTMatrix(s); } void LauKMatrixPropagator::getTMatrix(Double_t s) { // Find the unitary transition T matrix, where // T = [sqrt(rho)]^{*} T_hat sqrt(rho), and // T_hat = (I - i K rho)^-1 * K is the Lorentz-invariant T matrix, // which has phase-space factors included (rho). Note that the first // sqrt of the rho matrix is complex conjugated. // This function is not needed to calculate the K-matrix amplitudes, but // allows us to check the variation of T as a function of s (kinematics) // Initialse the real and imaginary parts of the T matrix to zero ReTMatrix_.Zero(); ImTMatrix_.Zero(); if (parametersSet_ == kFALSE) {return;} // Update K, rho and the propagator (I - i K rho)^-1 this->updatePropagator(s); // Find the real and imaginary T_hat matrices TMatrixD THatReal = realProp_*ScattKMatrix_; TMatrixD THatImag(zeroMatrix_); THatImag -= negImagProp_*ScattKMatrix_; // Find the square-root of the phase space matrix this->getSqrtRhoMatrix(); // Let sqrt(rho) = A + iB and T_hat = C + iD // => T = A(CA-DB) + B(DA+CB) + i[A(DA+CB) + B(DB-CA)] TMatrixD CA(THatReal); CA *= ReSqrtRhoMatrix_; TMatrixD DA(THatImag); DA *= ReSqrtRhoMatrix_; TMatrixD CB(THatReal); CB *= ImSqrtRhoMatrix_; TMatrixD DB(THatImag); DB *= ImSqrtRhoMatrix_; TMatrixD CAmDB(CA); CAmDB -= DB; TMatrixD DApCB(DA); DApCB += CB; TMatrixD DBmCA(DB); DBmCA -= CA; // Find the real and imaginary parts of the transition matrix T ReTMatrix_ = ReSqrtRhoMatrix_*CAmDB + ImSqrtRhoMatrix_*DApCB; ImTMatrix_ = ReSqrtRhoMatrix_*DApCB + ImSqrtRhoMatrix_*DBmCA; } void LauKMatrixPropagator::getSqrtRhoMatrix() { // Find the square root of the (current) phase space matrix so that // we can find T = [sqrt(rho)}^{*} T_hat sqrt(rho), where T_hat is the // Lorentz-invariant T matrix = (I - i K rho)^-1 * K; note that the first // sqrt of rho matrix is complex conjugated // If rho = rho_i + i rho_r = a + i b, then sqrt(rho) = c + i d, where // c = sqrt(0.5*(r+a)) and d = sqrt(0.5(r-a)), where r = sqrt(a^2 + b^2). // Since rho is diagonal, then the square root of rho will also be diagonal, // with its real and imaginary matrix elements equal to c and d, respectively // Initialise the real and imaginary parts of the square root of // the rho matrix to zero ReSqrtRhoMatrix_.Zero(); ImSqrtRhoMatrix_.Zero(); for (Int_t iChannel (0); iChannel < nChannels_; ++iChannel) { Double_t realRho = ReRhoMatrix_[iChannel][iChannel]; Double_t imagRho = ImRhoMatrix_[iChannel][iChannel]; Double_t rhoMag = sqrt(realRho*realRho + imagRho*imagRho); Double_t rhoSum = rhoMag + realRho; Double_t rhoDiff = rhoMag - realRho; Double_t reSqrtRho(0.0), imSqrtRho(0.0); if (rhoSum > 0.0) {reSqrtRho = sqrt(0.5*rhoSum);} if (rhoDiff > 0.0) {imSqrtRho = sqrt(0.5*rhoDiff);} ReSqrtRhoMatrix_[iChannel][iChannel] = reSqrtRho; ImSqrtRhoMatrix_[iChannel][iChannel] = imSqrtRho; } } LauComplex LauKMatrixPropagator::getTHat(Double_t s, Int_t channel) { LauComplex THat(0.0, 0.0); channel -= 1; if (channel < 0 || channel >= nChannels_) {return THat;} this->updatePropagator(s); // Find the real and imaginary T_hat matrices TMatrixD THatReal = realProp_*ScattKMatrix_; TMatrixD THatImag(zeroMatrix_); THatImag -= negImagProp_*ScattKMatrix_; // Return the specific THat component THat.setRealPart(THatReal[index_][channel]); THat.setImagPart(THatImag[index_][channel]); return THat; }