Belle II Software  release-08-01-10
generators
Collaboration diagram for generators:

Modules

 generators data objects
 
 generators modules
 

Classes

class  AAFHInterface
 Class to inferface AAFH/DIAG36 Generator written in Fortran. More...
 
class  BabayagaNLO
 C++ Interface for the Fortran Bhabha and exclusive two photon generator BABAYAGA.NLO. More...
 
class  BBBrem
 Generator for low scattering angle radiative Bhabha events (Beam-Beam Bremsstrahlung). More...
 
class  BHWide
 C++ Interface for the Fortran Bhabha scattering generator BHWide. More...
 
class  SGCosmic
 Class to generate tracks in the cosmics generator and store them in a MCParticle graph. More...
 
class  CRY
 C++ Interface for the generator CRY. More...
 
class  EvtBSemiTauonicDecayRateCalculator
 Class to calculate the differential decay rate, R(D), R(D*), polarizations of tau and D* using BSTD model based on [M. More...
 
class  EvtGenInterface
 Class to interface EvtGen. More...
 
class  EvtGenModelRegister
 Class to keep a register of all Belle2 EvtDecayBases. More...
 
class  EvtB0toKsKK
 Register Decay model EvtB0toKsKK. More...
 
class  EvtBCL
 The class provides the form factors for orbitally excited semileptonic decays. More...
 
class  EvtBCLFF
 BCL Form Factors. More...
 
class  EvtBSemiTauonic
 The EvtGen model of semi-tauonic B decays including new physics effects based on [M. More...
 
class  EvtBSemiTauonic2HDMType2
 The EvtGen model of semi-tauonic B decays including the charged higgs effect of 2HDM Type2 based on [M. More...
 
class  EvtBSemiTauonicAmplitude
 The base class for the calculation of the spin dependent amplitudes for the BSemiTauonic model based on [M. More...
 
class  EvtBSemiTauonicHelicityAmplitudeCalculator
 The class calculates the helicity amplitude of semi-tauonic B decays including new physics effects based on [M. More...
 
class  EvtBSemiTauonicScalarMesonAmplitude
 The class calculates the spin dependent amplitudes of B->Dtaunu decays for the BSemiTauonic model based on [M. More...
 
class  EvtBSemiTauonicVectorMesonAmplitude
 The class calculates the spin dependent amplitudes of B->D*taunu decays for the BSemiTauonic model based on [M. More...
 
class  EvtBtoXsnunu_FERMI
 The evtgen model to produce non-resonant B-> Xs nu nubar decay sample. More...
 
class  EvtEtaFullDalitz
 Class for the simulation of the eta -> pi+pi-pi0 decay with an improved dalitz description. More...
 
class  EvtEtaPi0Dalitz
 Class for the simulation of the eta -> 3pi0 and eta'->3pi0 decays. More...
 
class  EvtEtaPrimeDalitz
 Class for the simulation of the eta' -> pi+ pi- eta and pi0 pi0 eta decays. More...
 
class  EvtKnunu
 The evtgen model to produce B-> K nu nubar decay sample. More...
 
class  EvtKstarnunu_REV
 The evtgen model to produce B-> Kstar nu nubar decay sample. More...
 
class  EvtPhspCP
 Register Decay model EvtPhspCP. More...
 
class  HepevtReader
 Class to read Hepevt files and store the content in a MCParticle graph. More...
 
class  HepMCReader
 Class to read HepMC files and store the content in a MCParticle graph. More...
 
class  KKGenInterface
 Interface class for using the KKMC generator. More...
 
class  KoralW
 C++ interface for the FORTRAN 4-fermion final state generator KoralW. More...
 
class  LHEReader
 Class to read LHE files and store the content in a MCParticle graph. More...
 
class  ParticleGun
 Class to generate tracks in the particle gun and store them in a MCParticle graph. More...
 
class  Phokhara
 C++ Interface for the Fortran generator PHOKHARA. More...
 
class  ReaderSAD
 Class to read files that have been created by SAD and store their content in a MCParticle graph. More...
 
class  Teegg
 C++ Interface for the Fortran generator TEEGG. More...
 
class  EvtBCLFFTest
 The fixture for testing the EvtBCLFF. More...
 
class  ParticleGunTest
 The fixture for testing the Particlegun. More...
 
class  TouschekReaderTURTLE
 Class to read Touschek files and store their content in a MCParticle graph. More...
 
struct  DualNumber
 Simple structure implementing dual numbers which are used for exact evaluation of the derivatives, see https://en.wikipedia.org/wiki/Automatic_differentiation#Automatic_differentiation_using_dual_numbers. More...
 
struct  GeneralVector< T >
 3-vector with members of arbitrary type, especially members can be dual numbers More...
 
class  InitialParticleGeneration
 Generate Collision. More...
 

Macros

#define B2_EVTGEN_REGISTER_MODEL(classname)
 Class to register B2_EVTGEN_REGISTER_MODEL. More...
 

Functions

 B2_EVTGEN_REGISTER_MODEL (EvtB0toKsKK)
 register the model in EvtGen
 
double s13_min (const double &s12, const double &M, const double &m1, const double &m2, const double &m3)
 minimum s13
 
double s13_max (const double &s12, const double &M, const double &m1, const double &m2, const double &m3)
 maximum s13
 
 B2_EVTGEN_REGISTER_MODEL (EvtBCL)
 register the model in EvtGen
 
 B2_EVTGEN_REGISTER_MODEL (EvtBSemiTauonic)
 register the model in EvtGen
 
 B2_EVTGEN_REGISTER_MODEL (EvtBSemiTauonic2HDMType2)
 register the model in EvtGen
 
 B2_EVTGEN_REGISTER_MODEL (EvtBtoXsnunu_FERMI)
 register the model in EvtGen
 
 B2_EVTGEN_REGISTER_MODEL (EvtEtaFullDalitz)
 register the model in EvtGen
 
 B2_EVTGEN_REGISTER_MODEL (EvtEtaPi0Dalitz)
 register the model in EvtGen
 
 B2_EVTGEN_REGISTER_MODEL (EvtEtaPrimeDalitz)
 register the model in EvtGen
 
 B2_EVTGEN_REGISTER_MODEL (EvtKnunu)
 register the model in EvtGen
 
 B2_EVTGEN_REGISTER_MODEL (EvtKstarnunu_REV)
 register the model in EvtGen
 
 B2_EVTGEN_REGISTER_MODEL (EvtPhspCP)
 register the model in EvtGen
 
 TEST_F (EvtBCLFFTest, Scalar)
 Test calculation of scalar BCL FF.
 
 TEST_F (EvtBCLFFTest, Vector)
 Test calculation of vector BCL FF.
 
 TEST_F (ParticleGunTest, MomentumDistributions)
 Tests momentum generation parameters.
 
 TEST_F (ParticleGunTest, VertexDistributions)
 Tests vertex generation parameters.
 
 TEST_F (ParticleGunTest, AngularDistributions)
 Tests angular generation parameters.
 
double sqrt (double a)
 sqrt for double
 
double tan (double a)
 tan for double
 
double atan (double a)
 atan for double
 
DualNumber operator+ (DualNumber a, DualNumber b)
 addition of dual numbers
 
DualNumber operator+ (DualNumber a, double b)
 addition of dual number and double
 
DualNumber operator- (DualNumber a, double b)
 subtraction of dual number and double
 
DualNumber operator- (double a, DualNumber b)
 subtraction of double and dual number
 
DualNumber operator/ (double a, DualNumber b)
 division of double and dual number
 
DualNumber operator/ (DualNumber a, DualNumber b)
 division of two dual numbers
 
DualNumber operator- (DualNumber a, DualNumber b)
 subtraction of two dual numbers
 
DualNumber operator* (DualNumber a, DualNumber b)
 multiplication of two dual numbers
 
DualNumber operator* (double a, DualNumber b)
 multiplication of double and dual number
 
DualNumber sqrt (DualNumber a)
 sqrt of dual number
 
DualNumber atan (DualNumber a)
 atan of dual number
 
DualNumber tan (DualNumber a)
 tan of dual number
 
template<typename T >
GeneralVector< T > operator+ (GeneralVector< T > a, GeneralVector< T > b)
 addition of two general vectors
 
template<typename T >
dot (GeneralVector< T > a, GeneralVector< T > b)
 dot product of two general vectors
 
template<typename T >
GeneralVector< T > operator* (T a, GeneralVector< T > b)
 product of scalar and general vector
 
template<typename T >
getEcms (GeneralVector< T > p1, GeneralVector< T > p2)
 get CMS energy from HER & LER momentum 3-vectors

 
template<typename T >
GeneralVector< T > getBoost (GeneralVector< T > p1, GeneralVector< T > p2)
 get boost vector from HER & LER momentum 3-vectors

 
template<typename T >
std::pair< T, T > getAnglesCMS (GeneralVector< T > p1, GeneralVector< T > p2)
 get collision axis angles in CM frame from HER & LER momentum 3-vectors

 
template<typename T >
GeneralVector< T > getFourVector (T energy, T angleX, T angleY, bool isHER)
 get 4-momentum from energy and angles of beam
 
Eigen::MatrixXd getGradientMatrix (double eH, double thXH, double thYH, double eL, double thXL, double thYL)
 get gradient matrix of (eH, thXH, thYH, eL, thXL, thYL) -> (eCMS, boostX, boostY, boostY, angleXZ, angleYZ) transformation
 
Eigen::VectorXd getCentralValues (double eH, double thXH, double thYH, double eL, double thXL, double thYL)
 get vector including (Ecms, boostX, boostY, boostZ, angleXZ, angleYZ) from beam energies and angles
 
Eigen::MatrixXd transformCov (const Eigen::MatrixXd &covHER, const Eigen::MatrixXd &covLER, const Eigen::MatrixXd &grad)
 transform covariance matrix to the variables (Ecms, boostX, boostY, boostZ, angleXZ, angleYZ)
 
double getTotalEnergy (const std::vector< ROOT::Math::PxPyPzMVector > &ps)
 Main function scaleParticleEnergies in this header scales momenta in CMS of all particles in the final state by a constant factor such that the overall collision energy is slightly changed. More...
 
double getScaleFactor (const std::vector< ROOT::Math::PxPyPzMVector > &ps, double EcmsTarget)
 Find approximative value of the momentum scaling factor which makes the total energy of the particles provided in the vector ps equal to EcmsTarget.
 
std::vector< ROOT::Math::PxPyPzMVector > scaleMomenta (const std::vector< ROOT::Math::PxPyPzMVector > &ps, double C)
 Scale momenta of the particles in the vector ps with a factor C. More...
 
void scaleParticleEnergies (MCParticleGraph &mpg, double EcmsTarget)
 Scale momenta of the particles by a constant factor such that total energy is changed to EcmsTarget. More...
 
static Eigen::MatrixXd toEigen (TMatrixDSym m)
 transform matrix from ROOT to Eigen format
 
void init ()
 Initializes the generator.
 
void generateEvent (MCParticleGraph &mcGraph)
 Generates one single event. More...
 
void term ()
 Terminates the generator. More...
 
std::string getName ()
 Get function Name

 
EvtDecayBase * clone ()
 Clone the decay of B0toKsKK.
 
void init ()
 Initialize standard stream objects

 
void initProbMax ()
 Initialize standard stream objects for probability function

 
void decay (EvtParticle *p)
 Member of particle in EvtGen.
 
EvtVector4R umu (const EvtVector4R &p4a, const EvtVector4R &p4b, const EvtVector4R &p4c)
 Function 4Vector umu.
 
EvtVector4R Smu (const EvtVector4R &p4a, const EvtVector4R &p4b, const EvtVector4R &p4c)
 Function 4Vector Smu.
 
EvtVector4R Lmu (const EvtVector4R &p4a, const EvtVector4R &p4b, const EvtVector4R &p4c)
 Function 4Vector Lmu.
 
EvtTensor4C gmunu_tilde (const EvtVector4R &p4a, const EvtVector4R &p4b, const EvtVector4R &p4c)
 Function Tensor gmunu

 
EvtTensor4C Tmunu (const EvtVector4R &p4a, const EvtVector4R &p4b, const EvtVector4R &p4c)
 Function Tensor Tmunu

 
EvtTensor4C Multiply (const EvtTensor4C &t1, const EvtTensor4C &t2)
 Function Tensor Multiply

 
EvtTensor4C RaiseIndices (const EvtTensor4C &t)
 Function RaiseIndices

 
void RaiseIndex (EvtVector4R &vector)
 Member function RaiseIndices.
 
EvtTensor4C Mmunu (const EvtVector4R &p4a, const EvtVector4R &p4b, const EvtVector4R &p4c)
 Function Tensor Mmunu.
 
double BWBF (const double &q, const unsigned int &L)
 Meson radius

 
double BWBF (const double &q, const double &q0, const unsigned int &L)
 Meson radius

 
EvtComplex BreitWigner (const double &m, const double &m0, const double &Gamma0, const double &q, const double &q0, const unsigned int &L)
 BreitWigner Shape.
 
EvtVector4R Boost (const EvtVector4R &p4, const EvtVector4R &boost)
 Parameter for boost frame

 
double p (const double &mab, const double &M, const double &mc)
 Constants p

 
double q (const double &mab, const double &ma, const double &mb)
 Constants q.
 
EvtComplex Flatte_k (const double &s, const double &m_h)
 Constant Flatte_k.
 
EvtComplex Flatte (const double &m, const double &m0)
 Constant Flatte.
 
EvtComplex A_f0ks (const EvtVector4R &p4ks, const EvtVector4R &p4kp, const EvtVector4R &p4km)
 A_f0ks is amplitude of f0.
 
EvtComplex A_phiks (const EvtVector4R &p4ks, const EvtVector4R &p4kp, const EvtVector4R &p4km)
 A_phiks is amplitude of phi.
 
EvtComplex A_fxks (const EvtVector4R &p4ks, const EvtVector4R &p4kp, const EvtVector4R &p4km)
 A_fxks is amplitude of fxks.
 
EvtComplex A_chic0ks (const EvtVector4R &p4ks, const EvtVector4R &p4kp, const EvtVector4R &p4km)
 A_chic0ks is amplitude of chic0ks.
 
EvtComplex A_kknr (const EvtVector4R &p4k1, const EvtVector4R &p4k2, const double &alpha_kk)
 A_kknr is amplitude of kknr.
 
 EvtBCL ()
 Default constructor.
 
virtual ~EvtBCL ()
 virtual destructor
 
std::string getName ()
 Returns name of module.
 
EvtDecayBase * clone ()
 Clones module.
 
void decay (EvtParticle *p)
 Creates a decay.
 
void initProbMax ()
 Sets maximal probab.
 
void init ()
 Initializes module.
 
 EvtBCLFF (int numarg, double *arglist)
 constructor
 
void getscalarff (EvtId parent, EvtId daughter, double t, double, double *fpf, double *f0f)
 Scalar FF's. More...
 
void getvectorff (EvtId parent, EvtId daughter, double t, double, double *a1f, double *a2f, double *vf, double *a0f)
 Vector FF's. More...
 
void gettensorff (EvtId parent, EvtId daughter, double t, double, double *hf, double *kf, double *bp, double *bm)
 Not Implemented.
 
void getbaryonff (EvtId, EvtId, double, double, double *, double *, double *, double *)
 Not Implemented.
 
void getdiracff (EvtId, EvtId, double, double, double *, double *, double *, double *, double *, double *)
 Not Implemented.
 
void getraritaff (EvtId, EvtId, double, double, double *, double *, double *, double *, double *, double *, double *, double *)
 Not Implemented.
 
 EvtBSemiTauonic ()
 The default constructor

 
virtual ~EvtBSemiTauonic ()
 The destructor

 
std::string getName ()
 The function returns the model name. More...
 
EvtDecayBase * clone ()
 The function makes a copy of an EvtBSTD object. More...
 
void decay (EvtParticle *p)
 The function evaluates the decay amplitude of the parent particle. More...
 
void initProbMax ()
 The function sets the maximum value of the probability.
 
void init ()
 The function initializes the decay. More...
 
 EvtBSemiTauonic2HDMType2 ()
 The default constructor

 
virtual ~EvtBSemiTauonic2HDMType2 ()
 The destructor

 
std::string getName ()
 The function returns the model name. More...
 
EvtDecayBase * clone ()
 The function makes a copy of an EvtBSemiTauonic2HDMType2 object. More...
 
void decay (EvtParticle *p)
 The function evaluates the decay amplitude of the parent particle. More...
 
void initProbMax ()
 The function sets the maximum value of the probability. More...
 
void init ()
 The function initializes the decay. More...
 
EvtSpinDensity RotateToHelicityBasisInBoostedFrame (const EvtParticle *p, EvtVector4R p4boost)
 The function calculates the rotation matrix to convert the spin basis to the helicity basis in the boosted frame. More...
 
double CalcMaxProb (EvtId parent, EvtId meson, EvtId lepton, EvtId nudaug, EvtBSemiTauonicHelicityAmplitudeCalculator *HelicityAmplitudeCalculator)
 The function calculates the maximum probability. More...
 
 EvtBSemiTauonicHelicityAmplitudeCalculator ()
 The default constructor. More...
 
 EvtBSemiTauonicHelicityAmplitudeCalculator (const double rho12, const double rhoA12, const double ffR11, const double ffR21, const double AS1, const double AR3, const double bottomMass, const double charmMass, const EvtComplex &CV1, const EvtComplex &CV2, const EvtComplex &CS1, const EvtComplex &CS2, const EvtComplex &CT, const double parentMass, const double DMass, const double DstarMass)
 The constructor with HQET form factor parameters, Wilson coefficients of new physics contributions and parent B, daughter D(*) meson masses. More...
 
EvtComplex helAmp (double mtau, int tauhel, int Dhel, double w, double costau) const
 The function calculates the helicity amplitude. More...
 
EvtComplex helAmp (const EvtComplex &CV1, const EvtComplex &CV2, const EvtComplex &CS1, const EvtComplex &CS2, const EvtComplex &CT, double mtau, int tauhel, int Dhel, double w, double costau) const
 The function calculates helicity amplitudes with given Wilson coefficients. More...
 
double Lep (const double mtau, int tauhel, int whel, double q2, double costau) const
 The function to calculate the Leptonic Amplitudes for B->D*taunu decay of the vector type contribution. More...
 
double Lep (const double mtau, int tauhel, double q2, double costau) const
 The function to calculate the Leptonic Amplitudes for B->Dtaunu decay of the scalar type contribution. More...
 
double Lep (const double mtau, int tauhel, int whel1, int whel2, double q2, double costau) const
 The function to calculate the Leptonic Amplitudes for B->D*taunu decay of the tensor type contribution. More...
 
double HadV1 (int Dhel, int whel, double w) const
 The function to calculate the Hadronic Amplitudes of left handed (V-A) type contribution. More...
 
double HadV2 (int Dhel, int whel, double w) const
 The function to calculate the Hadronic Amplitudes of right handed (V+A) type contribution. More...
 
double HadS1 (int Dhel, double w) const
 The function to calculate the Hadronic Amplitudes of scalar (S+P) type contribution. More...
 
double HadS2 (int Dhel, double w) const
 The function to calculate the Hadronic Amplitudes of scalar (S-P) type contribution. More...
 
double HadT (int Dhel, int whel1, int whel2, double w) const
 The function to calculate the Hadronic Amplitudes of tensor type contribution. More...
 
double helampSM (double mtau, int tauhel, int Dhel, double w, double costau) const
 Helicity Amplitudes of SM (left handed) contribution. More...
 
double helampV1 (double mtau, int tauhel, int Dhel, double w, double costau) const
 Helicity Amplitudes of left handed (V-A) contribution. More...
 
double helampV2 (double mtau, int tauhel, int Dhel, double w, double costau) const
 Helicity Amplitudes of right handed (V+A) contribution. More...
 
double helampS1 (double mtau, int tauhel, int Dhel, double w, double costau) const
 Helicity Amplitudes of scalar (S+P) type contribution. More...
 
double helampS2 (double mtau, int tauhel, int Dhel, double w, double costau) const
 Helicity Amplitudes of scalar (S-P) type contribution. More...
 
double helampT (double mtau, int tauhel, int Dhel, double w, double costau) const
 Helicity Amplitudes of tensor type contribution. More...
 
double hp (double w) const
 HQET D vector form factor h_+(w). More...
 
double hm (double w) const
 HQET D vector form factor h_-(w). More...
 
double hA1 (double w) const
 HQET D* axial vector form factor h_{A1}(w). More...
 
double hV (double w) const
 HQET D* axial vector form factor h_V(w). More...
 
double hA2 (double w) const
 HQET D* axial vector form factor h_{A2}(w). More...
 
double hA3 (double w) const
 HQET D* axial vector form factor h_{A3}(w). More...
 
double hS (double w) const
 D scalar form factor h_S(w) in terms of vector form factors. More...
 
double hP (double w) const
 D* pseudo scalar form factor h_P(w) in terms of axial vector form factors. More...
 
double hT (double w) const
 D tensor form factor h_T(w) in terms of vector form factors. More...
 
double hT1 (double w) const
 D* tensor form factor h_{T1}(w) in terms of axial vector form factors. More...
 
double hT2 (double w) const
 D* tensor form factor h_{T2}(w). More...
 
double hT3 (double w) const
 D* tensor form factor h_{T3}(w). More...
 
double z (double w) const
 CLN form factor z. More...
 
double ffV1 (double w) const
 CLN form factor V1. More...
 
double ffS1 (double w) const
 CLN form factor S1. More...
 
double ffA1 (double w) const
 CLN form factor A1. More...
 
double ffR1 (double w) const
 CLN form factor R1. More...
 
double ffR2 (double w) const
 CLN form factor R2. More...
 
double ffR3 (double w) const
 CLN form factor R3. More...
 
double dS1 (double w) const
 HQET correction factor for the scalar form factor for B->Dtaunu. More...
 
double dR3 (double w) const
 HQET correction factor for the scalar form factor for B->D*taunu. More...
 
double mD (int Dhel) const
 Daughter D(*) meson mass. More...
 
double v (double mtau, double q2) const
 Function to calculate the tau velocity. More...
 
double qh2 (int Dhel, double w) const
 Function to calculate the q^2 divided by the square of parent mass (m_B^2). More...
 
double q2 (int Dhel, double w) const
 Function to calculate the q^2 of the decay (square of l+nu invariant mass). More...
 
bool chkDhel (int Dhel) const
 sanity checkers More...
 
bool chkwhel (int whel) const
 Function to check if whel is in the valid range. More...
 
bool chktauhel (int tauhel) const
 Function to check if tauhel is in the valid range. More...
 
void CalcAmp (EvtParticle *parent, EvtAmp &amp, EvtBSemiTauonicHelicityAmplitudeCalculator *HelicityAmplitudeCalculator) override
 The function calculates the spin dependent amplitude. More...
 
void CalcAmp (EvtParticle *parent, EvtAmp &amp, EvtBSemiTauonicHelicityAmplitudeCalculator *HelicityAmplitudeCalculator) override
 The function calculates the spin dependent amplitude. More...
 
virtual ~EvtBtoXsnunu_FERMI ()
 Destructor.
 
std::string getName ()
 The function which returns the name of the model.
 
EvtDecayBase * clone ()
 The function which makes a copy of the model.
 
void decay (EvtParticle *p)
 The function to determine kinematics of daughter particles based on dGdsb distribution.
 
void initProbMax ()
 The function to sets a maximum probability. More...
 
void init ()
 The function for an initialization.
 
double dGdsbProb (double _sb)
 The function returns the probability density value depending on sb.
 
double FermiMomentum (double pf)
 The function returns a momentum of b quark. More...
 
double FermiMomentumProb (double pb, double pf)
 The function returns a probability based on the Fermi motion model. More...
 
virtual ~EvtEtaFullDalitz ()
 Default Destructor.
 
std::string getName ()
 Returns the model name: ETA_FULLDALITZ.
 
EvtDecayBase * clone ()
 Makes a copy of the pointer to the class.
 
void init ()
 Checks that the number of input parameters are correct: More...
 
void initProbMax ()
 Sets the Maximum probability for the PHSP reweight. More...
 
void decay (EvtParticle *p)
 Function that implements the energy-dependent Dalitz.
 
virtual ~EvtEtaPi0Dalitz ()
 Default destructor.
 
std::string getName ()
 Returns the name of the model: ETA_PI0DALITZ.
 
EvtDecayBase * clone ()
 Makes a copy of the class object.
 
void init ()
 Checks that the number of input parameters are correct: More...
 
void initProbMax ()
 Sets the Maximum probability for the PHSP reweight. More...
 
void decay (EvtParticle *p)
 Function that implements the energy-dependent Dalitz.
 
virtual ~EvtEtaPrimeDalitz ()
 Default destructor.
 
std::string getName ()
 Returns the model name: ETAPRIME_DALITZ.
 
EvtDecayBase * clone ()
 Returns a copy of the class object.
 
void init ()
 Checks that the number of input parameters are correct: More...
 
void initProbMax ()
 Sets the Maximum probability for the PHSP reweight. More...
 
void decay (EvtParticle *p)
 Function that implements the energy-dependent Dalitz.
 
virtual ~EvtKnunu ()
 Destructor.
 
std::string getName ()
 The function which returns the name of the model.
 
EvtDecayBase * clone ()
 The function which makes a copy of the model.
 
void decay (EvtParticle *p)
 The function to calculate a quark decay amplitude.
 
void init ()
 The function for an initialization.
 
void initProbMax ()
 The function to sets a maximum probability.
 
virtual ~EvtKstarnunu_REV ()
 Destructor.
 
std::string getName ()
 The function which returns the name of the model.
 
EvtDecayBase * clone ()
 The function which makes a copy of the model.
 
void decay (EvtParticle *p)
 The function to calculate a quark decay amplitude.
 
void init ()
 The function for an initialization.
 
void initProbMax ()
 The function to sets a maximum probability.
 
std::string getName ()
 Get function Name

 
EvtDecayBase * clone ()
 Clone the decay.
 
void init ()
 Initialize standard stream objects

 
void initProbMax ()
 Initialize standard stream objects for probability function

 
void decay (EvtParticle *p)
 Member of particle in EvtGen.
 
double dGammadwdcostau (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int tauhel, int Dhel, double w, double costau)
 Function calculates the differential decay rate dGamma/dw/dcostau. More...
 
double dGammadw (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int tauhel, int Dhel, double w)
 Function calculates the differential decay rate dGamma/dw, integrated for costau. More...
 
double dGammadcostau (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int tauhel, int Dhel, double costau)
 Function calculates the differential decay rate dGamma/dcostau, integrated for w. More...
 
double Gamma (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int tauhel, int Dhel)
 Function calculates the helicity dependent decay rate Gamma, integrated for w and costau. More...
 
double GammaD (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau)
 Function calculates the decay rate Gamma for Dtaunu decay, integrated for w and costau and summed for helicities. More...
 
double GammaDstar (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau)
 Function calculates the differential decay rate Gamma for D*taunu decay, integrated for w and costau and summed for helicities. More...
 
double GammaSMD (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mlep=0.0005110)
 Function calculates the SM decay rate Gamma for Dlnu decay, integrated for w and costau and summed for helicities. More...
 
double GammaSMDstar (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mlep=0.0005110)
 Function calculates the SM decay rate Gamma for D*lnu decay, integrated for w and costau and summed for helicities. More...
 
double RGammaD (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mtau, const double mlep=0.0005110)
 Function calculates the ratio of Br(B->Dtaunu)/Br(B->Dlnu), R(D). More...
 
double RGammaDstar (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mtau, const double mlep=0.0005110)
 Function calculates the ratio of Br(B->Dtaunu)/Br(B->Dlnu), R(D*). More...
 
double PtauD (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mtau)
 Function calculates the polarization of tau, (RH - LH)/(LH + RH), in B->Dtaunu decay. More...
 
double PtauDstar (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mtau)
 Function calculates the polarization of tau, (RH - LH)/(LH + RH), in B->D*taunu decay. More...
 
double PDstar (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, const double mtau)
 Function calculates the polarization of D*, longitudinal/(longitudinal + transverse), in B->D*taunu decay. More...
 
double pf (const EvtBSemiTauonicHelicityAmplitudeCalculator &BSTD, double mtau, int Dhel, double w)
 Phase space factor, which is multiplied to the helicity amplitude to calculate the decay rate. More...
 
double EvaluateByW (double *x, double *param)
 Function used internally for numerical integration.
 
double EvaluateByCostau (double *x, double *param)
 Function used internally for numerical integration.
 
double EvaluateBy2D (double *x, double *param)
 Function used internally for numerical integration.
 
static EvtGenModelRegistergetInstance ()
 Return reference to the instance. More...
 
static std::list< EvtDecayBase * > getModels ()
 Return a list of models. More...
 
void checkVariable (const std::string &name, const std::map< int, bool > &allowed, ParticleGun::EDistribution &dist, std::vector< double > &pars)
 check one of the variables given a list of allowed and excluded distributions
 
void initialize ()
 function to be executed on initialize()
 
ROOT::Math::XYZVector generateVertex (const ROOT::Math::XYZVector &initial, const TMatrixDSym &cov, MultivariateNormalGenerator &gen) const
 generate the vertex More...
 
TMatrixDSym adjustCovMatrix (TMatrixDSym cov) const
 adjust smearing covariance matrix based on the generation flags
 
ConditionalGaussGenerator initConditionalGenerator (const ROOT::Math::PxPyPzEVector &pHER, const ROOT::Math::PxPyPzEVector &pLER, const TMatrixDSym &covHER, const TMatrixDSym &covLER)
 Initialize the conditional generator using HER & LER 4-vectors and HER & LER covariance matrices describing spread.
 
ROOT::Math::PxPyPzEVector generateBeam (const ROOT::Math::PxPyPzEVector &initial, const TMatrixDSym &cov, MultivariateNormalGenerator &gen) const
 generate 4 vector for one beam More...
 
MCInitialParticlesgenerate ()
 Generate a new event.
 
MCInitialParticlesgenerate (int allowedFlags)
 Generate a new event wit a particular set of allowed flags. More...
 
ROOT::Math::XYZVector getVertexConditional ()
 Generate vertex position and possibly update the generator of Lorentz transformation.
 
ROOT::Math::XYZVector updateVertex (bool force=false)
 Update the vertex position: More...
 

Variables

static const double me = Const::electron.getMass()
 electron mass
 
static EvtGen * s_evtgen = nullptr
 pointer to the evtgen instance
 

Detailed Description

Macro Definition Documentation

◆ B2_EVTGEN_REGISTER_MODEL

#define B2_EVTGEN_REGISTER_MODEL (   classname)
Value:
namespace {\
Belle2::EvtGenModelRegister::Factory<classname> EvtGenModelFactory_##classname; \
}

Class to register B2_EVTGEN_REGISTER_MODEL.

Definition at line 75 of file EvtGenModelRegister.h.

Function Documentation

◆ CalcAmp() [1/2]

void CalcAmp ( EvtParticle *  parent,
EvtAmp &  amp,
EvtBSemiTauonicHelicityAmplitudeCalculator HelicityAmplitudeCalculator 
)
overridevirtual

The function calculates the spin dependent amplitude.

Parameters
parenta pointer to the parent particle.
ampa pointer to fill the calculated spin dependent amplitude.
HelicityAmplitudeCalculatora pointer to the calculator of the helicity dependent amplitude. The function calculate the spin dependent amplitude of the semi-tauonic decay to a scalar meson (D meson).

Implements EvtBSemiTauonicAmplitude.

Definition at line 25 of file EvtBSemiTauonicScalarMesonAmplitude.cc.

28  {
29 
30  static EvtId EM = EvtPDL::getId("e-");
31  static EvtId MUM = EvtPDL::getId("mu-");
32  static EvtId TAUM = EvtPDL::getId("tau-");
33 // static EvtId EP = EvtPDL::getId("e+");
34 // static EvtId MUP = EvtPDL::getId("mu+");
35 // static EvtId TAUP = EvtPDL::getId("tau+");
36 
37  // calculate w and costau
38 
39  EvtVector4R p4d = p->getDaug(0)->getP4();
40  EvtVector4R p4l = p->getDaug(1)->getP4();
41  EvtVector4R p4n = p->getDaug(2)->getP4();
42  EvtVector4R p4ln(p4l + p4n);
43 
44  EvtVector4R p4dln = boostTo(p4d, p4ln, true);
45  EvtVector4R p4lln = boostTo(p4l, p4ln, true);
46 
47  const double gmB = p->getP4().mass();
48  const double gmd = p4d.mass();
49  const double gr = gmd / gmB;
50 
51  const double q2 = (p4l + p4n).mass2();
52  const double w = (1. + gr * gr - q2 / gmB / gmB) / 2. / gr;
53  // const double w=CalcHelAmp->wfunc(2,q2); avoid possible w<0 caused by the decay width
54  const double costau = p4dln.dot(p4lln) / p4dln.d3mag() / p4lln.d3mag();
55  const double ml = p4l.mass();
56 
57  // obtain helicity amplitudes
58  EvtComplex helamp[2]; // tauhel={1,-1}
59  helamp[0] = CalcHelAmp->helAmp(ml, 1, 2, w, costau); // note the parameter order is tauhel, Dhel
60  helamp[1] = CalcHelAmp->helAmp(ml, -1, 2, w, costau); // Dhel=2 ==> D meson
61 
62  // lepton theta and phi in l+nu rest frame
63  //const double l_theta=acos(p4lln.get(3)/p4lln.d3mag());
64  //const double l_phi=atan2(p4lln.get(2),p4lln.get(1));
65 
66  // spin (in l rest frame) -> helicity (in l+nu rest frame) rotation matrix
67  // ( sp0->hel0 , sp1->hel0 )
68  // ( sp0->hel1 , sp1->hel1 )
69  EvtSpinDensity l_HelFromSp = RotateToHelicityBasisInBoostedFrame(p->getDaug(1),
70  p4ln);
71 // l_phi,
72 // l_theta,
73 // -l_phi);
74 
75  // helicity (in l+nu rest frame) -> spin (in l rest frame) rotation matrix
76  // ( hel0->sp0 , hel1->sp0 )
77  // ( hel0->sp1 , hel1->sp1 )
78  EvtComplex l_SpFromHel[2][2]; // {0,1} from {1,-1}
79  EvtId l_num = p->getDaug(1)->getId();
80 // if (l_num == EM || l_num == MUM || l_num == TAUM) {
81  l_SpFromHel[0][0] = conj(l_HelFromSp.get(0, 0));
82  l_SpFromHel[0][1] = conj(l_HelFromSp.get(1, 0));
83  l_SpFromHel[1][0] = conj(l_HelFromSp.get(0, 1));
84  l_SpFromHel[1][1] = conj(l_HelFromSp.get(1, 1));
85 // } else {
86 // l_SpFromHel[0][1] = conj(l_HelFromSp.get(0, 0));
87 // l_SpFromHel[0][0] = conj(l_HelFromSp.get(1, 0));
88 // l_SpFromHel[1][1] = conj(l_HelFromSp.get(0, 1));
89 // l_SpFromHel[1][0] = conj(l_HelFromSp.get(1, 1));
90 // }
91 
92  // calculate spin amplitudes
93  EvtComplex spinamp[2];
94 
95  for (int lsp = 0; lsp < 2; lsp++) {
96  for (int lhel = 0; lhel < 2; lhel++) {
97  // b -> l
98  if (l_num == EM || l_num == MUM || l_num == TAUM) {
99  spinamp[lsp] += l_SpFromHel[lsp][lhel] * helamp[lhel];
100  }
101  // b-bar -> anti-l
102  else {
103  spinamp[lsp] += l_SpFromHel[lsp][lhel] * (lhel == 0 ? +1 : -1) * conj(helamp[1 - lhel]);
104  }
105  }
106  }
107 
108  amp.vertex(0, spinamp[0]);
109  amp.vertex(1, spinamp[1]);
110 
111  // consistency check
112  double helprob = abs2(helamp[0]) + abs2(helamp[1]);
113  double spinprob = abs2(spinamp[0]) + abs2(spinamp[1]);
114  if (fabs(helprob - spinprob) / helprob > 1E-6 || !finite(helprob) || !finite(spinprob)) {
115  B2ERROR("EvtBSemiTauonicScalarMesonAmplitude total helicity prob does not match with total spin prob.");
116  B2ERROR("helprob: " << helprob << " spinprob: " << spinprob);
117  B2ERROR("w: " << w << " costau: " << costau << " hel probs: " << abs2(helamp[0])
118  << "\t" << abs2(helamp[1])
119  << "\t" << abs2(helamp[0]) + abs2(helamp[1]));
120 
121  B2ERROR("w: " << w << " costau: " << costau << " spin probs: " << abs2(spinamp[0])
122  << "\t" << abs2(spinamp[1])
123  << "\t" << abs2(spinamp[0]) + abs2(spinamp[1]));
124 
125 // EvtGenReport(EVTGEN_ERROR, "EvtGen") <<
126 // "EvtBSemiTauonicScalarMesonAmplitude total helicity prob does not match with total spin prob."
127 // << std::endl;
128 // EvtGenReport(EVTGEN_ERROR, "EvtGen") << "helprob: "<<helprob<<" spinprob: "<<spinprob<<std::endl;
129 // EvtGenReport(EVTGEN_ERROR, "EvtGen") << "w: "<<w<<" costau: "<<costau
130 // <<" hel probs: "<<abs2(helamp[0])
131 // <<"\t"<<abs2(helamp[1])
132 // <<"\t"<<abs2(helamp[0])+abs2(helamp[1])<<std::endl;
133 //
134 // EvtGenReport(EVTGEN_ERROR, "EvtGen") << "w: "<<w<<" costau: "<<costau
135 // <<" spin probs: "<<abs2(spinamp[0])
136 // <<"\t"<<abs2(spinamp[1])
137 // <<"\t"<<abs2(spinamp[0])+abs2(spinamp[1])<<std::endl;
138  // abort();
139  }
140 
141  return;
142  }
R E
internal precision of FFTW codelets
EvtSpinDensity RotateToHelicityBasisInBoostedFrame(const EvtParticle *p, EvtVector4R p4boost)
The function calculates the rotation matrix to convert the spin basis to the helicity basis in the bo...

◆ CalcAmp() [2/2]

void CalcAmp ( EvtParticle *  parent,
EvtAmp &  amp,
EvtBSemiTauonicHelicityAmplitudeCalculator HelicityAmplitudeCalculator 
)
overridevirtual

The function calculates the spin dependent amplitude.

Parameters
parenta pointer to the parent particle.
ampa pointer to fill the calculated spin dependent amplitude.
HelicityAmplitudeCalculatora pointer to the calculator of the helicity dependent amplitude. The function calculate the spin dependent amplitude of the semi-tauonic decay to a vector meson (D* meson).

Implements EvtBSemiTauonicAmplitude.

Definition at line 24 of file EvtBSemiTauonicVectorMesonAmplitude.cc.

27  {
28  static EvtId EM = EvtPDL::getId("e-");
29  static EvtId MUM = EvtPDL::getId("mu-");
30  static EvtId TAUM = EvtPDL::getId("tau-");
31 // static EvtId EP = EvtPDL::getId("e+");
32 // static EvtId MUP = EvtPDL::getId("mu+");
33 // static EvtId TAUP = EvtPDL::getId("tau+");
34 
35  // calculate w and costau
36 
37  EvtVector4R p4d = p->getDaug(0)->getP4();
38  EvtVector4R p4l = p->getDaug(1)->getP4();
39  EvtVector4R p4n = p->getDaug(2)->getP4();
40  EvtVector4R p4ln(p4l + p4n);
41 
42  EvtVector4R p4dln = boostTo(p4d, p4ln, true);
43  EvtVector4R p4lln = boostTo(p4l, p4ln, true);
44 
45  const double gmB = p->getP4().mass();
46  const double gmd = p4d.mass();
47  const double gr = gmd / gmB;
48 
49  const double q2 = (p4l + p4n).mass2();
50  const double w = (1. + gr * gr - q2 / gmB / gmB) / 2. / gr;
51  // const double w=CalcHelAmp->wfunc(1,q2); avoid w<1 caused by the D* width
52  const double costau = p4dln.dot(p4lln) / p4dln.d3mag() / p4lln.d3mag();
53  const double ml = p4l.mass();
54 
55  // Set D* mass from its momentum (to take into account fluctuation due to its width)
56  const double orig_mD = CalcHelAmp->getMDst();
57  CalcHelAmp->setMDst(gmd);
58 
59  // obtain helicity amplitudes
60  EvtComplex helamp[3][2]; // Dhel={1,0,-1}, tauhel={1,-1}
61  helamp[0][0] = CalcHelAmp->helAmp(ml, 1, 1, w, costau); // note the parameter order is tauhel, Dhel
62  helamp[0][1] = CalcHelAmp->helAmp(ml, -1, 1, w, costau);
63  helamp[1][0] = CalcHelAmp->helAmp(ml, 1, 0, w, costau);
64  helamp[1][1] = CalcHelAmp->helAmp(ml, -1, 0, w, costau);
65  helamp[2][0] = CalcHelAmp->helAmp(ml, 1, -1, w, costau);
66  helamp[2][1] = CalcHelAmp->helAmp(ml, -1, -1, w, costau);
67 
68  // lepton theta and phi in l+nu rest frame
69  // const double l_theta=acos(p4lln.get(3)/p4lln.d3mag());
70  // const double l_phi=atan2(p4lln.get(2),p4lln.get(1));
71 
72  // spin (in l rest frame) -> helicity (in l+nu rest frame) rotation matrix
73  // ( sp0->hel0 , sp1->hel0 )
74  // ( sp0->hel1 , sp1->hel1 )
75  EvtSpinDensity l_HelFromSp = RotateToHelicityBasisInBoostedFrame(p->getDaug(1),
76  p4ln);
77 // l_phi,
78 // l_theta,
79 // -l_phi);
80 
81  // helicity (in l+nu rest frame) -> spin (in l rest frame) rotation matrix
82  // ( hel0->sp0 , hel1->sp0 )
83  // ( hel0->sp1 , hel1->sp1 )
84  EvtComplex l_SpFromHel[2][2]; // {0,1} from {1,-1}
85  EvtId l_num = p->getDaug(1)->getId();
86 // if (l_num == EM || l_num == MUM || l_num == TAUM) {
87  l_SpFromHel[0][0] = conj(l_HelFromSp.get(0, 0));
88  l_SpFromHel[0][1] = conj(l_HelFromSp.get(1, 0));
89  l_SpFromHel[1][0] = conj(l_HelFromSp.get(0, 1));
90  l_SpFromHel[1][1] = conj(l_HelFromSp.get(1, 1));
91 // } else {
92 // l_SpFromHel[0][1] = conj(l_HelFromSp.get(0, 0));
93 // l_SpFromHel[0][0] = conj(l_HelFromSp.get(1, 0));
94 // l_SpFromHel[1][1] = conj(l_HelFromSp.get(0, 1));
95 // l_SpFromHel[1][0] = conj(l_HelFromSp.get(1, 1));
96 // }
97 
98  // meson spin state to helicity state
99  const double D_theta = acos(p4d.get(3) / p4d.d3mag());
100  const double D_phi = atan2(p4d.get(2), p4d.get(1));
101  EvtSpinDensity D_HelFromSp = p->getDaug(0)->rotateToHelicityBasis(D_phi, D_theta, -D_phi);
102 
103  EvtComplex D_SpFromHel[3][3]; // {0,1,2} from {1,0,-1}
104  D_SpFromHel[0][0] = conj(D_HelFromSp.get(0, 0));
105  D_SpFromHel[0][1] = conj(D_HelFromSp.get(1, 0));
106  D_SpFromHel[0][2] = conj(D_HelFromSp.get(2, 0));
107  D_SpFromHel[1][0] = conj(D_HelFromSp.get(0, 1));
108  D_SpFromHel[1][1] = conj(D_HelFromSp.get(1, 1));
109  D_SpFromHel[1][2] = conj(D_HelFromSp.get(2, 1));
110  D_SpFromHel[2][0] = conj(D_HelFromSp.get(0, 2));
111  D_SpFromHel[2][1] = conj(D_HelFromSp.get(1, 2));
112  D_SpFromHel[2][2] = conj(D_HelFromSp.get(2, 2));
113 
114  // calculate spin amplitudes
115  EvtComplex spinamp[3][2];
116 
117  for (int dsp = 0; dsp < 3; dsp++) {
118  for (int lsp = 0; lsp < 2; lsp++) {
119  for (int dhel = 0; dhel < 3; dhel++) {
120  for (int lhel = 0; lhel < 2; lhel++) {
121  // b -> l, D*+
122  if (l_num == EM || l_num == MUM || l_num == TAUM) {
123  spinamp[dsp][lsp] += l_SpFromHel[lsp][lhel] * D_SpFromHel[dsp][dhel] * helamp[dhel][lhel];
124  }
125  // b-bar -> anti-l, D*-
126  else {
127  spinamp[dsp][lsp] += l_SpFromHel[lsp][lhel] * D_SpFromHel[dsp][dhel] * (lhel == 0 ? +1 : -1) * (dhel == 1 ? +1 : -1)
128  * conj(helamp[2 - dhel][1 - lhel]);
129  }
130  }
131  }
132  }
133  }
134 
135  amp.vertex(0, 0, spinamp[0][0]);
136  amp.vertex(0, 1, spinamp[0][1]);
137  amp.vertex(1, 0, spinamp[1][0]);
138  amp.vertex(1, 1, spinamp[1][1]);
139  amp.vertex(2, 0, spinamp[2][0]);
140  amp.vertex(2, 1, spinamp[2][1]);
141 
142  // Set D* mass to its original value
143  CalcHelAmp->setMDst(orig_mD);
144 
145  // consistency check
146  double helprob = abs2(helamp[0][0]) + abs2(helamp[0][1]) + abs2(helamp[1][0]) + abs2(helamp[1][1]) + abs2(helamp[2][0])
147  + abs2(helamp[2][1]);
148  double spinprob = abs2(spinamp[0][0]) + abs2(spinamp[0][1]) + abs2(spinamp[1][0]) + abs2(spinamp[1][1])
149  + abs2(spinamp[2][0]) + abs2(spinamp[2][1]);
150  if (fabs(helprob - spinprob) / helprob > 1E-6 || !finite(helprob) || !finite(spinprob)) {
151  B2ERROR("EvtBSemiTauonicVectorMesonAmplitude total helicity prob does not match with total spin prob, or nan.");
152  B2ERROR("helprob: " << helprob << " spinprob: " << spinprob);
153  B2ERROR("w: " << w << " costau: " << costau << " hel probs: "
154  << abs2(helamp[0][0]) << "\t" << abs2(helamp[0][1]) << "\t"
155  << abs2(helamp[1][0]) << "\t" << abs2(helamp[1][1]) << "\t"
156  << abs2(helamp[2][0]) << "\t" << abs2(helamp[2][1]) << "\t"
157  << abs2(helamp[0][0]) + abs2(helamp[0][1]) + abs2(helamp[1][0]) + abs2(helamp[1][1]) + abs2(helamp[2][0]) + abs2(helamp[2][1])
158  );
159 
160  B2ERROR("w: " << w << " costau: " << costau << " spin probs: "
161  << abs2(spinamp[0][0]) << "\t" << abs2(spinamp[0][1]) << "\t"
162  << abs2(spinamp[1][0]) << "\t" << abs2(spinamp[1][1]) << "\t"
163  << abs2(spinamp[2][0]) << "\t" << abs2(spinamp[2][1]) << "\t"
164  << abs2(spinamp[0][0]) + abs2(spinamp[0][1]) + abs2(spinamp[1][0]) + abs2(spinamp[1][1]) + abs2(spinamp[2][0]) + abs2(spinamp[2][1])
165  );
166 
167 // EvtGenReport(EVTGEN_ERROR, "EvtGen") <<
168 // "EvtBSemiTauonicVectorMesonAmplitude total helicity prob does not match with total spin prob, or nan."
169 // << std::endl;
170 // EvtGenReport(EVTGEN_ERROR, "EvtGen") "helprob: "<<helprob<<" spinprob: "<<spinprob<< std::endl;
171 // EvtGenReport(EVTGEN_ERROR, "EvtGen") "w: "<<w<<" costau: "<<costau<<" hel probs: "
172 // <<abs2(helamp[0][0])<<"\t"<<abs2(helamp[0][1])<<"\t"
173 // <<abs2(helamp[1][0])<<"\t"<<abs2(helamp[1][1])<<"\t"
174 // <<abs2(helamp[2][0])<<"\t"<<abs2(helamp[2][1])<<"\t"
175 // <<abs2(helamp[0][0]) + abs2(helamp[0][1]) + abs2(helamp[1][0]) + abs2(helamp[1][1]) + abs2(helamp[2][0]) + abs2(helamp[2][1])
176 // <<std::endl;
177 //
178 // EvtGenReport(EVTGEN_ERROR, "EvtGen") "w: "<<w<<" costau: "<<costau<<" spin probs: "
179 // <<abs2(spinamp[0][0])<<"\t"<<abs2(spinamp[0][1])<<"\t"
180 // <<abs2(spinamp[1][0])<<"\t"<<abs2(spinamp[1][1])<<"\t"
181 // <<abs2(spinamp[2][0])<<"\t"<<abs2(spinamp[2][1])<<"\t"
182 // <<abs2(spinamp[0][0]) + abs2(spinamp[0][1]) + abs2(spinamp[1][0]) + abs2(spinamp[1][1]) + abs2(spinamp[2][0]) + abs2(spinamp[2][1])
183 // <<std::endl;
184 
185  // Debugging information
186 // fprintf(stderr, "q2 by Helamp: %g\n", CalcHelAmp->q2(1, w));
187 // fprintf(stderr, "helampSM by Helamp: %g\n", CalcHelAmp->helampSM(ml, 1, 1, w, costau));
188 // fprintf(stderr, "Lep by Helamp: %g\n", CalcHelAmp->Lep(ml, 1, 1, CalcHelAmp->q2(1, w), costau));
189 // fprintf(stderr, "HadV2 by Helamp: %g\n", CalcHelAmp->HadV2(1, 1, w));
190 // fprintf(stderr, "v by Helamp: %g\n", CalcHelAmp->v(ml, CalcHelAmp->v(ml, CalcHelAmp->q2(1, w))));
191 //
192 // fprintf(stderr, "B mass : %g \t nominal %g\n", gmB, EvtPDL::getMeanMass(p->getId()));
193 // fprintf(stderr, "D mass : %g \t nominal %g\n", gmd, EvtPDL::getMeanMass(p->getDaug(0)->getId()));
194 // fprintf(stderr, "lepton mass : %g \t nominal %g\n", ml, EvtPDL::getMeanMass(p->getDaug(1)->getId()));
195 
196  // abort();
197  }
198 
199  return;
200  }

◆ CalcMaxProb()

double CalcMaxProb ( EvtId  parent,
EvtId  meson,
EvtId  lepton,
EvtId  nudaug,
EvtBSemiTauonicHelicityAmplitudeCalculator HelicityAmplitudeCalculator 
)

The function calculates the maximum probability.

Parameters
parenta ID of the parent meson.
mesona ID of the daughter meson.
leptona ID of the daughter lepton.
nudauga ID of the daughter neutrino.
HelicityAmplitudeCalculatora pointer to the calculator of the helicity dependent amplitude.
Returns
the maxmum probability multiplied by 1.1. The function scan the q^2 and angle between the daughter meson and lepton and search for the the maximum probability value.

Definition at line 77 of file EvtBSemiTauonicAmplitude.cc.

80  {
81  //This routine takes the arguements parent, meson, and lepton
82  //number, and a form factor model, and returns a maximum
83  //probability for this semileptonic form factor model. A
84  //brute force method is used. The 2D cos theta lepton and
85  //q2 phase space is probed.
86 
87  //Start by declaring a particle at rest.
88 
89  //It only makes sense to have a scalar parent. For now.
90  //This should be generalized later.
91 
92  EvtScalarParticle* scalar_part;
93  EvtParticle* root_part;
94 
95  scalar_part = new EvtScalarParticle;
96 
97  //cludge to avoid generating random numbers!
98  scalar_part->noLifeTime();
99 
100  EvtVector4R p_init;
101 
102  p_init.set(EvtPDL::getMass(parent), 0.0, 0.0, 0.0);
103  scalar_part->init(parent, p_init);
104  //root_part = (EvtParticle*)scalar_part;
105  root_part = static_cast<EvtParticle*>(scalar_part);
106 
107  root_part->setDiagonalSpinDensity();
108 
109  EvtParticle* daughter, *lep, *trino;
110 
111  EvtAmp amp;
112 
113  EvtId listdaug[3];
114  listdaug[0] = meson;
115  listdaug[1] = lepton;
116  listdaug[2] = nudaug;
117 
118  amp.init(parent, 3, listdaug);
119 
120  root_part->makeDaughters(3, listdaug);
121  daughter = root_part->getDaug(0);
122  lep = root_part->getDaug(1);
123  trino = root_part->getDaug(2);
124 
125  //cludge to avoid generating random numbers!
126  daughter->noLifeTime();
127  lep->noLifeTime();
128  trino->noLifeTime();
129 
130 
131  //Initial particle is unpolarized, well it is a scalar so it is
132  //trivial
133  EvtSpinDensity rho;
134  rho.setDiag(root_part->getSpinStates());
135 
136  double mass[3];
137 
138  double m = root_part->mass();
139 
140  EvtVector4R p4meson, p4lepton, p4nu, p4w;
141 
142  double q2, elepton, plepton;
143  int i, j;
144  double erho, prho, costl;
145 
146  double maxfoundprob = 0.0;
147  double prob;
148  int massiter;
149 
150  for (massiter = 0; massiter < 3; massiter++) {
151 
152  mass[0] = EvtPDL::getMeanMass(meson);
153  mass[1] = EvtPDL::getMeanMass(lepton);
154  mass[2] = EvtPDL::getMeanMass(nudaug);
155  if (massiter == 1) {
156  mass[0] = EvtPDL::getMinMass(meson);
157  }
158  if (massiter == 2) {
159  mass[0] = EvtPDL::getMaxMass(meson);
160  if ((mass[0] + mass[1] + mass[2]) > m) mass[0] = m - mass[1] - mass[2] - 0.00001;
161  }
162 
163  double q2min = mass[1] * mass[1]; // limit to minimum=lepton mass square
164  double q2max = (m - mass[0]) * (m - mass[0]);
165  double dq2 = (q2max - q2min) / 25;
166 // std::cout<<"m: "<<m<<" mass[0]: "<<mass[0]<<" q2min: "<<q2min<<" q2max: "<<q2max<<std::endl;
167 
168  //loop over q2
169 
170  for (i = 0; i < 25; i++) {
171  q2 = q2min + (i + 0.5) * dq2; // <-- !! not start from unphysical q2=0 !!
172 
173  erho = (m * m + mass[0] * mass[0] - q2) / (2.0 * m);
174 
175  prho = sqrt(erho * erho - mass[0] * mass[0]);
176 
177  p4meson.set(erho, 0.0, 0.0, -1.0 * prho);
178  p4w.set(m - erho, 0.0, 0.0, prho);
179 
180 // std::cout<<"q2: "<<q2<<std::endl;
181 // std::cout<<"p4meson: "<<p4meson<<std::endl;
182 
183  //This is in the W rest frame
184  elepton = (q2 + mass[1] * mass[1]) / (2.0 * sqrt(q2));
185  plepton = sqrt(elepton * elepton - mass[1] * mass[1]);
186 // std::cout<<"elepton: "<<elepton<<" plepton: "<<plepton<<std::endl;
187 
188  double probctl[3];
189 
190  for (j = 0; j < 3; j++) {
191 
192  costl = 0.99 * (j - 1.0);
193 
194  //These are in the W rest frame. Need to boost out into
195  //the B frame.
196  p4lepton.set(elepton, 0.0,
197  plepton * sqrt(1.0 - costl * costl), plepton * costl);
198  p4nu.set(plepton, 0.0,
199  -1.0 * plepton * sqrt(1.0 - costl * costl), -1.0 * plepton * costl);
200 
201  EvtVector4R boost((m - erho), 0.0, 0.0, 1.0 * prho);
202  p4lepton = boostTo(p4lepton, boost);
203  p4nu = boostTo(p4nu, boost);
204 
205  //Now initialize the daughters...
206 
207  daughter->init(meson, p4meson);
208  lep->init(lepton, p4lepton);
209  trino->init(nudaug, p4nu);
210 
211  CalcAmp(root_part, amp, CalcHelAmp);
212 
213  //Now find the probability at this q2 and cos theta lepton point
214  //and compare to maxfoundprob.
215 
216  //Do a little magic to get the probability!!
217  prob = rho.normalizedProb(amp.getSpinDensity());
218 
219  probctl[j] = prob;
220  }
221 
222  //probclt contains prob at ctl=-1,0,1.
223  //prob=a+b*ctl+c*ctl^2
224 
225  double a = probctl[1];
226  double b = 0.5 * (probctl[2] - probctl[0]);
227  double c = 0.5 * (probctl[2] + probctl[0]) - probctl[1];
228 
229  prob = probctl[0];
230  if (probctl[1] > prob) prob = probctl[1];
231  if (probctl[2] > prob) prob = probctl[2];
232 
233  if (fabs(c) > 1e-20) {
234  double ctlx = -0.5 * b / c;
235  if (fabs(ctlx) < 1.0) {
236  double probtmp = a + b * ctlx + c * ctlx * ctlx;
237  if (probtmp > prob) prob = probtmp;
238  }
239 
240  }
241 
242  if (prob > maxfoundprob) {
243  maxfoundprob = prob;
244  }
245 
246  }
247  if (EvtPDL::getWidth(meson) <= 0.0) {
248  //if the particle is narrow dont bother with changing the mass.
249  massiter = 4;
250  }
251 
252  }
253  root_part->deleteTree();
254 
255  maxfoundprob *= 1.1;
256  return maxfoundprob;
257 
258  }
virtual void CalcAmp(EvtParticle *parent, EvtAmp &amp, EvtBSemiTauonicHelicityAmplitudeCalculator *HelicityAmplitudeCalculator)=0
The function calculates the spin dependent amplitude.
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

◆ chkDhel()

bool chkDhel ( int  Dhel) const
private

sanity checkers

Function to check if Dhel is in the valid range.

Parameters
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.

Definition at line 527 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

528  {
529  if (Dhel == -1 || Dhel == 0 || Dhel == 1 || Dhel == 2)return true;
530  else return false;
531  }

◆ chktauhel()

bool chktauhel ( int  tauhel) const
private

Function to check if tauhel is in the valid range.

Parameters
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.

Definition at line 539 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ chkwhel()

bool chkwhel ( int  whel) const
private

Function to check if whel is in the valid range.

Parameters
whelhelicity of the virtual vector boson {+1,0,1,2}.

Definition at line 533 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ clone() [1/2]

EvtDecayBase * clone ( )

The function makes a copy of an EvtBSTD object.

Returns
a pointer to a new uninitialized EvtBSemiTauonic object

Definition at line 47 of file EvtBSemiTauonic.cc.

48  {
49  return new EvtBSemiTauonic;
50  }
EvtBSemiTauonic()
The default constructor

◆ clone() [2/2]

EvtDecayBase * clone ( )

The function makes a copy of an EvtBSemiTauonic2HDMType2 object.

Returns
a pointer to a new uninitialized EvtBSemiTauonic2HDMType2 object

Definition at line 47 of file EvtBSemiTauonic2HDMType2.cc.

48  {
49  return new EvtBSemiTauonic2HDMType2;
50  }
EvtBSemiTauonic2HDMType2()
The default constructor

◆ decay() [1/2]

void decay ( EvtParticle *  p)

The function evaluates the decay amplitude of the parent particle.

Parameters
pa pointer to the parent particle

Definition at line 53 of file EvtBSemiTauonic.cc.

◆ decay() [2/2]

void decay ( EvtParticle *  p)

The function evaluates the decay amplitude of the parent particle.

a pointer to the parent particle

Definition at line 53 of file EvtBSemiTauonic2HDMType2.cc.

◆ dGammadcostau()

double dGammadcostau ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
double  mtau,
int  tauhel,
int  Dhel,
double  costau 
)

Function calculates the differential decay rate dGamma/dcostau, integrated for w.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame. Note that overall factor (GF/sqrt(2) Vcb)^2 is omitted.

Definition at line 59 of file EvtBSemiTauonicDecayRateCalculator.cc.

61  {
62  m_BSTD = &BSTD;
63  TF1 f1("f1", this, &EvtBSemiTauonicDecayRateCalculator::EvaluateByW, BSTD.wmin(), BSTD.wmax(mtau, Dhel), 4,
64  "EvtBSemiTauonicDecayRateCalculator", "EvaluateByW");
65  f1.SetParameter(0, mtau);
66  f1.SetParameter(1, tauhel);
67  f1.SetParameter(2, Dhel);
68  f1.SetParameter(3, costau);
69  ROOT::Math::WrappedTF1 wf1(f1);
70 // ROOT::Math::GSLIntegrator ig;
71  ROOT::Math::GaussIntegrator ig;
72  ig.SetFunction(wf1);
73  return ig.Integral(BSTD.wmin(), BSTD.wmax(mtau, Dhel));
74  }
const EvtBSemiTauonicHelicityAmplitudeCalculator * m_BSTD
temporal pointer to the helicity amplitude calculator for EvaluateBy* functions
double EvaluateByW(double *x, double *param)
Function used internally for numerical integration.

◆ dGammadw()

double dGammadw ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
double  mtau,
int  tauhel,
int  Dhel,
double  w 
)

Function calculates the differential decay rate dGamma/dw, integrated for costau.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable. Note that overall factor (GF/sqrt(2) Vcb)^2 is omitted.

Definition at line 41 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ dGammadwdcostau()

double dGammadwdcostau ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
double  mtau,
int  tauhel,
int  Dhel,
double  w,
double  costau 
)

Function calculates the differential decay rate dGamma/dw/dcostau.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame. Note that overall factor (GF/sqrt(2) Vcb)^2 is omitted.

Definition at line 31 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ dR3()

double dR3 ( double  w) const

HQET correction factor for the scalar form factor for B->D*taunu.

Parameters
wvelocity transfer variable.
Returns
calculated factor.

Definition at line 493 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ dS1()

double dS1 ( double  w) const

HQET correction factor for the scalar form factor for B->Dtaunu.

Parameters
wvelocity transfer variable.
Returns
calculated factor.

Definition at line 488 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ EvtBSemiTauonicHelicityAmplitudeCalculator() [1/2]

The default constructor.

Initializes with the default parameter values used by the aurhos of PRD87,034028.

Definition at line 21 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ EvtBSemiTauonicHelicityAmplitudeCalculator() [2/2]

EvtBSemiTauonicHelicityAmplitudeCalculator ( const double  rho12,
const double  rhoA12,
const double  ffR11,
const double  ffR21,
const double  AS1,
const double  AR3,
const double  bottomMass,
const double  charmMass,
const EvtComplex &  CV1,
const EvtComplex &  CV2,
const EvtComplex &  CS1,
const EvtComplex &  CS2,
const EvtComplex &  CT,
const double  parentMass,
const double  DMass,
const double  DstarMass 
)

The constructor with HQET form factor parameters, Wilson coefficients of new physics contributions and parent B, daughter D(*) meson masses.

Parameters
rho12HQET form factor parameter rho_1^2 obtained by Dlnu decay data.
rhoA12HQET form factor parameter rho_A1^2 obtained by D*lnu decay data.
ffR11HQET form factor parameter R_1(1) obtained by D*lnu decay data.
ffR21HQET form factor parameter R_2(1) obtained by D*lnu decay data.
AS1a parameter to take into account the theoretical error of the scalar form factor for Dtaunu decay.
AR3a parameter to take into account the theoretical error of the scalar form factor for D*taunu decay.
CV1Wilson coeffcient of the left handed vector type NP contribution.
CV2Wilson coeffcient of the right handed vector type NP contribution.
CS1Wilson coeffcient of the scalar (S+P) type NP contribution.
CS2Wilson coeffcient of the scalar (S-P) type NP contribution.
CTWilson coeffcient of the tensor type NP contribution.
parentMassmass of the parent (B) meson.
DMassmass of the scalar type daughter (D) meson.
DstarMassmass of the vector type daughter (D*) meson.
bottomMassmass of the bottom quark mass (running mass at the energy of bottom quark mass)
charmMassmass of the charm quark mass (running mass at the energy of bottom quark mass) The constructor initializes the parameters of the decay. The recommended values of AS1 and AR3 by authors of PRD87,034028 are 1+/-1.

Definition at line 59 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ FermiMomentum()

double FermiMomentum ( double  pf)

The function returns a momentum of b quark.

The distribution of the momentum is based on the Fermi motion model.

Definition at line 310 of file EvtBtoXsnunu_FERMI.cc.

311  {
312  // Pick a value for the b-quark Fermi motion momentum
313  // according to Ali's Gaussian model
314 
315  // reference: Ali, Ahmed, et al. "Power corrections in the decay rate and distributions in B->Xs l+l- 2 in the standard model"
316  // see (eq.57)
317 
318  double pb, pbmax;
319  pb = 0.0;
320  pbmax = 5.0 * pf;
321 
322  while (pb == 0.0) {
323  double xbox = EvtRandom::Flat(pbmax);
324  double ybox = EvtRandom::Flat();
325  if (ybox < FermiMomentumProb(xbox, pf)) { pb = xbox; }
326  }
327 
328  return pb;
329  }
double FermiMomentumProb(double pb, double pf)
The function returns a probability based on the Fermi motion model.

◆ FermiMomentumProb()

double FermiMomentumProb ( double  pb,
double  pf 
)

The function returns a probability based on the Fermi motion model.

reference: Ali, Ahmed, et al. "Power corrections in the decay rate and distributions in B->Xs l+l- 2 in the standard model" see (eq.57)

Parameters
pbmomentum of the b quark
pfmomentum width parameter in the Fermi motion model

Definition at line 331 of file EvtBtoXsnunu_FERMI.cc.

◆ ffA1()

double ffA1 ( double  w) const

CLN form factor A1.

Parameters
wvelocity transfer variable.
Returns
calculated form factor value.

Definition at line 466 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ ffR1()

double ffR1 ( double  w) const

CLN form factor R1.

Parameters
wvelocity transfer variable.
Returns
calculated form factor value.

Definition at line 473 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ ffR2()

double ffR2 ( double  w) const

CLN form factor R2.

Parameters
wvelocity transfer variable.
Returns
calculated form factor value.

Definition at line 478 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ ffR3()

double ffR3 ( double  w) const

CLN form factor R3.

Parameters
wvelocity transfer variable.
Returns
calculated form factor value.

Definition at line 483 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ ffS1()

double ffS1 ( double  w) const

CLN form factor S1.

Parameters
wvelocity transfer variable.
Returns
calculated form factor value.

Definition at line 461 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ ffV1()

double ffV1 ( double  w) const

CLN form factor V1.

Parameters
wvelocity transfer variable.
Returns
calculated form factor value.

Definition at line 454 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ Gamma()

double Gamma ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
double  mtau,
int  tauhel,
int  Dhel 
)

Function calculates the helicity dependent decay rate Gamma, integrated for w and costau.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D. Note that overall factor (GF/sqrt(2) Vcb)^2 is omitted.

Definition at line 77 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ GammaD()

double GammaD ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
double  mtau 
)

Function calculates the decay rate Gamma for Dtaunu decay, integrated for w and costau and summed for helicities.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter lepton mass. Note that overall factor (GF/sqrt(2) Vcb)^2 is omitted.

Definition at line 98 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ GammaDstar()

double GammaDstar ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
double  mtau 
)

Function calculates the differential decay rate Gamma for D*taunu decay, integrated for w and costau and summed for helicities.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter lepton mass. Note that overall factor (GF/sqrt(2) Vcb)^2 is omitted.

Definition at line 106 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ GammaSMD()

double GammaSMD ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
const double  mlep = 0.0005110 
)

