A measurement is presented of decaytimedependent $CP$ violation in the decays $B^0\rightarrow J/\psi K^0_\mathrm{S}$ and $B^0\rightarrow\psi(2S) K^0_\mathrm{S}$, where the $J/\psi$ is reconstructed from two electrons and the $\psi(2S)$ from two muons. The analysis uses a sample of $pp$ collision data recorded with the LHCb experiment at centreofmass energies of 7 and 8 TeV, corresponding to an integrated luminosity of 3 $\mathrm{fb}^{1}$. The $CP$violation observables are measured to be \begin{equation*} \begin{aligned} C\left(B^0\rightarrow J/\psi K^0_\mathrm{S}\right)&=\phantom{+}\,0.12\,\pm\,0.07\pm\,0.02\,, S\left(B^0\rightarrow J/\psi K^0_\mathrm{S}\right)&=\phantom{+}\,0.83\,\pm\,0.08\pm\,0.01\,, C\left(B^0\rightarrow\psi(2S) K^0_\mathrm{S}\right)&=\,0.05\,\pm\,0.10\pm\,0.01\,, S\left(B^0\rightarrow\psi(2S) K^0_\mathrm{S}\right)&=\phantom{+}\,0.84\,\pm\,0.10\pm\,0.01\,, \end{aligned} \end{equation*} where $C$ describes $CP$ violation in the direct decay, and $S$ describes $CP$ violation in the interference between the amplitudes for the direct decay and for the decay after $B^0$$\overline{B}^0$ oscillation. The first uncertainties are statistical and the second are systematic. The two sets of results are compatible with the previous LHCb measurement using $B^0\rightarrow J/\psi K^0_\mathrm{S}$ decays, where the $J/\psi$ meson was reconstructed from two muons. The averages of all three sets of LHCb results are \begin{equation*} \begin{aligned} C\left(B^0\rightarrow[c\bar{c}]K^0_\mathrm{S}\right)&=0.017 \pm 0.029\,, S\left(B^0\rightarrow[c\bar{c}]K^0_\mathrm{S}\right)&=\phantom{+}0.760 \pm 0.034\,, \end{aligned} \end{equation*} under the assumption that higherorder contributions to the decay amplitudes are negligible. The uncertainties include statistical and systematic contributions.
Invariant mass of the $ B ^0 $ candidates for (left) the $ { J \mskip 3mu/\mskip 2mu\psi \mskip 2mu}$ and (right) the $\psi(2S)$ mode. The lines represent the result of the fit described in the text. 
Fig1a.pdf [73 KiB] HiDef png [277 KiB] Thumbnail [86 KiB] *.C file 

Fig1b.pdf [72 KiB] HiDef png [283 KiB] Thumbnail [90 KiB] *.C file 

Projections of the decaytime fit to weighted (left) $ B ^0 \!\rightarrow { J \mskip 3mu/\mskip 2mu\psi \mskip 2mu} K ^0_{\mathrm{ \scriptscriptstyle S}} $ and \hspace{\textwidth} (right) $ B ^0 \!\rightarrow \psi(2S) K ^0_{\mathrm{ \scriptscriptstyle S}} $ candidates. 
Fig2a.pdf [53 KiB] HiDef png [138 KiB] Thumbnail [57 KiB] *.C file 

Fig2b.pdf [53 KiB] HiDef png [138 KiB] Thumbnail [58 KiB] *.C file 

Signal yield asymmetries $(N_\overline{ B }{} {}^0  N_ B ^0 )/(N_\overline{ B }{} {}^0 + N_ B ^0 )$ versus the decay time for \hspace{\textwidth} (left) $ B ^0 \!\rightarrow { J \mskip 3mu/\mskip 2mu\psi \mskip 2mu} K ^0_{\mathrm{ \scriptscriptstyle S}} $ and (right) $ B ^0 \!\rightarrow \psi(2S) K ^0_{\mathrm{ \scriptscriptstyle S}} $ decays. The symbol $N_ B ^0 $ ($N_\overline{ B }{} {}^0 $) is the number of decays with a $ B ^0 $ ($\overline{ B }{} {}^0 $) flavour tag. The solid curves are the projections of the PDF with the combined flavour tagging decision. 
Fig3a.pdf [45 KiB] HiDef png [117 KiB] Thumbnail [47 KiB] *.C file 

Fig3b.pdf [74 KiB] HiDef png [119 KiB] Thumbnail [48 KiB] *.C file 

Twodimensional likelihood scans for the combination of the (left) $ B ^0 \!\rightarrow { J \mskip 3mu/\mskip 2mu\psi \mskip 2mu} K ^0_{\mathrm{ \scriptscriptstyle S}} $ modes and (right) all $ B ^0 \rightarrow [ c \overline c ] K ^0_{\mathrm{ \scriptscriptstyle S}} $ modes. The confidence level for the inner (outer) contour is $39\%$ ($87\%$). 
Fig4a.pdf [63 KiB] HiDef png [526 KiB] Thumbnail [77 KiB] *.C file 

Fig4b.pdf [65 KiB] HiDef png [839 KiB] Thumbnail [105 KiB] *.C file 

Animated gif made out of all figures. 
PAPER2017029.gif Thumbnail 
Effective flavourtagging efficiencies in per cent of the SS and OS taggers and their combination. 
Table_1.pdf [43 KiB] HiDef png [68 KiB] Thumbnail [10 KiB] tex code 

Parameters used as external inputs in the decaytimedependent fit. The production asymmetries are evaluated individually for both decay modes and separately for the different centreofmass energies of $7$ and $\SI{8}{\TeV}$. If two uncertainties are given the first is statistical and the second systematic. If one uncertainty is given it includes statistical and systematic contributions. 
Table_2.pdf [54 KiB] HiDef png [112 KiB] Thumbnail [18 KiB] tex code 

Systematic uncertainties for the $ C\!P$ violation observables $S$ and $C$. 
Table_3.pdf [77 KiB] HiDef png [130 KiB] Thumbnail [19 KiB] tex code 
Created on 15 February 2019.Citation count from INSPIRE on 15 February 2019.