diff --git a/doc/ReleaseNotes.md b/doc/ReleaseNotes.md index d2b6c0f..259b395 100644 --- a/doc/ReleaseNotes.md +++ b/doc/ReleaseNotes.md @@ -1,837 +1,841 @@ # Laura++ release notes +1st February 2021 Dan Johnson +* Allow floating of parameters in the K-matrix + - see https://phab.hepforge.org/T59 + 2nd December 2020 Thomas Latham * Fix LauFormulaPar to follow change in behaviour of TFormula - see https://phab.hepforge.org/T129 27th November 2020 Dan Johnson * Allow slope of NR exponential model to vary negative - improves fit stability in low-statistics fits - see https://phab.hepforge.org/T128 17th September 2020 Mark Whitehead * Begin updates to use inclusive language. Simultaneous fits now handled by Coordinator and Tasks - see https://phab.hepforge.org/T112 19th August 2020 Thomas Latham * Remove explicit normalisation of numerator Blatt-Weisskopf factors - See https://phab.hepforge.org/T93 22nd May 2020 Thomas Latham * Fix uninitialised variable (related to rho-omega mixing) in LauIsobarDynamics 12th December 2019 Thomas Latham & Daniel Johnson * Fix issue with generation of events for categories with small expected yield - See https://phab.hepforge.org/T76 21st November 2019 Thomas Latham * Add QuasiFlatSqDalitz example, which generates toy according to EvtGen's FLATSQDALITZ model 6th - 20th November 2019 Thomas Latham * Adopt CMake as the build system - See https://phab.hepforge.org/T33 === ## Laura++ v3r5 6th August 2019 Thomas Latham * Add some extra charmonium states to list of known resonances * Minor modifications to code for importing parameter values from file 17th May 2019 Thomas Latham * Fix licences and Doxygen in pole, nonresonant form factors, and rescattering line shapes * Add journal reference for pole line shape * Fix class names and add Doxygen to LauCalcChiSq, LauResultsExtractor, LauMergeDataFiles * Update Doxyfile from more recent Doxygen version * Make consistent the use of ClassDef and ClassImp everywhere * Add functions to return the "sanitised" names of parent and daughters 8th January 2019 Thomas Latham * Workaround for issue with splitting toy MC files when generating large number of experiments 5th December 2018 Thomas Latham * Move sources and headers for the utilities library into the main library - makes examples dir executables only (in preparation for CMake build) 22nd, 23rd July and 4th August 2018 Juan Otalora * Add pole, nonresonant form factors, and rescattering line shapes 17th April 2018 Daniel O'Hanlon * Fix bug in rho-omega mixing fit-fraction calculation: rho fit-fraction was not normalised to the total DP rate 23rd March 2018 Thomas Latham * Some fixes in LauRhoOmegaMix that propagate the following settings to the subcomponents: - spinType_ - flipHelicity_ - ignoreMomenta_ - ignoreSpin_ - ignoreBarrierScaling_ 23rd February 2018 Thomas Latham * Add section on structure of package to README file (requested by CPC technial editor) * Add copyright notice to files in test directory 21st February 2018 Thomas Latham * Improve comments in functions calculating helicity angles in LauKinematics 19th February 2018 Daniel O'Hanlon * Fix bug in LauCPFitModel introduced in code for importing parameters (25/01/18) - When parameters are asked to be randomised via useRandomInitFitPars, those parameters that were already fixed in the model, in addition to those that are fixed on import, were being freed. 19th February 2018 Daniel O'Hanlon * Bug fixes in rho/omega fit fractions calculation 25th January 2018 Daniel O'Hanlon * Add feature for importing parameters into LauCPFitModels from previous fit output files. 23rd January 2018 Daniel O'Hanlon * Calculate separate rho and omega fit-fractions for LauRhoOmegaMix, when turned on with calculateRhoOmegaFitFractions in LauIsobarDynamics. === ## Laura++ v3r4 16th January 2018 Thomas Latham * Update licence for all files to the Apache Software License Version 2.0 14th December 2017 Thomas Latham * Correct LauFlatteRes to use the exact formulae from the papers that report the default parameter values for each supported resonance - Deals correctly now with the cases where the m0 is absorbed into the couplings - Now uses the correct value of g1 for the a_0(980) (needed to be squared) - Also sets the mass values to those reported in those papers - Added printout to specify what is being done in each case * Improve the consistency between the weightEvents functions in LauSimpleFitModel and LauCPFitModel - Also remove the unecessary division by ASqMax in LauIsobarDynamics::getEventWeight 4th December 2017 Thomas Latham * Allow background yields to be specified as any LauAbsRValue (i.e. LauParameter or now also LauFormulaPar) 30th November 2017 Thomas Latham * In LauFitDataTree::readExperimentData add a check that the tree contains the branch "iExpt" and if not: - If the requested experiment is 0 then read all data in the tree (and print a warning) - Otherwise print an error message and return 29th November 2017 Thomas Latham * Improve error messages in LauCPFitModel::weightEvents === ## Laura++ v3r3 23rd November 2017 Thomas Latham * Add an example written as a python script: GenFit3pi.py * Various improvements to the other example code 23rd November 2017 Thomas Latham * Fix bug in the LauAbsResonance constructor used by the K-matrix - "resonance" charge is now set to the sum of the daughter charges 1st November 2017 Thomas Latham * Fix bug in LauFlatteRes - m_0 factor multiplying the width was, if useAdlerTerm_ is true, replaced by f_Adler rather than being multiplied by it - only affected case where using LauFlatteRes to describe K_0*(1430) === ## Laura++ v3r2 18th October 2017 Thomas Latham * Modify LauDaughters::testDPSymmetry to: - produce an ERROR message and exit if the symmetric DP does not have its daughters arranged correctly - detect also flavour-conjugate DPs and set a corresponding flag that can be retrieved via LauDaughters::gotFlavourConjugateDP - in this case if the daughters are sub-optimally arranged print a WARNING * Modify LauIsobarDynamics::calcDPNormalisationScheme so that any narrow resonance regions are symmetrised appropriately if the DP is fully-symmetric, symmetric or is flavour-conjugate (and in this last case, symmetrisation of the integration has been forced via a new boolean function) 11th October 2017 Thomas Latham * Allow the user to specify the randomiser to be used to randomise the initial values of the isobar parameters - simply use the new static function LauAbsCoeffSet::setRandomiser - if not specified it defaults to the current use of LauRandom::zeroSeedRandom 10th October 2017 Thomas Latham * Make symmetrisation of vetoes automatic in LauVetoes for symmetric DPs - but add new allowed indices (4 and 5) to allow vetoes to be applied to mMin or mMax if desired * Also apply to fully symmetric DPs * In addition implement the more efficient calculation of the amplitude in the fully symmetric case 23rd September 2017 Thomas Latham * Fix expressions for Covariant option for Blatt-Weisskopf momentum for spin > 1 * Make use of setSpinFormalism to set the formalism to Legendre for NR types (instead of kludging with ignoreMomentum) 15th September 2017 Thomas Latham * Various improvements to the examples 6th September 2017 Thomas Latham * Improve doxygen comments for event-embedding functions in fit models 5th September 2017 Thomas Latham * Improve efficiency of Covariant spin factor calculations 31st August 2017 Thomas Latham * Add further option for parent Blatt-Weisskopf momentum - Covariant (corresponding to Covariant spin factor) 8th August 2017 Thomas Latham * Implement expressions for the spin factor based on covariant tensor formalism * Make it much simpler to switch between formalism options via new functions in LauResonanceMaker: - setSpinFormalism, setBWType, setBWBachelorRestFrame - default settings are unchanged (and are equivalent to setting LauAbsResonance::Zemach_P, LauBlattWeisskopfFactor::BWPrimeBarrier, LauBlattWeisskopfFactor::ResonanceFrame, respectively) 21st July 2017 Thomas Latham * Add note to README file about compilation issue on Ubuntu 16.04 LTS 21st July 2017 Thomas Latham * Create public functions to update the kinematics based on one invariant mass and the corresponding helicity angle 20th June 2017 Daniel O'Hanlon * Terminate when asked to read a non-existent K-matrix parameter file 8th June 2017 Thomas Latham * Fix compilation error on gcc 4.9 30th May 2017 Thomas Latham * Permit different efficiency histograms to be defined in classic/square DP and force enable calculation of square DP coords (here and for background PDFs) if required 29th May 2017 Thomas Latham * Propagate information on EDM from the minimiser to the fit models and into the fit results ntuple 29th May 2017 Thomas Latham * Ensure that the kinematics will calculate the square DP co-ordinates if the integration requires them 29th May 2017 Thomas Latham * Reintegrate the RooFit-slave branch into the trunk (and delete the branch) 28th March 2017 Thomas Latham (in branch for developing RooFit-based slave) * Rename cacheFitData to verifyFitData in all fit models and RF-slave 28th March 2017 Daniel O'Hanlon * Fix bug in LauCPFitModel::weightEvents 24th March 2017 Thomas Latham (in branch for developing RooFit-based slave) * Refactor code between fit models, master, slave and fit-object classes 22nd March 2017 Thomas Latham (in branch for developing RooFit-based slave) * Make the compilation of the RF-based slave class, and its associated example binary, optional 22nd March 2017 Thomas Latham (in branch for developing RooFit-based slave) * Complete working example of RooFit-based slave - Have identified some scope for refactoring of code - Also want to make the compilation of this class, and its associated example binary, optional 15th March 2017 Mark Whitehead (in branch for developing time-dependent model) * Handle event-by-event mistag probabilities 7th March 2017 Thomas Latham * Rename the command for weighting events from "reweight" to "weight" 3rd March 2017 Daniel O'Hanlon * Implement LauCPFitModel::weightEvents based on the same function in LauSimpleFitModel 1st March 2017 Thomas Latham (in branch for developing RooFit-based slave) * Fix root-cling related errors 28th February 2017 Thomas Latham (in branch for developing RooFit-based slave) * Start work on creation of RooFit-based slave class - Will allow RooFit-based fitters to plug-in straightforwardly to the simultaneous fitting (JFit) framework 20th February 2017 Thomas Latham * Add warning messages to LauBkgndDPModel::setBkgndHisto when supplied backgroud histogram pointers are null 31st January 2017 Thomas Latham * Audit of the code to automate the creation of the integration binning scheme. - Fix one bug, some tidy-ups, and reintroduce a couple of lost features: - the use of a single square-DP grid if a narrow resonance is found in m12 - extension of region down to threshold if the narrow resonance is close to threshold 22nd January 2017 Daniel O'Hanlon * Fix bug in automated integration scheme where resonances were assumed to have been added in order of ascending mass 14th December 2016 Daniel O'Hanlon * Add several light resonances to the list in LauResonanceMaker 13th December 2016 Daniel O'Hanlon * Automate the determination of the integration scheme for an arbitrary number of narrow resonances in m13 and m23 12th December 2016 Daniel O'Hanlon * Efficiency saving from modifying the behaviour of LauIsobarDynamics::calculateAmplitudes, LauIsobarDynamics::resAmp and LauIsobarDynamics::incohResAmp in the case of symmetric DPs - Previously, there were 2N calls to LauKinematics::flipAndUpdateKinematics for N resonances, now reduced to 2 21st November 2016 John Back * Added two K-matrix examples for creating pedagogical plots (with associated data files): - B3piKMatrixPlots for K-matrix elements, propagator, and pole and SVP production terms - B3piKMatrixMassProj for pole and SVP mass projections generated over the DP 17th November 2016 John Back * Modifications of the K matrix implementation: - Changed the format of the parameter file to use keywords, with updated examples - The scattering coefficients are now symmetrised, unless "ScattSymmetry 0" is used - Allow the option to use the Adler zero suppression term for the production poles and SVPs (default = off). These are specified with the useProdAdler boolean in the LauKMatrixProdPole/SVP constructors - Added a few helper functions for obtaining coefficients and (internal) matrices - Added a method to return the Lorentz-invariant transition amplitude for plots/tests 1st November 2016 Wenbin Qian * Add calculation of so-called covariant factors for spin amplitude === ## Laura++ v3r1 9th September 2016 Thomas Latham * Modification of LauFitNtuple to check the size of the covariance matrix wrt known number of parameters and act accordingly: - If it is empty, just fill a diagonal correlation matrix and issue a warning. - If it results from a failed first stage of a two-stage fit then the correlation matrix is padded with 1s and 0s for the parameters that were fixed in the first stage. * Remove the feature that allows parameters to float in first stage of a two-stage fit but to be fixed in second. * Minor fix to LauAbsCoeffSet: the names of parameters would be mangled if they were the same as the basename, e.g. A1_A would become A1_ while A1_B would be correct. 8th September 2016 Thomas Latham * Modifications to LauResonanceInfo to allow customisation of which extra parameters are shared between charge conjugate or shared-parameter records. - Where the parameters are not shared they are independently created instead of being cloned. * Modification of LauRhoOmegaMix to take advantage of the above to have the magB and phiB parameters independent. * Addition to LauResonanceMaker of rho(770)_COPY record that is a shared record with rho(770) - this allows the above new feature to be used. * Minor unrelated improvement to information messages in LauIsobarDynamics. 25th August 2016 John Back * Modified LauRhoOmegaMix to allow either a RelBW or GS lineshape for the rho, as well as allowing the option to set the second-order denominator term to be equal to unity. Also fixed the bug where the spinTerm was not included in the rho-omega amplitude. Changed the LauAbsResonance enum from RhoOmegaMix to RhoOmegaMix_GS, RhoOmegaMix_RBW, RhoOmegaMix_GS_1 and RhoOmegaMix_RBW_1, where _1 sets the denominator term to unity and _GS or _RBW sets the appropriate rho lineshape. The omega is always a RelBW. * Added to LauAbsResonance: ignoreSpin and ignoreBarrierScaling boolean flags, which ignore either the spin terms or the barrier scaling factors for the amplitude. The latter does not turn off the resonance barrier factor for mass-dependent widths * Added to LauResonanceMaker: getResInfo(resonanceName), which retrieves the resonance information. This is used to obtain the PDG omega values for initialising LauRhoOmegaMix * Made LauRelBreitWignerRes ignore momentum-dependent terms for the resonance width if ignoreMomenta is set. This is used in the LauRhoOmegaMix for the omega lineshape where its width does not depend on momentum 23rd May 2016 John Back * Added new lineshape model for rho-omega mass mixing, LauRhoOmegaMix. 12th April 2016 Thomas Latham * Switch to integrating in square DP when narrow resonances are found in m12. - The integration grid size can be specified by the user 19th January 2016 John Back * Correct the f(m^2) factor in the denominator of the LauGounarisSakuraiRes lineshape to use Gamma_0 instead of Gamma(m) 14th January 2016 Thomas Latham * Documentation improvements 7th December 2015 Thomas Latham * Resolve bug that meant the order of resonances in LauIsobarDynamics was assumed to match with the order in which the complex coefficients are supplied to the fit model - The ordering of resonances is defined by LauIsobarDynamics: - Firstly all coherent resonances in order of addition - Followed by all incoherent resonances in order of addition - The complex coefficients are now rearranged to match that order - Printout of the model summary at the end of initialisation has been enhanced to indicate the ordering - Doxygen updated to reflect these changes 12th November 2015 Daniel Craik * Added support for Akima splines and linear interpolation to Lau1DCubicSpline * LauAbsModIndPartWave, LauModIndPartWaveRealImag and LauModIndPartWaveMagPhase updated to allow choice of spline interpolation method * LauEFKLLMRes updated to use Akima splines 10th November 2015 Thomas Latham & Daniel Craik * Add the EFKLLM form-factor model for the Kpi S-wave and an example using this lineshape * Modify LauResonanceMaker::getResonance to use a switch for greater clarity and easier checking on missing cases 4th November 2015 Daniel Craik * Add checks to LauIsobarDynamics::addResonance and LauIsobarDynamics::addIncohResonance to stop the wrong type of LauResonanceModel being used - LauAbsResonance::isIncoherentModel method added to identify incoherent models 8th September 2015 Mark Whitehead * Add the ability to modify the error of parameters via the CoeffSet - setParameterError added to LauAbsCoeffSet * Tweak the handling of initial error values passed to MINUIT (to determine initial step size) in LauMinuit 7th September 2015 Mark Whitehead * Add the ability to Gaussian constrain parameters via the CoeffSet - addGaussianConstraint added to LauAbsCoeffSet 12th June 2015 Thomas Latham * Modifications to Belle-style nonresonant models - LauBelleNR modified to use pure Legendre polynomials of cos(theta) in the spin term (i.e. to remove the q*p factors) - New form added to LauBelleSymNR (LauAbsResonance::BelleSymNRNoInter) that removes the interference term between the two DP halves - The new form also works with non-zero spin (warning added if non-zero spin specified for BelleSymNR and TaylorNR) 8th June 2015 Thomas Latham * Further work on the blinding mechanism: - New method added LauParameter::blindParameter that activates the blinding. - The rest of the framework updated to use another new method LauParameter::unblindedValue in all likelihood calculations etc. - Example GenFitNoDP updated to include lines to optionally blind the yield parameters. 29th May 2015 Daniel Craik * Added LauBlind class for blinding and unblinding a value with an offset based on a blinding string 26th May 2015 Daniel Craik * Stopped LauCPFitModel passing fixed signal/background yields or asymmetries to Minuit to avoid hitting limit of 101 fixed parameters 22nd April 2015 Daniel Craik * Updated MIPW classes to use Lau1DCubicSpline 19th April 2015 Daniel Craik * Added Lau1DCubicSpline class for 1D spline interpolation 26th March 2015 Thomas Latham * Reworked MIPW code into abstract base class and derived classes to allow different representations of the amplitude at each knot 31st December 2015 Daniel Craik * Added unbinned goodness of fit tests to examples 12th January 2015 Daniel Craik * Calculate effective masses for virtual resonances above the upper kinematic limit 10th December 2014 Daniel Craik * Added coefficient sets to extract gamma from a simultaneous fit to CP and nonCP final states, such as the B0->D_CP K pi and B0->D0bar K pi Dalitz plots, as proposed in Phys. Rev. D79, 051301 (2009) - LauPolarGammaCPCoeffSet uses the CP parameters r, delta and gamma directly - LauRealImagGammaCPCoeffSet parameterises CPV as X_CP+/- and Y_CP+/- - LauCartesianGammaCPCoeffSet parameterises CPV as X_CP, Y_CP DeltaX_CP DeltaY_CP - Fixed CP parameters are not passed to the fitter so the same coefficient sets can be used for both the CP and nonCP Dalitz plots - LauPolarGammaCPCoeffSet allows for a single gamma parameter to be shared between multiple resonances - LauAbsCoeffSet::adjustName made virtual to allow global variables such as gamma to not receive a prefix === ## Laura++ v3r0p1 19th June 2015 Thomas Latham * Factor out the JFit slave code from LauAbsFitModel into a new base class LauSimFitSlave 19th June 2015 Thomas Latham * Fix check in LauIsobarDynamics::calcDPNormalisationScheme to avoid using hardcoded number === ## Laura++ v3r0 24th October 2014 Thomas Latham * Fixed bug in floating of Blatt-Weisskopf barrier radii - The values at the pole mass were not being updated when the radii changed 21st October 2014 Daniel Craik * Fixed bug in LauIsobarDynamics where multiple incoherent amplitudes led to nonsensical fit fractions 17th October 2014 John Back * Added the ability to calculate the transition amplitude matrix T in LauKMatrixPropagator, as well as a few other minor speed-up changes and code checks. Example/PlotKMatrixTAmp.cc can be used to check the T amplitude variation, phase shift and inelasticity, for a given K matrix channel, as a function of the invariant mass squared variable s 15th October 2014 Thomas Latham * Add methods to LauIsobarDynamics to make the integration binning more tunable by the user: - setNarrowResonanceThreshold - modify the value below which a resonance is considered to be narrow (defaults to 0.02 GeV/c2) - setIntegralBinningFactor - modify the factor by which the narrow resonance width is divided to obtain the bin size (defaults to 100) * Print warning messages if the memory usage is likely to be very large 13th October 2014 Thomas Latham * Modify Makefile to allow compilation with ROOT 6 (in addition to maintaining support for ROOT 5) * Fix a few compilation errors on MacOSX 10.9 13th October 2014 Daniel Craik * Update LauModIndPartWave to allow knots at kinematic limits to be modified - Add new method setKnotAmp to modify existing knots (and the knot at the upper kinematic limit which is automatically added at initialisation) * Update doxygen for LauIsobarDynamics::addIncoherentResonance to mention that incoherent resonances must be added last 10th October 2014 Thomas Latham * Add new method to LauResonanceMaker to set whether the radius of a given Blatt-Weisskopf category should be fixed of floated * Modify the methods of LauResonanceMaker to set the radius value and whether it should be floated so that they work before and after the resonances have been created 9th October 2014 John Back * Corrected the eta-eta' and 4pi phase space factors in LauKMatrixPropagator, which is used for the K-matrix amplitude: - calcEtaEtaPRho() does not include the mass difference term m_eta - m_eta' following the recommendation in hep-ph/0204328 and from advice from M Pennington - calcFourPiRho() incorporates a better parameterisation of the double integral of Eq 4 in hep-ph/0204328 which avoids the exponential increase for small values of s (~< 0.1) - More detailed comments are provided in the above two functions to explain what is going on and the reason for the choices made 6th October 2014 Thomas Latham * Implement the mechanism for floating Blatt-Weisskopf barrier factor radius parameters 30th September 2014 Thomas Latham * Fix issue in the checks on toy MC generation validity - in the case of exceeding max iterations it was possible to enter an infinite loop - the checks now detect all three possible states: - aSqMaxSet_ is too low (generation is biased) => increase aSqMaxSet_ value - aSqMaxSet_ is too high => reduce aSqMaxSet_ value to improve efficiency - aSqMaxSet_ is high (causing low efficiency) but cannot be lowered without biasing => increase iterationsMax_ limit * Update resonance parameter in LauResonanceMaker to match PDG 2014 * Modify behaviour when TTree objects are saved into files to avoid having multiple cycle numbers present 29th September 2014 Daniel Craik * Add support for incoherent resonances in the signal model - LauIsobarDynamics updated to include incoherent terms - ABC for incoherent resonances, LauAbsIncohRes, added deriving from LauAbsResonance - LauGaussIncohRes added to implement a Gaussian incoherent resonance, deriving from LauAbsIncohRes - Small changes to various other classes to enable incoherent terms * Fixed small bug in LauMagPhaseCoeffSet which could hang if phase is exactly pi or -pi * Added charged version of the BelleNR resonances to LauResonanceMaker * Updated parameters in LauConstants to match PDG 2014 14th July 2014 Thomas Latham * Add intial support for fully-symmetric final states such as B0 -> KS KS KS - Performs the symmetrisation of the signal model - Background (and efficiency) histogram classes need some work if the user wants to provide folded histograms 8th July 2014 Daniel Craik * Add class for model-independent partial wave - Uses splines to produce a smooth amplitude from a set of magnitude and phase values at given invariant masses - The individual magnitudes and phases can be floated in the fit 16th June 2014 Thomas Latham * Allow floating of resonance parameters in simultaneous fits 13th June 2014 Thomas Latham * Fix bug in LauResonanceInfo cloning method, where the width parameter was given a clone of the mass 10th June 2014 Thomas Latham * Add new function to allow sharing of resonance parameters between components that are not charged conjugates, e.g. LASS_BW and LASS_NR 9th June 2014 Thomas Latham and Daniel Craik * Fix bug in the new integration scheme - Was not accounting for cases where several resonances share a floating parameter - Meant that the integrals and caches for that resonance were not being updated * Introduce a change in the implementation of the helicity flip for neutral parent decays - Prior to this change the helicity was flipped for any neutral resonance in the decay of a neutral particle. - Now the flip no longer occurs in flavour-specific decays (such as Bs0 -> D0bar K- pi+ or B0 -> K+ pi- pi0) since it is only required in flavour-conjugate modes (such as B0 -> KS pi+ pi-). - This does not affect any physical results but it does contribute a pi phase flip to some odd-spin resonances (for example K*(892)0 in Bs0->D0barKpi). - Therefore results are not necessarily comparable between fits run before and after this changeset. - This change will first be released in v3r0. === ## Laura++ v2r2 5th June 2014 Thomas Latham * Fix issue in asymmetric efficiency histogram errors - Fluctuation of bins was incorrectly sampling - assumed area each side of peak was the same 5th June 2014 Thomas Latham (in branch for release in v3r0) * Introduce intelligent calculation of amplitudes during recalculation of integrals and recaching of data points - Floating resonance parameters is now much more efficient * Make resonance parameters second-stage, also improves fit timing when floating them 3rd June 2014 Rafael Coutinho * Implement generation of toy MC from fit results in fitSlave 27th May 2014 Thomas Latham (in branch for release in v3r0) * Complete audit of special functions * Remove unncessary LauAbsDPDynamics base class and move all functionality into LauIsobarDynamics 20th May 2014 Daniel Craik (in branch for release in v3r0) * Add support for K*_0(1430) and a_0(980) to LauFlatteRes 16th-19th May 2014 Thomas Latham and Daniel Craik (in branch for release in v3r0) * Update all other lineshapes so that their parameters can float - The only resonance parameters that now cannot float are the Blatt-Weisskopf barrier factor radii 15th May 2014 Thomas Latham (in branch for release in v3r0) * Change the mechanism for getting floating resonance parameters into the fit - Moved from LauResonanceMaker to the resonances themselves - Lays some groundwork for improving the efficiency of recalculating the integrals - LauBelleNR and LauBelleSymNR lineshape parameters can now be floated 13th May 2014 Daniel Craik (in branch for release in v3r0) * Fix bug where illegal characters were being propagated from resonance names into TBranch names 6th May 2014 Thomas Latham (in branch for release in v3r0) * Provide accessors for mass and width parameters 5th May 2014 Louis Henry * Fix compilation problem by making LauDatabasePDG destructor virtual 4th May 2014 Thomas Latham * Provide a new argument to LauSimpleFitModel::splitSignalComponent and LauCPFitModel::splitSignalComponent to allow fluctuation of the bins on the SCF fraction histogram 29th April 2014 Thomas Latham * Fix bug in the determination of the integration scheme - Nearby narrow resonances caused problems if their "zones" overlap - These zones are now merged together 29th April 2014 Thomas Latham (in branch for release in v3r0) * Some improvments to integration scheme storage 26th April 2014 Juan Otalora (in branch for release in v3r0) * Make integation scheme fixed after first determination - is stored in a new class LauDPPartialIntegralInfo - used on subsequent re-evaluations of the integrals 23rd April 2014 Thomas Latham * Attempt to improve clarity of LauIsobarDynamics::addResonance function - the 3rd argument is now an enumeration of the various resonance models - removed the optional arguments regarding the change of mass, width & spin - the same functionality can be obtained by using the returned pointer and calling changeResonance - the resonance name now only affects the lineshape in the LauPolNR case - the BelleSymNR / TaylorNR choice is now made in the 3rd argument - similarly for the BelleNR / (newly introduced) PowerLawNR choice * Add new PowerLawNR nonresonant model (part of LauBelleNR) * All examples updated to use new interface 23rd April 2014 Thomas Latham * Address issue of setting values of resonance parameters for all models - decided to do away with need to have LauIsobarDynamics know everything - LauIsobarDynamics::addResonance now returns a pointer to LauAbsResonance - parameters can be changed through LauAbsResonance::setResonanceParameter - LauIsobarDynamics still knows about Blatt-Weisskopf factors - better to only need to set this once - Update GenFit3pi example to demonstrate mechanism 22nd April 2014 Thomas Latham * Allow Gaussian constraints to be added in simultaneous fitting - constraints will be ignored by the slaves - those added directly to fit parameters will be propogated to the master and handled there - those on combinations of parameters should be added in the master process 22nd April 2014 Mark Whitehead * Update Laura to cope with resonances of spin 4 and spin 5 - Zemach spin terms added to src/LauAbsResonance.cc - BW barrier factors added to src/LauRelBreitWignerRes.cc 19th April 2014 Daniel Craik * Add LauWeightedSumEffModel which gives an efficiency model from the weighted sum of several LauEffModel objects. * Added pABC, LauAbsEffModel, for LauEffModel and LauWeightedSumEffModel. * Various classes updated to use pointers to LauAbsEffModel instead of LauEffModel. 15th April 2014 Daniel Craik * Enable LauEfficiencyModel to contain several Lau2DAbsDP objects with the total efficiency calculated as the product. 10th April 2014 Mark Whitehead * Fix an issue with the likelihood penalty term for Gaussian constraints - Factor two missing in the denominator - New penalty term is: ( x-mean )^2 / 2*(width^2) 4th April 2014 Thomas Latham * Add storage of fit fractions that have not been efficiency corrected === ## Laura++ v2r1 1st April 2014 Thomas Latham * Fix issue in LauFitter that prevents compilation with g++ 4.8 - Missing virtual destructor - Take opportunity to audit other special functions 31st March 2014 Mark Whitehead (in branch for release in v2r1) * Added an efficiency branch to the ntuple produced for toy data samples - Both LauSimpleFitModel and LauCPFitModel updated 28th March 2014 Daniel Craik (in branch for release in v2r2) * Added support for asymmetric errors to Lau2DHistDP, Lau2DSplineDP and LauEffModel. 27th March 2014 Daniel Craik * Changed histogram classes to use seeded random number generator for fluctuation and raising or lowering of bins and updated doxygen. 20th March 2014 Mark Whitehead (in branch for release in v2r1) * Added the ability to add Gaussian contraints to LauFormulaPars of fit parameters - User supplies the information but the LauFormulaPar is constructed behind the scenes 18th March 2014 Thomas Latham * Improve behaviour of toy generation from fit results 13th March 2014 Juan Otalora (in branch for release in v3r0) * Extended ability to float mass and width to other resonance lineshapes (Flatte, LASS and G-S) 11th March 2014 Mark Whitehead (in branch for release in v2r1) * Added the functionality to make LauFormulaPars usable in fits - Added a new class LauAbsRValue which LauParameter and LauFormularPar inherit from - Many files updated to accept LauAbsRValues instead of LauParameters * Fairly major clean up of obsolete functions in LauAbsPdf - Only LauLinearPdf used any of them, this has now been updated 10th March 2014 Thomas Latham (in branch for release in v3r0) * First attempt at floating resonance parameters (work mostly from Juan) - Only works for RelBW lineshape - Can only float mass and width - Works nicely! - Still needs much work to generalise and make more efficient === ## Laura++ v2r0 8th March 2014 Thomas Latham * Some additional functionality for the CoeffSet classes: - allow the parameter values to be set (optionally setting the initial and generated values as well) - allow the parameters to be set to float or to be fixed in the fit These are needed when cloning but wanting some of the parameters to have different values and/or floating behaviour from the cloned set. * Improve the printout of the setting of the coefficient values in the fit models and the creation of resonances * Add LauFlatNR for the unform NR model - ends its rather strange special treatment * Fix bug setting resAmpInt to 0 for LauPolNR * Many other improvements to the info/warning/error printouts * Modify GenFitBelleCPKpipi example to demonstrate cloning in action * Add -Werror to compiler flags (treats warnings as errors) 5th March 2014 Thomas Latham * Some improvements to LauPolNR to speed up amplitude calculation 2nd March 2014 Thomas Latham * A number of updates to the CoeffSet classes: - allow specification of the basename just after construction (before being given to the fit model) - allow configuration of the parameter fit ranges (through static methods of base class) - more adaptable cloning of the parameters (e.g. can only clone phase but allow magnitude to float independently) - allow CP-violating parameters to be second-stage in Belle and CLEO formats * Some improvements to the Doxygen and runtime information printouts 20th February 2014 Louis Henry * Add LauPolNR - class for modelling the nonresonant contribution based on BaBar 3K model (arXiv:1201.5897) 6th February 2014 Thomas Latham * Correct helicity convention information in Doxygen for LauKinematics === ## Laura++ v1r2 5th February 2014 Thomas Latham * Add rule to the Makefile that creates a rootmap file for the library 4th February 2014 Daniel Craik * Fixed bug in Lau2DSplineDPPdf - normalisation was not being calculated * Added out-of-range warning in LauBkgndDPModel and supressed excessive warnings 3rd February 2014 Mark Whitehead (in branch for release in v2r0) * Added a new class to allow parameters to be a function of other parameters - inc/LauFormulaPar.hh - src/LauFormulaPar.cc 28th January 2014 Daniel Craik * Improved out-of-range efficiency warnings in LauEffModel and supressed excessive errors * Modified LauIsobarDynamics to allow LASS parameters to be configured for LauLASSBWRes and LauLASSNRRes 27th January 2014 Daniel Craik * Added spline interpolation to DP backgrounds - Added Lau2DSplineDPPdf which uses a spline to model a normalised PDF across a DP - Added pABC, Lau2DAbsDPPdf, for Lau2DHistDPPdf and Lau2DSplineDPPdf and moved common code in Lau2DHistDPPdf and Lau2DSplineDPPdf into ABC Lau2DAbsHistDPPdf - LauBkgndDPModel, modified to use Lau2DAbsDPPdf instead of Lau2DHistDPPdf - setBkgndSpline method added to LauBkgndDPModel to allow use of splines 22nd January 2014 Thomas Latham * Improve some error checks and corresponding warning messages in LauCPFitModel::setSignalDPParameters 16th January 2014 Thomas Latham * Add LauRealImagCPCoeffSet, which provides an (x,y), (xbar,ybar) way of parametrising the complex coefficients. * Try to improve timing in the *CoeffSet classes by making the complex coeffs into member variables. 20th December 2013 Daniel Craik * Added Lau2DCubicSpline which provides cubic spline interpolation of a histogram - Added Lau2DSplineDP which uses a spline to model variation across a DP (eg efficiency) - Added pABC, Lau2DAbsDP, for Lau2DHistDP and Lau2DSplineDP and moved common code in Lau2DHistDP and Lau2DSplineDP into ABC Lau2DAbsHistDP - LauEffModel, LauDPDepSumPdf and LauDPDepMapPdf modified to use Lau2DAbsDP instead of Lau2DHistDP - setEffSpline method added to LauEffModel and useSpline flag added to constructor for LauDPDepSumPdf to allow use of splines 18th December 2013 Mark Whitehead (in branch for release in v2r0) * Added functionality to include Gaussian constraints on floated parameters in the fit. The files updated are: - inc/LauAbsFitModel.hh - inc/LauParameter.hh - src/LauAbsFitModel.cc - src/LauParameter.cc 5th December 2013 Thomas Latham * Fix small bug in GenFitKpipi example where background asymmetry parameter had its limits the wrong way around 4th December 2013 Daniel Craik * Updated 2D chi-squared code to use adaptive binning. 3rd December 2013 Thomas Latham * Generalise the Makefile in the examples directory - results in minor changes to the names of 3 of the binaries 3rd December 2013 Thomas Latham (in branch for release in v2r0) * Have the master save an ntuple with all fitter parameters and the full correlation matrix information. 29th November 2013 Thomas Latham * Fixed bug in ResultsExtractor where the output file was not written 29th November 2013 Thomas Latham (in branch for release in v2r0) * Allow the slave ntuples to store the partial covariance matrices in the simultaneous fitting 26th November 2013 Thomas Latham (in branch for release in v2r0) * Added first version of the simultaneous fitting framework === ## Laura++ v1r1p1 22nd November 2013 Thomas Latham * Fixed bug in LauCPFitModel where values of q = -1 extra PDFs were used regardless of the event charge. === ## Laura++ v1r1 20th November 2013 Mark Whitehead * Changed convention for the barrier factors, swapping from p* to p. This seems to give more physically reasonable results. The files updated are: - src/LauGounarisSakuraiRes.cc - src/LauRelBreitWignerRes.cc 18th October 2013 Thomas Latham * Fix dependency problem in Makefile 8th October 2013 Thomas Latham * Some fixes to yield implementation * Minor bug fix in DP background histogram class 7th October 2013 Mark Whitehead * Update to accept the yields and yield asymmetries as LauParameters. All examples have been updated to reflect this change. This updated the following files: - inc/LauCPFitModel.hh - inc/LauSimpleFitModel.hh - inc/LauAbsFitModel.hh - src/LauCPFitModel.cc - src/LauSimpleFitModel.cc * Addition of the following particles to src/LauResonanceMaker.cc Ds*+-, Ds0*(2317)+-, Ds2*(2573)+-, Ds1*(2700)+- and Bs*0 === ## Laura++ v1r0 13th September 2013 Thomas Latham * Initial import of the package into HEPforge diff --git a/inc/LauAbsResonance.hh b/inc/LauAbsResonance.hh index cc16996..2867023 100644 --- a/inc/LauAbsResonance.hh +++ b/inc/LauAbsResonance.hh @@ -1,578 +1,578 @@ /* 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 LauAbsResonance.hh \brief File containing declaration of LauAbsResonance class. */ /*! \class LauAbsResonance \brief Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc.) Abstract Class for defining the type for all classes used to model resonances in the Dalitz plot, such as Breit-Wigner functions. In addition, some common functionality is implemented, including data such as the mass and width of the desired state. */ #ifndef LAU_ABS_RESONANCE #define LAU_ABS_RESONANCE #include "TString.h" #include "LauBlattWeisskopfFactor.hh" #include "LauComplex.hh" #include "LauParameter.hh" class LauDaughters; class LauKinematics; class LauResonanceInfo; class LauAbsResonance { public: //! Define the allowed resonance types enum LauResonanceModel { BW, /*!< simple Breit-Wigner */ RelBW, /*!< relativistic Breit-Wigner */ GS, /*!< a modified Breit-Wigner from Gounaris-Sakurai */ Flatte, /*!< Flatte or coupled-channel Breit-Wigner */ Sigma, /*!< special shape for the sigma or f_0(600) */ Kappa, /*!< special shape for the kappa, a low-mass Kpi scalar */ Dabba, /*!< special shape for the dabba, a low-mass Dpi scalar */ LASS, /*!< the LASS amplitude to describe the Kpi S-wave */ LASS_BW, /*!< the resonant part of the LASS amplitude */ LASS_NR, /*!< the nonresonant part of the LASS amplitude */ EFKLLM, /*!< a form-factor-based description of the Kpi S-wave */ KMatrix, /*!< S-wave description using K-matrix and P-vector */ FlatNR, /*!< a uniform nonresonant amplitude */ NRModel, /*!< a theoretical model nonresonant amplitude */ BelleNR, /*!< an empirical exponential nonresonant amplitude */ PowerLawNR, /*!< an empirical power law nonresonant amplitude */ BelleSymNR, /*!< an empirical exponential nonresonant amplitude for symmetrised DPs */ BelleSymNRNoInter, /*!< an empirical exponential nonresonant amplitude for symmetrised DPs without interference */ TaylorNR, /*!< an empirical Taylor expansion nonresonant amplitude for symmetrised DPs */ PolNR, /*!< an empirical polynomial nonresonant amplitude */ Pole, /*!< scalar Pole lineshape */ PolarFFNR, /*!< Polar Form Factor nonresonant amplitude */ PolarFFSymNR, /*!< Polar Form Factor nonresonant amplitude for symmetrised DPs */ PolarFFSymNRNoInter, /*!< Polar Form Factor nonresonant amplitude for symmetrised DPs without interference */ Rescattering, /*!< KK-PiPi inelastic scattering amplitude */ Rescattering2, /*!< KK-PiPi inelastic scattering amplitude */ RescatteringNoInter, /*!< KK-PiPi inelastic scattering amplitude */ MIPW_MagPhase, /*!< a model independent partial wave - magnitude and phase representation */ MIPW_RealImag, /*!< a model independent partial wave - real and imaginary part representation */ GaussIncoh, /*!< an incoherent Gaussian shape */ RhoOmegaMix_GS, /*!< mass mixing model using GS for res 1 and RBW for res 2 */ RhoOmegaMix_RBW, /*!< mass mixing model using two RBWs */ RhoOmegaMix_GS_1, /*!< mass mixing model using GS for res 1 and RBW for res 2, with denominator factor = 1 */ RhoOmegaMix_RBW_1 /*!< mass mixing model using two RBWs, with denominator factor = 1 */ }; //! Define the allowed spin formalisms enum LauSpinType { Zemach_P, /*!< Zemach tensor formalism, bachelor momentum in resonance rest frame */ Zemach_Pstar, /*!< Zemach tensor formalism, bachelor momentum in parent rest frame */ Covariant, /*!< Covariant tensor formalism */ Legendre /*!< Legendre polynomials only */ }; //! Is the resonance model incoherent? /*! \param [in] model the resonance model \return true if the model is incoherent */ static bool isIncoherentModel(LauResonanceModel model); //! Constructor (for use by standard resonances) /*! \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 */ LauAbsResonance(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters); //! Constructor (for use by K-matrix components) /*! \param [in] resName the name of the component \param [in] resPairAmpInt the number of the daughter not produced by the resonance \param [in] daughters the daughter particles */ LauAbsResonance(const TString& resName, const Int_t resPairAmpInt, const LauDaughters* daughters); //! Destructor virtual ~LauAbsResonance(); //! Initialise the model virtual void initialise() = 0; //! Calculate the complex amplitude /*! \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 LauResonanceModel getResonanceModel() const = 0; //! Get the spin type /*! \return the spin formalism */ LauSpinType getSpinType() const {return spinType_;} //! Get the name of the resonance /*! \return the resonance name */ const TString& getResonanceName() const {return resName_;} //! Get the name of the resonance /*! \return the resonance name */ const TString& getSanitisedName() const {return sanitisedName_;} //! Get the integer to identify which DP axis the resonance belongs to /*! \return the DP axis identification number, the ID of the bachelor */ Int_t getPairInt() const {return resPairAmpInt_;} //! Get the spin of the resonance /*! \return the resonance spin */ Int_t getSpin() const {return resSpin_;} //! Get the charge of the resonance /*! \return the resonance charge */ Int_t getCharge() const {return resCharge_;} //! Get the mass of the resonance /*! \return the resonance mass */ Double_t getMass() const {return (resMass_!=0) ? resMass_->unblindValue() : -1.0;} //! Get the width of the resonance /*! \return the resonance width */ Double_t getWidth() const {return (resWidth_!=0) ? resWidth_->unblindValue() : -1.0;} //! Get the mass parameter of the resonance /*! \return the resonance mass parameter */ LauParameter* getMassPar() {return resMass_;} //! Get the width parameter of the resonance /*! \return the resonance width parameter */ LauParameter* getWidthPar() {return resWidth_;} //! 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& getFloatingParameters() { return this->getParameters(); }; //! Is the amplitude pre-symmetrised? /*! The default value is kFALSE, so pre-symmetrised lineshapes should override this. \return whether the amplitude is already symmetrised */ virtual Bool_t preSymmetrised() const {return kFALSE;} //! Get the helicity flip flag /*! \return the flip helicity flag */ Bool_t flipHelicity() const {return flipHelicity_;} //! Set the helicity flip flag /*! \param [in] boolean the helicity flip status */ void flipHelicity(const Bool_t boolean) {flipHelicity_ = boolean;} //! Get the ignore momenta flag /*! Whether to ignore the momentum factors in both the spin factor and the mass-dependent width \return the ignore momenta flag */ Bool_t ignoreMomenta() const {return ignoreMomenta_;} //! Set the ignore momenta flag /*! Whether to ignore the momentum factors in both the spin factor and the mass-dependent width \param [in] boolean the ignore momenta status */ void ignoreMomenta(const Bool_t boolean) {ignoreMomenta_ = boolean;} //! Get the ignore spin flag /*! Whether to set the spinTerm to unity always \return the ignore spin flag */ Bool_t ignoreSpin() const {return ignoreSpin_;} //! Set the ignore spin flag /*! Whether to set the spinTerm to unity always \param [in] boolean the ignore spin status */ void ignoreSpin(const Bool_t boolean) {ignoreSpin_ = boolean;} //! Get the ignore barrier factor scaling flag /*! Whether to ignore barrier factor scaling in the amplitude numerator, they are still used for the mass-dependent width \return the ignore barrier amplitude scaling flag */ Bool_t ignoreBarrierScaling() const {return ignoreBarrierScaling_;} //! Set the ignore barrier factor scaling flag /*! Whether to ignore barrier factor scaling in the amplitude numerator, they are still used for the mass-dependent width \param [in] boolean the ignore barrier factor scaling status */ void ignoreBarrierScaling(const Bool_t boolean) {ignoreBarrierScaling_ = boolean;} //! Allow the mass, width and spin of the resonance to be changed /*! Negative values wil be ignored, so if, for example, you want to only change the spin you can provide negative values for the mass and width \param [in] newMass new value of the resonance mass \param [in] newWidth new value of the resonance width \param [in] newSpin new value of the resonance spin */ void changeResonance(const Double_t newMass, const Double_t newWidth, const Int_t newSpin); //! Allow the Blatt-Weisskopf radius for the resonance and parent factors to be changed /*! Negative values wil be ignored, so if, for example, you want to only change the parent radius you can provide a negative value for the resonance radius \param [in] resRadius new value of the resonance radius \param [in] parRadius new value of the parent radius */ void changeBWBarrierRadii(const Double_t resRadius, const Double_t parRadius); //! 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); //! Fix or release the resonance mass /*! \param [in] parFixed new status of mass */ void fixMass(const Bool_t parFixed) { if (resMass_!=0) { resMass_->fixed(parFixed); } } //! Fix or release the resonance width /*! \param [in] parFixed new status of width */ void fixWidth(const Bool_t parFixed) { if (resWidth_!=0) { resWidth_->fixed(parFixed); } } //! Get the status of resonance mass (fixed or released) /*! \return the status of resonance mass (fixed or released) */ Bool_t fixMass() const { return (resMass_!=0) ? resMass_->fixed() : kTRUE; } //! Get the status of resonance width (fixed or released) /*! \return the status of resonance width (fixed or released) */ Bool_t fixWidth() const { return (resWidth_!=0) ? resWidth_->fixed() : kTRUE; } //! Set the spin formalism to be used /*! \param [in] spinType the spin formalism */ void setSpinType(const LauSpinType spinType) {spinType_ = spinType;} //! Set the form factor model and parameters /*! \param [in] resFactor the barrier factor for the resonance decay \param [in] parFactor the barrier factor for the parent decay */ void setBarrierRadii(LauBlattWeisskopfFactor* resFactor, LauBlattWeisskopfFactor* parFactor) { resBWFactor_ = resFactor; parBWFactor_ = parFactor; } //! Fix or release the Blatt-Weisskopf barrier radii void fixBarrierRadii(const Bool_t fixResRadius, const Bool_t fixParRadius); //! Get the status of resonance barrier radius (fixed or released) Bool_t fixResRadius() const; //! Get the status of parent barrier radius (fixed or released) Bool_t fixParRadius() const; //! Get the radius of the resonance barrier factor Double_t getResRadius() const; //! Get the radius of the parent barrier factor Double_t getParRadius() const; protected: //! Get the name of the parent particle TString getNameParent() const; //! Get the name of the first daughter of the resonance TString getNameDaug1() const; //! Get the name of the second daughter of the resonance TString getNameDaug2() const; //! Get the name of the daughter that does not originate form the resonance TString getNameBachelor() const; //! Get the parent particle mass Double_t getMassParent() const; //! Get the mass of daughter 1 Double_t getMassDaug1() const; //! Get the mass of daughter 2 Double_t getMassDaug2() const; //! Get the mass of the bachelor daughter Double_t getMassBachelor() const; //! Get the Charge of the parent particle Int_t getChargeParent() const; //! Get the charge of daughter 1 Int_t getChargeDaug1() const; //! Get the charge of daughter 2 Int_t getChargeDaug2() const; //! Get the charge of the bachelor daughter Int_t getChargeBachelor() const; //! Get the current value of the daughter momentum in the resonance rest frame Double_t getQ() const {return q_;} //! Get the current value of the bachelor momentum in the resonance rest frame Double_t getP() const {return p_;} //! Get the current value of the bachelor momentum in the parent rest frame Double_t getPstar() const {return pstar_;} //! Get the current value of the full spin-dependent covariant factor Double_t getCovFactor() const {return covFactor_;} //! Get the centrifugal barrier for the parent decay LauBlattWeisskopfFactor* getParBWFactor() {return parBWFactor_;} const LauBlattWeisskopfFactor* getParBWFactor() const {return parBWFactor_;} //! Get the centrifugal barrier for the resonance decay LauBlattWeisskopfFactor* getResBWFactor() {return resBWFactor_;} const LauBlattWeisskopfFactor* getResBWFactor() const {return resBWFactor_;} //! Access the resonance info object LauResonanceInfo* getResInfo() const {return resInfo_;} //! Access the daughters object const LauDaughters* getDaughters() const {return daughters_;} //! Calculate the amplitude spin term using the Zemach tensor formalism /*! \param [in] pProd the momentum factor (either q * p or q * pstar) */ Double_t calcZemachSpinFactor( const Double_t pProd ) const; //! Calculate the amplitude spin term using the covariant tensor formalism /*! \param [in] pProd the momentum factor (q * pstar) */ Double_t calcCovSpinFactor( const Double_t pProd ); //! Calculate the spin-dependent covariant factor /*! \param [in] erm E_ij in the parent rest-frame divided by m_ij (equivalent to sqrt(1 + p^2/mParent^2)) */ void calcCovFactor( const Double_t erm ); //! Calculate the Legendre polynomial for the spin factor /*! Uses the current-event value of cosHel_ */ Double_t calcLegendrePoly() const; //! Calculate the Legendre polynomial for the spin factor (specifying the cosHel value) /*! \param [in] cosHel the cosine of the helicity angle */ Double_t calcLegendrePoly( const Double_t cosHel ); //! 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) = 0; //! Clear list of floating parameters void clearFloatingParameters() { resParameters_.clear(); } //! Add parameter to the list of floating parameters /*! \param [in] param the parameter to be added to the list */ void addFloatingParameter( LauParameter* param ); //! Access the list of floating parameters std::vector& getParameters() { return resParameters_; } private: //! Copy constructor (not implemented) LauAbsResonance(const LauAbsResonance& rhs); //! Copy assignment operator (not implemented) LauAbsResonance& operator=(const LauAbsResonance& rhs); //! Information on the resonance - LauResonanceInfo* resInfo_; + LauResonanceInfo* resInfo_{0}; //! Information on the particles const LauDaughters* daughters_; //! Parent name - TString nameParent_; + TString nameParent_{""}; //! Daughter 1 name - TString nameDaug1_; + TString nameDaug1_{""}; //! Daughter 2 name - TString nameDaug2_; + TString nameDaug2_{""}; //! Bachelor name - TString nameBachelor_; + TString nameBachelor_{""}; //! Parent charge - Int_t chargeParent_; + Int_t chargeParent_{0}; //! Daughter 1 charge - Int_t chargeDaug1_; + Int_t chargeDaug1_{0}; //! Daughter 2 charge - Int_t chargeDaug2_; + Int_t chargeDaug2_{0}; //! Bachelor charge - Int_t chargeBachelor_; + Int_t chargeBachelor_{0}; //! Parent mass - Double_t massParent_; + Double_t massParent_{0.0}; //! Daughter 1 mass - Double_t massDaug1_; + Double_t massDaug1_{0.0}; //! Daughter 2 mass - Double_t massDaug2_; + Double_t massDaug2_{0.0}; // Bachelor mass - Double_t massBachelor_; + Double_t massBachelor_{0.0}; //! Resonance name TString resName_; //! Resonance name with illegal characters removed TString sanitisedName_; //! Resonance mass - LauParameter* resMass_; + LauParameter* resMass_{0}; //! Resonance width - LauParameter* resWidth_; + LauParameter* resWidth_{0}; //! All parameters of the resonance std::vector resParameters_; //! Resonance spin - Int_t resSpin_; + Int_t resSpin_{0}; //! Resonance charge - Int_t resCharge_; + Int_t resCharge_{0}; //! DP axis identifier Int_t resPairAmpInt_; //! Blatt Weisskopf barrier for parent decay - LauBlattWeisskopfFactor* parBWFactor_; + LauBlattWeisskopfFactor* parBWFactor_{0}; //! Blatt Weisskopf barrier for resonance decay - LauBlattWeisskopfFactor* resBWFactor_; + LauBlattWeisskopfFactor* resBWFactor_{0}; //! Spin formalism - LauSpinType spinType_; + LauSpinType spinType_{Zemach_P}; //! Boolean to flip helicity - Bool_t flipHelicity_; + Bool_t flipHelicity_{kFALSE}; //! Boolean to ignore the momentum factors in both the spin factor and the mass-dependent width - Bool_t ignoreMomenta_; + Bool_t ignoreMomenta_{kFALSE}; //! Boolean to set the spinTerm to unity always - Bool_t ignoreSpin_; + Bool_t ignoreSpin_{kFALSE}; //! Boolean to ignore barrier factor scaling in the amplitude numerator, they are still used for the mass-dependent width - Bool_t ignoreBarrierScaling_; + Bool_t ignoreBarrierScaling_{kFALSE}; // Event kinematics information //! Invariant mass - Double_t mass_; + Double_t mass_{0.0}; //! Helicity angle cosine - Double_t cosHel_; + Double_t cosHel_{0.0}; //! Daughter momentum in resonance rest frame - Double_t q_; + Double_t q_{0.0}; //! Bachelor momentum in resonance rest frame - Double_t p_; + Double_t p_{0.0}; //! Bachelor momentum in parent rest frame - Double_t pstar_; + Double_t pstar_{0.0}; //! Covariant factor /*! sqrt(1 + z*z), where z = p / mParent Can also be expressed as E_ij in the parent rest-frame divided by m_ij - indeed this is how LauKinematics calculates it. \see LauKinematics::getcov12 \see LauKinematics::getcov13 \see LauKinematics::getcov23 */ - Double_t erm_; + Double_t erm_{1.0}; //! Covariant factor (full spin-dependent expression) - Double_t covFactor_; + Double_t covFactor_{1.0}; ClassDef(LauAbsResonance,0) // Abstract resonance class }; #endif diff --git a/inc/LauKMatrixProdPole.hh b/inc/LauKMatrixProdPole.hh index a16341f..6b9bae7 100644 --- a/inc/LauKMatrixProdPole.hh +++ b/inc/LauKMatrixProdPole.hh @@ -1,103 +1,109 @@ /* 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;} + //! 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& 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..a1e1d7a 100644 --- a/inc/LauKMatrixProdSVP.hh +++ b/inc/LauKMatrixProdSVP.hh @@ -1,103 +1,109 @@ /* 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;} + + //! Retrieve the resonance parameters, e.g. so that they can be loaded into a fit + /*! + \return floating parameters of the resonance + */ + 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..fffaa41 100644 --- a/inc/LauKMatrixPropagator.hh +++ b/inc/LauKMatrixPropagator.hh @@ -1,499 +1,551 @@ /* 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 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& getPoleMassSqParameter(Int_t poleIndex); + //! 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 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 mSq0 production parameter + /*! + \return the mSq0 parameter + */ + LauParameter& getmSq0() {return mSq0_;} + + //! Get s0Scatt production parameter + /*! + \return the s0Scatt parameter + */ + LauParameter& gets0Scatt() {return s0Scatt_;} + + //! Get s0 production parameter + /*! + \return the s0Prod parameter + */ + LauParameter& gets0Prod() {return s0Prod_;} + + //! Get sA production parameter + /*! + \return the sA parameter + */ + LauParameter& getsA() {return sA_;} + + //! Get sA0 production parameter + /*! + \return the sA0 parameter + */ + LauParameter& getsA0() {return sA0_;} + //! Get the "slowly-varying part" term of the amplitude /*! \return the svp term */ 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); //! 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 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}; //! 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_; //! 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_; //! 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 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_; //! 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/LauAbsResonance.cc b/src/LauAbsResonance.cc index f956be6..c697e08 100644 --- a/src/LauAbsResonance.cc +++ b/src/LauAbsResonance.cc @@ -1,720 +1,681 @@ /* 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 LauAbsResonance.cc \brief File containing implementation of LauAbsResonance class. */ #include #include "TSystem.h" #include "LauAbsResonance.hh" #include "LauConstants.hh" #include "LauDaughters.hh" #include "LauKinematics.hh" #include "LauParameter.hh" #include "LauResonanceInfo.hh" ClassImp(LauAbsResonance) bool LauAbsResonance::isIncoherentModel(LauResonanceModel model) { switch(model) { case BW: case RelBW: case GS: case Flatte: case Sigma: case Kappa: case Dabba: case LASS: case LASS_BW: case LASS_NR: case EFKLLM: case KMatrix: case FlatNR: case NRModel: case BelleNR: case PowerLawNR: case BelleSymNR: case BelleSymNRNoInter: case TaylorNR: case PolNR: case Pole: case PolarFFNR: case PolarFFSymNR: case PolarFFSymNRNoInter: case Rescattering: case Rescattering2: case RescatteringNoInter: case MIPW_MagPhase: case MIPW_RealImag: case RhoOmegaMix_GS: case RhoOmegaMix_RBW: case RhoOmegaMix_GS_1: case RhoOmegaMix_RBW_1: break; case GaussIncoh: return true; } return false; } // Constructor LauAbsResonance::LauAbsResonance(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters) : resInfo_(resInfo), daughters_(daughters), - nameParent_(""), nameDaug1_(""), nameDaug2_(""), nameBachelor_(""), - chargeParent_(0), chargeDaug1_(0), chargeDaug2_(0), chargeBachelor_(0), - massParent_(0.0), massDaug1_(0.0), massDaug2_(0.0), massBachelor_(0.0), resName_( (resInfo!=0) ? resInfo->getName() : "" ), sanitisedName_( (resInfo!=0) ? resInfo->getSanitisedName() : "" ), resMass_( (resInfo!=0) ? resInfo->getMass() : 0 ), resWidth_( (resInfo!=0) ? resInfo->getWidth() : 0 ), resSpin_( (resInfo!=0) ? resInfo->getSpin() : 0 ), resCharge_( (resInfo!=0) ? resInfo->getCharge() : 0 ), - resPairAmpInt_(resPairAmpInt), - parBWFactor_(0), - resBWFactor_(0), - spinType_(Zemach_P), - flipHelicity_(kFALSE), - ignoreMomenta_(kFALSE), - ignoreSpin_(kFALSE), - ignoreBarrierScaling_(kFALSE), - mass_(0.0), - cosHel_(0.0), - q_(0.0), - p_(0.0), - pstar_(0.0), - erm_(1.0), - covFactor_(1.0) + resPairAmpInt_(resPairAmpInt) { if ( resInfo == 0 ) { std::cerr << "ERROR in LauAbsResonance constructor : null LauResonanceInfo object provided" << std::endl; gSystem->Exit(EXIT_FAILURE); } if ( daughters_ == 0 ) { std::cerr << "ERROR in LauAbsResonance constructor : null LauDaughters object provided" << std::endl; gSystem->Exit(EXIT_FAILURE); } nameParent_ = this->getNameParent(); nameDaug1_ = this->getNameDaug1(); nameDaug2_ = this->getNameDaug2(); nameBachelor_ = this->getNameBachelor(); massParent_ = this->getMassParent(); massDaug1_ = this->getMassDaug1(); massDaug2_ = this->getMassDaug2(); massBachelor_ = this->getMassBachelor(); chargeParent_ = this->getChargeParent(); chargeDaug1_ = this->getChargeDaug1(); chargeDaug2_ = this->getChargeDaug2(); chargeBachelor_ = this->getChargeBachelor(); // check that the total charge adds up to that of the resonance Int_t totalCharge = chargeDaug1_ + chargeDaug2_; if ( (totalCharge != resCharge_) && (resPairAmpInt_ != 0) ) { std::cerr << "ERROR in LauAbsResonance : Total charge of daughters = " << totalCharge << ". Resonance charge = " << resCharge_ << "." << std::endl; gSystem->Exit(EXIT_FAILURE); } } // Constructor LauAbsResonance::LauAbsResonance(const TString& resName, const Int_t resPairAmpInt, const LauDaughters* daughters) : - resInfo_(0), daughters_(daughters), - nameParent_(""), nameDaug1_(""), nameDaug2_(""), nameBachelor_(""), - chargeParent_(0), chargeDaug1_(0), chargeDaug2_(0), chargeBachelor_(0), - massParent_(0.0), massDaug1_(0.0), massDaug2_(0.0), massBachelor_(0.0), resName_(resName), sanitisedName_(resName), - resMass_(0), - resWidth_(0), - resSpin_(0), - resCharge_(0), - resPairAmpInt_(resPairAmpInt), - parBWFactor_(0), - resBWFactor_(0), - spinType_(Zemach_P), - flipHelicity_(kFALSE), - ignoreMomenta_(kFALSE), - ignoreSpin_(kFALSE), - ignoreBarrierScaling_(kFALSE), - mass_(0.0), - cosHel_(0.0), - q_(0.0), - p_(0.0), - pstar_(0.0), - erm_(1.0), - covFactor_(1.0) + resPairAmpInt_(resPairAmpInt) { if ( daughters_ == 0 ) { std::cerr << "ERROR in LauAbsResonance constructor : null LauDaughters object provided" << std::endl; gSystem->Exit(EXIT_FAILURE); } nameParent_ = this->getNameParent(); nameDaug1_ = this->getNameDaug1(); nameDaug2_ = this->getNameDaug2(); nameBachelor_ = this->getNameBachelor(); massParent_ = this->getMassParent(); massDaug1_ = this->getMassDaug1(); massDaug2_ = this->getMassDaug2(); massBachelor_ = this->getMassBachelor(); chargeParent_ = this->getChargeParent(); chargeDaug1_ = this->getChargeDaug1(); chargeDaug2_ = this->getChargeDaug2(); chargeBachelor_ = this->getChargeBachelor(); // Since we haven't been provided with a LauResonanceInfo object we can just // set the change of the resonance to be the sum of the daughter charges resCharge_ = chargeDaug1_ + chargeDaug2_; } // Destructor LauAbsResonance::~LauAbsResonance() { } LauComplex LauAbsResonance::amplitude(const LauKinematics* kinematics) { // Use LauKinematics interface for amplitude // For resonance made from tracks i, j, we need the momenta // of tracks i and k in the i-j rest frame for spin helicity calculations // in the Zemach tensor formalism. // Also need the momentum of track k in the parent rest-frame for // calculation of the Blatt-Weisskopf factors. mass_ = 0.0; cosHel_ = 0.0; q_ = 0.0; p_ = 0.0; pstar_ = 0.0; erm_ = 1.0; covFactor_ = 1.0; if (resPairAmpInt_ == 1) { mass_ = kinematics->getm23(); cosHel_ = kinematics->getc23(); q_ = kinematics->getp2_23(); p_ = kinematics->getp1_23(); pstar_ = kinematics->getp1_Parent(); erm_ = kinematics->getcov23(); } else if (resPairAmpInt_ == 2) { mass_ = kinematics->getm13(); cosHel_ = kinematics->getc13(); q_ = kinematics->getp1_13(); p_ = kinematics->getp2_13(); pstar_ = kinematics->getp2_Parent(); erm_ = kinematics->getcov13(); } else if (resPairAmpInt_ == 3) { mass_ = kinematics->getm12(); cosHel_ = kinematics->getc12(); q_ = kinematics->getp1_12(); p_ = kinematics->getp3_12(); pstar_ = kinematics->getp3_Parent(); erm_ = kinematics->getcov12(); } else { std::cerr << "ERROR in LauAbsResonance::amplitude : Nonsense setup of resPairAmp array." << std::endl; gSystem->Exit(EXIT_FAILURE); } if (this->flipHelicity()) { cosHel_ *= -1.0; } if (this->ignoreMomenta()) { q_ = 1.0; p_ = 1.0; pstar_ = 1.0; erm_ = 1.0; } // Calculate the spin factors Double_t spinTerm(1.0); Double_t pProd(1.0); if (!this->ignoreSpin()) { switch ( this->getSpinType() ) { case Zemach_P: pProd = q_*p_; spinTerm = this->calcZemachSpinFactor( pProd ); break; case Zemach_Pstar: pProd = q_*pstar_; spinTerm = this->calcZemachSpinFactor( pProd ); break; case Covariant: pProd = q_*pstar_; spinTerm = this->calcCovSpinFactor( pProd ); break; case Legendre: spinTerm = this->calcLegendrePoly(); break; } } // Calculate the full amplitude LauComplex resAmplitude = this->resAmp(mass_, spinTerm); return resAmplitude; } void LauAbsResonance::calcCovFactor( const Double_t erm ) { if (resSpin_ == 0) { covFactor_ = 1.0; } else if (resSpin_ == 1) { covFactor_ = erm; } else if (resSpin_ == 2) { covFactor_ = erm*erm + 0.5; } else if (resSpin_ == 3) { covFactor_ = erm*(erm*erm + 1.5); } else if (resSpin_ == 4) { covFactor_ = (8.*erm*erm*erm*erm + 24.*erm*erm + 3.)/35.; } else if (resSpin_ > 4) { std::cerr << "WARNING in LauAbsResonance::calcCovFactor : covariant spin factor cannot (yet) be fully calculated for spin >= 5" << std::endl; std::cerr << " : the function of sqrt(1 + (p/mParent)^2) part will be missing" << std::endl; covFactor_ = 1.0; } } Double_t LauAbsResonance::calcCovSpinFactor( const Double_t pProd ) { if (resSpin_ == 0) { covFactor_ = 1.0; return 1.0; } // Covariant spin factor is (p* q)^L * f_L(erm) * P_L(cosHel) Double_t spinFactor(pProd); for ( Int_t i(1); i < resSpin_; ++i ) { spinFactor *= pProd; } this->calcCovFactor( erm_ ); spinFactor *= covFactor_; spinFactor *= this->calcLegendrePoly(); return spinFactor; } Double_t LauAbsResonance::calcZemachSpinFactor( const Double_t pProd ) const { // Calculate the spin factors // // These are calculated as follows // // -2^j * (q*p)^j * cj * Pj(cosHel) // // where Pj(coshHel) is the jth order Legendre polynomial and // // cj = j! / (2j-1)!! if (resSpin_ == 0) { return 1.0; } Double_t spinFactor(pProd); for ( Int_t i(1); i < resSpin_; ++i ) { spinFactor *= pProd; } spinFactor *= this->calcLegendrePoly(); return spinFactor; } Double_t LauAbsResonance::calcLegendrePoly( const Double_t cosHel ) { cosHel_ = cosHel; return this->calcLegendrePoly(); } Double_t LauAbsResonance::calcLegendrePoly() const { Double_t legPol = 1.0; if (resSpin_ == 1) { // Calculate vector resonance Legendre polynomial legPol = -2.0*cosHel_; } else if (resSpin_ == 2) { // Calculate tensor resonance Legendre polynomial legPol = 4.0*(3.0*cosHel_*cosHel_ - 1.0)/3.0; } else if (resSpin_ == 3) { // Calculate spin 3 resonance Legendre polynomial legPol = -8.0*(5.0*cosHel_*cosHel_*cosHel_ - 3.0*cosHel_)/5.0; } else if (resSpin_ == 4) { // Calculate spin 4 resonance Legendre polynomial legPol = 16.0*(35.0*cosHel_*cosHel_*cosHel_*cosHel_ - 30.0*cosHel_*cosHel_ + 3.0)/35.0; } else if (resSpin_ == 5) { // Calculate spin 5 resonance Legendre polynomial legPol = -32.0*(63.0*cosHel_*cosHel_*cosHel_*cosHel_*cosHel_ - 70.0*cosHel_*cosHel_*cosHel_ + 15.0*cosHel_)/63.0; } else if (resSpin_ > 5) { std::cerr << "WARNING in LauAbsResonance::calcLegendrePoly : Legendre polynomials not (yet) implemented for spin > 5" << std::endl; } return legPol; } void LauAbsResonance::changeResonance(const Double_t newMass, const Double_t newWidth, const Int_t newSpin) { if (newMass > 0.0) { resMass_->valueAndRange(newMass,0.0,3.0*newMass); resMass_->initValue(newMass); resMass_->genValue(newMass); std::cout << "INFO in LauAbsResonance::changeResonance : Setting mass to " << resMass_->value() << std::endl; } if (newWidth > 0.0) { resWidth_->valueAndRange(newWidth,0.0,3.0*newWidth); resWidth_->initValue(newWidth); resWidth_->genValue(newWidth); std::cout << "INFO in LauAbsResonance::changeResonance : Setting width to " << resWidth_->value() << std::endl; } if (newSpin > -1) { resSpin_ = newSpin; std::cout << "INFO in LauAbsResonance::changeResonance : Setting spin to " << resSpin_ << std::endl; } } void LauAbsResonance::changeBWBarrierRadii(const Double_t resRadius, const Double_t parRadius) { if ( resRadius >= 0.0 && resBWFactor_ != 0 ) { LauParameter* resBWRadius = resBWFactor_->getRadiusParameter(); resBWRadius->value(resRadius); resBWRadius->initValue(resRadius); resBWRadius->genValue(resRadius); std::cout << "INFO in LauAbsResonance::changeBWBarrierRadii : Setting resonance factor radius to " << resBWRadius->value() << std::endl; } if ( parRadius >= 0.0 && parBWFactor_ != 0 ) { LauParameter* parBWRadius = parBWFactor_->getRadiusParameter(); parBWRadius->value(parRadius); parBWRadius->initValue(parRadius); parBWRadius->genValue(parRadius); std::cout << "INFO in LauAbsResonance::changeBWBarrierRadii : Setting parent factor radius to " << parBWRadius->value() << std::endl; } } void LauAbsResonance::setResonanceParameter(const TString& name, const Double_t value) { //This function should always be overwritten if needed in classes inheriting from LauAbsResonance. std::cerr << "WARNING in LauAbsResonance::setResonanceParameter : Unable to set parameter \"" << name << "\" to value: " << value << "." << std::endl; } void LauAbsResonance::floatResonanceParameter(const TString& name) { //This function should always be overwritten if needed in classes inheriting from LauAbsResonance. std::cerr << "WARNING in LauAbsResonance::floatResonanceParameter : Unable to release parameter \"" << name << "\"." << std::endl; } LauParameter* LauAbsResonance::getResonanceParameter(const TString& name) { //This function should always be overwritten if needed in classes inheriting from LauAbsResonance. std::cerr << "WARNING in LauAbsResonance::getResonanceParameter : Unable to get parameter \"" << name << "\"." << std::endl; return 0; } void LauAbsResonance::addFloatingParameter( LauParameter* param ) { if ( param == 0 ) { return; } if ( param->clone() ) { resParameters_.push_back( param->parent() ); } else { resParameters_.push_back( param ); } } void LauAbsResonance::fixBarrierRadii(const Bool_t fixResRad, const Bool_t fixParRad) { if ( resBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::fixBarrierRadii : resonance barrier factor not present, cannot fix/float it" << std::endl; return; } if ( parBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::fixBarrierRadii : parent barrier factor not present, cannot fix/float it" << std::endl; return; } LauParameter* resBWRadius = resBWFactor_->getRadiusParameter(); resBWRadius->fixed(fixResRad); LauParameter* parBWRadius = parBWFactor_->getRadiusParameter(); parBWRadius->fixed(fixParRad); } Bool_t LauAbsResonance::fixResRadius() const { if ( resBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::fixResRadius : resonance barrier factor not present" << std::endl; return kTRUE; } LauParameter* bwRadius = resBWFactor_->getRadiusParameter(); return bwRadius->fixed(); } Bool_t LauAbsResonance::fixParRadius() const { if ( parBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::fixParRadius : parent barrier factor not present" << std::endl; return kTRUE; } LauParameter* bwRadius = parBWFactor_->getRadiusParameter(); return bwRadius->fixed(); } Double_t LauAbsResonance::getResRadius() const { if ( resBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::getResRadius : resonance barrier factor not present" << std::endl; return -1.0; } LauParameter* bwRadius = resBWFactor_->getRadiusParameter(); return bwRadius->unblindValue(); } Double_t LauAbsResonance::getParRadius() const { if ( parBWFactor_ == 0 ) { std::cerr << "WARNING in LauAbsResonance::getParRadius : parent barrier factor not present" << std::endl; return -1.0; } LauParameter* bwRadius = parBWFactor_->getRadiusParameter(); return bwRadius->unblindValue(); } Double_t LauAbsResonance::getMassParent() const { // Get the parent mass Double_t mass(LauConstants::mB); if (daughters_) { mass = daughters_->getMassParent(); } return mass; } Double_t LauAbsResonance::getMassDaug1() const { // Get the daughter mass Double_t mass(LauConstants::mPi); if (daughters_) { if (resPairAmpInt_ == 1) { mass = daughters_->getMassDaug2(); } else if (resPairAmpInt_ == 2) { mass = daughters_->getMassDaug1(); } else if (resPairAmpInt_ == 3) { mass = daughters_->getMassDaug1(); } } return mass; } Double_t LauAbsResonance::getMassDaug2() const { // Get the daughter mass Double_t mass(LauConstants::mPi); if (daughters_) { if (resPairAmpInt_ == 1) { mass = daughters_->getMassDaug3(); } else if (resPairAmpInt_ == 2) { mass = daughters_->getMassDaug3(); } else if (resPairAmpInt_ == 3) { mass = daughters_->getMassDaug2(); } } return mass; } Double_t LauAbsResonance::getMassBachelor() const { // Get the bachelor mass Double_t mass(LauConstants::mPi); if (daughters_) { if (resPairAmpInt_ == 1) { mass = daughters_->getMassDaug1(); } else if (resPairAmpInt_ == 2) { mass = daughters_->getMassDaug2(); } else if (resPairAmpInt_ == 3) { mass = daughters_->getMassDaug3(); } } return mass; } Int_t LauAbsResonance::getChargeParent() const { // Get the parent charge Int_t charge(0); if (daughters_) { charge = daughters_->getChargeParent(); } return charge; } Int_t LauAbsResonance::getChargeDaug1() const { // Get the daughter charge Int_t charge(0); if (daughters_) { if (resPairAmpInt_ == 1) { charge = daughters_->getChargeDaug2(); } else if (resPairAmpInt_ == 2) { charge = daughters_->getChargeDaug1(); } else if (resPairAmpInt_ == 3) { charge = daughters_->getChargeDaug1(); } } return charge; } Int_t LauAbsResonance::getChargeDaug2() const { // Get the daughter charge Int_t charge(0); if (daughters_) { if (resPairAmpInt_ == 1) { charge = daughters_->getChargeDaug3(); } else if (resPairAmpInt_ == 2) { charge = daughters_->getChargeDaug3(); } else if (resPairAmpInt_ == 3) { charge = daughters_->getChargeDaug2(); } } return charge; } Int_t LauAbsResonance::getChargeBachelor() const { // Get the bachelor charge Int_t charge(0); if (daughters_) { if (resPairAmpInt_ == 1) { charge = daughters_->getChargeDaug1(); } else if (resPairAmpInt_ == 2) { charge = daughters_->getChargeDaug2(); } else if (resPairAmpInt_ == 3) { charge = daughters_->getChargeDaug3(); } } return charge; } TString LauAbsResonance::getNameParent() const { // Get the parent name TString name(""); if (daughters_) { name = daughters_->getNameParent(); } return name; } TString LauAbsResonance::getNameDaug1() const { // Get the daughter name TString name(""); if (daughters_) { if (resPairAmpInt_ == 1) { name = daughters_->getNameDaug2(); } else if (resPairAmpInt_ == 2) { name = daughters_->getNameDaug1(); } else if (resPairAmpInt_ == 3) { name = daughters_->getNameDaug1(); } } return name; } TString LauAbsResonance::getNameDaug2() const { // Get the daughter name TString name(""); if (daughters_) { if (resPairAmpInt_ == 1) { name = daughters_->getNameDaug3(); } else if (resPairAmpInt_ == 2) { name = daughters_->getNameDaug3(); } else if (resPairAmpInt_ == 3) { name = daughters_->getNameDaug2(); } } return name; } TString LauAbsResonance::getNameBachelor() const { // Get the bachelor name TString name(""); if (daughters_) { if (resPairAmpInt_ == 1) { name = daughters_->getNameDaug1(); } else if (resPairAmpInt_ == 2) { name = daughters_->getNameDaug2(); } else if (resPairAmpInt_ == 3) { name = daughters_->getNameDaug3(); } } return name; } diff --git a/src/LauKMatrixProdPole.cc b/src/LauKMatrixProdPole.cc index 3223f8c..5c67a4d 100644 --- a/src/LauKMatrixProdPole.cc +++ b/src/LauKMatrixProdPole.cc @@ -1,108 +1,132 @@ /* 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_ ); + } + } + + LauParameter& par_polemasssq_ = thePropagator_->getPoleMassSqParameter(poleIndex_); + if ( !par_polemasssq_.fixed() ) + { + this->addFloatingParameter( &par_polemasssq_ ); + } + + return this->getParameters(); + +} \ No newline at end of file diff --git a/src/LauKMatrixProdSVP.cc b/src/LauKMatrixProdSVP.cc index 7ad3c35..dcad139 100644 --- a/src/LauKMatrixProdSVP.cc +++ b/src/LauKMatrixProdSVP.cc @@ -1,96 +1,146 @@ /* 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_mSq0_ = thePropagator_->getmSq0(); + if ( !par_mSq0_.fixed() ) + { + this->addFloatingParameter( &par_mSq0_ ); + } + + LauParameter& par_s0Scatt_ = thePropagator_->gets0Scatt(); + if ( !par_s0Scatt_.fixed() ) + { + this->addFloatingParameter( &par_s0Scatt_ ); + } + + LauParameter& par_s0Prod_ = thePropagator_->gets0Prod(); + if ( !par_s0Prod_.fixed() ) + { + this->addFloatingParameter( &par_s0Prod_ ); + } + + LauParameter& par_sA_ = thePropagator_->getsA(); + if ( !par_sA_.fixed() ) + { + this->addFloatingParameter( &par_sA_ ); + } + + LauParameter& par_sA0_ = thePropagator_->getsA0(); + if ( !par_sA0_.fixed() ) + { + this->addFloatingParameter( &par_sA0_ ); + } + + return this->getParameters(); + +} \ No newline at end of file diff --git a/src/LauKMatrixPropagator.cc b/src/LauKMatrixPropagator.cc index 80bafff..f0e5697 100644 --- a/src/LauKMatrixPropagator.cc +++ b/src/LauKMatrixPropagator.cc @@ -1,1133 +1,1166 @@ /* 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); + LauParameter mPoleParam(Form("KM_%s_poleMassSq_%i",name_.Data(),poleIndex),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); + LauParameter scattParam(Form("KM_%s_scattConst_%i_%i",name_.Data(),scattIndex,iChannel),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; } +LauParameter& LauKMatrixPropagator::getPoleMassSqParameter(Int_t poleIndex) +{ + if ( (parametersSet_ == kFALSE) || (poleIndex < 0 || poleIndex >= nPoles_) ) { + std::cerr << "ERROR from LauKMatrixPropagator::getPoleMassSqParameter(). Invalid pole." << std::endl; + gSystem->Exit(EXIT_FAILURE); + } + + return mSqPoles_[poleIndex]; +} + 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; }