Function calculates the SM decay rate Gamma for Dlnu decay, integrated for w and costau and summed for helicities.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mlepdaughter lepton mass (default is the electron mass). Note that overall factor (GF/sqrt(2) Vcb)^2 is omitted.

Definition at line 117 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ GammaSMDstar()

double GammaSMDstar ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
const double  mlep = 0.0005110 
)

Function calculates the SM decay rate Gamma for D*lnu decay, integrated for w and costau and summed for helicities.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mlepdaughter lepton mass (default is the electron mass). Note that overall factor (GF/sqrt(2) Vcb)^2 is omitted.

Definition at line 132 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ generate()

MCInitialParticles & generate ( int  allowedFlags)
private

Generate a new event wit a particular set of allowed flags.

Parameters
[in]allowedFlagsAllowed flags.

Definition at line 145 of file InitialParticleGeneration.cc.

146  {
147  if (!m_event) {
148  m_event.create();
149  }
150  if (!m_beamParams.isValid()) {
151  B2FATAL("Cannot generate beam without valid BeamParameters");
152  }
153  if (m_beamParams.hasChanged()) {
157  }
158  m_event->setGenerationFlags(m_beamParams->getGenerationFlags() & allowedFlags);
159  ROOT::Math::PxPyPzEVector her = generateBeam(m_beamParams->getHER(), m_beamParams->getCovHER(), m_generateHER);
160  ROOT::Math::PxPyPzEVector ler = generateBeam(m_beamParams->getLER(), m_beamParams->getCovLER(), m_generateLER);
161  ROOT::Math::XYZVector vtx = generateVertex(m_beamParams->getVertex(), m_beamParams->getCovVertex(), m_generateVertex);
162  m_event->set(her, ler, vtx);
163  //Check if we want to go to CMS, if so boost both
164  if (m_beamParams->hasGenerationFlags(BeamParameters::c_generateCMS)) {
165  m_event->setGenerationFlags(0);
166  her = m_event->getLabToCMS() * her;
167  ler = m_event->getLabToCMS() * ler;
168  m_event->set(her, ler, vtx);
169  m_event->setGenerationFlags(m_beamParams->getGenerationFlags() & allowedFlags);
170  }
171  return *m_event;
172  }
DBObjPtr< BeamParameters > m_beamParams
Datastore object containing the nominal beam parameters.
MultivariateNormalGenerator m_generateHER
Generator for HER.
StoreObjPtr< MCInitialParticles > m_event
Datastore object containing the generated event.
MultivariateNormalGenerator m_generateLER
Generator for LER.
MultivariateNormalGenerator m_generateVertex
Generator for Vertex.
@ c_generateCMS
generate initial event in CMS instead of lab
void reset()
reset the generator setting the size to 0.
ROOT::Math::XYZVector generateVertex(const ROOT::Math::XYZVector &initial, const TMatrixDSym &cov, MultivariateNormalGenerator &gen) const
generate the vertex
ROOT::Math::PxPyPzEVector generateBeam(const ROOT::Math::PxPyPzEVector &initial, const TMatrixDSym &cov, MultivariateNormalGenerator &gen) const
generate 4 vector for one beam

