Belle II Software  release-08-01-10
EvtPhspCP.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <iomanip>
10 #include <cmath>
11 #include <string>
12 
13 #include "EvtGenBase/EvtCPUtil.hh"
14 #include "EvtGenBase/EvtPDL.hh"
15 
16 #include <generators/evtgen/EvtGenModelRegister.h>
17 #include "generators/evtgen/models/EvtPhspCP.h"
18 
19 namespace Belle2 {
27 
28  EvtPhspCP::~EvtPhspCP() {}
29 
30  std::string EvtPhspCP::getName()
31  {
32  return "PHSP_CP";
33  }
34 
35  EvtDecayBase* EvtPhspCP::clone()
36  {
37  return new EvtPhspCP;
38  }
39 
41  {
42  // Check number of arguments
43  checkNArg(7);
44  }
45 
47  {
48  setProbMax(2 * (getArg(3)*getArg(3) + getArg(5)*getArg(5)));
49  }
50 
51  void EvtPhspCP::decay(EvtParticle* p)
52  {
53  static EvtId B0 = EvtPDL::getId("B0");
54  static EvtId B0B = EvtPDL::getId("anti-B0");
55 
56  double t;
57  EvtId other_b;
58 
59  EvtCPUtil::getInstance()->OtherB(p, t, other_b, 0.5);
60 
61  p->initializePhaseSpace(getNDaug(), getDaugs());
62 
63  EvtComplex amp;
64 
65  EvtComplex A, Abar;
66 
67  A = EvtComplex(getArg(3) * cos(getArg(4)), getArg(3) * sin(getArg(4)));
68  Abar = EvtComplex(getArg(5) * cos(getArg(6)), getArg(5) * sin(getArg(6)));
69 
70  // CP asymmetry
71  const double angle = getArg(0); // q/p = exp(-2i*angle). |q/p| = 1
72  const double dm = getArg(1); // Delta m_d
73  const double etaCP = getArg(2); // CP eigenvalue
74 
75  if (other_b == B0B) {
76  amp = A * cos(dm * t / (2 * EvtConst::c)) +
77  EvtComplex(cos(-2.0 * angle), sin(-2.0 * angle)) *
78  etaCP * EvtComplex(0.0, 1.0) * Abar * sin(dm * t / (2 * EvtConst::c));
79 
80  }
81  if (other_b == B0) {
82  amp = A * EvtComplex(cos(2.0 * angle), sin(2.0 * angle)) *
83  EvtComplex(0.0, 1.0) * sin(dm * t / (2 * EvtConst::c)) +
84  etaCP * Abar * cos(dm * t / (2 * EvtConst::c));
85  }
86 
87  setProb(abs2(amp));
88 
89  return;
90  }
91 
93 } // Belle 2 Namespace
Register Decay model EvtPhspCP.
Definition: EvtPhspCP.h:21
void init()
Initialize standard stream objects
Definition: EvtPhspCP.cc:40
EvtDecayBase * clone()
Clone the decay.
Definition: EvtPhspCP.cc:35
void initProbMax()
Initialize standard stream objects for probability function
Definition: EvtPhspCP.cc:46
std::string getName()
Get function Name
Definition: EvtPhspCP.cc:30
void decay(EvtParticle *p)
Member of particle in EvtGen.
Definition: EvtPhspCP.cc:51
B2_EVTGEN_REGISTER_MODEL(EvtB0toKsKK)
register the model in EvtGen
Abstract base class for different kinds of events.