diff --git a/EvtGenBase/EvtResonance2.hh b/EvtGenBase/EvtResonance2.hh index b0df5c6..745e2b2 100644 --- a/EvtGenBase/EvtResonance2.hh +++ b/EvtGenBase/EvtResonance2.hh @@ -1,84 +1,71 @@ //-------------------------------------------------------------------------- // // Environment: // This software is part of the EvtGen package developed jointly // for the BaBar and CLEO collaborations. If you use all or part // of it, please give an appropriate acknowledgement. // // Copyright Information: See EvtGen/COPYRIGHT // Copyright (C) 1998 Caltech, UCSB // // Module: EvtGen/EvtResonance2.hh // // Description:resonance-defining class // // Modification history: // // lange Nov 21, 2000 Module created // //------------------------------------------------------------------------ #ifndef EVTRESONANCE2_HH #define EVTRESONANCE2_HH #include "EvtGenBase/EvtVector4R.hh" -class EvtComplex; - - - class EvtResonance2 { public: //operator EvtResonance2& operator = (const EvtResonance2 &); - - //constructor with all information about the resonance - // invmass_angdenom chooses whether to use the resonance mass (false) - // or the daughter invariant mass (true) for the denominators in - // angular distributions - - EvtResonance2(const EvtVector4R& p4_p, const EvtVector4R& p4_d1, - const EvtVector4R& p4_d2, - double ampl = 0.0, double theta = 0.0, double gamma = 0.0, - double bwm = 0.0, int spin = 0, bool invmass_angdenom = false); - //destructor - virtual ~EvtResonance2(); + // Constructor + EvtResonance2(const EvtVector4R& p4_p, const EvtVector4R& p4_d1, + const EvtVector4R& p4_d2, double ampl = 1.0, double theta = 0.0, + double gamma = 0.0, double bwm = 0.0, int spin = 0, bool invmass_angdenom = false, + double barrier1 = 1.5, double barrier2 = 5.0); //accessors //return 4-momenta of the particles involved - inline const EvtVector4R& p4_p() { return _p4_p; } - inline const EvtVector4R& p4_d1() { return _p4_d1; } - inline const EvtVector4R& p4_d2() { return _p4_d2; } - + inline const EvtVector4R& p4_p() const { return _p4_p; } + inline const EvtVector4R& p4_d1() const { return _p4_d1; } + inline const EvtVector4R& p4_d2() const { return _p4_d2; } //return amplitude - inline double amplitude() { return _ampl; } + inline double amplitude() const { return _ampl; } //return theta - inline double theta() { return _theta; } + inline double theta() const { return _theta; } //return gamma - inline double gamma() { return _gamma; } + inline double gamma() const { return _gamma; } //return bwm - inline double bwm() { return _bwm; } - + inline double bwm() const { return _bwm; } + //return spin - inline int spin() { return _spin; } + inline int spin() const { return _spin; } //calculate amplitude for this resonance - EvtComplex resAmpl(); - - private: + EvtComplex resAmpl() const; + +private: EvtVector4R _p4_p, _p4_d1, _p4_d2; - double _ampl, _theta, _gamma, _bwm; + double _ampl, _theta, _gamma, _bwm, _barrier1, _barrier2; int _spin; bool _invmass_angdenom; -}; +}; #endif - diff --git a/EvtGenModels/EvtLambdacPHH.hh b/EvtGenModels/EvtLambdacPHH.hh new file mode 100644 index 0000000..a989902 --- /dev/null +++ b/EvtGenModels/EvtLambdacPHH.hh @@ -0,0 +1,90 @@ +//-------------------------------------------------------------------------- +// +// Copyright Information: See EvtGen/COPYRIGHT +// +// Module: EvtLambdacPHH.hh +// +// Description: Decay model for Lambda_c -> K- pi+ p using amplitudes +// from the Fermilab E791 analysis: arXiv:hep-ex/9912003v1 +// +// Modification history: +// +// Elisabeth Niel (elisabeth.maria.niel@cern.ch) and +// Patrick Robbe (robbe@lal.in2p3.fr) Jan 2019 Module created +// +//------------------------------------------------------------------------ +// +#ifndef EVTLAMBDACPHH_HH +#define EVTLAMBDACPHH_HH + +#include "EvtGenBase/EvtComplex.hh" +#include "EvtGenBase/EvtDecayAmp.hh" +#include "EvtGenBase/EvtResonance2.hh" +#include "EvtGenBase/EvtVector4R.hh" + +#include +#include + +class EvtParticle; + +class EvtLambdacPHH: public EvtDecayAmp { + +public: + + EvtLambdacPHH(); + + std::string getName(); + EvtDecayBase* clone(); + + void init(); + void initProbMax(); + void decay(EvtParticle *p); + +protected: + + // Resonance enumeration + enum LcResLabel {NonReson = 0, Kstar, Delta, Lambda}; + + // Amplitude functions + std::vector calcResAmpTerms(EvtLambdacPHH::LcResLabel resIndex, + const EvtResonance2& res, double norm) const; + + EvtComplex DecayAmp3(EvtLambdacPHH::LcResLabel resonance, int m, int mprime, double theta_res, + double phi_res, double theta_prime_daughter_res,double phi_prime_daughter_res) const; + + EvtComplex fampl3(double amplitude_res, double phi_res, int spinMother,int m_spinMother, + int m_prime_spinMother, double theta_res, float spin_res, float m_spin_res, + float m_prime_spin_res, double theta_daughter_res, double phi_prime_daughter_res) const; + + // Find resonance normalisation factors + void calcNormalisations(); + + void getFitFractions(); + + // Inverse cos/sin functions that checks for valid arguments + double getACos(double num, double denom) const; + double getASin(double num, double denom) const; + +private: + + // Daughter ordering for K-, pi+, p + int _d1, _d2, _d3; + + // Resonance parameters + double _Nplusplus, _Nplusminus, _Nminusplus, _Nminusminus; + double _phiNplusplus, _phiNplusminus, _phiNminusplus, _phiNminusminus; + double _E1, _phiE1, _E2, _phiE2, _E3, _phiE3, _E4, _phiE4; + double _F1, _phiF1, _F2, _phiF2 , _H1, _phiH1, _H2, _phiH2; + + double _NRNorm, _KstarNorm, _DeltaNorm, _LambdaNorm; + double _KstarM, _KstarW, _KstarR; + double _DeltaM, _DeltaW, _DeltaR; + double _LambdaM, _LambdaW, _LambdaR; + double _Lambda_cR; + + EvtVector4R _zprime, _p4_Lambda_c; + double _zpMag, _p4_Lambdac_Mag; + +}; + +#endif diff --git a/History.txt b/History.txt index cfe87fc..8ac0dd5 100644 --- a/History.txt +++ b/History.txt @@ -1,570 +1,580 @@ //========================================================================== // // History file for EvtGen // //=========================================================================== +3rd July 2019 John Back + Added the EvtLambdacPHH decay model for Lc -> p K pi decays with K*(890), + Delta++(1232) and Lambda(1520) resonances, based on the Fermilab E791 + analysis hep-ex/9912003v1, courtesy of Elisabeth Niel and Patrick Robbe + (LHCb). Modified EvtResonance2 to accept other barrier factor radii. + +3rd July 2019 Michal Kreps + Make sure minimum mass for resonances with non-zero widths is larger than + 1e-4 GeV in EvtRelBreitWignerBarrierFact. + 3rd May 2019 John Back Corrected EvtSLDiBaryonAmp bugs/issues in the BToDiBaryonlnupQCD model: parity, amplitude terms and B momentum reference frame variables. Corrected treament of spinor indices in EvtRareLb2Lll, courtesy of Tom Blake and Michal Kreps (LHCb). Updated the EvtBcVHad model to also handle Bc -> psi Ks K decays, courtesy of Aleksei Luchinsky (LHCb). Add new decay model EvtBsMuMuKK (BS_MUMUKK) for Bs to J/psi (mu+mu-) K+K-, courtesy of Veronika Chobanova, Jeremy Dalseno, Diego Martinez Santos and Marcos Romero Lamas (LHCb). Fix infinite loop during initialisation of the EvtBTo3hCP model via EvtCBTo3piP00 and EvtCBTo3piMPP, courtesy of Peter Richardson (Durham). 15th March 2019 Tom Latham Implement cmake build system, replacing the old config method. 29th Jan 2019 Michal Kreps Allow reading decay files which are missing end-of-line before end-of-file. 7th December 2018 John Back Added the EvtBLLNuL (BLLNUL) model that generates rare B -> ell ell nu ell decays, where ell = e or mu, courtesy of Anna Danilina and Nikolai Nikitin (LHCb). Removed the EvtB2MuMuMuNu (BUTOMMMN) model, since its now replaced by the more general BLLNuL one. 5th November 2018 John Back Added the BToDiBaryonlnupQCD model for generating B to p N* l nu decays, where N can be any (exited) charged baryon (spin 1/2 or 3/2), courtesy of Mark Smith and Ryan Newcombe (LHCb), with added code optimisations. 17th October 2018 John Back Added various decay models from LHCb EvtGenExtras package: EvtBcVHad ("BC_VHAD"), Evtbs2llGammaMNT ("BSTOGLLMNT"), Evtbs2llGammaISRFSR ("BSTOGLLISRFSR"), EvtbTosllMS ("BTOSLLMS"), EvtbTosllMSExt ("BTOSLLMSEXT"), EvtLb2Baryonlnu ("Lb2Baryonlnu"), EvtLb2plnuLCSR ("Lb2plnuLCSR"), EvtLb2plnuLQCD ("Lb2plnuLQCD"), EvtFlatSqDalitz ("FLATSQDALITZ") and EvtPhspFlatLifetime ("PHSPFLATLIFETIME"). 5th October 2018 John Back Updated setupEvtGen.sh to work with the new HepForge Phabricator site. 13th March 2018 John Back Updated EvtPythiaEngine to correctly handle updates of various particle properties so that Pythia uses the same information as EvtGen (evt.pdl) for the generic and alias PYTHIA decay model. 12th March 2018 John Back Updated EvtBcXMuNu models (X = Scalar, Vector, Tensor) to generate Bc to D0(star) mu nu decays, with associated form factors in EvtBCXFF, courtesy of Aleksei Luchinsky (LHCb). Also generalised the calculation of their maximum probabilities by reusing the CalcMaxProb method in EvtSemiLeptonicAmp, which now allows for different Q^2 binning (default remains at 25 bins). R01-07-00------------------------------------------------------------------- 13th December 2017 John Back New tag incorporating all changes below. Recommended external packages are HepMC 2.06.09, pythia 8.230, Photos++ 3.61 and Tauola++ 1.1.6c, as used in the setupEvtGen.sh script. 12th December 2017 John Back Changed Pythia validation example decay files to use Pythia8 codes. 6th December 2017 John Back Modified the examples to use DECAY.DEC (see 25th April 2016) instead of DECAY_2010.DEC. Changed EvtExternalGenList to assume Pythia8 codes are used in decay files by default, which is the case for DECAY.DEC. Also updated the setupEvtGen.sh script to work with Pythia 8.2x versions. 29th November 2017 John Back Modified EvtSVP, EvtVVP and EvtTVP models to handle both radiative and two-lepton decays, courtesy of Aleksei Luchinsky (LHCb). 14th July 2017 John Back Only create external generator objects if they don't already exist in EvtExternalGenFactory. Modified configure script to work with Pythia 8.2x 5th July 2017 Michal Kreps Register the VTOSLL model. 14th June 2017 John Back Add isNeutralKaon() boolean function and corrected comments in EvtDDalitz. 8th May 2017 Michal Kreps Fix bug in EvtbTosllVectorAmp to recognise Bs --> K*bar mu mu decay as b --> d ll transition. 8th May 2017 Michal Kreps Significantly simplify way how we decide on decay mode and daughters ordering in DDalitz model. With new code by definition all orderings of daughters in the decay file will yield same output. 4th May 2017 John Back Further fixes to DDalitz particle ordering (including charge-conjugates): Mode 5: D0 -> K- K0bar K+ and K+ K- K0bar Mode 12: D0 -> pi0 pi- pi+ and pi+ pi0 pi- Removed unneeded index ordering checks for mode 10 (D+ -> pi- pi+ pi+) and mode 11 (Ds+ -> pi- pi+ pi+) 27th April 2017 John Back Fixed DDalitz particle ordering for mode 7: D+ -> pi+ K- K+ and K+ pi+ K- and their charge-conjugates 7th April 2017 John Back Modified EvtGenExternal/EvtPythiaEngine to ensure that the EvtGen-based instances of Pythia8 (for generic and alias decays) use the same particle properties as defined by EvtGen, courtesy Patrick Robbe (LHCb). 5th April 2017 Michal Kreps Fixed indexing in copy constructor of Evt3Rank3C, which would otherwise produce an infinite loop; bug report from David Grellscheid. 3rd November 2016 John Back Modified EvtFlatQ2 model to work for all B -> X lepton lepton modes, as well as adding an extra phase space factor to correct for the dip at low q^2, courtesy of Marcin Chrzaszcz & Thomas Blake (LHCb), which is enabled by using "FLATQ2 1" instead of just "FLATQ2" in the decay file. 13th October 2016 John Back Added the TauolaCurrentOption decfile keyword to select the hadronic current in Tauola; default is the BaBar-tuned current option (int = 1). EvtParticles can store double attributes using the functions setAttributeDouble(name, double) and getAttributeDouble(name), which can be useful for storing and retrieving amplitude weights, for example. The analogous EvtParticle integer attribute interface remains unchanged: setAttribute(name, int) and getAttribute(name). 13th September 2016 John Back Modified EvtTauolaEngine to use internal Tauola spin matrices for tau pair events by temporarily setting the PDG id of the mother as a boson, keeping the same 4-momentum. The BaBar hadronic currents are now used by default. Also added the ability to change some Tauola parameters using the "Define" keyword in decay files. Added an example decay file illustrating the new features: validation/TauolaFiles/Btautau.dec 9th September 2016 Michal Kreps Reimplement code in EvtBTo3pi.F, EvtBTo3piMPP.F, EvtBTo3piP00.F and EvtBToKpipi.F in C++ in order to remove dependence on Fortran compiler. With this, there is no internal Fortran code in EvtGen. R01-06-00------------------------------------------------------------------- 1st June 2016 John Back New tag incorporating all changes below. Recommended external packages are HepMC 2.06.09, pythia 8.186, Photos++ 3.61 and Tauola++ 1.1.5. 28th April 2016 Michal Kreps For Ds+ --> 2pi+ pi- there was double counting of branching fraction resulting in total branching fraction being 1.5 times larger than measured one. Fix by revisiting submodes, which now fill total Ds --> 3pi. 25th April 2016 Michal Kreps Added DECAY.DEC/XML, which contain updated semileptonic charm and beauty branching fractions using the 2014 PDG, tuned to minimize disagreements between measurements and EvtGen for both inclusive and exclusive decays. Updated the evt.pdl particle properties file to the PDG 2014 edition. Implemented new LQCD form factors for Lb --> L mu mu from arXiv paper 1602.01399 (EvtRareLbToLllFFlQCD); old LQCD form factors are removed. 18th March 2016 John Back Fixed incorrect spinor algebra used in S1 -> 1/2 S2, 1/2 -> S3 S4 decays in EvtDiracParticle::rotateToHelicityBasis() functions, courtesy of Luis Miguel Garcia Martin and the IFIC Valencia LHCb group. 19th Feburary 2016 John Back Fixed bug in the definition of the initial spinor term Sinit in EvtRareLbToLll::HadronicAmpRS(), from Tom Blake (LHCb). 12th February 2016 John Back From LHCb, added extensions to the EvtHQET2(FF) model for semitauonic decays from Brian Hamilton, which needs a patch to EvtSemiLeptonicAmp from Jack Wimberley to ensure that the q^2 range is physical when finding the maximum amplitude probability. 2nd December 2015 John Back From LHCb, added EvtKStopizmumu model for KS -> pi0 mu mu decays based on JHEP08(1998)004, courtesy of Veronika Chobanova, Diego Martinez Santos and Jeremy Dalseno. Added EvtConst::Fermi for Fermi coupling constant. R01-05-00------------------------------------------------------------------- 21st October 2015 John Back New tag incorporating all changes below. Recommended external packages are HepMC 2.06.09, pythia 8.186, Photos++ 3.61 and Tauola++ 1.1.5. Added the EvtB2MuMuMuNu model for simulating the very rare four-leptonic decays B- -> mu+ mu- anti-nu_mu mu-, courtesy Nikolai Nikitin. 16th October 2015 John Back Updated the configure script to automatically select the library names for PHOTOS++; version 3.56 and below uses Fortran, version 3.61 and above uses C++ only (default). Avoid using v3.60, since it does not work. This needs the PHOTOS libraries built before EvtGen is configured. Modified setupEvtGen.sh to use Photos++ v3.61. 7th October 2015 John Back Updated EvtGenExternal/EvtPhotosEngine to check that additional particles from the outgoing vertex are indeed (FSR) photons, since later versions of PHOTOS introduce pair emission, where particles may not always be photons. Added the genRootDecayChain.cc validation program to create ROOT files containing information about the complete decay tree. Two example test decay files BKstarGamma.dec and BuDst0rhop.dec can be used with this; the first tests PHOTOS, the second looks at sequential decay chain storage. The plotBKstarGamma.C ROOT macro can be used for B -> K* gamma plots. 2nd October 2015 John Back Modified EvtSVPHelAmp and added a new EvtSVPHelCPMix model, implementing the complete mixing phenomenology of Bs to vector gamma decays, courtesy of Clara Remon (LHCb). EvtD0mixDalitz code: cleanup, inverted q/p for decays of D0bar (simplifies user decay files) and fixed y parameter bug, courtesy of Jordi Tico (LHCb). Changed the initialisation order of the infrared cut-off in EvtPhotosEngine. This actually has no effect, since the exponentiation function sets it to the same 1e-7 value, but it's now in the correct order if we need to update it. Removed all remaining obsolete pragma (Win32) warnings from some classes. 23rd September 2015 Michal Kreps Reimplement the real Spence function in C++ and removed its fortran implementation. 15th September 2015 Michal Kreps Fixed accessed uninitialised memory in EvtPDL.cpp, line 213. Modified the configure and setupEvtGen.sh scripts to work on Mac; needed Mac compilation patch files added to the new "platform" subdirectory. 10th September 2015 John Back Updated setupEvtGen.sh to use the recommended external packages: HepMC 2.06.09, pythia 8.186, Photos++ 3.56 and Tauola++ 1.1.5. Fixed form-factor calculations for the BTOSLLBALL model 6 used to generate b -> sll decays, courtesy of Christoph Langenbruch and David Loh (LHCb). Affects B->K*ll, B->rholl and B->omegall, particularly the electron modes. In the validation directory, added runPhotosTest.sh for testing FSR in Upsilon(4S) -> e+ e- decays, and changed the plot comparison scripts to use the 2nd directory "oldRootFiles" (which could be a soft-link) for including ROOT histograms made from a previous version of EvtGen. 27th August 2015 John Back Added Mersenne-Twister random number generator (RNG) EvtMTRandomEngine. It requires c++11 compiler features (>= gcc 4.7), which should automatically be enabled by the configure script. Introduced the preprocessor environment variable EVTGEN_CPP11 for c++11 features. EvtMTRandomEngine is the default RNG for the validation and test examples if c++11 features are enabled. Added a phase-space test validation/genPHSP.sh and PhaseSpacePlots.C to visually check the flatness of Dalitz plots in order to ensure that the RNG is not producing biased results that depend on particle ordering. Added the models EvtbsToLLLLAmp and EvtbsToLLLLHyperCP for B0_q -> l+ l- l+ l- decays (SM and one supersymmetric scenario), courtesy of Nikolai Nikitin and Konstantin Toms. Documentation provided in doc/evt_BQTOLLLL_model.pdf and doc/evt_BQTOLLLLHYPERCP_model.pdf. Changed the installation and set-up script name to be just setupEvtGen.sh; it uses the VERSION variable to specify the required tag. List of tags are available using either "svn ls -v http://svn.cern.ch/guest/evtgen/tags" or by going to http://svn.cern.ch/guest/evtgen/tags in a web browser. 12th June 2015 John Back Changed the width of chi_b1 in evt.pdl from 9.8928 GeV (!) to zero. 1st May 2015 John Back Added Bc -> scalar ell nu (EvtBcSMuNu) and Bc -> tensor ell nu (EvtBcTMuNu) decays, courtesy of Jack Wimberley, LHCb. Also included the chi_c1 mode for EvtBcVMuNu. R01-04-00------------------------------------------------------------------- 2nd April 2015 John Back Removed the EvtStdlibRandomEngine class since this can produce biases to kinematic distributions when one or more of the daughters is a resonance, such as B0 -> K pi psi (thanks to Antonio Augusto Alves Jr who discovered this issue). EvtSimpleRandomEngine is now the default random number generator in the validation and test examples. Incorporated several additions and modifications from LHCb: a) From Michal Kreps, Tom Blake & Christoph Langenbruch, added rare Lb --> Lambda^(*) ell ell models described in arXiv:1108.6129, with various form factors from Gutsche et al. (arXiv:1301.3737) and lattice QCD (arXiv:1212.4827) b) From Andrew Crocombe, implemented Bs --> K* form factors from Ball-Zwicky and z-parametrization form factors from arXiv:1006.4945 for EvtbTosllBallFF c) Christoph Langenbruch fixed the Bs -> phi ll form factors in EvtbTosllBallFF; T3 showed a non-physical pole at very low q2 which significantly affected the electron mode d) From Michal Kreps, removed semicolons from wrong places to clear warnings when compiled with the "-pedantic" option. 9th October 2014 John Back Change svnweb.cern.ch to svn.cern.ch in the setup script. 1st April 2014 John Back In EvtReport, modified the logging output severity status flags to have the "EVTGEN_" prefix, e.g. INFO becomes EVTGEN_INFO. The global report() function has been renamed to EvtGenReport(). 31st March 2014 John Back Added the ability to store named attributes for EvtParticles in the form of a map. The setAttribute(name, value) stores the required value, while getAttribute(name) retrieves the integer value. This is used in EvtPhotosEngine to specify the final-state radiation "FSR" attribute to 1 for any additional photons (EvtPhotonParticles) created by Photos++. It also stores the "ISR" attribute, but this is always set to zero, since only FSR photons are created. If the named attribute doesn't exist, then getAttribute() returns zero. 29th January 2014 Daniel Craik Removed mass assertion on GS shape in EvtDalitzReso to allow it to also be used for charged rho resonances. 27th January 2014 John Back Minor corrections to Vub models to remove further gcc 4.8 warnings. Updated configure script to work for MacOS clang (from Genser team). R01-03-00------------------------------------------------------------------- 9th January 2014 John Back New tag version "1.3.0", incorporating all changes below. Replaced auto-install script to work with this version as well as the latest versions of all external generator packages. Updated README to mention the new CERN-based web pages for Photos++ and Tauola++. 8th January 2014 John Back Fix gcc 4.6 and 4.8 compilation warnings, courtesy of Patrick Robbe (LHCb); main changes are removal of unused variables. Changed the EvtPythiaEngine class and configure script to use new Pythia 8 header locations; Pythia 8.180 or above is now required. 7th January 2014 John Back Modified EvtBCVFF to correct the Kiselev form factors from Jack Wimberley (LHCb). 9th October 2013 Daniel Craik Added Gounaris-Sakurai and Gaussian shapes to EvtGenericDalitz and set sensible defaults for LASS parameters. 19th September 2013 John Back Modified EvtGenExternal/EvtPythiaEngine to keep track of any new particles that are added to the default Pythia database to avoid duplicating particle/anti-particle entries that could override previously defined Pythia decay chains. 18th September 2013 John Back Added Mac OS flags for the configure script and src/Makefile. 15th July 2013 Daniel Craik Added flag to turn on scaling of LASS amplitude by M/q in EvtDalitzReso 15th July 2013 Daniel Craik EvtParserXML now accepts file names containing environment variables, exponential non-resonant shape in EvtDalitzReso now defined as exp(-alpha*m^2), LASS shape in EvtDalitzReso now takes a cutoff parameter 4th July 2013 Daniel Craik Added LASS, exponential non-resonant and linear non-resonant shapes to EvtGenericDalitz. 3rd July 2013 Daniel Craik Fixed auto-install script for R01-02-00. 1st July 2013 Daniel Craik Added auto-install script for R01-02-00. R01-02-00------------------------------------------------------------------- 15th May 2013 John Back New tag, version "1.2.0", incorporating all changes below. 14th May 2013 Michal Kreps Added Blatt-Weisskopf barrier factors up to L=5 in EvtGenBase/EvtBlattWeisskopf::compute(). 14th May 2013 John Back Added additional entries (appended at the end) to the evt.pdl particle data file courtesy of Romulus Godang and Belle II colleagues. 14th March 2013 John Back Added the method EvtParticle::getPDGId() to get the PDG integer for a particle directly (which just calls EvtPDL::getStdHep()). Added a check in EvtPhotosEngine::doDecay to skip Photos if a given particle has too many daughters (>= 10) to avoid a problem with a hard coded upper limit in the Photos PHOENE subroutine. 2nd February 2013 Daniel Craik Updated EvtDalitzTable to estimate probMax when it is missing from a Dalitz model. 1st February 2013 John Back Added the ability to read in Pythia 6 commands in ascii decay files in EvtDecayTable::readDecayFile (this was already possible in xml files). Modified the Photos++ engine default settings to be more suited to B decays (from LHCb defaults). 31st January 2013 John Back Added the ability to read in Pythia 8 commands in ascii decay files in EvtDecayTable::readDecayFile. They can be set using the syntax: "PythiaTypeParam module:variable=value", where Type = Generic, Alias or Both for specifying whether the parameter is for the generic or alias Pythia decay engines (or both). The 2nd argument must not contain any spaces. Fixed the list of commands strings being used in the EvtPythiaEngine class (i.e. Pythia parameters that can be set via decay files). 31st January 2013 Daniel Craik Added named parameters to various decay models. 30th January 2013 John Back Fixed some of the parameter arguments used in the EvtSVSCPiso model. 24th January 2013 John Back Set the Photos++ and Tauola++ models to use the EvtGen random number engine when useEvtGenRandom is set to true in the EvtExternalGenList constructor. 23rd January 2013 John Back Added EvtGenExternal/EvtPythiaRandom to allow the use of the EvtGen random number engine to also be used for the random engine for Pythia 8. Added a boolean (useEvtGenRandom, default = true) within the EvtExternalGenList constructor to use this feature. 18th December 2012 John Back Corrected some wrong daughter ordering assignments for decay modes 5 and 12 in EvtDDalitz. Updated validation/DalitzDecays.xml to also contain D decay mode 12, as well as various modes that may use K_S0 and K_L0. Added validation/genDDalitzModes.sh and updated validation/compareDalitz.C to do a complete comparison of the D Dalitz modes with the xml versions. 11th December 2012 Daniel Craik Updated the Xml parser to support named model parameters. Updated the generic Dalitz model to use named model parameters as an example. 15th October 2012 John Back Make EvtSimpleRandomEngine inherit from EvtRandomEngine to avoid crash in EvtGen.cpp when no random engine is defined (from Bjoern Spruck). R01-01-00------------------------------------------------------------------- 4th October 2012 John Back New tag, version "1.1.0", incorporating all changes below. Provide proper default constructors for EvtVector4R and EvtPhotonParticle. Modified the validation and test code to also compile/link in the case of no external generators being included. 3rd October 2012 John Back Corrected the t3 vector form factor values for the Ball-Zwicky '05 model (modelId = 6) in EvtbTosllBallFF::getVectorFF(), which were set to t3tilde instead. 18th September 2012 John Back Moved the external generator engines to a new sub-directory EvtGenExternal. Building the code now creates 2 libraries: libEvtGen.so (Base+Models) and libEvtGenExternal.so. This allows anyone to ignore using the new external generators if required (by not creating/loading the 2nd library). Added prefix option to the configure script/Makefile to allow the user to specify an installation directory for the include files, libraries, DECAY.DEC and evt.pdl files (for Genser). 14th September 2012 Michal Kreps Fixed the calculation of the angle between decay planes in the function EvtKine::EvtDecayAngleChi. Fixed typo in EvtLb2Lll decay model. Only some NP scenarious could be affected, SM one is definitely unaffected. 13th September 2012 John Back Added the use of the environment variables EVTGEN_PHOTOS, EVTGEN_PYTHIA and EVTGEN_TAUOLA to specify if the Photos, Pythia and/or Tauola engine classes are used or not. These variables are set by the configure script, depending if the library paths are specified for these generators. R01-00-01-------------------------------------------------------------------- 12th September 2012 John Back New tag incorporating all changes below, since R01-00-00. 11th September 2012 John Back Modified the Photos and Tauola engine classes to use the new Photospp and Tauolapp namespaces that are present in the latest versions of Photos++(3.5) and Tauola++(1.0.7). Updated the configure file to get the correct location of the Tauola++ include files. Added the D0->pi+pi-pi0 decay mode in EvtDDalitz from Marco Gersabeck and Frederic Dreyer (LHCb). Added new decay models/classes from Alexey Luchinsky (LHCb): EvtBcVMuNu, EvtTVP, EvtWnPi, EvtSVP, EvtXPsiGamma, EvtBcVNpi 29th June 2012 John Back Corrected mass(squared) variables filled in the Dalitz TTree in validation/genExampleRootFiles. 15th May 2012 Daniel Craik Updated EvtD0gammaDalitz to deal with D mesons from neutral B->DK Added save function to validation/compareDalitz.C. 11th May 2012 Daniel Craik Replaced BaBar specific configuration for BlattWeisskopf birth factors. Updated XML conversion script to handle new configuration. Fixed some bugs in the XML conversion script related to particle modifications. 9th May 2012 Daniel Craik Added latex documentation for xml decay files. 2nd May 2012 Daniel Craik Added resDaughters attribute to the Dalitz resonance xml tag to simplify defining symmetric resonances. Updated validation xml files to use the new functionality. 27th April 2012 Daniel Craik Upgraded EvtGenericDalitz to use EvtDalitzReso for resonances. Added validation to compare EvtGenericDalitz to all 11 EvtDDalitz modes. Added a root macro to quickly compare two Dalitz decays for validation. 24th April 2012 John Back Solved two bugs in the EvtD0gammaDalitz model (from Jordi Tico, LHCb): configuration of the conjugated model, and using only the B charge to determine the model used, not the D flavour. 17th April 2012 Daniel Craik Updated the GenericDalitz validation code to use the same probMax values as DDalitz. Added XML decay file parsing to EvtGen::readUDecay. Dec files are still the default. 30th March 2012 John Back Update maximum probability values in EvtDDalitz::initProbMax() for all DDalitz modes. 23rd March 2012 John Back Added the EvtEta2MuMuGamma decay model from LHCb. 21st March 2012 John Back Added EvtD0gammaDalitz decay model from LHCb. 20th March 2012 Daniel Craik Added backwards compatibility for Pythia 6 commands in the XML configuration. Updated decay file conversion tool to convert JetSetPar lines to pythia6Param tags. 19th March 2012 Daniel Craik Added infrastructure to pass commands to external generators. XML config now takes Pythia8 configuration commands. 16th March 2012 Daniel Craik Added the ability to define particles from the PDL for Dalitz decay resonances instead of defining mass, width and spin seperately. Renamed the lifetime attribute of Dalitz decay resonaces to width to avoid confusion. Added further validation code for the generic Dalitz model. 15th March 2012 Daniel Craik Added validation code for xml decay files and the generic Dalitz model. R01-00-00 ------------------------------------------------------------------ 6th March 2012 John Back First official version for Genser (evtgen 1.0.0) that includes support for external generators: Pythia8, Photos++ and Tauola++. This also includes a preliminary version of creating Dalitz plot decay models using EvtGenericDalitz. diff --git a/src/EvtGenBase/EvtRelBreitWignerBarrierFact.cpp b/src/EvtGenBase/EvtRelBreitWignerBarrierFact.cpp index 10372c0..920943b 100644 --- a/src/EvtGenBase/EvtRelBreitWignerBarrierFact.cpp +++ b/src/EvtGenBase/EvtRelBreitWignerBarrierFact.cpp @@ -1,283 +1,289 @@ //-------------------------------------------------------------------------- // // Environment: // This software is part of the EvtGen package developed jointly // for the BaBar and CLEO collaborations. If you use all or part // of it, please give an appropriate acknowledgement. // // Copyright Information: See EvtGen/COPYRIGHT // Copyright (C) 1998 Caltech, UCSB // // Module: EvtLineShape.cc // // Description: Store particle properties for one particle. // // Modification history: // // Lange March 10, 2001 Module created // Dvoretskii June 03, 2002 Reimplemented rollMass() // //------------------------------------------------------------------------ #include "EvtGenBase/EvtPatches.hh" #include "EvtGenBase/EvtPatches.hh" #include "EvtGenBase/EvtPredGen.hh" #include "EvtGenBase/EvtRelBreitWignerBarrierFact.hh" #include "EvtGenBase/EvtTwoBodyVertex.hh" #include "EvtGenBase/EvtPropBreitWignerRel.hh" #include "EvtGenBase/EvtPDL.hh" #include "EvtGenBase/EvtAmpPdf.hh" #include "EvtGenBase/EvtMassAmp.hh" #include "EvtGenBase/EvtSpinType.hh" #include "EvtGenBase/EvtIntervalFlatPdf.hh" #include EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact() { } EvtRelBreitWignerBarrierFact::~EvtRelBreitWignerBarrierFact() { } EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact(double mass, double width, double maxRange, EvtSpinType::spintype sp) : EvtAbsLineShape(mass,width,maxRange,sp) { // double mDaug1, double mDaug2, int l) { _includeDecayFact=true; _includeBirthFact=true; _mass=mass; _width=width; _spin=sp; _blattDecay=3.0; _blattBirth=1.0; _maxRange=maxRange; _errorCond=false; double maxdelta = 15.0*width; if ( maxRange > 0.00001 ) { _massMax=mass+maxdelta; _massMin=mass-maxRange; } else{ _massMax=mass+maxdelta; _massMin=mass-15.0*width; } _massMax=mass+maxdelta; - if ( _massMin< 0. ) _massMin=0.; + if ( _massMin< 0. ) { + if ( _width > 0.0001 ) { + _massMin = 0.00011; + } else { + _massMin=0.; + } + } } EvtRelBreitWignerBarrierFact::EvtRelBreitWignerBarrierFact(const EvtRelBreitWignerBarrierFact& x) : EvtAbsLineShape(x) { _massMax=x._massMax; _massMin=x._massMin; _blattDecay=x._blattDecay; _blattBirth=x._blattBirth; _maxRange=x._maxRange; _includeDecayFact=x._includeDecayFact; _includeBirthFact=x._includeBirthFact; _errorCond=x._errorCond; } EvtRelBreitWignerBarrierFact& EvtRelBreitWignerBarrierFact::operator=(const EvtRelBreitWignerBarrierFact& x) { _mass=x._mass; _width=x._width; _spin=x._spin; _massMax=x._massMax; _massMin=x._massMin; _blattDecay=x._blattDecay; _blattBirth=x._blattBirth; _maxRange=x._maxRange; _includeDecayFact=x._includeDecayFact; _includeBirthFact=x._includeBirthFact; _errorCond=x._errorCond; return *this; } EvtAbsLineShape* EvtRelBreitWignerBarrierFact::clone() { return new EvtRelBreitWignerBarrierFact(*this); } double EvtRelBreitWignerBarrierFact::getMassProb(double mass, double massPar,int nDaug, double *massDau) { _errorCond=false; //return EvtAbsLineShape::getMassProb(mass,massPar,nDaug,massDau); if (nDaug!=2) return EvtAbsLineShape::getMassProb(mass,massPar,nDaug,massDau); double dTotMass=0.; int i; for (i=0; i0.0000000001 ) { if ( mass > massPar) return 0.; } if ( _errorCond ) return 0.; // we did all the work in getRandMass return 1.; } double EvtRelBreitWignerBarrierFact::getRandMass(EvtId *parId,int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses) { if ( nDaug!=2) return EvtAbsLineShape::getRandMass(parId,nDaug,dauId,othDaugId,maxMass,dauMasses); if ( _width< 0.00001) return _mass; //first figure out L - take the lowest allowed. EvtSpinType::spintype spinD1=EvtPDL::getSpinType(dauId[0]); EvtSpinType::spintype spinD2=EvtPDL::getSpinType(dauId[1]); int t1=EvtSpinType::getSpin2(spinD1); int t2=EvtSpinType::getSpin2(spinD2); int t3=EvtSpinType::getSpin2(_spin); int Lmin=-10; // the user has overridden the partial wave to use. for (unsigned int vC=0; vC<_userSetPW.size(); vC++) { if ( dauId[0]==_userSetPWD1[vC] && dauId[1]==_userSetPWD2[vC] ) { Lmin=2*_userSetPW[vC]; } if ( dauId[0]==_userSetPWD2[vC] && dauId[1]==_userSetPWD1[vC] ) { Lmin=2*_userSetPW[vC]; } } // allow for special cases. if (Lmin<-1 ) { //There are some things I don't know how to deal with if ( t3>4) return EvtAbsLineShape::getRandMass(parId,nDaug,dauId,othDaugId,maxMass,dauMasses); if ( t1>4) return EvtAbsLineShape::getRandMass(parId,nDaug,dauId,othDaugId,maxMass,dauMasses); if ( t2>4) return EvtAbsLineShape::getRandMass(parId,nDaug,dauId,othDaugId,maxMass,dauMasses); //figure the min and max allowwed "spins" for the daughters state Lmin=std::max(t3-t2-t1,std::max(t2-t3-t1,t1-t3-t2)); if (Lmin<0) Lmin=0; assert(Lmin==0||Lmin==2||Lmin==4); } //double massD1=EvtPDL::getMeanMass(dauId[0]); //double massD2=EvtPDL::getMeanMass(dauId[1]); double massD1=dauMasses[0]; double massD2=dauMasses[1]; // I'm not sure how to define the vertex factor here - so retreat to nonRel code. if ( (massD1+massD2)> _mass ) return EvtAbsLineShape::getRandMass(parId,nDaug,dauId,othDaugId,maxMass,dauMasses); //parent vertex factor not yet implemented double massOthD=-10.; double massParent=-10.; int birthl=-10; if ( othDaugId) { EvtSpinType::spintype spinOth=EvtPDL::getSpinType(*othDaugId); EvtSpinType::spintype spinPar=EvtPDL::getSpinType(*parId); int tt1=EvtSpinType::getSpin2(spinOth); int tt2=EvtSpinType::getSpin2(spinPar); int tt3=EvtSpinType::getSpin2(_spin); //figure the min and max allowwed "spins" for the daughters state if ( (tt1<=4) && ( tt2<=4) ) { birthl=std::max(tt3-tt2-tt1,std::max(tt2-tt3-tt1,tt1-tt3-tt2)); if (birthl<0) birthl=0; massOthD=EvtPDL::getMeanMass(*othDaugId); massParent=EvtPDL::getMeanMass(*parId); } // allow user to override for (size_t vC=0; vC<_userSetBirthPW.size(); vC++) { if ( *othDaugId==_userSetBirthOthD[vC] && *parId==_userSetBirthPar[vC]){ birthl=2*_userSetBirthPW[vC]; } } } double massM=_massMax; if ( (maxMass > -0.5) && (maxMass < massM) ) massM=maxMass; //special case... if the parent mass is _fixed_ we can do a little better //and only for a two body decay as that seems to be where we have problems // Define relativistic propagator amplitude EvtTwoBodyVertex vd(massD1,massD2,_mass,Lmin/2); vd.set_f(_blattDecay); EvtPropBreitWignerRel bw(_mass,_width); EvtMassAmp amp(bw,vd); if ( _includeDecayFact) { amp.addDeathFact(); amp.addDeathFactFF(); } if ( massParent>-1.) { if ( _includeBirthFact ) { EvtTwoBodyVertex vb(_mass,massOthD,massParent,birthl/2); vb.set_f(_blattBirth); amp.setBirthVtx(vb); amp.addBirthFact(); amp.addBirthFactFF(); } } EvtAmpPdf pdf(amp); // Estimate maximum and create predicate for accept reject double tempMaxLoc=_mass; if ( maxMass>-0.5 && maxMass<_mass) tempMaxLoc=maxMass; double tempMax=_massMax; if ( maxMass>-0.5 && maxMass<_massMax) tempMax=maxMass; double tempMinMass=_massMin; if ( massD1+massD2 > _massMin) tempMinMass=massD1+massD2; //redo sanity check - is there a solution to our problem. //if not return an error condition that is caught by the //mass prob calculation above. if ( tempMinMass > tempMax ) { _errorCond=true; return tempMinMass; } if ( tempMaxLoc < tempMinMass) tempMaxLoc=tempMinMass; double safetyFactor=1.2; EvtPdfMax max(safetyFactor*pdf.evaluate(EvtPoint1D(tempMinMass,tempMax,tempMaxLoc))); EvtPdfPred pred(pdf); pred.setMax(max); EvtIntervalFlatPdf flat(tempMinMass,tempMax); EvtPdfGen gen(flat); EvtPredGen,EvtPdfPred > predgen(gen,pred); EvtPoint1D point = predgen(); return point.value(); } diff --git a/src/EvtGenBase/EvtResonance2.cpp b/src/EvtGenBase/EvtResonance2.cpp index 236036c..661d6a5 100644 --- a/src/EvtGenBase/EvtResonance2.cpp +++ b/src/EvtGenBase/EvtResonance2.cpp @@ -1,151 +1,147 @@ //-------------------------------------------------------------------------- // // Environment: // This software is part of the EvtGen package developed jointly // for the BaBar and CLEO collaborations. If you use all or part // of it, please give an appropriate acknowledgement. // // Copyright Information: See EvtGen/COPYRIGHT // Copyright (C) 1998 Caltech, UCSB // // Module: EvtResonance2.cc // -// Description: resonance-defining class +// Description: resonance-defining class // // Modification history: // // NK September 4, 1997 Module created // //------------------------------------------------------------------------ -// +// #include "EvtGenBase/EvtPatches.hh" -#include -#include "EvtGenBase/EvtVector4R.hh" -#include "EvtGenBase/EvtKine.hh" + #include "EvtGenBase/EvtComplex.hh" +#include "EvtGenBase/EvtConst.hh" #include "EvtGenBase/EvtResonance2.hh" #include "EvtGenBase/EvtReport.hh" -#include "EvtGenBase/EvtConst.hh" - -EvtResonance2::~EvtResonance2(){} +#include EvtResonance2& EvtResonance2::operator = ( const EvtResonance2 &n) { if ( &n == this ) return *this; _p4_p = n._p4_p; _p4_d1 = n._p4_d1; _p4_d2 = n._p4_d2; _ampl = n._ampl; _theta = n._theta; _gamma = n._gamma; _spin = n._spin; _bwm = n._bwm; _invmass_angdenom = n._invmass_angdenom; - return *this; + _barrier1 = n._barrier1; + _barrier2 = n._barrier2; + return *this; } - + EvtResonance2::EvtResonance2(const EvtVector4R& p4_p, const EvtVector4R& p4_d1, - const EvtVector4R& p4_d2, double ampl, - double theta, double gamma, double bwm, int spin, - bool invmass_angdenom): - _p4_p(p4_p),_p4_d1(p4_d1), _p4_d2(p4_d2),_ampl(ampl), _theta(theta), - _gamma(gamma), _bwm(bwm), _spin(spin), _invmass_angdenom(invmass_angdenom) {} + const EvtVector4R& p4_d2, double ampl, + double theta, double gamma, double bwm, int spin, + bool invmass_angdenom , double barrier1, double barrier2): + _p4_p(p4_p),_p4_d1(p4_d1), _p4_d2(p4_d2),_ampl(ampl), _theta(theta), + _gamma(gamma), _bwm(bwm), _barrier1(barrier1), _barrier2(barrier2), _spin(spin), _invmass_angdenom(invmass_angdenom) +{ +} + +EvtComplex EvtResonance2::resAmpl() const { -EvtComplex EvtResonance2::resAmpl() { - double pi180inv = 1.0/EvtConst::radToDegrees; EvtComplex ampl; EvtVector4R p4_d3 = _p4_p-_p4_d1-_p4_d2; //get cos of the angle between the daughters from their 4-momenta //and the 4-momentum of the parent //in general, EvtDecayAngle(parent, part1+part2, part1) gives the angle //the missing particle (not listed in the arguments) makes //with part2 in the rest frame of both //listed particles (12) - - //angle 3 makes with 2 in rest frame of 12 (CS3) + + //angle 3 makes with 2 in rest frame of 12 (CS3) //double cos_phi_0 = EvtDecayAngle(_p4_p, _p4_d1+_p4_d2, _p4_d1); //angle 3 makes with 1 in 12 is, of course, -cos_phi_0 //first compute several quantities...follow CLEO preprint 00-23 double mAB=(_p4_d1+_p4_d2).mass(); double mBC=(_p4_d2+p4_d3).mass(); double mAC=(_p4_d1+p4_d3).mass(); - double mA=_p4_d1.mass(); - double mB=_p4_d2.mass(); + double mA=_p4_d1.mass(); + double mB=_p4_d2.mass(); double mD=_p4_p.mass(); double mC=p4_d3.mass(); - + double mR=_bwm; double gammaR=_gamma; double mdenom = _invmass_angdenom ? mAB : mR; double pAB=sqrt( (((mAB*mAB-mA*mA-mB*mB)*(mAB*mAB-mA*mA-mB*mB)/4.0) - mA*mA*mB*mB)/(mAB*mAB)); double pR=sqrt( (((mR*mR-mA*mA-mB*mB)*(mR*mR-mA*mA-mB*mB)/4.0) - mA*mA*mB*mB)/(mR*mR)); double pD= (((mD*mD-mR*mR-mC*mC)*(mD*mD-mR*mR-mC*mC)/4.0) - mR*mR*mC*mC)/(mD*mD); if ( pD>0 ) { pD=sqrt(pD); } else {pD=0;} double pDAB=sqrt( (((mD*mD-mAB*mAB-mC*mC)*(mD*mD-mAB*mAB-mC*mC)/4.0) - mAB*mAB*mC*mC)/(mD*mD)); - - double fR=1; double fD=1; int power=0; switch (_spin) { case 0: fR=1.0; fD=1.0; power=1; break; case 1: - fR=sqrt(1.0+1.5*1.5*pR*pR)/sqrt(1.0+1.5*1.5*pAB*pAB); - fD=sqrt(1.0+5.0*5.0*pD*pD)/sqrt(1.0+5.0*5.0*pDAB*pDAB); + fR=sqrt(1.0+_barrier1*_barrier1*pR*pR)/sqrt(1.0+_barrier1*_barrier1*pAB*pAB); + fD=sqrt(1.0+_barrier2*_barrier2*pD*pD)/sqrt(1.0+_barrier2*_barrier2*pDAB*pDAB); power=3; break; case 2: - fR = sqrt( (9+3*pow((1.5*pR),2)+pow((1.5*pR),4))/(9+3*pow((1.5*pAB),2)+pow((1.5*pAB),4)) ); - fD = sqrt( (9+3*pow((5.0*pD),2)+pow((5.0*pD),4))/(9+3*pow((5.0*pDAB),2)+pow((5.0*pDAB),4)) ); + fR = sqrt( (9+3*pow((_barrier1*pR),2)+pow((_barrier1*pR),4))/(9+3*pow((_barrier1*pAB),2)+pow((_barrier1*pAB),4)) ); + fD = sqrt( (9+3*pow((_barrier2*pD),2)+pow((_barrier2*pD),4))/(9+3*pow((_barrier2*pDAB),2)+pow((_barrier2*pDAB),4)) ); power=5; break; default: - EvtGenReport(EVTGEN_INFO,"EvtGen") << "Incorrect spin in EvtResonance22.cc\n"; + EvtGenReport(EVTGEN_INFO,"EvtGen") << "Incorrect spin in EvtResonance2.cc\n"; } - + double gammaAB= gammaR*pow(pAB/pR,power)*(mR/mAB)*fR*fR; switch (_spin) { case 0: ampl=_ampl*EvtComplex(cos(_theta*pi180inv),sin(_theta*pi180inv))* fR*fD/(mR*mR-mAB*mAB-EvtComplex(0.0,mR*gammaAB)); break; case 1: ampl=_ampl*EvtComplex(cos(_theta*pi180inv),sin(_theta*pi180inv))* (fR*fD*(mAC*mAC-mBC*mBC+((mD*mD-mC*mC)*(mB*mB-mA*mA)/(mdenom*mdenom)))/ (mR*mR-mAB*mAB-EvtComplex(0.0,mR*gammaAB))); break; case 2: ampl=_ampl*EvtComplex(cos(_theta*pi180inv),sin(_theta*pi180inv))* fR*fD/(mR*mR-mAB*mAB-EvtComplex(0.0,mR*gammaAB))* (pow((mBC*mBC-mAC*mAC+(mD*mD-mC*mC)*(mA*mA-mB*mB)/(mdenom*mdenom)),2)- (1.0/3.0)*(mAB*mAB-2*mD*mD-2*mC*mC+pow((mD*mD- mC*mC)/mdenom, 2))* - (mAB*mAB-2*mA*mA-2*mB*mB+pow((mA*mA-mB*mB)/mdenom,2))); + (mAB*mAB-2*mA*mA-2*mB*mB+pow((mA*mA-mB*mB)/mdenom,2))); break; default: - EvtGenReport(EVTGEN_INFO,"EvtGen") << "Incorrect spin in EvtResonance22.cc\n"; + EvtGenReport(EVTGEN_INFO,"EvtGen") << "Incorrect spin in EvtResonance2.cc\n"; } return ampl; } - - - diff --git a/src/EvtGenModels/EvtLambdacPHH.cpp b/src/EvtGenModels/EvtLambdacPHH.cpp new file mode 100644 index 0000000..0a60fb8 --- /dev/null +++ b/src/EvtGenModels/EvtLambdacPHH.cpp @@ -0,0 +1,618 @@ +//-------------------------------------------------------------------------- +// +// Copyright Information: See EvtGen/COPYRIGHT +// +// Module: EvtLambdacPHH.cpp +// +// Description: Decay model for Lambda_c -> K- pi+ p using amplitudes +// from the Fermilab E791 analysis: arXiv:hep-ex/9912003v1 +// +// Modification history: +// +// Elisabeth Niel (elisabeth.maria.niel@cern.ch) and +// Patrick Robbe (robbe@lal.in2p3.fr) Jan 2019 Module created +// +//------------------------------------------------------------------------ +// +#include "EvtGenBase/EvtPatches.hh" + +#include "EvtGenModels/EvtLambdacPHH.hh" + +#include "EvtGenBase/EvtConst.hh" +#include "EvtGenBase/EvtdFunction.hh" +#include "EvtGenBase/EvtGenKine.hh" +#include "EvtGenBase/EvtParticle.hh" +#include "EvtGenBase/EvtPDL.hh" +#include "EvtGenBase/EvtRandom.hh" +#include "EvtGenBase/EvtReport.hh" +#include "EvtGenBase/EvtSpinType.hh" + +#include +#include +#include + +EvtLambdacPHH::EvtLambdacPHH() : + _d1(0), + _d2(1), + _d3(3), + _Nplusplus(0.46), + _Nplusminus(1.0), + _Nminusplus(0.18), + _Nminusminus(0.94), + _phiNplusplus(3.48), + _phiNplusminus(0.00), + _phiNminusplus(0.75), + _phiNminusminus(1.13), + _E1(0.52), + _phiE1(-1.01), + _E2(0.20), + _phiE2(2.35), + _E3(0.21), + _phiE3(3.46), + _E4(0.16), + _phiE4(5.29), + _F1(0.17), + _phiF1(4.98), + _F2(0.38), + _phiF2(4.88), + _H1(0.18), + _phiH1(5.93), + _H2(0.20), + _phiH2(-0.06), + _NRNorm(1.0), + _KstarNorm(1.0), + _DeltaNorm(1.0), + _LambdaNorm(1.0), + _KstarM(0.890), + _KstarW(0.0498), + _KstarR(3.40), + _DeltaM(1.232), + _DeltaW(0.1120), + _DeltaR(5.22), + _LambdaM(1.520), + _LambdaW(0.0156), + _LambdaR(6.29), + _Lambda_cR(5.07), + _zprime(), + _p4_Lambda_c(), + _zpMag(0.0), + _p4_Lambdac_Mag(0.0) +{ + // Fermilab E791 values from MINUIT fit arXiv:hep-ex/9912003v1 +} + +std::string EvtLambdacPHH::getName() { + + return "LAMBDAC_PHH"; + +} + +EvtDecayBase* EvtLambdacPHH::clone() { + + return new EvtLambdacPHH; + +} + +bool compareId(const std::pair &left, + const std::pair &right) { + + // Compare id numbers to achieve the ordering K-, pi+ and p + bool result(false); + + int leftPDGid = EvtPDL::getStdHep(left.first); + int rightPDGid = EvtPDL::getStdHep(right.first); + + if (leftPDGid < rightPDGid) { + result = true; + } + + return result; + +} + +void EvtLambdacPHH::init() { + + static EvtId KM = EvtPDL::getId("K-"); + static EvtId PIP = EvtPDL::getId("pi+"); + static EvtId LAMBDAC = EvtPDL::getId("Lambda_c+"); + static EvtId LAMBDACB = EvtPDL::getId("anti-Lambda_c-"); + static EvtId PROTON = EvtPDL::getId("p+"); + + // check that there are 0 or 1 arguments and 3 daughters + checkNArg(0, 1); + checkNDaug(3); + + EvtId parnum = getParentId(); + checkSpinParent(EvtSpinType::DIRAC); + checkSpinDaughter(0, EvtSpinType::DIRAC); + checkSpinDaughter(1, EvtSpinType::SCALAR); + checkSpinDaughter(2, EvtSpinType::SCALAR); + + std::vector > daughters; + if (parnum == LAMBDAC) { + for (int i=0; i<3; ++i) { + daughters.push_back(std::make_pair(getDaug(i), i)); + } + } else { + for (int i=0; i<3; ++i) { + daughters.push_back(std::make_pair(EvtPDL::chargeConj(getDaug(i)), i)); + } + } + + // Sort daughters, they will end up in the order KM, PIP and PROTON + std::sort(daughters.begin(), daughters.end(), compareId); + + if (parnum == LAMBDAC || parnum == LAMBDACB) { + if (daughters[0].first == KM && daughters[1].first == PIP && daughters[2].first == PROTON) { + _d1 = daughters[0].second; + _d2 = daughters[1].second; + _d3 = daughters[2].second; + } + } + + // Find resonance dynamics normalisations + calcNormalisations(); + + // Print out expected fit fractions + getFitFractions(); + +} + +void EvtLambdacPHH::calcNormalisations() { + + // Generate events uniform in the Lambda_c Dalitz plot and find the + // normalisation integrals of the Breit-Wigner lineshapes + + // Lambda_c -> K- pi+ p + int nDaug(3); + EvtVector4R p4Daug[3]; + + double mDaug[3] = {EvtPDL::getMeanMass(EvtPDL::getId("K-")), + EvtPDL::getMeanMass(EvtPDL::getId("pi+")), + EvtPDL::getMeanMass(EvtPDL::getId("p+"))}; + + double norm[3] = {0.0, 0.0, 0.0}; + + // sample size + int N(100000); + for (int i = 0; i < N; i++) { + + double mParent = EvtPDL::getMass(EvtPDL::getId("Lambda_c+")); + EvtVector4R p0(mParent, 0.0, 0.0, 0.0); + + // Generate uniform 4 momenta + EvtGenKine::PhaseSpace(nDaug, mDaug, p4Daug, mParent); + + EvtResonance2 LambdacpKpi1(p0, p4Daug[0], p4Daug[1], 1.0, 0.0, _KstarW, _KstarM, 1, true, _KstarR, _Lambda_cR); // K*0 -> K- and pi+; L = 1 + EvtResonance2 LambdacpKpi2(p0, p4Daug[2], p4Daug[1], 1.0, 0.0, _DeltaW, _DeltaM, 1, true, _DeltaR, _Lambda_cR); // Delta++ -> p and pi+; L = 1 + EvtResonance2 LambdacpKpi3(p0, p4Daug[2], p4Daug[0], 1.0, 0.0,_LambdaW,_LambdaM, 2, true,_LambdaR, _Lambda_cR); // Lambda(1520) -> K- and p; L = 2 + + // Sum amplitude magnitude squared + norm[0] += abs2(LambdacpKpi1.resAmpl()); + norm[1] += abs2(LambdacpKpi2.resAmpl()); + norm[2] += abs2(LambdacpKpi3.resAmpl()); + + } + + // Set normalisation lineshape multiplication factors + double N0(N*1.0); + + // Scale NR to get sensible relative fit fractions + _NRNorm = 1.0/3.0; + // Set this using a decay file parameter if required + if (getNArg() > 1) {_NRNorm = getArg(1);} + + if (norm[0] > 0.0) { + _KstarNorm = sqrt(N0/norm[0]); + } + if (norm[1] > 0.0) { + _DeltaNorm = sqrt(N0/norm[1]); + } + if (norm[2] > 0.0) { + _LambdaNorm = sqrt(N0/norm[2]); + } + +} + +void EvtLambdacPHH::getFitFractions() { + + // Generate events uniform in the Lambda_c Dalitz plot and find the + // fit fractions for each resonance + + // Lambda_c -> K- pi+ p + int nDaug(3); + EvtVector4R p4Daug[3]; + + double mDaug[3] = {EvtPDL::getMeanMass(EvtPDL::getId("K-")), + EvtPDL::getMeanMass(EvtPDL::getId("pi+")), + EvtPDL::getMeanMass(EvtPDL::getId("p+"))}; + + double FitFracTop[4] = {0.0, 0.0, 0.0, 0.0}; + double FitFracDenom = 0.0; + + // sample size + int N(100000); + for (int i = 0; i < N; i++) { + + double mParent = EvtPDL::getMass(EvtPDL::getId("Lambda_c+")); + EvtVector4R p0(mParent, 0.0, 0.0, 0.0); + + // Generate uniform 4 momenta + EvtGenKine::PhaseSpace(nDaug, mDaug, p4Daug, mParent); + + EvtResonance2 LambdacpKpi0(p0, p4Daug[0], p4Daug[1], 1.0, 0.0, 0.0, 0.0, 0, true, 0.0, 0.0); // Non resonant (NR) + EvtResonance2 LambdacpKpi1(p0, p4Daug[0], p4Daug[1], 1.0, 0.0, _KstarW, _KstarM, 1, true, _KstarR, _Lambda_cR); // K*0 -> K- and pi+; L = 1 + EvtResonance2 LambdacpKpi2(p0, p4Daug[2], p4Daug[1], 1.0, 0.0, _DeltaW, _DeltaM, 1, true, _DeltaR, _Lambda_cR); // Delta++ -> p and pi+; L = 1 + EvtResonance2 LambdacpKpi3(p0, p4Daug[2], p4Daug[0], 1.0, 0.0,_LambdaW,_LambdaM, 2, true,_LambdaR, _Lambda_cR); // Lambda(1520) -> K- and p; L = 2 + + std::vector ampNonRes = calcResAmpTerms(EvtLambdacPHH::NonReson, LambdacpKpi0, _NRNorm); + std::vector ampKstar = calcResAmpTerms(EvtLambdacPHH::Kstar, LambdacpKpi1, _KstarNorm); + std::vector ampDelta = calcResAmpTerms(EvtLambdacPHH::Delta, LambdacpKpi2, _DeltaNorm); + std::vector ampLambda = calcResAmpTerms(EvtLambdacPHH::Lambda, LambdacpKpi3, _LambdaNorm); + + // Combine resonance amplitudes for a given spin configuration + EvtComplex amp00 = ampNonRes[0] + ampKstar[0] + ampDelta[0] + ampLambda[0]; + EvtComplex amp01 = ampNonRes[1] + ampKstar[1] + ampDelta[1] + ampLambda[1]; + EvtComplex amp10 = ampNonRes[2] + ampKstar[2] + ampDelta[2] + ampLambda[2]; + EvtComplex amp11 = ampNonRes[3] + ampKstar[3] + ampDelta[3] + ampLambda[3]; + + // Fit fraction numerator terms + FitFracTop[0] += abs2(ampNonRes[0]) + abs2(ampNonRes[1]) + abs2(ampNonRes[2]) + abs2(ampNonRes[3]); + FitFracTop[1] += abs2(ampKstar[0]) + abs2(ampKstar[1]) + abs2(ampKstar[2]) + abs2(ampKstar[3]); + FitFracTop[2] += abs2(ampDelta[0]) + abs2(ampDelta[1]) + abs2(ampDelta[2]) + abs2(ampDelta[3]); + FitFracTop[3] += abs2(ampLambda[0]) + abs2(ampLambda[1]) + abs2(ampLambda[2]) + abs2(ampLambda[3]); + + // Fit fraction common denominator + FitFracDenom += abs2(amp00) + abs2(amp01) + abs2(amp10) + abs2(amp11); + + } + + EvtGenReport(EVTGEN_INFO,"EvtLambdacPHH") << "FitFracs: NR = " << FitFracTop[0]/FitFracDenom << ", K* = " << FitFracTop[1]/FitFracDenom + << ", Del = " << FitFracTop[2]/FitFracDenom << ", Lam = " << FitFracTop[3]/FitFracDenom + << std::endl; + +} + +void EvtLambdacPHH::initProbMax() { + + // Default value + setProbMax(10.0); + + // Set probability using decay file parameter + if (getNArg() > 0) {setProbMax(getArg(0));} + +} + +void EvtLambdacPHH::decay(EvtParticle *p) { + + // Daughter order: 1 = K-, 2 = pi+, 3 = p + p->initializePhaseSpace(getNDaug(),getDaugs()); + + // 4-momenta in the rest frame of the Lambda_c + EvtVector4R p4_p(p->mass(), 0.0, 0.0, 0.0); + EvtVector4R moms1 = p->getDaug(_d1)->getP4(); + EvtVector4R moms2 = p->getDaug(_d2)->getP4(); + EvtVector4R moms3 = p->getDaug(_d3)->getP4(); + + // Lambda_c decay mode resonances. Spin L values from strong decay parity conservation: + // parity(resonance) = parity(daug1)*parity(daug2)*(-1)^L + EvtResonance2 LambdacpKpi0(p4_p, moms1, moms2, 1.0, 0.0, 0.0, 0.0, 0, true, 0.0, 0.0); // Non-resonant L = 0 + EvtResonance2 LambdacpKpi1(p4_p, moms1, moms2, 1.0, 0.0, _KstarW, _KstarM, 1, true, _KstarR, _Lambda_cR); // K*0 -> K- and pi+; L = 1 + EvtResonance2 LambdacpKpi2(p4_p, moms3, moms2, 1.0, 0.0, _DeltaW, _DeltaM, 1, true, _DeltaR, _Lambda_cR); // Delta++ -> p and pi+; L = 1 + EvtResonance2 LambdacpKpi3(p4_p, moms3, moms1, 1.0, 0.0,_LambdaW,_LambdaM, 2, true,_LambdaR, _Lambda_cR); // Lambda(1520) -> K- and p; L = 2 + + // Define the "beam" direction, used in Fig 1 of hep-ex/9912003v1 + EvtVector4R beam(0.0, 0.0, 0.0, 1.0); + EvtParticle* parent = p->getParent(); + if (parent) { + // If non prompt, the beam is along the direction of the mother + EvtVector4R p4_Lambda_c_mother = parent->getP4Lab(); + p4_Lambda_c_mother.applyBoostTo(p->getP4Lab()); + beam = p4_Lambda_c_mother; + } + + _p4_Lambda_c = p->getP4Lab(); + _p4_Lambdac_Mag = _p4_Lambda_c.d3mag(); + + // Define the unit vector denoting the "z" axis in Fig 1 + _zprime = -1.0*_p4_Lambda_c.cross(beam); + _zprime.applyBoostTo(_p4_Lambda_c, true); // From lab frame to Lambda_c + + _zpMag = _zprime.d3mag(); + // Check if zprime magnitude is non-zero + if (_zpMag > 0.0) { + // Normalise + _zprime /= _zpMag; + } else { + // Set as the z direction + _zprime.set(0.0, 0.0, 0.0, 1.0); + } + // Update normalised |z'| + _zpMag = 1.0; + + // Get the amplitudes: non-resonant, K*, Delta and Lambda + std::vector ampNonRes = calcResAmpTerms(EvtLambdacPHH::NonReson, LambdacpKpi0, _NRNorm); + std::vector ampKstar = calcResAmpTerms(EvtLambdacPHH::Kstar, LambdacpKpi1, _KstarNorm); + std::vector ampDelta = calcResAmpTerms(EvtLambdacPHH::Delta, LambdacpKpi2, _DeltaNorm); + std::vector ampLambda = calcResAmpTerms(EvtLambdacPHH::Lambda, LambdacpKpi3, _LambdaNorm); + + // Combine resonance amplitudes for a given spin configuration + EvtComplex amp00 = ampNonRes[0] + ampKstar[0] + ampDelta[0] + ampLambda[0]; + EvtComplex amp01 = ampNonRes[1] + ampKstar[1] + ampDelta[1] + ampLambda[1]; + EvtComplex amp10 = ampNonRes[2] + ampKstar[2] + ampDelta[2] + ampLambda[2]; + EvtComplex amp11 = ampNonRes[3] + ampKstar[3] + ampDelta[3] + ampLambda[3]; + + // Set the amplitude components + vertex(0, 0, amp00); + vertex(0, 1, amp01); + vertex(1, 0, amp10); + vertex(1, 1, amp11); + +} + +std::vector EvtLambdacPHH::calcResAmpTerms(EvtLambdacPHH::LcResLabel resIndex, + const EvtResonance2& res, double norm) const { + + // Initialise the resonance and daughter theta and phi angles + double thetaRes(0.0), phiRes(0.0), phiPrimeDaug(0.0), thetaPrimeDaug(0.0); + // Initialise beta rotation angle + double beta_res(0.0); + + EvtVector4R res_atproton(0.0,0.0,0.0,0.0), Lc_atproton(0.0,0.0,0.0,0.0); + + // Initialise Amplitude terms + EvtComplex term1(0.0), term2(0.0), term3(0.0), term4(0.0); + // Normalised dynamical amplitude + EvtComplex resAmp = res.resAmpl()*norm; + + // Angles are not needed for the non-resonant amplitude + if (resIndex != EvtLambdacPHH::NonReson) { + + // Resonance and daughter 4 momenta + EvtVector4R p4d1 = res.p4_d1(); + EvtVector4R p4d2 = res.p4_d2(); + EvtVector4R p4Res = p4d1 + p4d2; + EvtVector4R p4_d3 = res.p4_p() - p4Res; + + double p4ResMag = p4Res.d3mag(); + + // 4-momenta for theta' and phi' angles + EvtVector4R yRes = -1.0*p4_d3.cross(_zprime); + + EvtVector4R res_d1 = p4d1; + res_d1.applyBoostTo(p4Res, true); + double res_d1_Mag = res_d1.d3mag(); + + EvtVector4R res_d3 = -1.0*p4_d3; + double res_d3_Mag = res_d3.d3mag(); + + thetaPrimeDaug = getACos(res_d1.dot(res_d3), res_d1_Mag*res_d3_Mag); + + res_atproton = p4Res; + double res_atproton_mag = res_atproton.d3mag(); + + Lc_atproton = res.p4_p(); + double Lc_atproton_mag = Lc_atproton.d3mag(); + + // Check that the momentum of the Lambda_c is not zero, as well as a valid zprime vector + if (_p4_Lambdac_Mag > 0.0 && _zpMag > 0.0) { + + thetaRes = getACos(-1.0*p4Res.dot(_zprime), p4ResMag); + phiRes = getASin(-1.0*p4Res.dot(_p4_Lambda_c), sin(thetaRes)*_p4_Lambdac_Mag*p4ResMag); + phiPrimeDaug = getASin(res_d1.dot(yRes), sin(thetaPrimeDaug)*res_d1_Mag*yRes.d3mag()); + + } else { + + // Use randomised angles with flat probability distributions + thetaRes = EvtRandom::Flat(0.0, EvtConst::pi); + phiRes = EvtRandom::Flat(0.0, EvtConst::twoPi); + phiPrimeDaug = EvtRandom::Flat(0.0, EvtConst::twoPi); + + } + + if (res_atproton_mag > 0.0 && Lc_atproton_mag > 0.0) { + + // Extra rotation to go to the proton helicity frame for the two resonances Delta++ and Lambda. + // No rotation is needed for K*. Boost the vectors to the proton restframe to get the rotation angle + res_atproton.applyBoostTo(p4d1, true); + Lc_atproton.applyBoostTo(p4d1, true); + + beta_res = getACos(res_atproton.dot(Lc_atproton), res_atproton_mag*Lc_atproton_mag); + + } else { + + beta_res = EvtRandom::Flat(0.0, EvtConst::pi); + + } + } + + // Find the spin-dependent amplitudes + if (resIndex == EvtLambdacPHH::NonReson || resIndex == EvtLambdacPHH::Kstar) { + + term1 = resAmp*DecayAmp3(resIndex, 1, 1, thetaRes, phiRes, thetaPrimeDaug, phiPrimeDaug); + term2 = resAmp*DecayAmp3(resIndex, 1, -1, thetaRes, phiRes, thetaPrimeDaug, phiPrimeDaug); + term3 = resAmp*DecayAmp3(resIndex, -1, 1, thetaRes, phiRes, thetaPrimeDaug, phiPrimeDaug); + term4 = resAmp*DecayAmp3(resIndex, -1, -1, thetaRes, phiRes, thetaPrimeDaug, phiPrimeDaug); + + } else { + + double rotate_00 = EvtdFunction::d(1, 1, 1, beta_res); + double rotate_10 = EvtdFunction::d(1,-1, 1, beta_res); + double rotate_11 = EvtdFunction::d(1,-1,-1, beta_res); + double rotate_01 = EvtdFunction::d(1, 1,-1, beta_res); + + // Delta and Lambda need to be rotated before summing over the proton helicity axis + EvtComplex termA = resAmp*DecayAmp3(resIndex, 1, 1, thetaRes, phiRes, thetaPrimeDaug, phiPrimeDaug); + EvtComplex termB = resAmp*DecayAmp3(resIndex, 1, -1, thetaRes, phiRes, thetaPrimeDaug, phiPrimeDaug); + EvtComplex termC = resAmp*DecayAmp3(resIndex, -1, 1, thetaRes, phiRes, thetaPrimeDaug, phiPrimeDaug); + EvtComplex termD = resAmp*DecayAmp3(resIndex, -1, -1, thetaRes, phiRes, thetaPrimeDaug, phiPrimeDaug); + + term1 = rotate_00*termA + rotate_10*termB; + term2 = rotate_01*termA + rotate_11*termB; + term3 = rotate_00*termC + rotate_10*termD; + term4 = rotate_01*termC + rotate_11*termD; + + } + + // Return the spin amplitudes as a vector + std::vector ampVect; + ampVect.push_back(term1); + ampVect.push_back(term2); + ampVect.push_back(term3); + ampVect.push_back(term4); + + return ampVect; + +} + +EvtComplex EvtLambdacPHH::DecayAmp3(EvtLambdacPHH::LcResLabel resonance, int m, int mprime, double theta_res, double phi_res, + double theta_prime_daughter_res, double phi_prime_daughter_res) const { + + // Find the amplitudes given in Tables 3 to 6 in the paper. + // Wigner d-functions use 2*spin, e.g. d(1/2, 1/2, 1/2) -> d(1, 1, 1) + EvtComplex term1(0.0,0.0), term2(0.0,0.0); + + if (resonance == EvtLambdacPHH::NonReson) { + + // Non-resonant: table 6 + if (m == 1 && mprime == 1) { + + term1 = _Nplusplus*EvtComplex(cos(_phiNplusplus),sin(_phiNplusplus)); + + } else if (m == 1 && mprime == -1) { + + term1 = _Nplusminus*EvtComplex(cos(_phiNplusminus),sin(_phiNplusminus)); + + } else if (m == -1 && mprime == 1) { + + term1 = _Nminusplus*EvtComplex(cos(_phiNminusplus),sin(_phiNminusplus)); + + } else if (m == -1 && mprime == -1) { + + term1 = _Nminusminus*EvtComplex(cos(_phiNminusminus),sin(_phiNminusminus)); + + } + + } else if (resonance == EvtLambdacPHH::Kstar) { + + // K*0(1-) resonance: table 3 + if (m == 1 && mprime == 1) { + + term1 = fampl3(_E1, _phiE1, 1, 1, 1, theta_res, 2, 2, 0, theta_prime_daughter_res, phi_prime_daughter_res); + term2 = fampl3(_E2, _phiE2, 1, 1, -1, theta_res, 2, 0, 0, theta_prime_daughter_res, phi_res); + + } else if (m == 1 && mprime == -1) { + + term1 = fampl3(_E3, _phiE3, 1, 1, 1, theta_res, 2, 0, 0, theta_prime_daughter_res, 0.0); + term2 = fampl3(_E4, _phiE4, 1, 1, -1, theta_res, 2, -2, 0, theta_prime_daughter_res, phi_res-phi_prime_daughter_res); + + } else if (m == -1 && mprime == 1) { + + term1 = fampl3(_E1, _phiE1, 1, -1, 1, theta_res, 2, 2, 0, theta_prime_daughter_res, -(phi_res-phi_prime_daughter_res)); + term2 = fampl3(_E2, _phiE2, 1, -1, -1, theta_res, 2, 0, 0, theta_prime_daughter_res, 0.0); + + } else if (m == -1 && mprime == -1) { + + term1 = fampl3(_E3, _phiE3, 1, -1, 1, theta_res, 2, 0, 0, theta_prime_daughter_res, -phi_res); + term2 = fampl3(_E4, _phiE4, 1, -1, -1, theta_res, 2, -2, 0, theta_prime_daughter_res, -phi_prime_daughter_res); + } + + } else if (resonance == EvtLambdacPHH::Delta) { + + // Delta++(3/2+) resonance: table 4 + if (m == 1 && mprime == 1) { + + term1 = fampl3(_F1, _phiF1, 1, 1, 1, theta_res, 3, 1, 1, theta_prime_daughter_res, 0.0); + term2 = fampl3(_F2, _phiF2, 1, 1, -1, theta_res, 3, -1, 1, theta_prime_daughter_res, phi_res-phi_prime_daughter_res); + + } else if (m == 1 && mprime == -1) { + + term1 = fampl3(_F1, _phiF1, 1, 1, 1, theta_res, 3, 1, -1, theta_prime_daughter_res, phi_prime_daughter_res); + term2 = fampl3(_F2, _phiF2, 1, 1, -1, theta_res, 3, -1, -1, theta_prime_daughter_res, phi_res); + + } else if (m == -1 && mprime == 1) { + + term1 = fampl3(_F1, _phiF1, 1, -1, 1, theta_res, 3, 1, 1, theta_prime_daughter_res, -phi_res); + term2 = fampl3(_F2, _phiF2, 1, -1, -1, theta_res, 3, -1, 1, theta_prime_daughter_res, -phi_prime_daughter_res); + + } else if (m == -1 && mprime == -1) { + + term1 = fampl3(_F1, _phiF1, 1, -1, 1, theta_res, 3, 1, -1, theta_prime_daughter_res, -(phi_res-phi_prime_daughter_res)); + term2 = fampl3(_F2, _phiF2, 1, -1, -1, theta_res, 3, -1, -1, theta_prime_daughter_res, 0.0); + + } + + } else if (resonance == EvtLambdacPHH::Lambda) { + + // Lambda(1520)(3/2-) resonance: table 5 + if (m == 1 && mprime == 1) { + + term1 = fampl3(_H1, _phiH1, 1, 1, 1, theta_res, 3, 1, 1, theta_prime_daughter_res, 0.0); + term2 = fampl3(_H2, _phiH2, 1, 1, -1, theta_res, 3, -1, 1, theta_prime_daughter_res, phi_res-phi_prime_daughter_res); + + } else if (m == 1 && mprime == -1) { + + term1 = -1.0*fampl3(_H1, _phiH1, 1, 1, 1, theta_res, 3, 1, -1, theta_prime_daughter_res, phi_prime_daughter_res); + term2 = -1.0*fampl3(_H2, _phiH2, 1, 1, -1, theta_res, 3, -1, -1, theta_prime_daughter_res, phi_res); + + } else if (m == -1 && mprime == 1) { + + term1 = fampl3(_H1, _phiH1, 1, -1, 1, theta_res, 3, 1, 1, theta_prime_daughter_res, -phi_res); + term2 = fampl3(_H2, _phiH2, 1, -1, -1, theta_res, 3, -1, 1, theta_prime_daughter_res, -phi_prime_daughter_res); + + } else if (m == -1 && mprime == -1) { + + term1 = -1.0*fampl3(_H1, _phiH1, 1, -1, 1, theta_res, 3, 1, -1, theta_prime_daughter_res, -(phi_res-phi_prime_daughter_res)); + term2 = -1.0*fampl3(_H2, _phiH2, 1, -1, -1, theta_res, 3, -1, -1, theta_prime_daughter_res, 0.0); + + } + } + + EvtComplex Amplitude = term1 + term2; + return Amplitude; + +} + +EvtComplex EvtLambdacPHH::fampl3(double amplitude_res, double phi_res, int spinMother, int m_spinMother, int m_prime_spinMother, + double theta_res, float spin_res,float m_spin_res, float m_prime_spin_res, + double theta_daughter_res, double phi_prime_daughter_res) const { + + double dTerm1 = EvtdFunction::d(spinMother, m_spinMother, m_prime_spinMother, theta_res); + double dTerm2 = EvtdFunction::d(spin_res, m_spin_res, m_prime_spin_res, theta_daughter_res); + + EvtComplex amp_phase1 = EvtComplex(cos(phi_res), sin(phi_res)); + EvtComplex amp_phase2 = EvtComplex(cos(phi_prime_daughter_res), sin(phi_prime_daughter_res)); + + EvtComplex partial_amp = amplitude_res*amp_phase1*dTerm1*amp_phase2*dTerm2; + + return partial_amp; + +} + +double EvtLambdacPHH::getACos(double num, double denom) const { + + // Find inverse cosine, checking ratio is within +- 1 + double angle(0.0), ratio(0.0); + if (fabs(denom) > 0.0) {ratio = num/denom;} + + if (fabs(ratio) <= 1.0) { + angle = acos(ratio); + } + + return angle; + +} + +double EvtLambdacPHH::getASin(double num, double denom) const { + + // Find inverse sine, checking ratio is within +- 1 + double angle(0.0), ratio(0.0); + if (fabs(denom) > 0.0) {ratio = num/denom;} + + if (fabs(ratio) <= 1.0) { + angle = asin(ratio); + } + + return angle; + +} diff --git a/src/EvtGenModels/EvtModelReg.cpp b/src/EvtGenModels/EvtModelReg.cpp index 5e4dfd9..19242a0 100644 --- a/src/EvtGenModels/EvtModelReg.cpp +++ b/src/EvtGenModels/EvtModelReg.cpp @@ -1,355 +1,359 @@ //-------------------------------------------------------------------------- // // Environment: // This software is part of the EvtGen package developed jointly // for the BaBar and CLEO collaborations. If you use all or part // of it, please give an appropriate acknowledgement. // // Copyright Information: See EvtGen/COPYRIGHT // Copyright (C) 1998 Caltech, UCSB // // Module: EvtModel.cc // // Description: // // Modification history: // // RYD September 25, 1996 Module created // //------------------------------------------------------------------------ // #include "EvtGenBase/EvtPatches.hh" #include #include #include #include #include #include #include "EvtGenBase/EvtModel.hh" #include "EvtGenModels/EvtTauVectornu.hh" #include "EvtGenModels/EvtVVP.hh" #include "EvtGenModels/EvtSLN.hh" #include "EvtGenModels/EvtISGW2.hh" #include "EvtGenModels/EvtMelikhov.hh" #include "EvtGenModels/EvtSLPole.hh" #include "EvtGenModels/EvtPropSLPole.hh" #include "EvtGenModels/EvtSLBKPole.hh" #include "EvtGenModels/EvtISGW.hh" #include "EvtGenModels/EvtBHadronic.hh" #include "EvtGenModels/EvtVSS.hh" #include "EvtGenModels/EvtVSSMix.hh" #include "EvtGenModels/EvtVSSBMixCPT.hh" #include "EvtGenModels/EvtVSPPwave.hh" #include "EvtGenModels/EvtGoityRoberts.hh" #include "EvtGenModels/EvtSVS.hh" #include "EvtGenModels/EvtTSS.hh" #include "EvtGenModels/EvtTVSPwave.hh" #include "EvtGenModels/EvtSVVHelAmp.hh" #include "EvtGenModels/EvtSVPHelAmp.hh" #include "EvtGenModels/EvtSVPCP.hh" #include "EvtGenModels/EvtVVSPwave.hh" #include "EvtGenModels/EvtDDalitz.hh" #include "EvtGenModels/EvtOmegaDalitz.hh" #include "EvtGenModels/EvtPi0Dalitz.hh" #include "EvtGenModels/EvtEtaDalitz.hh" #include "EvtGenModels/EvtPhsp.hh" #include "EvtGenModels/EvtBtoXsgamma.hh" #include "EvtGenModels/EvtBtoXsll.hh" #include "EvtGenModels/EvtBtoXsEtap.hh" #include "EvtGenModels/EvtSSSCP.hh" #include "EvtGenModels/EvtSSSCPpng.hh" #include "EvtGenModels/EvtSTSCP.hh" #include "EvtGenModels/EvtSTS.hh" #include "EvtGenModels/EvtSSSCPT.hh" #include "EvtGenModels/EvtSVSCP.hh" #include "EvtGenModels/EvtSSDCP.hh" #include "EvtGenModels/EvtSVSNONCPEIGEN.hh" #include "EvtGenModels/EvtSVVNONCPEIGEN.hh" #include "EvtGenModels/EvtSVVCP.hh" #include "EvtGenModels/EvtSVVCPLH.hh" #include "EvtGenModels/EvtSVSCPLH.hh" #include "EvtGenModels/EvtSll.hh" #include "EvtGenModels/EvtVll.hh" #include "EvtGenModels/EvtTaulnunu.hh" #include "EvtGenModels/EvtTauHadnu.hh" #include "EvtGenModels/EvtTauScalarnu.hh" #include "EvtGenModels/EvtKstarnunu.hh" #include "EvtGenModels/EvtbTosllBall.hh" #include "EvtGenModels/EvtSingleParticle.hh" #include "EvtGenModels/EvtVectorIsr.hh" #include "EvtGenModels/EvtBToPlnuBK.hh" #include "EvtGenModels/EvtBToVlnuBall.hh" #include "EvtGenModels/EvtSVVHelCPMix.hh" #include "EvtGenModels/EvtSVPHelCPMix.hh" #include "EvtGenModels/EvtLb2Lll.hh" #include "EvtGenModels/EvtRareLbToLll.hh" #include "EvtGenModels/EvtHypNonLepton.hh" #include "EvtGenModels/EvtbTosllAli.hh" #include "EvtGenModels/EvtBToDDalitzCPK.hh" #include "EvtGenModels/EvtPVVCPLH.hh" #include "EvtGenModels/EvtLambdaB2LambdaV.hh" #include "EvtGenModels/EvtSSD_DirectCP.hh" #include "EvtGenModels/EvtHQET.hh" #include "EvtGenModels/EvtHQET2.hh" #include "EvtGenBase/EvtParticle.hh" #include "EvtGenBase/EvtPDL.hh" #include "EvtGenModels/EvtHelAmp.hh" #include "EvtGenModels/EvtPartWave.hh" #include "EvtGenModels/EvtBto2piCPiso.hh" #include "EvtGenModels/EvtBtoKpiCPiso.hh" #include "EvtGenModels/EvtSVSCPiso.hh" #include "EvtGenModels/EvtVVpipi.hh" #include "EvtGenModels/EvtY3SToY1SpipiMoxhay.hh" #include "EvtGenModels/EvtYmSToYnSpipiCLEO.hh" #include "EvtGenModels/EvtVVPIPI_WEIGHTED.hh" #include "EvtGenModels/EvtVPHOtoVISRHi.hh" #include "EvtGenModels/EvtBTo4piCP.hh" #include "EvtGenModels/EvtBTo3piCP.hh" #include "EvtGenModels/EvtCBTo3piP00.hh" #include "EvtGenModels/EvtCBTo3piMPP.hh" #include "EvtGenModels/EvtBToKpipiCP.hh" #include "EvtGenModels/EvtBsquark.hh" #include "EvtGenModels/EvtPhiDalitz.hh" #include "EvtGenModels/EvtLNuGamma.hh" #include "EvtGenModels/EvtVub.hh" #include "EvtGenModels/EvtVubHybrid.hh" #include "EvtGenModels/EvtVubNLO.hh" #include "EvtGenModels/EvtVubBLNP.hh" #include "EvtGenModels/EvtVubBLNPHybrid.hh" #include "EvtGenModels/EvtPto3P.hh" #include "EvtGenModels/EvtBtoKD3P.hh" #include "EvtGenModels/EvtKstarstargamma.hh" #include "EvtGenModels/EvtFlatQ2.hh" #include "EvtGenModels/EvtLambdaP_BarGamma.hh" #include "EvtGenModels/EvtBBScalar.hh" #include "EvtGenModels/EvtKKLambdaC.hh" #include "EvtGenModels/EvtMultibody.hh" #include "EvtGenModels/EvtBaryonPCR.hh" #include "EvtGenModels/EvtDMix.hh" #include "EvtGenModels/EvtD0mixDalitz.hh" #include "EvtGenModels/EvtD0gammaDalitz.hh" #include "EvtGenModels/EvtEta2MuMuGamma.hh" #include "EvtGenModels/EvtBcToNPi.hh" #include "EvtGenModels/EvtBcPsiNPi.hh" #include "EvtGenModels/EvtBcBsNPi.hh" #include "EvtGenModels/EvtBcBsStarNPi.hh" #include "EvtGenModels/EvtBcSMuNu.hh" #include "EvtGenModels/EvtBcVMuNu.hh" #include "EvtGenModels/EvtBcTMuNu.hh" #include "EvtGenModels/EvtBcVNpi.hh" #include "EvtGenModels/EvtSVP.hh" #include "EvtGenModels/EvtTVP.hh" #include "EvtGenModels/EvtXPsiGamma.hh" #include "EvtGenModels/EvtbsToLLLL.hh" #include "EvtGenModels/EvtbsToLLLLHyperCP.hh" #include "EvtGenModels/EvtBLLNuL.hh" #include "EvtGenModels/EvtKStopizmumu.hh" #include "EvtGenModels/EvtVtoSll.hh" #include "EvtGenModels/EvtBsMuMuKK.hh" #include "EvtGenModels/EvtGenericDalitz.hh" #include "EvtGenModels/EvtBcVHad.hh" #include "EvtGenModels/Evtbs2llGammaMNT.hh" #include "EvtGenModels/Evtbs2llGammaISRFSR.hh" #include "EvtGenModels/EvtbTosllMS.hh" #include "EvtGenModels/EvtbTosllMSExt.hh" #include "EvtGenModels/EvtbsToLLLL.hh" #include "EvtGenModels/EvtbsToLLLLHyperCP.hh" #include "EvtGenModels/EvtLb2plnuLCSR.hh" #include "EvtGenModels/EvtLb2plnuLQCD.hh" #include "EvtGenModels/EvtLb2Baryonlnu.hh" #include "EvtGenModels/EvtBToDiBaryonlnupQCD.hh" #include "EvtGenModels/EvtFlatSqDalitz.hh" #include "EvtGenModels/EvtPhspFlatLifetime.hh" +#include "EvtGenModels/EvtLambdacPHH.hh" + #include "EvtGenModels/EvtModelReg.hh" using std::fstream; using std::cout; using std::endl; EvtModelReg::EvtModelReg(const std::list* extraModels) { EvtModel &modelist=EvtModel::instance(); if(extraModels){ for(std::list::const_iterator it = extraModels->begin(); it != extraModels->end(); ++it){ modelist.registerModel(*it); } } modelist.registerModel(new EvtBBScalar); modelist.registerModel(new EvtLambdaP_BarGamma); modelist.registerModel(new EvtFlatQ2); modelist.registerModel(new EvtTauHadnu); modelist.registerModel(new EvtTauVectornu); modelist.registerModel(new EvtVVP); modelist.registerModel(new EvtSLN); modelist.registerModel(new EvtISGW2); modelist.registerModel(new EvtMelikhov); modelist.registerModel(new EvtSLPole); modelist.registerModel(new EvtPropSLPole); modelist.registerModel(new EvtSLBKPole); modelist.registerModel(new EvtHQET); modelist.registerModel(new EvtHQET2); modelist.registerModel(new EvtISGW); modelist.registerModel(new EvtBHadronic); modelist.registerModel(new EvtVSS); modelist.registerModel(new EvtVSSMix); modelist.registerModel(new EvtVSSBMixCPT); modelist.registerModel(new EvtVSPPwave); modelist.registerModel(new EvtGoityRoberts); modelist.registerModel(new EvtSVS); modelist.registerModel(new EvtTSS); modelist.registerModel(new EvtTVSPwave); modelist.registerModel(new EvtSVVHelAmp); modelist.registerModel(new EvtSVPHelAmp); modelist.registerModel(new EvtSVPCP); modelist.registerModel(new EvtVVSPwave); modelist.registerModel(new EvtDDalitz); modelist.registerModel(new EvtOmegaDalitz); modelist.registerModel(new EvtEtaDalitz); modelist.registerModel(new EvtPhsp); modelist.registerModel(new EvtBtoXsgamma); modelist.registerModel(new EvtBtoXsll); modelist.registerModel(new EvtBtoXsEtap); modelist.registerModel(new EvtSSSCP); modelist.registerModel(new EvtSSSCPpng); modelist.registerModel(new EvtSTSCP); modelist.registerModel(new EvtSTS); modelist.registerModel(new EvtSSSCPT); modelist.registerModel(new EvtSVSCP); modelist.registerModel(new EvtSSDCP); modelist.registerModel(new EvtSVSNONCPEIGEN); modelist.registerModel(new EvtSVVNONCPEIGEN); modelist.registerModel(new EvtSVVCP); modelist.registerModel(new EvtSVVCPLH); modelist.registerModel(new EvtSVSCPLH); modelist.registerModel(new EvtSll); modelist.registerModel(new EvtVll); modelist.registerModel(new EvtTaulnunu); modelist.registerModel(new EvtTauScalarnu); modelist.registerModel(new EvtKstarnunu); modelist.registerModel(new EvtbTosllBall); modelist.registerModel(new EvtBto2piCPiso); modelist.registerModel(new EvtBtoKpiCPiso); modelist.registerModel(new EvtSVSCPiso); modelist.registerModel(new EvtSingleParticle); modelist.registerModel(new EvtVectorIsr); modelist.registerModel(new EvtPi0Dalitz); modelist.registerModel(new EvtHelAmp); modelist.registerModel(new EvtPartWave); modelist.registerModel(new EvtVVpipi); modelist.registerModel(new EvtY3SToY1SpipiMoxhay); modelist.registerModel(new EvtYmSToYnSpipiCLEO); modelist.registerModel(new EvtBsquark); modelist.registerModel(new EvtPhiDalitz); modelist.registerModel(new EvtBToPlnuBK); modelist.registerModel(new EvtBToVlnuBall); modelist.registerModel(new EvtVVPIPI_WEIGHTED); modelist.registerModel(new EvtVPHOtoVISRHi); modelist.registerModel(new EvtBTo4piCP); modelist.registerModel(new EvtBTo3piCP); modelist.registerModel(new EvtCBTo3piP00); modelist.registerModel(new EvtCBTo3piMPP); modelist.registerModel(new EvtBToKpipiCP); modelist.registerModel(new EvtLb2Lll); modelist.registerModel(new EvtRareLbToLll); modelist.registerModel(new EvtHypNonLepton); modelist.registerModel(new EvtSVVHelCPMix); modelist.registerModel(new EvtSVPHelCPMix); modelist.registerModel(new EvtLNuGamma); modelist.registerModel(new EvtKstarstargamma); modelist.registerModel(new EvtVub); modelist.registerModel(new EvtVubHybrid); modelist.registerModel(new EvtVubNLO); modelist.registerModel(new EvtVubBLNP); modelist.registerModel(new EvtVubBLNPHybrid); modelist.registerModel(new EvtPto3P); modelist.registerModel(new EvtBtoKD3P); modelist.registerModel(new EvtKKLambdaC); modelist.registerModel(new EvtMultibody); modelist.registerModel(new EvtDMix); modelist.registerModel(new EvtD0mixDalitz); modelist.registerModel(new EvtD0gammaDalitz); modelist.registerModel(new EvtEta2MuMuGamma); modelist.registerModel(new EvtbTosllAli); modelist.registerModel(new EvtBaryonPCR); modelist.registerModel(new EvtBToDDalitzCPK); modelist.registerModel(new EvtLambdaB2LambdaV); modelist.registerModel(new EvtLambda2PPiForLambdaB2LambdaV); modelist.registerModel(new EvtV2VpVmForLambdaB2LambdaV); modelist.registerModel(new EvtPVVCPLH); modelist.registerModel(new EvtSSD_DirectCP); modelist.registerModel(new EvtBcToNPi(true)); // true = print author info modelist.registerModel(new EvtBcPsiNPi); modelist.registerModel(new EvtBcBsNPi); modelist.registerModel(new EvtBcBsStarNPi); modelist.registerModel(new EvtBcSMuNu); modelist.registerModel(new EvtBcVMuNu); modelist.registerModel(new EvtBcTMuNu); modelist.registerModel(new EvtBcVNpi); modelist.registerModel(new EvtSVP); modelist.registerModel(new EvtTVP); modelist.registerModel(new EvtXPsiGamma); modelist.registerModel(new EvtbsToLLLL); modelist.registerModel(new EvtbsToLLLLHyperCP); modelist.registerModel(new EvtBLLNuL); modelist.registerModel(new EvtKStopizmumu); modelist.registerModel(new EvtVtoSll); modelist.registerModel(new EvtBsMuMuKK); modelist.registerModel(new EvtGenericDalitz()); modelist.registerModel(new EvtBcVHad); modelist.registerModel(new Evtbs2llGammaMNT); modelist.registerModel(new Evtbs2llGammaISRFSR); modelist.registerModel(new EvtbTosllMS); modelist.registerModel(new EvtbTosllMSExt); modelist.registerModel(new EvtLb2plnuLQCD); modelist.registerModel(new EvtLb2plnuLCSR); modelist.registerModel(new EvtLb2Baryonlnu); modelist.registerModel(new EvtBToDiBaryonlnupQCD); modelist.registerModel(new EvtFlatSqDalitz); modelist.registerModel(new EvtPhspFlatLifetime); + modelist.registerModel(new EvtLambdacPHH); + }