◆ generateBeam()

ROOT::Math::PxPyPzEVector generateBeam ( const ROOT::Math::PxPyPzEVector &  initial,
const TMatrixDSym &  cov,
MultivariateNormalGenerator gen 
) const
private

generate 4 vector for one beam

Parameters
initialbeam
covcovariance of the beam momentum (E, theta_x, theta_y)
genmultivariate normal generator to be used

Definition at line 101 of file InitialParticleGeneration.cc.

◆ generateEvent()

void generateEvent ( MCParticleGraph mcGraph)

Generates one single event.

Parameters
mcGraphReference to the MonteCarlo graph into which the generated particles will be stored.

Definition at line 105 of file CRY.cc.

106  {
107  bool eventInAcceptance = 0;
108  static std::vector<CRYParticle*> ev;
109 
110  //force at least particle in acceptance box
111  for (int iTrial = 0; iTrial < m_maxTrials; ++iTrial) {
112  m_totalTrials++;
113  // Generate one event
114  ev.clear();
115  m_cryGenerator->genEvent(&ev);
116  // check all particles
117  for (auto* p : ev) {
118  const int pdg = p->PDGid();
119  const double kineticEnergy = p->ke() * Unit::MeV;
120  if (kineticEnergy < m_kineticEnergyThreshold) continue;
121 
122  const double mass = TDatabasePDG::Instance()->GetParticle(pdg)->Mass();
123  const double etot = kineticEnergy + mass;
124  // since etot is at least mass this cannot be negative
125  const double ptot = sqrt(etot * etot - mass * mass);
126 
127  // Momentum
128  // We have x horizontal, y up and z along the beam. So uvw -> zxy, xc yc zc -> zxy
129  const double px = ptot * p->v();
130  const double py = ptot * p->w();
131  const double pz = ptot * p->u();
132  // Vertex
133  const double vx = p->y() * Unit::m;
134  const double vy = p->z() * Unit::m;
135  const double vz = p->x() * Unit::m;
136 
137  // Time
138  /* In basf2, it is assumed that t = 0 when an event was produced,
139  For the cosmic case, we set t = 0 when particle cross y=0 plane;
140  The output time from CRY (p->t()) is too large (order of second) and also
141  increase as simulated time, so it is impossible to handle in basf2.
142  For event which has more then one particle, the difference between their production
143  times is also too large (> micro-second) to keep in basf2, so the time relation
144  between particles in each event is also reset. Production of each particle in event is set t=0 at y=0.
145  if one need production from CRY for a special study, you have to find a way to handle it...*/
146  double time = 0;
147 
148  vecgeom::Vector3D<double> pos(vx, vy, vz);
149  vecgeom::LorentzVector<double> mom(px, py, pz, etot);
150  const double speed = (mass == 0 ? 1 : mom.Beta()) * Const::speedOfLight;
151 
152  // Project on the boundary of the world box
153  auto inside = m_world->Inside(pos);
154  if (inside == vecgeom::kInside) {
155  // inside the world volume, go backwards in time to the world box
156  const auto dir = -mom.vect().Unit();
157  double dist = m_world->DistanceToOut(pos, dir);
158  pos += dist * dir;
159  time -= dist / speed;
160  } else if (inside == vecgeom::kOutside) {
161  // outside the world volume, go forwards in time to the world box
162  // this should not happen but better safe then sorry ...
163  const auto dir = mom.vect().Unit();
164  double dist = m_world->DistanceToIn(pos, dir);
165  if (dist == vecgeom::InfinityLength<double>()) continue;
166  pos += dist * dir;
167  time += dist / speed;
168  }
169  // Intersect with the acceptance box
170  double dist = m_acceptance->DistanceToIn(pos, mom.vect().Unit());
171  if (dist == vecgeom::InfinityLength<double>()) continue;
172 
173  // We want to keep this one
174  auto& particle = mcGraph.addParticle();
175  // all particle of a generator are primary
176  particle.addStatus(MCParticle::c_PrimaryParticle);
177  // all particle of CRY are stable
178  particle.addStatus(MCParticle::c_StableInGenerator);
179  particle.setPDG(pdg);
180  particle.setFirstDaughter(0);
181  particle.setLastDaughter(0);
182  particle.setMomentum(ROOT::Math::XYZVector(mom.x(), mom.y(), mom.z()));
183  particle.setMass(mass);
184  particle.setEnergy(mom.e());
185  particle.setProductionVertex(ROOT::Math::XYZVector(pos.x(), pos.y(), pos.z()));
186  particle.setProductionTime(time);
187  eventInAcceptance = true;
188  }
189  // clean up CRY event
190  for (auto* p : ev) delete p;
191  // and if we have something in the acceptance then we're done
192  if (eventInAcceptance) {
193  return;
194  }
195 
196  }
197  B2ERROR("Number of trials exceeds maxTrials increase number of maxTrials" << LogVar("maxTrials", m_maxTrials));
198  }
std::unique_ptr< vecgeom::VUnplacedVolume > m_acceptance
acceptance shape
Definition: CRY.h:160
std::unique_ptr< vecgeom::VUnplacedVolume > m_world
world box shape
Definition: CRY.h:159
double m_kineticEnergyThreshold
kinetic energy threshold.
Definition: CRY.h:145
std::unique_ptr< CRYGenerator > m_cryGenerator
The CRY generator.
Definition: CRY.h:158
int m_totalTrials
total number of thrown events.
Definition: CRY.h:148
int m_maxTrials
number of trials per event.
Definition: CRY.h:147
static const double speedOfLight
[cm/ns]
Definition: Const.h:686
@ c_PrimaryParticle
bit 0: Particle is primary particle.
Definition: MCParticle.h:47
@ c_StableInGenerator
bit 1: Particle is stable, i.e., not decaying in the generator.
Definition: MCParticle.h:49
static const double m
[meters]
Definition: Unit.h:69
static const double MeV
[megaelectronvolt]
Definition: Unit.h:114
Class to store variables with their name which were sent to the logging service.

