evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
EvtPi0Dalitz.cpp
Go to the documentation of this file.
1 
2 /***********************************************************************
3 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4 * *
5 * This file is part of EvtGen. *
6 * *
7 * EvtGen is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * EvtGen is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19 ***********************************************************************/
20 
22 
24 #include "EvtGenBase/EvtGenKine.hh"
25 #include "EvtGenBase/EvtPDL.hh"
27 #include "EvtGenBase/EvtPatches.hh"
28 #include "EvtGenBase/EvtReport.hh"
31 
32 #include <fstream>
33 #include <stdio.h>
34 #include <stdlib.h>
35 #include <string>
36 using std::fstream;
37 
38 std::string EvtPi0Dalitz::getName()
39 {
40  return "PI0_DALITZ";
41 }
42 
44 {
45  return new EvtPi0Dalitz;
46 }
47 
49 {
50  setProbMax( 3.5 );
51 }
52 
54 {
55  // check that there are 0 arguments
56  checkNArg( 0 );
57  checkNDaug( 3 );
58 
60 
64 }
65 
67 {
68  EvtParticle *ep, *em, *gamma;
70  0.00000002, 0, 1 ) );
71 
72  ep = p->getDaug( 0 );
73  em = p->getDaug( 1 );
74  gamma = p->getDaug( 2 );
75 
76  // the next four lines generates events with a weight such that
77  // the efficiency for selecting them is good. The parameter below of
78  // 0.1 is the size of the peak at low q^2 (in arbitrary units).
79  // The value of 0.1 is appropriate for muons.
80  // when you use this remember to remove the cut on q^2!
81 
82  //ep em invariant mass^2
83  double m2 = ( ep->getP4() + em->getP4() ).mass2();
84  EvtVector4R q = ep->getP4() + em->getP4();
85  //Just use the prob summed over spins...
86 
87  EvtTensor4C w, v;
88 
89  v = 2.0 * ( gamma->getP4() * q ) *
90  EvtGenFunctions::directProd( q, gamma->getP4() ) -
91  ( gamma->getP4() * q ) * ( gamma->getP4() * q ) * EvtTensor4C::g() -
92  m2 * EvtGenFunctions::directProd( gamma->getP4(), gamma->getP4() );
93 
94  w = 4.0 * ( EvtGenFunctions::directProd( ep->getP4(), em->getP4() ) +
95  EvtGenFunctions::directProd( em->getP4(), ep->getP4() ) -
96  EvtTensor4C::g() *
97  ( ep->getP4() * em->getP4() - ep->getP4().mass2() ) );
98 
99  double prob = ( real( cont( v, w ) ) ) / ( m2 * m2 );
100  prob *= ( 1.0 / ( ( 0.768 * 0.768 - m2 ) * ( 0.768 * 0.768 - m2 ) +
101  0.768 * 0.768 * 0.151 * 0.151 ) );
102 
103  // EvtGenReport(EVTGEN_INFO,"EvtGen") << "prob is "<<prob<<endl;
104  setProb( prob );
105 
106  return;
107 }
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
void setProb(double prob)
Definition: EvtDecayProb.hh:32
static const EvtTensor4C & g()
Definition: EvtTensor4C.cpp:44
EvtDecayBase * clone() override
EvtComplex cont(const EvtTensor4C &t1, const EvtTensor4C &t2)
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void initProbMax() override
void setProbMax(double prbmx)
void init() override
double mass2() const
Definition: EvtVector4R.hh:100
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
void checkNDaug(int d1, int d2=-1)
void checkSpinParent(EvtSpinType::spintype sp)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
const EvtVector4R & getP4() const
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
int getNDaug() const
Definition: EvtDecayBase.hh:65
void setWeight(double weight)
Definition: EvtDecayProb.hh:34
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
double real(const EvtComplex &c)
Definition: EvtComplex.hh:230
void decay(EvtParticle *p) override
std::string getName() override