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.
EvtVSSMix.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 
23 #include "EvtGenBase/EvtConst.hh"
24 #include "EvtGenBase/EvtGenKine.hh"
25 #include "EvtGenBase/EvtId.hh"
26 #include "EvtGenBase/EvtPDL.hh"
28 #include "EvtGenBase/EvtPatches.hh"
29 #include "EvtGenBase/EvtReport.hh"
31 
32 #include <stdlib.h>
33 #include <string>
34 
35 std::string EvtVSSMix::getName()
36 {
37  return "VSS_MIX";
38 }
39 
41 {
42  return new EvtVSSMix;
43 }
44 
46 {
47  // check that there are 1 arguments
48  checkNArg( 1 );
49  checkNDaug( 2 );
50 
52 
55 }
56 
58 {
59  setProbMax( 0.5 );
60 }
61 
63 {
64  //added by Lange Jan4,2000
65  static EvtId B0 = EvtPDL::getId( "B0" );
66  static EvtId B0B = EvtPDL::getId( "anti-B0" );
67 
69  EvtParticle *s1, *s2;
70  s1 = p->getDaug( 0 );
71  s2 = p->getDaug( 1 );
72  EvtVector4R s1mom = s1->getP4();
73 
74  double t1, t2, dm;
75 
76  s1->setLifetime();
77  s2->setLifetime();
78 
79  t1 = s1->getLifetime();
80  t2 = s2->getLifetime();
81 
82  //dm should probably be a parameter to this model.
83 
84  dm = getArg( 0 ) / EvtConst::c;
85 
86  EvtId d1, d2;
87 
88  d1 = s1->getId();
89  d2 = s2->getId();
90 
91  double mix_amp = 0.;
92  if ( d1 == B0 && d2 == B0B )
93  mix_amp = cos( 0.5 * dm * ( t1 - t2 ) );
94  if ( d1 == B0B && d2 == B0 )
95  mix_amp = cos( 0.5 * dm * ( t1 - t2 ) );
96  if ( d1 == B0 && d2 == B0 )
97  mix_amp = sin( 0.5 * dm * ( t1 - t2 ) );
98  if ( d1 == B0B && d2 == B0B )
99  mix_amp = sin( 0.5 * dm * ( t1 - t2 ) );
100 
101  double norm = 1.0 / s1mom.d3mag();
102 
103  vertex( 0, norm * mix_amp * s1mom * ( p->eps( 0 ) ) );
104  vertex( 1, norm * mix_amp * s1mom * ( p->eps( 1 ) ) );
105  vertex( 2, norm * mix_amp * s1mom * ( p->eps( 2 ) ) );
106 
107  return;
108 }
109 
110 std::string EvtVSSMix::getParamName( int i )
111 {
112  switch ( i ) {
113  case 0:
114  return "deltaM";
115  default:
116  return "";
117  }
118 }
virtual EvtVector4C eps(int i) const
double getArg(unsigned int j)
EvtId getId() const
void setLifetime(double tau)
EvtDecayBase * clone() override
Definition: EvtVSSMix.cpp:40
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
void init() override
Definition: EvtVSSMix.cpp:45
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
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)
std::string getName() override
Definition: EvtVSSMix.cpp:35
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static const double c
Definition: EvtConst.hh:30
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
const EvtVector4R & getP4() const
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
double d3mag() const
int getNDaug() const
Definition: EvtDecayBase.hh:65
double getLifetime()
void initProbMax() override
Definition: EvtVSSMix.cpp:57
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
std::string getParamName(int i) override
Definition: EvtVSSMix.cpp:110
void decay(EvtParticle *p) override
Definition: EvtVSSMix.cpp:62