◆ generateVertex()

ROOT::Math::XYZVector generateVertex ( const ROOT::Math::XYZVector &  initial,
const TMatrixDSym &  cov,
MultivariateNormalGenerator gen 
) const
private

generate the vertex

Parameters
initialnominal vertex position
covcovariance of the vertex position
genmultivariate normal generator to be used

Definition at line 27 of file InitialParticleGeneration.cc.

◆ getInstance()

EvtGenModelRegister & getInstance ( )
staticprivate

Return reference to the instance.

This class behaves like a purely static class but we need a singleton pattern to avoid initialisation hell.

Definition at line 21 of file EvtGenModelRegister.cc.

22  {
23  static unique_ptr<EvtGenModelRegister> instance(new EvtGenModelRegister());
24  return *instance;
25  }
EvtGenModelRegister()
Singleton: private constructor.

◆ getModels()

list< EvtDecayBase * > getModels ( )
static

Return a list of models.

Caller takes responsibility to free the instances when no longer needed

Returns
list with pointers to instances of all registered models.

Definition at line 27 of file EvtGenModelRegister.cc.

◆ getName() [1/2]

std::string getName ( )

The function returns the model name.

Returns
name of the model "BSTD"

Definition at line 40 of file EvtBSemiTauonic.cc.

◆ getName() [2/2]

