]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TEvtGen/EvtGenModels/EvtPVVCPLH.cpp
ATO-78 - Technical changes to compare different calibrations
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenModels / EvtPVVCPLH.cpp
CommitLineData
0ca57c2f 1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1999 Caltech, UCSB
10//
11// Module: EvtPVVCPLH.cc
12//
13// Description: The decay of a scalar to two vector particles are
14// performed with CP violation and different widths for
15// the CP-even and CP-odd states. E.g. Bs->J/psi phi.
16//
17// Modification history:
18//
19// RYD November 5, 1999 Module EvtSVVCPLH created
20//
21// DUPREE October 10, 2006 Large modification: EvtSVVCPLH->EvtPVVCPLH
22// Time-dependence correctly
23//
24// COWAN June 10, 2009 Modified to use the new EvtCPUtils class.
25// EvtIncoherentMixing removed.
26//
27//------------------------------------------------------------------------
28//
29#include <stdlib.h>
30#include "EvtGenBase/EvtParticle.hh"
31#include "EvtGenBase/EvtGenKine.hh"
32#include "EvtGenBase/EvtCPUtil.hh"
33#include "EvtGenBase/EvtPDL.hh"
34#include "EvtGenModels/EvtSVVHelAmp.hh"
35#include "EvtGenBase/EvtReport.hh"
36#include "EvtGenModels/EvtPVVCPLH.hh"
37#include "EvtGenBase/EvtId.hh"
38#include <string>
39#include "EvtGenBase/EvtConst.hh"
40#include "EvtGenBase/EvtRandom.hh"
41
42EvtPVVCPLH::~EvtPVVCPLH() {}
43
44std::string EvtPVVCPLH::getName() {
45 return "PVV_CPLH";
46}
47
48
49EvtDecayBase* EvtPVVCPLH::clone(){
50
51 return new EvtPVVCPLH;
52
53}
54
55void EvtPVVCPLH::init(){
56
57 // check that there are 8 arguments (deltaMs no argument anymore)
58 checkNArg(8);
59 checkNDaug(2);
60
61 checkSpinParent(EvtSpinType::SCALAR);
62
63 checkSpinDaughter(0,EvtSpinType::VECTOR);
64 checkSpinDaughter(1,EvtSpinType::VECTOR);
65
66}
67
68void EvtPVVCPLH::initProbMax(){
69
70 //This is probably not quite right, but it should do as a start...
71 //Anders
72
73 setProbMax(2*(getArg(2)*getArg(2)+getArg(4)*getArg(4)+getArg(6)*getArg(6)));
74
75}
76
77void EvtPVVCPLH::decay( EvtParticle *p){
78
79 //added by Lange Jan4,2000
80 static EvtId BS0=EvtPDL::getId("B_s0");
81 static EvtId BSB=EvtPDL::getId("anti-B_s0");
82
83 //This is only to get tag-ID
84 //Mixing is not relevant
85 //Lifetime is made correctly later
86 //Tristan
87 EvtId other_b;
88 double t;
89
90// To generate integrated CP asymmetry, EvtGen uses the "flipping".
91// CP-asymmetry in this channel very small, since:
92// deltaMs large ..and..
93// CPV-phase small
94 EvtCPUtil::getInstance()->OtherB(p,t,other_b);
95
96 //Here we're gonna generate and set the "envelope" lifetime
97 //So we take the longest living component (for positive deltaGamma: tauH)
98 //The double exponent will be taken care of later, by the amplitudes
99 //Tristan
100
101 static double Gamma = EvtConst::c/(EvtPDL::getctau(BS0));
102 static double deltaGamma = EvtCPUtil::getInstance()->getDeltaGamma(BS0);
103 static double ctauLong = EvtConst::c/(Gamma-fabs(deltaGamma)/2);
104 // if dG>0: tauLong=tauH(CP-odd) is then largest
105
106 //This overrules the lifetimes made in OtherB
107 t=-log(EvtRandom::Flat())*(ctauLong);//ctauLong has same dimensions as t
108 if(isBsMixed(p)){
109 p->getParent()->setLifetime(t);
110 }else{
111 p->setLifetime(t);
112 }
113
114 //These should be filled with the transversity amplitudes at t=0 //Tristan
115 EvtComplex G0P,G1P,G1M;
116 G1P=EvtComplex(getArg(2)*cos(getArg(3)),getArg(2)*sin(getArg(3)));
117 G0P=EvtComplex(getArg(4)*cos(getArg(5)),getArg(4)*sin(getArg(5)));
118 G1M=EvtComplex(getArg(6)*cos(getArg(7)),getArg(6)*sin(getArg(7)));
119
120 EvtComplex lambda_km=EvtComplex(cos(2*getArg(0)),sin(2*getArg(0)));//was een min in oude versie
121
122 //deltaMs is no argument anymore
123 //Tristan
124
125 static double deltaMs = EvtCPUtil::getInstance()->getDeltaM(BS0);
126
127 EvtComplex cG0P,cG1P,cG1M;
128
129 double mt = exp(-std::max(0.,deltaGamma)*t/(2*EvtConst::c));
130 double pt = exp(+std::min(0.,deltaGamma)*t/(2*EvtConst::c));
131
132 EvtComplex gplus = ( mt*EvtComplex(cos(deltaMs*t/(2*EvtConst::c)),sin( deltaMs*t/(2*EvtConst::c)))
133 +pt*EvtComplex(cos(deltaMs*t/(2*EvtConst::c)),sin(-deltaMs*t/(2*EvtConst::c))) )/2;
134 EvtComplex gminus = ( mt*EvtComplex(cos(deltaMs*t/(2*EvtConst::c)),sin( deltaMs*t/(2*EvtConst::c)))
135 -pt*EvtComplex(cos(deltaMs*t/(2*EvtConst::c)),sin(-deltaMs*t/(2*EvtConst::c))) )/2;;
136
137 if (other_b==BSB){
138 //These are the right equations for the transversity formalism
139 //cGOP is de 0-component, CP-even, so lives shorter: mainly lifetime tauL
140 //cG1P is the //-component, also CP-even, also mainly smaller exponent
141 //cG1M is the transverse component, CP-odd, so has mainly longer lifetime tauH
142 //Tristan
143 cG0P = G0P*( gplus + lambda_km*gminus );
144 cG1P = G1P*( gplus + lambda_km*gminus );
145 cG1M = G1M*( gplus - lambda_km*gminus );
146 } else if (other_b==BS0){
147 //The equations for BsBar
148 //Note the minus-sign difference
149 //Tristan
150 cG0P = G0P*( gplus + (1.0/lambda_km)*gminus );
151 cG1P = G1P*( gplus + (1.0/lambda_km)*gminus );
152 cG1M =-G1M*( gplus - (1.0/lambda_km)*gminus );
153
154 } else{
155 report(ERROR,"EvtGen") << "other_b was not BSB or BS0!"<<std::endl;
156 ::abort();
157 }
158
159 EvtComplex A0,AP,AM;
160 //Converting the transversity amplitudes
161 //to helicity amplitudes
162 //(to plug them into SVVHelAmp)
163 A0=cG0P;
164 AP=(cG1P+cG1M)/sqrt(2.0);
165 AM=(cG1P-cG1M)/sqrt(2.0);
166
167 EvtSVVHelAmp::SVVHel(p,_amp2,getDaug(0),getDaug(1),AP,A0,AM);
168
169 return ;
170}
171
172bool EvtPVVCPLH::isBsMixed ( EvtParticle * p ) {
173 if ( ! ( p->getParent() ) ) return false ;
174
175 static EvtId BS0=EvtPDL::getId("B_s0");
176 static EvtId BSB=EvtPDL::getId("anti-B_s0");
177
178 if ( ( p->getId() != BS0 ) && ( p->getId() != BSB ) ) return false ;
179
180 if ( ( p->getParent()->getId() == BS0 ) ||
181 ( p->getParent()->getId() == BSB ) ) return true ;
182
183 return false ;
184}
185
186