-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpaper.tex
More file actions
1554 lines (1496 loc) · 75.9 KB
/
Copy pathpaper.tex
File metadata and controls
1554 lines (1496 loc) · 75.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\clearpage
\noindent\textbf{27 Jan 2020, Monday}
\\
\\
Catch up the work done from the Teaching Block 1:
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/invmass_ini}
\caption{The binned distributions of simulated $B^0$ events in the variables of $m(K^+\pi^-)$ (left) and $m(D^0\bar{D^0})$ (right) for different values of $C_T$.}
\label{fig1}
\end{figure}
\\
A summary of previous work:
\begin{itemize}
\item Looked at the MC data file of the decay contains the four-momentum of the particles generated from MINT, and counted the number of events with $C_T>0$ and $C_T<0$, using $C_T = \Vec{p}_{K^+}\cdot(\Vec{p}_{D^0} \times \Vec{p}_{\bar{D}^0})$.
\item Find the triple product asymmetry of MC data: $A_T = (501-499)/(501+499) = 0.002$ (using Eq.\ref{triple_product_asy}).
\item Plotted the resonance for the K$\pi$ and $D\bar{D}$ final states with the 1000 events for the $C_T > 0$ and $C_T < 0$ cases. The data given has already been in the rest frame of $B^0$, so no further Lorentz boost is required.
\item Calculated the invariant mass of $m(D^0\bar{D^0}K^+\pi^-)$ and finding that all the values equal to 5279.4 $MeV/c^2$, which is the mass of $B^0$, which verifies the invariant masses are calculated correctly.
\end{itemize}
Next Steps:
\begin{itemize}
\item Find the uncertainties in the triple product asymmetry.
\item Fit the binned distributions using the Breit-Wigner distributions
\item Find the distribution of other CM variables ($\phi$, helicity angles)
\end{itemize}
\\
\textbf{Triple Product asymmetry}:
\\
Denote the triple product asymmetry as:
\begin{equation}
A_T = \frac{N(C_T > 0) - N(C_T < 0)}{N(C_T > 0) + N(C_T < 0)},
\label{triple_product_asy}
\end{equation}
The error in $N(C_T > 0)$ is $\sqrt{N(C_T > 0)}$ and in $N(C_T < 0)$ is $\sqrt{N(C_T <0)}$ for a large number of samples, given a Poisson distribution. The error in $A_T$ is then:
\begin{align}
\Delta A_T &= \sqrt{\left(\frac{\partial A_T}{\partial N(C_T > 0)}\Delta N(C_T > 0)\right) ^ 2 + \left(\frac{\partial A_T}{\partial N(C_T < 0)}\Delta N(C_T < 0)\right) ^ 2} \\\nonumber
&= \sqrt{\left(\frac{2N(C_T < 0)}{(N(C_T > 0) + N(C_T < 0))^2}\right)^2 N(C_T > 0) + \left(\frac{-2N(C_T > 0)}{(N(C_T > 0) + N(C_T < 0))^2}\right)^2 N(C_T < 0)} .
\end{align}
The result is $A_T = 0.002 \pm 0.0316$. This error is much larger than the result which indicates that no CP violation is in this sample.
\clearpage
\noindent\textbf{28 Jan 2020, Tuesday}
\\
\\
Aiming to find the distribution of the five CM variables:
\begin{itemize}
\item the invariant masses of daughter pairs in the rest frame of $B^0$: $m(D^0\bar{D^0})$, $m(K^+\pi^-)$. This has been found in Fig.\ref{fig1} using $\sqrt{\bm{P}\cdot\bm{P}}$, where $\bm{P}$ is the sum of the 4-momentum of the daughter pairs.
\item the cosine of the helicity angles between the daughter particle and the mother-particle $B^0$, in the rest frame of its daughter pairs
\begin{itemize}
\item $\cos(\theta_{D^0})$, $\theta_{D^0}$ is the angle between the momentum of $D^0$ and $B^0$ in the rest frame of $D^0\bar{D^0}$
\item $\cos(\theta_{K^+})$, $\theta_{K^+}$ is the angle between the momentum of $K^+$ and $B^0$ in the rest frame of $K^+\pi^-$
\item to boost the momenta to the daughter pair's rest frame:
daughter pair's rest frame has four-momentum
\begin{equation}
\bm{P} = (p_{1x} + p_{2x} ,\;p_{1y} + p_{2y},\;p_{1z} + p_{2z},\;M_1 + M_2) = \bm{p}_1 + \bm{p}_2,
\end{equation}
the boost vector is then
\begin{equation}
\Vec{v} = (p_{1x} + p_{2x} ,\;p_{1y} + p_{2y},\;p_{1z} + p_{2z})/(M_1 + M_2) = (\Vec{p_1}+\Vec{p_2})/M.
\end{equation}
\item $M$ is not the invariant mass of the daughter pair, but the sum of the masses of the pair.
\item The boost is performed using the built-in function in \texttt{ROOT}, which has the analytical form \autocite{wiki:xxx}:
\begin{equation}
\bm{p}'=\left(
\begin{matrix}
\gamma & -\gamma\bm{\beta}^{T}\\
-\gamma\bm{\beta} & \bm{I}+(\gamma-1)\bm{\beta}\bm{\beta}^{T}/\beta^2
\end{matrix}
\right)\bm{p},\;\;\;\;\text{where}\;\gamma=\frac{1}{\sqrt{1-\beta^2}},\;\bm{\beta} = \Vec{v}/c.
\end{equation}
Hence, e.g., $\cos(\theta_{D^0}) = \frac{\Vec{p}'_{D^0}\cdot\Vec{p}'_{B^0}}{|\Vec{p}'_{D^0}||\Vec{p}'_{B^0}|}$.
\item particularly check the direction of the boost, sometimes need to add a minus sign before the boost vector. To check if the boost is correct:
a. boost the daughter pair's Lorentz vector to its rest frame gives zero in the three-momentum.
b. the distribution of the cos(angle) should look uniform and not peak at one side of the graph.
\end{itemize}
\item the angle $\phi$ between the planes of the daughter pairs in the rest frame of mother particle $B^0$. In this case, the angle between the plane $D^0\bar{D}^0$ and the plane $K^+\pi^-$: $\phi = \cos^{-1}\left(\frac{(\Vec{p}_{D^0}\times\Vec{p}_{\bar{D}^0})\cdot(\Vec{p}_{K^+}\times\Vec{p}_{\pi^-})}{|\Vec{p}_{D^0}\times\Vec{p}_{\bar{D}^0}||\Vec{p}_{K^+}\times\Vec{p}_{\pi^-}|}\right)$.
\end{itemize}
\begin{figure}[h]
\center
\includegraphics*[width=0.76\linewidth]{decay_geometry}
\caption{(a) The four-body $B^0$ decay geometry in the rest frame of $B^0$. (b) Definition of the helicity angles $\theta_{D^0}$ and $\theta_{K^+}$, and the decay-plane angle $\phi$.}
\label{decay_geometry}
\end{figure}
\clearpage
The distributions were found with 100 bins, where the error bars come from the default option when drawing the histogram in \texttt{ROOT}. The data has been separated for different values of $C_T$ as shown in blue and red data points. The helicity angles distributed uniformly and the 3-momenta of the daughter pairs in their own frame is zero, which indicates the boost is performed correctly.
\begin{figure}[h]
\center
\includegraphics*[width=0.46\linewidth]{CM_variables_B0/invmass_D0Dbar0}
\caption{The binned distributions of invariant mass $m(D^0\bar{D^0})$ for different values of $C_T$.}
\label{invdd}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.46\linewidth]{CM_variables_B0/invmass_KpPim}
\caption{The binned distributions of invariant mass $m(K^+\pi^-)$ for different values of $C_T$.}
\label{invkpi}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.46\linewidth]{CM_variables_B0/helangle_D0Dbar0}
\caption{The binned distributions of helicity angle $\cos(\theta_{D^0})$ for different values of $C_T$.}
\label{thetadd}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.46\linewidth]{CM_variables_B0/helangle_KpPim}
\caption{The binned distributions of helicity angle $\cos(\theta_{K^+})$ for different values of $C_T$.}
\label{thetakpi}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.43\linewidth]{CM_variables_B0/planeangle}
\caption{The binned distributions of the angle $\phi$ bbetween the plane $D^0\bar{D^0}$ and the plane $K^+\pi^-$ for different values of $C_T$.}
\label{phi}
\end{figure}
\clearpage
\noindent\textbf{29 Jan 2020, Wednesday}
\\
\\
Fitting the invariant mass distributions using the relativistic Breit-Wigner distribution\autocite{wiki:xxxx}:
\begin{equation}
f(E) = \frac{k}{(E^2-M^2)^2 + M^2\Gamma^2},
\label{bw}
\end{equation}
\indent $k = \frac{2\sqrt{2}M\Gamma\gamma}{\pi\sqrt{M^2+\gamma}}$,
\\
\indent $\gamma = \sqrt{M^2(M^2+\Gamma^2)}$,
\\
\indent $E$ - center of mass energy that produce the resonance,
\\
\indent $M$ - mass of the resonance,
\\
\indent $\Gamma$ - resonance width.
\\
\\
The fitting was performed using \texttt{ROOT} framework by defining a class for the fitting function. The left and right limit of the fit was roughly approximated from the left and right ends of the peaks in the histogram. This gives individual fitting for each peak. The initial values for the mass and the width were obtained from PDG.
\\
\\
The fitted results are given by:
\begin{figure}[h]
\center
\includegraphics*[width=0.86\linewidth]{CM_variables_B0/invmass_D0Dbar0_fit}
\caption{The binned distributions of invariant mass $m(D^0\bar{D^0})$ for different values of $C_T$ fitted using Eq.\ref{bw}}
\label{DD_fit}
\end{figure}
\\
\begin{figure}[h]
\center
\includegraphics*[width=0.86\linewidth]{CM_variables_B0/invmassdd_fitdata}
\caption{The fitted values from the curves in MeV}
\label{DD_fitdata}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.86\linewidth]{CM_variables_B0/invmass_KpPim_fit}
\caption{The binned distributions of invariant mass $m(K^+\pi^-)$ for different values of $C_T$ fitted using Eq.\ref{bw}}
\label{kpi_fit}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.86\linewidth]{CM_variables_B0/invmasskpi_fitdata}
\caption{The fitted values from the curves in MeV}
\label{kpi_fitdata}
\end{figure}
\clearpage
\noindent\textbf{30 Jan 2020, Thursday}
\\
\\
To generate more events, an amplitude generator is required - use \texttt{AmpGen}
\\
\\
Start trying to install \href{https://github.com/GooFit/AmpGen#applications}{\texttt{AmpGen}}:
\\
\\
AmpGen is downloaded but not be able to compile it. At the stage of \texttt{make}, there exist the error:
\\\begin{itemize}
\texttt{\seqsplit{ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86\_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd}}
\\
\texttt{Undefined symbols for architecture x86\_64:}
\end{itemize}
\\
\\
One method tried:
\\
\\
Download a different version of the \href{https://github.com/phracker/MacOSX-SDKs/releases}{sdk}:
MacOSX10.10.sdk.tzr.xz, which is suggested from \href{https://www.anaconda.com/utilizing-the-new-compilers-in-anaconda-distribution-5/}{here} and \href{https://github.com/ContinuumIO/anaconda-issues/issues/9096}{here}.
\\
\\
Uncompress it to the \texttt{/opt} directory in the laptop:
\texttt{sudo tar xf ~/Downloads/MacOSX10.10.sdk.tar.xz -C /opt}
\\
\\
Add the lines into the file \texttt{\$HOME/.condarc}:
\indent \texttt{conda\_build:}
\indent \indent \texttt{config\_file:$\sim$/.conda/conda\_build\_config.yaml}
\\
\\
Here is more details of using \href{https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#specify-root-dir}{conda\_build}.
\\
\\
Then create the file \texttt{\$HOME/.conda/conda\_build\_config.yaml} and add:
\indent \texttt{CONDA\_BUILD\_SYSROOT:}
\indent \indent \texttt{- /opt/MacOSX10.10.sdk \# [osx]}
\\
\\
- But this doesn't work.
\clearpage
\noindent\textbf{4 Feb 2020, Tuesday}
\\
\\
\texttt{AmpGen}: now find a way to work from Paras - Remove everything that has been done before and follow the instructions written in the "Installation Notes.ipynb".
\\
\\
\texttt{AmpGen} has been successfully installed - now try to generate and analyse the events for the $D\to K^+K^-\pi^+\pi^-$ decay and check if \texttt{AmpGen} is working correctly.
The results can be compared with the literature\autocite{Aaij_2014}.
\\
\\
The file contains the amplitude model for the $D\to K^+K^-\pi^+\pi^-$ decay is: \texttt{DtoKKpipi\_v2.opt}.
\\
\\
Inside the file, the structure is:
\\
\\
\texttt{EventType D0 K+ K- pi+ pi-}
\begin{itemize}
\item to specify the particles involved in the decay. This can also be specified as an argument in the command line.
\end{itemize}
\\
\\
\\
\footnotesize
\texttt{\#\hspace{9cm}Real / Amplitude\hspace{0.2cm}|\hspace{0.2cm}Imaginary / Phase}
\\
\texttt{\#\hspace{9cm}Fix?\hspace{0.2cm}Value\hspace{0.2cm} Step\hspace{0.2cm}|\hspace{0.2cm} Fix?\hspace{0.2cm}Value\hspace{0.2cm}Step}
\\
\\
\texttt{D0[D]\{K*(1680)0\{K+,pi-\},K*(892)bar0\{K-,pi+\}\} \hspace{0.2cm}0\hspace{0.2cm}1.20197\hspace{0.2cm}0.0898679\hspace{0.2cm}0\hspace{0.2cm}-2.44153\hspace{0.2cm}0.0844467}
\normalsize
\begin{itemize}
\item This is one of the intermediate resonances that contribute to the decay:
\\
$D^0\to K^{*0}$(1680)($\to K^+\pi^-$)$K^{*0}$(892)($\to K^-\pi^+$).
\item For each resonance, it has an vertex gives the probability of the decay to happen.
\item For the six numbers, the left three are the parameters for the real part while the right three are the parameters for the imaginary part of the vertex.
\item Each parameter is specified in terms of three numbers: the fix flag, the initial value, and the step size.
\item The fix term is to specify whether the initial value is fixed (fix=2) or free (fix=0) ...
\item step?
\item the [D] specify the spin in the orbital angular momentum in the final states, one can also use [P], [S] ..for different spins.
\end{itemize}
\clearpage
\noindent\textbf{6 Feb 2020, Thursday}
\\
\\
Outputs from AmpGen generated events:
\\
\\
\textbf{1. $\bm{D^0\to K^+K^-\pi^+\pi^-}$}
\\
\\
\indent run the DtoKKpipi\_v2.opt file with 171300 events.
\\
\indent $C_T = \Vec{p}_{\pi^-}\cdot(\Vec{p}_{K^+} \times \Vec{p}_{K^-})$
\\
\\
TP Asymmetry $A_T = -0.0740\pm0.0024$
\\
\\
The distributions of CM variables with 100 bins:
\\
\\
The distributions match the results in the literature, which means the code is correct and AmgGen can works properly.
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_D0/invmass_KmKp}
\caption{The binned distributions of invariant mass $m(K^-K^+)$ for different values of $C_T$.}
\label{invkk}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_D0/invmass_PimPip}
\caption{The binned distributions of invariant mass $m(\pi^-\pi^+)$ for different values of $C_T$.}
\label{invpipi}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_D0/helangle_KmKp}
\caption{The binned distributions of helicity angle $\cos(\theta_{K^+})$ for different values of $C_T$.}
\label{thetakk}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_D0/helangle_PimPip}
\caption{The binned distributions of helicity angle $\cos(\theta_{\pi^+})$ for different values of $C_T$.}
\label{thetapipi}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_D0/planeangleD0}
\caption{The binned distributions of the angle $\phi$ bbetween the plane $K^-K^+$ and the plane $\pi^-\pi^+$ for different values of $C_T$.}
\label{phiD}
\end{figure}
\clearpage
\\
\\
\noindent \textbf{2. $\bm{B^0\to D^0\bar{D}^0K^+\pi^-}$}
\\
\\
Use \texttt{AmpGen} to generate $B^0\to D^0\bar{D}^0K^+\pi^-$ events:
\begin{itemize}
\item add \texttt{B0toDDbar0K+pi-.opt} file to \texttt{$\sim$/AmpGen/build/bin/}
\item inside \texttt{the B0toDDbar0K+pi-.opt} file, use the resonances from the \texttt{MINT} file (\texttt{4BodyModel.txt}), change the format of the resonance list to match the format of \texttt{.opt} files used in \texttt{AmpGen}.
\item inside the \texttt{B0toDDbar0K+pi-.opt} file, change \texttt{kappa0} to \texttt{K(0)*(800)0} - the particle name has been updated in PDG.
\item inside the \texttt{B0toDDbar0K+pi-.opt} file, change the non resonance part
e.g. change \texttt{D0Dbar0} to \texttt{NonResS0\{D0,Dbar0\}}.
[This will improve the speed considerably when including the narrow $D^*$ resonances. It only works if all decays are done in quasi-two-body steps (i.e. $B\to\psi K^*$ as a resonance works, but $B\to D\bar{D}K^*$ doesn’t).]
\item inside the \texttt{mass\_width.csv} file, change line 385: J=2, P=+ for particle \texttt{D(s2)(2573)}.
\end{itemize}
\\
\\
Fit the results for different event files - from \texttt{MINT} and \texttt{AmpGen}...
\\
\\
\\
\indent \textbf{a. old results from \texttt{MINT}} - 1000 events: $A_T= 0.002\pm0.0316$
\begin{itemize}
This still uses Eq.\ref{bw} to fit but using a different approach - by summing over the Breit-Wigner functions for each peak. In this case, the events are not enough to make a clear fit for the left figure in Fig.\ref{invddv2}, the right figure in Fig.\ref{invkpiv2}, and the left figure in Fig.\ref{invfit2}. The fitting outcomes for resonance peaks are shown in Fig.\ref{ddkpi_fitdata}. For the successfully fitted peaks, it gives the expected results.
\end{itemize}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_invmass_fit_output_1000}
\caption{The fitted values from the curves in Fig.\ref{invddv2},\ref{invkpiv2},\ref{invfit2}(MeV)}
\label{ddkpi_fitdata}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_invmass_D0Dbar0_fit_1000}
\caption{The binned distributions of invariant mass $m(D^0\bar{D^0})$ for different values of $C_T$.}
\label{invddv2}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_invmass_KpPim_fit_1000}
\caption{The binned distributions of invariant mass $m(K^+\pi^-)$ for different values of $C_T$.}
\label{invkpiv2}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_invariant_mass_fit_1000}
\caption{The binned distributions of invariant mass $m(D^0\bar{D^0})$ by combining the data from $C_T<0$ and $C_T>0$.}
\label{invfit2}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_helangle_D0Dbar0_1000}
\caption{The binned distributions of helicity angle $\cos(\theta_{D^0})$ for different values of $C_T$.}
\label{thetaddv2}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_helangle_KpPim_1000}
\caption{The binned distributions of helicity angle $\cos(\theta_{K^+})$ for different values of $C_T$.}
\label{thetakpiv2}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_planeangle_1000}
\caption{The binned distributions of the angle $\phi$ bbetween the plane $D^0\bar{D^0}$ and the plane $K^+\pi^-$ for different values of $C_T$.}
\label{phiv2}
\end{figure}
\clearpage
\\
\\
\textbf{b. AmpGen - 10000 events:} $A_T = 0.0156 \pm 0.0099987$
\begin{itemize}
In order to have better fittings, more events were generated. This fit the data properly with errors being $10^2$ smaller in the fitted parameters. An investigation in the confidence level of $A_T$, the errors in the parameters vs the number of events can be carried out.
\\
\\
For Fig.\ref{thetaddv3}, Fig.\ref{thetakpiv3}, Fig.\ref{phiv3}, it was asked why the peaks are downwards rather than upwards in the LHCb seminar (8th Feb). It is also expected to be more flat for the helicity angles.
\end{itemize}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_invmass_fit_output_10000}
\caption{The fitted values from the curves in Fig.\ref{invddv3},\ref{invkpiv3},\ref{invfit3}(MeV)}
\label{ddkpi_fitdata3}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_invmass_D0Dbar0_fit_10000}
\caption{The binned distributions of invariant mass $m(D^0\bar{D^0})$ for different values of $C_T$.}
\label{invddv3}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_invmass_KpPim_fit_10000}
\caption{The binned distributions of invariant mass $m(K^+\pi^-)$ for different values of $C_T$.}
\label{invkpiv3}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_invariant_mass_fit_10000}
\caption{The binned distributions of invariant mass $m(D^0\bar{D^0})$ for different values of $C_T$.}
\label{invfit3}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_helangle_D0Dbar0_10000}
\caption{The binned distributions of helicity angle $\cos(\theta_{D^0})$ for different values of $C_T$.}
\label{thetaddv3}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_helangle_KpPim_10000}
\caption{The binned distributions of helicity angle $\cos(\theta_{K^+})$ for different values of $C_T$.}
\label{thetakpiv3}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{CM_variables_B0/B0_planeangle_10000}
\caption{The binned distributions of the angle $\phi$ between the plane $D^0\bar{D^0}$ and the plane $K^+\pi^-$ for different values of $C_T$.}
\label{phiv3}
\end{figure}
\clearpage
\noindent\textbf{7 Feb 2020, Friday}
\\
\\
To do list:
\begin{itemize}
\item CP violation for D0 and for B0 decay.
\item split the amplitude to account for different spins, first make the 1/3 of the original value and make the phase equal
\item check the amount of CP violation vs number of events
\item check P violation in several decay modes (all resonances, single resonance, etc)
\item check the meaning of K$\sim$, pi\# in the .root file generated (try flipping the sign of the momentum for \_3\_K$\sim$ and \_4\_pi\#)
\\
\indent $\Rightarrow$ have got the same results for CM variables
\end{itemize}
\\
\\
The charge conjugate decays can be generated using a different Seed in AmpGen (e.g. add a line in the .opt file: Seed 6) and inverting the sign of the 3-momenta for the generated MC data. This means initially we have got a particle goes to the (e.g.) +ve direction, and by flipping the sign, the particle goes to the negative direction, but this equivalent to its antiparticle goes to the +ve direction. By doing this for all the particles, we have generated the same decay but with charge-conjugate mesons. (Would there be a better explanation for this?)
\\
\\
The inverted 3-momentum gives the value of $\bar{C}_T$. To find the triple product asymmetry for the charge-conjugate decays, one need to count the number of events with $-\bar{C}_T>0$ and $-\bar{C}_T<0$.
\\
\\
a. Find the CP asymmetry in the $\bm{D^0\to K^+K^-\pi^+\pi^-}$ decay:
\\
\\
Re-run the \texttt{DtoKKpipi\_v2.opt} file using Seed 5 and 7 with 171300 events, gives
\\
\\
\indent $\bar{A}_T = -0.072563\pm0.0024$, $A_T=-0.073987\pm 0.0024$ (previous results),
\\
\indent and, hence $\mathcal{A}_{\mathcal{C}\mathcal{P}} = 0.5 (A_T-\bar{A}_T)= -0.000712 \pm 0.0017$.
\\
\\
This is over a half smaller than the literature \autocite{Aaij_2014}.
\\
\\
b. Find the CP violation in $\bm{B^0\to D^0\bar{D}^0K^+\pi^-}$ decay:
\\
\\
Re-run the \texttt{B0toDDbar0K+pi-.opt} file after adding \texttt{NonResS0}, with $10^4$ events, using Seed 5 and 7, gives
\\
\\
\indent $A_T=0.012\pm0.01$, $\bar{A}_T = 0.0102\pm0.01$,
\\
\indent and, hence $\mathcal{A}_{\mathcal{C}\mathcal{P}} = 0.5 (A_T-\bar{A}_T)=0.0009\pm 0.0071$.
\\
\\
For $10^5$ events, with the B0 decay, using Seed 0 (no seed specified) and 8, gives
\\
\\
\indent $A_T = 0.0015 \pm 0.0034$, $\bar{A}_T = -0.00148 \pm 0.0031$,
\\
\\
find $\mathcal{A}_{\mathcal{C}\mathcal{P}} = 0.0015 \pm 0.002$.
\\
\\
All the results are within the uncertainty and show no CP violation.
\clearpage
This value of $\mathcal{A}_{\mathcal{C}\mathcal{P}}$ was investigated further for a range of event numbers:
\\
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{a_cp/acp_primary}
\caption{The asymmetries calculated for different number of events.}
\label{acp_nospd}
\end{figure}
\\
It can be seen that the $\mathcal{A}_{\mathcal{C}\mathcal{P}}$ is slightly deviated from zero with errorbars becoming smaller and excluding zero, but the confidence level is less than $2\sigma$, where $\sigma = \mathcal{A}_{\mathcal{C}\mathcal{P}}/\Delta(\mathcal{A}_{\mathcal{C}\mathcal{P}})$. Clearly, more events need to be generated to see the trend of asymmetry and error bars.
\clearpage
\noindent\textbf{13 Feb 2020, Thursday}
\\
\\
From Paras: [One is that we indeed still have to specify independent couplings of differing spin configurations separately. In practical terms, for the "vector-vector” decays i.e decays to two spin-1 particles (such as $B\to\psi K^*$) we need to specify S P and D waves, there should be examples of this in the $D\to KK\pi\pi$ opt file. We should discuss at some point how to split the amplitude and phase across the components (first instinct: make each amplitude 1/3 of the current value, and make all phases the same).]
\\
\\
The idea is we should take consideration of the different angular momentum states (the S, P, D waves) for the decay modes with two spin-1 particles in the intermediate states. For example, the decay $B^0\to \psi(3770)K^*_0(892)$. The initial state $B^0$ has $J^P = 0^-$ (P-odd), while $\psi(3770)$ and $K^*_0(892)$ both has $J^P=1^-$, where $J$ is the intrinsic spin of the particle. Hence the total spin in the final states can be $S = 0,1,2$.
Since the initial state has $J=0$ one need $L+S=0$ in the final state to conserve angular momentum ($L$ is the orbital angular momentum quantum number), which results in $L=0,1,2$ in the final state. This corresponds to value of $S=0,1,2$, and is called S, P and D waves, respectively. The Parity eigenvalue for this decay mode can be calculated from (a deep discussion for this can be found in \autocite{d_Argent_2017}):
\begin{equation}
P = (-1)^L \times \prod\text{(intrinsic parity)} =
\begin{cases}
(-1)^0(-1)(-1) = +1,& \text{if } L=0\;\;(\text{S waves})\\
(-1)^1(-1)(-1) = -1,& \text{if } L=1\;\;(\text{P waves})\\
(-1)^2(-1)(-1) = +1,& \text{if } L=2\;\;(\text{D waves})
\end{cases}
\end{equation}
\label{coupling_const}
Hence, the S and D waves are P-even and the P waves are P-odd, and P violation can be induced from the interference of these waves. The amount of P violation depends on the relative amplitude $A_n$ and phase $\phi_n$ of the waves, where each decay mode with a particular wave has a coupling constant $A_n e^{i\phi_n}$. Thus, the inference amplitudes can be written as:
\begin{align}
\mathcal{I} &= |A_1e^{i\phi_1}+A_2e^{i\phi_2}|^2 \nonumber\\
&=(A_1e^{i\phi_1}+A_2e^{i\phi_2})(A_1e^{-i\phi_1}+A_2e^{-i\phi_2})\nonumber\\
&={A_1}^2 + {A_2}^2 + A_1A_2(e^{i(\phi_2-\phi_1)}+e^{i(\phi_1-\phi_2)})\nonumber\\
&={A_1}^2 + {A_2}^2 + 2A_1A_2\cos(\phi_2-\phi_1)
\end{align}
In the \texttt{B0toDDbar0K+pi-.opt} file, the two spin-1 particles are (all have $J^P=1^-$):
$\psi(3770)$ and $K*(892)0$
$\psi(4040)$ and $K*(892)0$
$\psi(4160)$ and $K*(892)0$
$\psi(4415)$ and $K*(892)0$
\\
\\
For a single resonance,
\texttt{B0\{psi(3770)0\{D0,Dbar0\},K*(892)0\{K+,pi-\}\}\hspace{0.4cm}2\hspace{0.4cm}6.28\hspace{0.4cm}0.05\hspace{0.4cm}2\hspace{0.4cm}0.\hspace{0.4cm}10.}
\\
\\
This was changed by taking 1/3 of the second number column - amplitude):
\texttt{B0[S]\{psi(3770)0\{D0,Dbar0\},K*(892)0\{K+,pi-\}\}\hspace{0.4cm}2\hspace{0.4cm}2.093\hspace{0.4cm}0.05\hspace{0.4cm}2\hspace{0.4cm}0.\hspace{0.4cm}10.}
\texttt{B0[P]\{psi(3770)0\{D0,Dbar0\},K*(892)0\{K+,pi-\}\}\hspace{0.4cm}2\hspace{0.4cm}2.093\hspace{0.4cm}0.05\hspace{0.4cm}2\hspace{0.4cm}0.\hspace{0.4cm}10.}
\texttt{B0[D]\{psi(3770)0\{D0,Dbar0\},K*(892)0\{K+,pi-\}\}\hspace{0.4cm}2\hspace{0.4cm}2.093\hspace{0.4cm}0.05\hspace{0.4cm}2\hspace{0.4cm}0.\hspace{0.4cm}10.}
\\
\\
- There are no errors generated and gives different results as before in the output .root file.
\\
\\
Next:
Adjust the p waves and check p-violation
test for more event numbers
\clearpage
\noindent\textbf{17 Feb 2020, Monday}
\\
\\
The events were generated with increasing event numbers and smaller intervals. It can be seen in Fig.\ref{acp_nospd} that there is a fluctuation in the asymmetries at around $2\cdot 10^5$ events and the asymmetries goes to zero at larger events numbers. This shows no CP and P violation. The errors in the asymmetries decreases asymptotically closing to zero as the event number increases.
\\
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{a_cp/acp_nospd}
\caption{The asymmetries calculated for different number of events.}
\label{acp_nospd}
\end{figure}
\\
\\
By adding the S, P, and D waves, the values of $A_T$ and $\bar{A}_T$ are no longer consistent with zero which means there are P violation induced in the regular and conjugate decays, as shown in Fig.\ref{acp_spd},.
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{a_cp/acp_spd}
\caption{The asymmetries calculated for different number of events with equal SPD waves.}
\label{acp_spd}
\end{figure}
\clearpage
\noindent\textbf{18 Feb 2020, Tuesday}
\\
\\
This part starts by changing the amplitude of P waves in the resonance files:
\\
\\
\textbf{A. Change all P wave amplitudes}
\\
\\
\indent Input files: AmpGen/build/bin/spd\_waves\_gen
\\
\\
\indent Output files: \seqsplit{Simulations/B02DDbarKPi/p\_waves}
\\
\\
event file (.opt) Example:
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_p_10000}
\caption{An example of event file for the plot in Fig.\ref{at_pwave_all_10000}}
\label{event_info_p_10000}
\end{figure}
\\
Changed the second number column in line 12, 15, 21, 23.
\clearpage
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/at_pwave_all_10000}
\caption{The change of $A_T$ by multiplying all the P wave amplitudes with the factors in x-axis using $10^4$ events.}
\label{at_pwave_all_10000}
\end{figure}
\\
All the events and P wave values are generated with the same seed - no seed specified (Seed 0).
\clearpage
\noindent \textbf{B. Change all SP wave amplitudes and make them equal}
\\
\\
\indent Input files: AmpGen/build/bin/spd\_waves\_gen
\\
\\
\indent Output files: \seqsplit{Simulations/B02DDbarKPi/sp\_waves}
\\
\\
event file (.opt) Example:
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_sp_10000}
\caption{An example of event file for the plot in Fig.\ref{at_pwave_all_10000}}
\label{event_info_p_10000}
\end{figure}
\\
Changed the second number column in line 11, 12, 15, 16, 20, 21, 23, 24.
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/at_spwave_all_10000}
\caption{The change of $A_T$ by multiplying all the S and P wave amplitudes with the factors in x-axis using $10^4$ events.}
\label{at_pwave_all_10000}
\end{figure}
\\
\clearpage
\noindent\textbf{19 Feb 2020, Wednesday}
\\
\\
\textbf{C. P waves and SP waves for all resonances}
\\
\\
\indent Input files: AmpGen/build/bin/spd\_waves\_gen\_sr2
\\
\\
\indent Output files: \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_sr2}
\\
\\
event file (.opt) Example:
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_p_sr2_10000}
\caption{An example of event file for the P-wave plot in Fig.\ref{spd_waves_sr2}}
\label{event_info_p_sr2_10000}
\end{figure}
\\
Changed the second number column in line 11, 13, 15, 17.
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_sp_sr2_10000}
\caption{An example of event file for the SP-wave plot in Fig.\ref{spd_waves_sr2}}
\label{event_info_sp_sr2_10000}
\end{figure}
\\
Changed the second number column in line 11, 12, 14, 15, 17, 18, 20, 21.
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/spd_waves_sr2}
\caption{(left) The change of $A_T$ by multiplying the P wave amplitudes with the factors in x-axis using $10^4$ events. (right) The change of $A_T$ by multiplying the S and P wave amplitudes equally with the factors in x-axis using $10^4$ events.}
\label{spd_waves_sr2}
\end{figure}
\clearpage
\noindent Investigation on single resonance $\psi$(3770)K$^*$(892)0:
\\
\\
\textbf{D. use only the P waves or SP waves for a single resonance}
\\
\\
\indent Input files: AmpGen/build/bin/spd\_waves\_gen\_sr1
\\
\\
\indent Output files: \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_sr1}
\\
\\
event file (.opt) Example:
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_p_sr1_10000}
\caption{An example of event file for the P-wave plot in Fig.\ref{spd_waves_sr1}}
\label{event_info_p_sr1_10000}
\end{figure}
\\
Changed the second number column in line 3.
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_sp_sr1_10000}
\caption{An example of event file for the SP-wave plot in Fig.\ref{spd_waves_sr1}}
\label{event_info_sp_sr1_10000}
\end{figure}
\\
Changed the second number column in line 5, 6.
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/spd_waves_sr1}
\caption{(left) The change of $A_T$ by multiplying the P wave amplitudes with the factors in x-axis using $10^4$ events. (right) The change of $A_T$ by multiplying the S and P wave amplitudes equally with the factors in x-axis using $10^4$ events.}
\label{spd_waves_sr1}
\end{figure}
Reasons for flat?
\clearpage
\noindent Investigation on single resonance $\psi$(4040)K$^*$(892)0:
\noindent \textbf{E. P waves and SP waves single resonances with interferences}
\\
\\
\indent Input files: AmpGen/build/bin/spd\_waves\_gen\_sr3
\\
\indent \indent \indent \indent AmpGen/build/bin/B0\_event\_spd\_sr3\_4040/sr1\_seed200\_10000 (for smaller intervals between -1 and 1)
\\
\\
\indent Output files: \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_sr3}
\\
\indent \indent \indent \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_sr\_4040}
\\
\\
event file (.opt) Example:
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_p_sr3_10000}
\caption{An example of event file for the P-wave plot in Fig.\ref{spd_waves_sr3}}
\label{event_info_p_sr3_10000}
\end{figure}
\\
Changed the second number column in line 3.
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_sp_sr3_10000}
\caption{An example of event file for the SP-wave plot in Fig.\ref{spd_waves_sr3}}
\label{event_info_sp_sr3_10000}
\end{figure}
\\
Changed the second number column in line 3, 4.
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/spd_waves_sr3}
\caption{(left) The change of $A_T$ by multiplying the P wave amplitudes with the factors in x-axis using $10^4$ events. (right) The change of $A_T$ by multiplying the S and P wave amplitudes equally with the factors in x-axis using $10^4$ events.}
\label{spd_waves_sr3}
\end{figure}
\clearpage
\noindent\textbf{21 Feb 2020, Friday}
\\
\\
\textbf{F. Split the events into ten files generated with a set of 10 seeds}
\\
\\
(1) Same set of seed for each p wave amplitude:
\\
\indent Seed 0,10,20,30,40,50,60,70,80,90 --- range (0,100,10)
\\
\\
\indent Input files: AmpGen/build/bin/spd\_waves\_gen\_sr3\_seed
\\
\indent \indent \indent \indent AmpGen/build/bin/B0\_event\_spd\_sr3\_4040/sr2\_seed200\_1000 (for smaller intervals between -1 and 1)
\\
\\
\indent Output files: \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_combine\_1E4\_4040}
\\
\indent \indent \indent \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_sr\_4040}
\\
\\
event file (.opt) Example:
\\
\begin{figure}[h]
\center
\includegraphics*[width=0.90\linewidth]{p_wave/event_info_combine_p_10000}
\caption{An example of event file for the P-wave plot in Fig.\ref{spd_waves_combine}}
\label{event_info_combine_p_10000}
\end{figure}
\\
Changed the second number column in line 3, 6.
\begin{figure}[h]
\center
\includegraphics*[width=0.80\linewidth]{p_wave/spd_waves_combine}
\caption{The change of $A_T$ by multiplying the P wave amplitudes with the factors in x-axis using $10^4$ events. }
\label{spd_waves_combine}
\end{figure}
\clearpage
\noindent (2) Different sets of seed for each p wave amplitude:
\\
\\
e.g - Seed 0,20,40,60,80,100,120,140,160,180 --- range (0,200,10) for $factor = 10^{-5}$
Seed 1,21,41,61,81,101,121,141,161,181 for $factor = 10^{-4}$
, etc...
\\
\\
\indent Input files: AmpGen/build/bin/spd\_waves\_gen\_sr3\_seed2
\\
\indent \indent \indent \indent AmpGen/build/bin/B0\_event\_spd\_sr3\_4040/sr3\_seed200\_1000\ +\ sr3\_seed200\_10000 (for smaller intervals between -1 and 1)
\\
\\
\indent Output files: \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_combined2\_1E4\_4040\ +\ spd\_waves\_combined2\_1E5\_4040}
\\
\indent \indent \indent \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_sr\_4040}
\\
\\
event file (.opt) Example:
\\
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_combine2_p_10000}
\caption{An example of event file for the P-wave plot in Fig.\ref{spd_waves_combine2_p}}
\label{event_info_combine2_p_10000}
\end{figure}
\\
Changed the second number column in line 3, 6.
\begin{figure}[h]
\center
\includegraphics*[width=0.60\linewidth]{p_wave/spd_waves_combined2_p}
\caption{The change of $A_T$ by multiplying the P wave amplitudes with the factors in x-axis using $10^4$ and $10^5$ events. }
\label{spd_waves_combined2_p}
\end{figure}
\clearpage
Put the results for $\psi$(4040)K$^*$(892)0 together with more events for the \textbf{E} and \textbf{F}(1) methods, this gives
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/spd_waves_sr_4040}
\caption{The change of $A_T$ by multiplying the P wave amplitudes with the factors in x-axis using $10^4$ and $10^5$ events by generating events using three different methods. }
\label{spd_waves_sr_4040}
\end{figure}
\clearpage
\noindent More investigation on single resonance $\psi$(3770)K$^*$(892)0 using the methods stated in \textbf{E}, \textbf{F}(1) and \textbf{F}(2).
\\
\\
\indent Input files: AmpGen/build/bin/B0\_event\_spd\_sr3\_3770
\\
\\
\indent Output files: \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_sr\_3770}
\\
\\
event file (.opt) Example:
\\
\\
(It was found we didn't specify the coordinate system in the event files. However, this doesn't effect the previous results since all the results were generated from real numbers - no phases)
\\
We should also tell the units for the phase - I use radian.
\\
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_sr_3770}
\caption{An example of event file for the P-wave plot in Fig.\ref{spd_waves_sr_3770}}
\label{event_info_sr_3770}
\end{figure}
\\
Changed the second number column in line 7.
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/spd_waves_sr_3770}
\caption{The change of $A_T$ by multiplying the P wave amplitudes with the factors in x-axis using $10^4$ and $10^5$ events by generating events using three different methods. }
\label{spd_waves_sr_3770}
\end{figure}
\\
Method A = \textbf{E}
\\
Method B = \textbf{F}(1)
\\
Method C = \textbf{F}(2)
\clearpage
\noindent More investigation on all resonance using the methods stated in \textbf{F}(2).
\\
\\
\indent Input files: AmpGen/build/bin/B0\_event\_spd\_nophase
\\
\\
\indent Output files: \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_combine3\_1E4\ +\ spd\_waves\_combine3\_1E5\ +\ spd\_waves\_combine3\_1E6}
\\
\\
event file (.opt) Example:
\begin{figure}[h]
\center
\includegraphics*[width=0.86\linewidth]{p_wave/event_info_combine3_spd}
\caption{An example of event file for the P-wave plot in Fig.\ref{spd_waves_combined3_p}}
\label{event_info_combine3_spd}
\end{figure}
Changed the second number column in line 7, 8, 9, 10.
\begin{figure}[h]
\center
\includegraphics*[width=0.76\linewidth]{p_wave/spd_waves_combined3_p}
\caption{The change of $A_T$ by multiplying the P wave amplitudes with the factors in x-axis using $10^4$, $10^5$ and $10^6$ events. }
\label{spd_waves_combined3_p}
\end{figure}
\clearpage
\noindent\textbf{24 Feb 2020, Monday}
\\
\\
Start varying the phase of the resonance. The phase are chosen to be from -1.5pi to 1.75 pi with intervals of 0.25pi
\\
\\
For the single resonance - $\psi$(3770)K$^*$(892)0,
\\
\\
\indent Input files: AmpGen/build/bin/B0\_event\_sr1\_p\_phase\_1E5
\\
\\
\indent Output files: \seqsplit{Simulations/B02DDbarKPi/spd\_waves\_combine\_phase\_1E5}
\\
\\
event file (.opt) Example:
\\
\begin{figure}[h]
\center
\includegraphics*[width=0.96\linewidth]{p_wave/event_info_combine_phase_1E5}
\caption{An example of event file for the P-wave plot in Fig.\ref{spd_waves_combine_phase_1E5}}
\label{event_info_combine_phase_1E5}
\end{figure}
\\
Changed the second and the fifth number column in line 7.
\begin{figure}[h]
\center
\includegraphics*[width=1.06\linewidth]{p_wave/spd_waves_combine_phase_1E5}
\caption{The change of $A_T$ by multiplying the P wave amplitudes with the factors in x-axis using and changing the phase with $10^5$ events. }
\label{spd_waves_combine_phase_1E5}
\end{figure}
\\
\\
- No obvious parity violation in this single resonance?
\\
The whole process takes 22+7 hours.
Would need some optimization in the codes for calculating $A_T$.
\clearpage
\noindent\textbf{25 Feb 2020, Tuesday}
\\
\\
Have looked at the fitter in AmpGen by first generate $10^4$ events using AmpGen and fit the results with \texttt{SignalOnlyFitter}:
\begin{figure}[h]
\center
\includegraphics*[width=0.86\linewidth]{amplitude_fit/SignalOnlyFitter}
\caption{Instruction of using the \texttt{SignalOnlyFitter}}
\label{SignalOnlyFitter}
\end{figure}
\\
\label{aa_test}
The was done by unfixing (fix=0) the amplitudes and phases of the resonance in the resonance (\texttt{.opt}) file with all the resonances and the S, P and D waves for the two spin-1 resonance being included and fix only one resonance. Here fixing $\psi$(3770)K$^*$(892)0[S] (set to be fix=2) for both amplitude and phase.
\begin{figure}[h]
\center
\includegraphics*[width=0.76\linewidth]{amplitude_fit/resonance_file}
\caption{The amplitude model for the intermediate resonance used for the fit.}
\label{resonance_file}
\end{figure}
\clearpage
\noindent The fitting returns back the real and imaginary part of the amplitude in the resonances of the decay and percentage/probability for the each resonance to occur, based on the four momentum data. This also generates a plot.root file containing the phase space plots. It takes about 5 minutes to finish the fitting for $10^4$ events.
\\
\\
A comparison was made between the generated MC data and the results from the amplitude fitting, as shown below:
\begin{figure}[h]
\center
\includegraphics*[width=0.86\linewidth]{amplitude_fit/compare}
\caption{The verification of the fitter with the generated $B^0$ decays with 10000 events.}
\label{compare_fitter}
\end{figure}
\begin{figure}[h]
\center
\includegraphics*[width=0.86\linewidth]{amplitude_fit/compare_400}
\caption{The verification of the fitter with the generated $B^0$ decays with 400 events (much fewer events).}
\label{compare_fitter_400}
\end{figure}
\\
\\
\clearpage
The comparison of the ratio of the resonances contributed obtained from the fittings were made for different number of events using the Random Seed 7.
\begin{figure}[h]
\center