std::string getName ( )

The function returns the model name.

Returns
name of the model "BSTD_2HDMTYPE2"

Definition at line 40 of file EvtBSemiTauonic2HDMType2.cc.

◆ getscalarff()

void getscalarff ( EvtId  parent,
EvtId  daughter,
double  t,
double  ,
double *  fpf,
double *  f0f 
)

Scalar FF's.

Implementation follows arXiv:1509.06938v3.

For the scalar FF, the arglist in the constructor should contain 8 expansion parameters: b+_0, b+_1, b+_2, b+_3, b0_0, b0_1, b0_2, b0_3

Parameters
parent
daughter
tMomentum transfer, also called q2. q2 = (p_B - p_M)^2
fpff_+(q2).
f0ff_0(q2).

Definition at line 30 of file EvtBCLFF.cc.

31  {
32 
33  if (m_numBCLFFCoefficients != 8) {
34  EvtGenReport(EVTGEN_ERROR, "EvtGen") << "Wrong number of arguments for EvtBCLFF::getscalarff!\n";
35  }
36 
37  const auto mB = EvtPDL::getMeanMass(parent);
38  const auto mM = EvtPDL::getMeanMass(daughter);
39 
40  const auto tplus = (mB + mM) * (mB + mM);
41  const auto tzero = (mB + mM) * (std::sqrt(mB) - std::sqrt(mM)) * (std::sqrt(mB) - std::sqrt(mM));
42 
43  const auto mR2 = m_resonance1Minus * m_resonance1Minus;
44  const auto pole = 1 / (1 - t / mR2);
45 
46  const std::vector<double> bplus = {m_BCLFFCoefficients[0], m_BCLFFCoefficients[1], m_BCLFFCoefficients[2], m_BCLFFCoefficients[3]};
47  const std::vector<double> bzero = {m_BCLFFCoefficients[4], m_BCLFFCoefficients[5], m_BCLFFCoefficients[6], m_BCLFFCoefficients[7]};
48 
49  const auto N_fpf = bplus.size();
50  const auto N_f0f = bzero.size();
51 
52  auto z = [tplus, tzero](decltype(t) q2) {
53  const auto term1 = std::sqrt(tplus - q2);
54  const auto term2 = std::sqrt(tplus - tzero);
55  return (term1 - term2) / (term1 + term2);
56  };
57 
58  double sum_fpf = 0;
59  for (unsigned int n = 0; n < N_fpf; ++n) {
60  sum_fpf += bplus[n] * (std::pow(z(t), n) - std::pow(-1, n - N_fpf) * n / N_fpf * std::pow(z(t), N_fpf));
61  }
62  *fpf = pole * sum_fpf;
63 
64  double sum_f0f = 0;
65  for (unsigned int n = 0; n < N_f0f; ++n) {
66  sum_f0f += bzero[n] * std::pow(z(t), n);
67  }
68  *f0f = sum_f0f;
69  }
static constexpr double m_resonance1Minus
Mass of the 1- resonance for the parametrization of the vector FF.
Definition: EvtBCLFF.h:83
double m_BCLFFCoefficients[19]
Parameters passed to the model; BCL expansion coefficients.
Definition: EvtBCLFF.h:78
int m_numBCLFFCoefficients
Total number of parameters passed to the model.
Definition: EvtBCLFF.h:76

◆ getTotalEnergy()

double Belle2::getTotalEnergy ( const std::vector< ROOT::Math::PxPyPzMVector > &  ps)
inline

Main function scaleParticleEnergies in this header scales momenta in CMS of all particles in the final state by a constant factor such that the overall collision energy is slightly changed.

It is used for MC generators which do not provide option to generate events with smeared energy of initial particles. There is an assumption that matrix element of the process does not change much when Ecms is varied by 5MeV/10580MeV = 0.05% (typical Ecms smearing at Belle II). This is typically the case if the cross section does not have the resonance peak around collision energy. Get total energy of all particles in the provided vector

Definition at line 34 of file scaleParticleEnergies.h.

35  {
36  double eTot = 0;
37  for (auto p : ps)
38  eTot += p.E();
39  return eTot;
40  }

◆ getvectorff()

void getvectorff ( EvtId  parent,
EvtId  daughter,
double  t,
double  ,
double *  a1f,
double *  a2f,
double *  vf,
double *  a0f 
)

Vector FF's.

Implementation follows arXiv:1503.05534v3. It is assumed that each expansion has three terms (hardcoded). However, this can be easily expanded or generalized. It is not done, because this way we can check if the number of arguments in the decay file is the correct one.

For the vector FF, the arglist in the constructor should contain 11 expansion parameters: A0_1, A0_2, A1_0, A1_1, A1_2, A12_0, A12_1, A12_2, V_0, V_1, V_2 Nota bene: A0_0 is correlated to A12_0.

Parameters
parent
daughter
tMomentum transfer, also called q2. q2 = (p_B - p_M)^2
a1fA1(q2)
a2fA2(q2)
vfV(q2)
a0fA0(q2)

Definition at line 71 of file EvtBCLFF.cc.

◆ hA1()

double hA1 ( double  w) const

HQET D* axial vector form factor h_{A1}(w).


Definition at line 367 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hA2()

double hA2 ( double  w) const

HQET D* axial vector form factor h_{A2}(w).


Definition at line 379 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hA3()

double hA3 ( double  w) const

HQET D* axial vector form factor h_{A3}(w).


Definition at line 385 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ HadS1()

double HadS1 ( int  Dhel,
double  w 
) const

The function to calculate the Hadronic Amplitudes of scalar (S+P) type contribution.

Parameters
Dhelhelicity of the daughter D(*) meson {+1,0,1} for D* and 2 for D.
wvelocity transfer variable.
Returns
calculated amplitude value.

Definition at line 242 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ HadS2()

double HadS2 ( int  Dhel,
double  w 
) const

The function to calculate the Hadronic Amplitudes of scalar (S-P) type contribution.

Parameters
Dhelhelicity of the daughter D(*) meson {+1,0,1} for D* and 2 for D.
wvelocity transfer variable.
Returns
calculated amplitude value.

Definition at line 254 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ HadT()

double HadT ( int  Dhel,
int  whel1,
int  whel2,
double  w 
) const

The function to calculate the Hadronic Amplitudes of tensor type contribution.

Parameters
Dhelhelicity of the daughter D(*) meson {+1,0,1} for D* and 2 for D.
whel1helicity of the one virtual vector boson {+1,0,1,2}.
whel2helicity of the another virtual vector boson {+1,0,1,2}.
wvelocity transfer variable.
Returns
calculated amplitude value. The tensor contribution is described by two vector contributions.

Definition at line 264 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ HadV1()

double HadV1 ( int  Dhel,
int  whel,
double  w 
) const

The function to calculate the Hadronic Amplitudes of left handed (V-A) type contribution.

Parameters
Dhelhelicity of the daughter D(*) meson {+1,0,1} for D* and 2 for D.
whelhelicity of the virtual vector boson {+1,0,1,2}.
wvelocity transfer variable.
Returns
calculated amplitude value.

Definition at line 197 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ HadV2()

double HadV2 ( int  Dhel,
int  whel,
double  w 
) const

The function to calculate the Hadronic Amplitudes of right handed (V+A) type contribution.

Parameters
Dhelhelicity of the daughter D(*) meson {+1,0,1} for D* and 2 for D.
whelhelicity of the virtual vector boson {+1,0,1,2}.
wvelocity transfer variable.
Returns
calculated amplitude value.

Definition at line 229 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ helAmp() [1/2]

EvtComplex helAmp ( const EvtComplex &  CV1,
const EvtComplex &  CV2,
const EvtComplex &  CS1,
const EvtComplex &  CS2,
const EvtComplex &  CT,
double  mtau,
int  tauhel,
int  Dhel,
double  w,
double  costau 
) const

The function calculates helicity amplitudes with given Wilson coefficients.

Parameters
CV1Wilson coeffcient of the left handed vector type NP contribution.
CV2Wilson coeffcient of the right handed vector type NP contribution.
CS1Wilson coeffcient of the scalar (S+P) type NP contribution.
CS2Wilson coeffcient of the scalar (S-P) type NP contribution.
CTWilson coeffcient of the tensor type NP contribution.
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame. The overall factor GF/sqrt(2) Vcb omitted because it does not change the distribution.

Definition at line 108 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ helAmp() [2/2]

EvtComplex helAmp ( double  mtau,
int  tauhel,
int  Dhel,
double  w,
double  costau 
) const

The function calculates the helicity amplitude.

Parameters
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame. The overall factor GF/sqrt(2) Vcb omitted because it does not change the distribution.

Definition at line 101 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ helampS1()

double helampS1 ( double  mtau,
int  tauhel,
int  Dhel,
double  w,
double  costau 
) const

Helicity Amplitudes of scalar (S+P) type contribution.

Parameters
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame.
Returns
calculated amplitude value. Overall factor GF/sqrt(2) Vcb omitted. Wilson coefficients CXX ommited.

Definition at line 325 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ helampS2()

double helampS2 ( double  mtau,
int  tauhel,
int  Dhel,
double  w,
double  costau 
) const

Helicity Amplitudes of scalar (S-P) type contribution.

Parameters
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame.
Returns
calculated amplitude value. Overall factor GF/sqrt(2) Vcb omitted. Wilson coefficients CXX ommited.

Definition at line 331 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ helampSM()

double helampSM ( double  mtau,
int  tauhel,
int  Dhel,
double  w,
double  costau 
) const

Helicity Amplitudes of SM (left handed) contribution.

Parameters
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame. Overall factor GF/sqrt(2) Vcb omitted. Wilson coefficients CXX ommited.

Definition at line 297 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ helampT()

double helampT ( double  mtau,
int  tauhel,
int  Dhel,
double  w,
double  costau 
) const

Helicity Amplitudes of tensor type contribution.

Parameters
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame.
Returns
calculated amplitude value. Overall factor GF/sqrt(2) Vcb omitted. Wilson coefficients CXX ommited.

Definition at line 337 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ helampV1()

double helampV1 ( double  mtau,
int  tauhel,
int  Dhel,
double  w,
double  costau 
) const

Helicity Amplitudes of left handed (V-A) contribution.

Parameters
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame.
Returns
calculated amplitude value. Overall factor GF/sqrt(2) Vcb omitted. Wilson coefficients CXX ommited.

Definition at line 308 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ helampV2()

double helampV2 ( double  mtau,
int  tauhel,
int  Dhel,
double  w,
double  costau 
) const

Helicity Amplitudes of right handed (V+A) contribution.

Parameters
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame.
Returns
calculated amplitude value. Overall factor GF/sqrt(2) Vcb omitted. Wilson coefficients CXX ommited.

Definition at line 314 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hm()

double hm ( double  w) const

HQET D vector form factor h_-(w).


Definition at line 361 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hp()

double hp ( double  w) const

HQET D vector form factor h_+(w).


Definition at line 354 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hP()

double hP ( double  w) const

D* pseudo scalar form factor h_P(w) in terms of axial vector form factors.


Definition at line 404 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hS()

double hS ( double  w) const

D scalar form factor h_S(w) in terms of vector form factors.


Definition at line 392 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hT()

double hT ( double  w) const

D tensor form factor h_T(w) in terms of vector form factors.


Definition at line 416 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hT1()

double hT1 ( double  w) const

D* tensor form factor h_{T1}(w) in terms of axial vector form factors.


Definition at line 423 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hT2()

double hT2 ( double  w) const

D* tensor form factor h_{T2}(w).


Definition at line 432 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hT3()

double hT3 ( double  w) const

D* tensor form factor h_{T3}(w).


Definition at line 440 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ hV()

double hV ( double  w) const

HQET D* axial vector form factor h_V(w).


Definition at line 373 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ init() [1/5]

void init ( )

The function initializes the decay.

The function reads paramters from the decay file and initializes the parameters for the decay amplitude calculator.

Definition at line 78 of file EvtBSemiTauonic.cc.

◆ init() [2/5]

void init ( )

The function initializes the decay.

The function reads paramters from the decay file and initializes the parameters for the decay amplitude calculator.

Definition at line 78 of file EvtBSemiTauonic2HDMType2.cc.

◆ init() [3/5]

void init ( )

Checks that the number of input parameters are correct:

  • 3 scalar particles (check on spin but not on charge)
  • 6 real parameters (no check on the actual values)

Definition at line 41 of file EvtEtaFullDalitz.cc.

42  {
43 
44  // check that there is are arguments
45  checkNArg(6);
46  checkNDaug(3);
47 
48 
49  checkSpinParent(EvtSpinType::SCALAR);
50 
51  checkSpinDaughter(0, EvtSpinType::SCALAR);
52  checkSpinDaughter(1, EvtSpinType::SCALAR);
53  checkSpinDaughter(2, EvtSpinType::SCALAR);
54  }

◆ init() [4/5]

void init ( )

Checks that the number of input parameters are correct:

  • 3 scalar particles (check on spin but not on charge)
  • 1 real parameters (no check on the actual values)

Definition at line 56 of file EvtEtaPi0Dalitz.cc.

57  {
58 
59  // check that there is 1 argument
60  checkNArg(1);
61  checkNDaug(3);
62 
63 
64  checkSpinParent(EvtSpinType::SCALAR);
65 
66  checkSpinDaughter(0, EvtSpinType::SCALAR);
67  checkSpinDaughter(1, EvtSpinType::SCALAR);
68  checkSpinDaughter(2, EvtSpinType::SCALAR);
69  }

◆ init() [5/5]

void init ( )

Checks that the number of input parameters are correct:

  • 3 scalar particles (check on spin but not on charge)
  • 4 real parameters (no check on the actual values)

Definition at line 58 of file EvtEtaPrimeDalitz.cc.

59  {
60 
61  // check that there is are arguments
62  checkNArg(4);
63  checkNDaug(3);
64 
65 
66  checkSpinParent(EvtSpinType::SCALAR);
67 
68  checkSpinDaughter(0, EvtSpinType::SCALAR);
69  checkSpinDaughter(1, EvtSpinType::SCALAR);
70  checkSpinDaughter(2, EvtSpinType::SCALAR);
71  }

◆ initProbMax() [1/5]

void initProbMax ( )

The function sets the maximum value of the probability.


Definition at line 59 of file EvtBSemiTauonic2HDMType2.cc.

◆ initProbMax() [2/5]

void initProbMax ( )

The function to sets a maximum probability.

In this model, noProbMax() is called because maximum probability is determined by m_dGdsbProbMax

Definition at line 161 of file EvtBtoXsnunu_FERMI.cc.

◆ initProbMax() [3/5]

void initProbMax ( )

Sets the Maximum probability for the PHSP reweight.

Maximum value is hardcoded and inherited from the EvtEtaDalitz class.

Definition at line 57 of file EvtEtaFullDalitz.cc.

◆ initProbMax() [4/5]

void initProbMax ( )

Sets the Maximum probability for the PHSP reweight.

Maximum value is hardcoded and inherited from the EvtEtaDalitz class.

Definition at line 72 of file EvtEtaPi0Dalitz.cc.

◆ initProbMax() [5/5]

void initProbMax ( )

Sets the Maximum probability for the PHSP reweight.

Maximum value is hardcoded and inherited from the EvtEtaDalitz class.

Definition at line 74 of file EvtEtaPrimeDalitz.cc.

◆ Lep() [1/3]

double Lep ( const double  mtau,
int  tauhel,
double  q2,
double  costau 
) const

The function to calculate the Leptonic Amplitudes for B->Dtaunu decay of the scalar type contribution.

Parameters
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
q2q^2 of the decay (square of l+nu invariant mass).
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame.
Returns
calculated amplitude value.

Definition at line 150 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ Lep() [2/3]

double Lep ( const double  mtau,
int  tauhel,
int  whel,
double  q2,
double  costau 
) const

The function to calculate the Leptonic Amplitudes for B->D*taunu decay of the vector type contribution.

Parameters
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
whelhelicity of the virtual vector boson {+1,0,1,2}.
q2q^2 of the decay (square of l+nu invariant mass).
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame.
Returns
calculated amplitude value.

Definition at line 127 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ Lep() [3/3]

double Lep ( const double  mtau,
int  tauhel,
int  whel1,
int  whel2,
double  q2,
double  costau 
) const

The function to calculate the Leptonic Amplitudes for B->D*taunu decay of the tensor type contribution.

Parameters
mtaudaughter lepton mass.
tauhelhelicity of the lepton in the (l+nu) rest frame {+1,-1}.
whel1helicity of the one virtual vector boson {+1,0,1,2}.
whel2helicity of the another virtual vector boson {+1,0,1,2}.
q2q^2 of the decay (square of l+nu invariant mass).
costaucosine of the angle between D(*) meson and the lepton in the (l+nu) rest frame.
Returns
calculated amplitude value. The tensor contribution is described by two vector contributions.

Definition at line 165 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ mD()

double mD ( int  Dhel) const

Daughter D(*) meson mass.

kinematics

Parameters
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
Returns
daughter D(*) meson mass corresponding to the Dhel.

Definition at line 499 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ PDstar()

double PDstar ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
const double  mtau 
)

Function calculates the polarization of D*, longitudinal/(longitudinal + transverse), in B->D*taunu decay.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter tau lepton mass for B->Dtaunu decay.

Definition at line 187 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ pf()

double pf ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
double  mtau,
int  Dhel,
double  w 
)

Phase space factor, which is multiplied to the helicity amplitude to calculate the decay rate.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter tau lepton mass for B->Dtaunu decay.
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.

Definition at line 199 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ PtauD()

double PtauD ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
const double  mtau 
)

Function calculates the polarization of tau, (RH - LH)/(LH + RH), in B->Dtaunu decay.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter tau lepton mass for B->Dtaunu decay.

Definition at line 170 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ PtauDstar()

double PtauDstar ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
const double  mtau 
)

Function calculates the polarization of tau, (RH - LH)/(LH + RH), in B->D*taunu decay.

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter tau lepton mass for B->Dtaunu decay.

Definition at line 177 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ q2()

double q2 ( int  Dhel,
double  w 
) const

Function to calculate the q^2 of the decay (square of l+nu invariant mass).

Parameters
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
Returns
calculated q^2.

Definition at line 521 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ qh2()

double qh2 ( int  Dhel,
double  w 
) const

Function to calculate the q^2 divided by the square of parent mass (m_B^2).

Parameters
Dhelhelicity of the D(*) meson in the rest frame of the parent meson {+1,0,-1} for D* and 2 for D.
wvelocity transfer variable.
Returns
calculated q^2/m_B^2.

Definition at line 515 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ RGammaD()

double RGammaD ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
const double  mtau,
const double  mlep = 0.0005110 
)

Function calculates the ratio of Br(B->Dtaunu)/Br(B->Dlnu), R(D).

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter tau lepton mass for B->Dtaunu decay.
mlepdaughter lepton mass for B->Dlnu decay (default is the electron mass). Note that overall factor (GF/sqrt(2) Vcb)^2 is omitted.

Definition at line 149 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ RGammaDstar()

double RGammaDstar ( const EvtBSemiTauonicHelicityAmplitudeCalculator BSTD,
const double  mtau,
const double  mlep = 0.0005110 
)

Function calculates the ratio of Br(B->Dtaunu)/Br(B->Dlnu), R(D*).

Parameters
BSTDhelicity ampliutude calculator initialized properly by user.
mtaudaughter tau lepton mass for B->Dtaunu decay.
mlepdaughter lepton mass for B->Dlnu decay (default is the electron mass).

Definition at line 158 of file EvtBSemiTauonicDecayRateCalculator.cc.

◆ RotateToHelicityBasisInBoostedFrame()

EvtSpinDensity RotateToHelicityBasisInBoostedFrame ( const EvtParticle *  p,
EvtVector4R  p4boost 
)

The function calculates the rotation matrix to convert the spin basis to the helicity basis in the boosted frame.

Parameters
pa pointer to the particle
p4boosta 4 vector to specify the rest frame to boost to. The function calculate the rotation matrix from the spin basis defined in the p rest frame to the helicity basis in the rest frame of p4boost.

Definition at line 27 of file EvtBSemiTauonicAmplitude.cc.

◆ scaleMomenta()

std::vector<ROOT::Math::PxPyPzMVector> Belle2::scaleMomenta ( const std::vector< ROOT::Math::PxPyPzMVector > &  ps,
double  C 
)
inline

Scale momenta of the particles in the vector ps with a factor C.

Result is returned as returned as a vector with the scaled momenta

Definition at line 58 of file scaleParticleEnergies.h.

◆ scaleParticleEnergies()

void Belle2::scaleParticleEnergies ( MCParticleGraph mpg,
double  EcmsTarget 
)
inline

Scale momenta of the particles by a constant factor such that total energy is changed to EcmsTarget.

It also changes momenta of the incoming particles such that energy is conserved. Should be called in CM reference frame.

Definition at line 71 of file scaleParticleEnergies.h.

◆ term()

void term ( )

Terminates the generator.

Closes the internal generator.

Definition at line 200 of file CRY.cc.

◆ updateVertex()

ROOT::Math::XYZVector updateVertex ( bool  force = false)

Update the vertex position:

  1. If there is no initial particles object generate a new one with nominal values without smearing
  2. If the BeamParameters disallow smearing of the vertex it does nothing
  3. If initial particles already exist check if the vertex smearing has already been applied. If not, apply vertex smearing if allowed.
  4. Return the shift in vertex to the previous value (or the origin if there was no previous value).

This function does not update the energies as this would possibly introduce inconsistency between values used by the generator and the values contained in the initial particles. But it is useful to smear the vertex after generation.

Parameters
forceif true the vertex will be regenerated even if vertex smearing was already applied.

Definition at line 202 of file InitialParticleGeneration.cc.

◆ v()

double v ( double  mtau,
double  q2 
) const

Function to calculate the tau velocity.

Parameters
mtaudaughter lepton mass.
q2q^2 of the decay (square of l+nu invariant mass).
Returns
calculated tau velocity.

Definition at line 509 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.

◆ z()

double z ( double  w) const

CLN form factor z.

Parameters
wvelocity transfer variable.
Returns
calculated form factor value.

Definition at line 449 of file EvtBSemiTauonicHelicityAmplitudeCalculator.cc.