# Program Repair with Minimal Edits Using CodeT5 ††thanks: This work was
supported by the Japan Society for the Promotion of Science (JSPS) KAKENHI
Grant Number JP23H03508.

Atsushi Shirafuji  University of Aizu
Aizu-Wakamatsu, Japan
<EMAIL_ADDRESS>Md. Mostafizer Rahman  Dhaka University of
Engineering & Technology
Gazipur, Bangladesh
<EMAIL_ADDRESS>Md Faizul Ibne Amin  University of Aizu
Aizu-Wakamatsu, Japan
<EMAIL_ADDRESS>Yutaka Watanobe  University of Aizu
Aizu-Wakamatsu, Japan
<EMAIL_ADDRESS>
###### Abstract

Programmers often struggle to identify and fix bugs in their programs. In
recent years, many language models (LMs) have been proposed to fix erroneous
programs and support error recovery. However, the LMs tend to generate
solutions that differ from the original input programs. This leads to
potential comprehension difficulties for users.

In this paper, we propose an approach to suggest a correct program with
minimal repair edits using CodeT5. We fine-tune a pre-trained CodeT5 on code
pairs of wrong and correct programs and evaluate its performance with several
baseline models.

The experimental results show that the fine-tuned CodeT5 achieves a pass@100
of 91.95% and an average edit distance of the most similar correct program of
6.84, which indicates that at least one correct program can be suggested by
generating 100 candidate programs. We demonstrate the effectiveness of LMs in
suggesting program repair with minimal edits for solving introductory
programming problems.

###### Index Terms:

program repair, programming problems, learning support, computer science
education.

##  I Introduction

Most of the time, programmers edit source code to fix bugs, add new features,
or change existing features. Recent studies have shown that these edits are
repetitive [1, 2], and manually repeating the edits can be error-prone and
time-consuming [3]. Many language models (LMs) have been proposed to assist
debugging by identifying errors and suggesting fixes in source code.
Suggesting correct code for wrong code using LMs can significantly reduce
these repetitive edits and reduce the effort programmers spend to correct the
wrong code.

Several deep learning models, such as recurrent neural network (RNN), long
short-term memory (LSTM), bidirectional LSTM (BiLSTM), LSTM with an attention
mechanism (LSTMAttn), and Transformer, are used to correct erroneous source
code and provide various learning supports, such as predicting the next tokens
[4, 5], fixing bugs in wrong code [6, 7, 8, 9], and improving the performance
and readability [10, 11]. In particular, LMs based on the Transformer
architecture [12] have demonstrated exceptional performance across various
tasks, not only in texts [13, 14] but also in code [15, 16, 17, 18, 19, 20,
21, 22], images [23], and videos [24].

Figure 1: Motivating example of program repair.

However, the code generated by LMs often deviates from user expectations,
necessitating additional effort to edit to rectify the code. As illustrated in
Figure 1, although the top-right program is a more popular solution than the
bottom-right program, it requires larger edits from the wrong program. Since
it can confuse the user in understanding the suggested repair, suggesting a
program with minimal edits is desirable. Despite the importance of whether the
generated programs are helpful for learners, to the best of our knowledge, no
previous work has been undertaken to investigate syntactic similarity and
functional correctness simultaneously.

In this work, to mitigate the learners’ burden of finding the bugs and support
more effective learning programming, we propose using an LM trained on source
code, CodeT5 [17], to suggest a correct program with minimal edits to repair
the given wrong program. By suggesting the correct program that is more
aligned with the user-written program, we can avoid confusing users due to the
large difference in the suggested program from the original program.

We fine-tune a pre-trained CodeT5 on a dataset of code pairs consisting of
wrong and correct programs collected from Aizu Online Judge (AOJ) [25]. We
evaluate the performance of the fine-tuned CodeT5 compared with the following
baseline models.

  * •

Naive copy model to copy the input program as the output program.

  * •

Naive retrieval model to retrieve the most similar program from the training
data.

  * •

Sequence-to-sequence (Seq2Seq) model consisting of a BiLSTM and an LSTMAttn.

Our experimental results demonstrate that the fine-tuned CodeT5 achieves a
91.95% on pass@100. It indicates that at least one correct program can be
suggested by generating 100 candidate programs for 91.95% of the wrong
programs. Moreover, the edit distance of the most similar correctly generated
program is 6.84 on average, whereas the human-crafted repair has 10.76 on
average. We show that the fine-tuned CodeT5 can generate correct programs for
wrong programs with minimal edits to assist in solving introductory
programming problems.

The contributions of this work are as follows.

  * •

We demonstrate that fine-tuning CodeT5 on code pairs of (wrong, correct)
programs performs well on program repair.

  * •

We show that the fine-tuned CodeT5 can generate repaired programs with minimal
edits compared to human-crafted repair.

##  II Related Work

Automated program repair (APR) has been a subject of increasing interest with
the growth of software systems, aiming to reduce the time and effort spent on
debugging by programmers. Many studies have utilized deep learning techniques,
such as RNNs and Transformers, considering the task of converting the wrong
program into a correct one, similar to the neural machine translation task.

As the earlier works leveraged RNNs for program repair, using Seq2Seq based on
RNN [26, 27, 28], LSTM [29, 8], BiLSTM [7, 30], and LSTMAttn [31], has been
proposed. For other attempts, Hoppity [32] used the graph neural network to
capture the graph structure, and CoCoNuT [33] used the convolutional neural
network instead of an LSTM to model source code at different granularity
levels. As one of the works considering the edit distance of generated
programs, Gulwani et al. [34] proposed Clara using the syntactic difference
(tree-edit-distance) as the cost function to find the program repair from the
existing correct student solutions for introductory programming education.
Similarly, Lu et al. [35] proposed a fast and accurate program repair tool,
FAPR, that outperformed Clara in suggesting the correct and smaller programs
according to the qualitative evaluation. As an application, Parihar et al.
[36] applied program repair, enabling automatic grading of incorrect
submissions that contain syntax errors using test cases and awarding partial
marks for them.

In recent years, Transformer-based approaches have performed remarkably well
and are now a dominant model. Especially, Transformer-based [37, 38], BERT
[13]-based [39, 38], and T5 [40]-based [6, 17] models are proposed. CodeT5
[17] has demonstrated the capability in program repair on the CodeXGLUE
benchmark [38].

More recently, using large language models (LLMs) trained on source code has
shown the capability in APR. Several works [41, 9, 42, 43] proposed APR
systems leveraging LLMs such as Codex [15]. Not only fixing syntactic or
semantic bugs, but Codex has also shown the ability to fix security bugs [44],
improving time performance [10] and code readability [11].

Our approach shares similarities with the works mentioned above. However, it
differs in focusing on minimal edits for program repair to better align with
the user-written programs.

##  III Experiments

###  III-A Proposed Approach

Figure 2: Illustration of the proposed approach.

The proposed approach is illustrated in Figure 2. A user inputs a wrong
program, failing to solve a programming problem. After an LM generates
multiple candidate programs, a judge system validates the functional
correctness of the generated programs. For the correctly generated programs,
the most similar program, i.e., the program with the smallest edit distance
with the input program, is suggested to the user. This process allows the user
to obtain a repaired program with minimal edits.

Note that, in this work, we also use naive models instead of the LM for
comparison. In addition, in the experiments, we generate 100 candidate
programs. Increasing the number of candidate programs enhances the accuracy of
suggesting correct programs as it can search for better programs. However, the
system response time must be increased as the number of candidate programs
increases since LMs require much computational time for inference.

###  III-B Dataset

We use Python 3 programs submitted on AOJ [25, 45] for the dataset to train
and evaluate the models. We target a set of programming problems named
Introduction to Programming I
(ITP1)111https://onlinejudge.u-aizu.ac.jp/courses/lesson/2/ITP1/all., an
introductory course with 44 programming problems. The course is designed for
introduction to programming and ranges from requiring standard input and
output to class and method definitions.

Figure 3: Illustration of collecting code pairs consisting of wrong and
correct programs from the same user. AC indicates correct programs, and WA,
RE, TLE, and MLE indicate wrong programs, such as wrong answer, runtime error,
time limit exceeded, and memory limit exceeded, respectively.

For the program repair task, we collect code pairs of wrong and correct
programs from AOJ, as shown in Figure 3. If a wrong program is submitted
before the correct program, we consider it an attempt and make a code pair
(wrong, correct) with the correct program. For program consistency, each code
pair consists of the submissions from the same user.

As preprocessing, we only use the code whose token-based length is more than 0
and less than 256. In addition, we remove duplicated code pairs to avoid
overfitting and cheating in training and evaluating models.

After shuffling the collected code pairs, we split the code pairs into 90% for
training or fine-tuning, 5% for validation, and 5% for testing. Table I shows
the number of code pairs and their average edit distance between wrong and
correct programs.

TABLE I: The number of code pairs in each set. | #Code Pairs | Avg. Edit Distance (Std)
---|---|---
Train | 52,526 (90%) | 10.72 (13.68)
Valid | 2,918 (5%) | 10.95 (14.39)
Test | 2,918 (5%) | 11.34 (17.14)
Total | 58,362 | 10.76 (13.91)

###  III-C Evaluation Metrics

####  III-C1 Pass Rate

Pass rate (also known as success rate) is a metric showing the percentage of
problems solved by generating $k$ programs for each problem [15]. A problem is
considered solved if any generated program solves the problem (i.e., passes
all test cases). However, this work uses this metric to show the percentage of
wrong programs that are repaired by generating $k$ programs for each wrong
program. Therefore, a wrong program is considered repaired if any generated
program solves the problem.

In this work, we use an unbiased estimator of pass rate for programs,
pass@$k$, inspired by Chen et al. [15]. Pass@$k$ is denoted as Formula 1,
where $n\geq k$ is the number of samples and $c\leq n$ is the number of
correct samples.

$\text{Pass@$k$}:=\mathop{\mathbb{E}}_{\text{Programs}}\left[1-\frac{{\binom{n-c}{k}}}{\binom{n}{k}}\right]$
(1)

Whether the generated program solved the given programming problem (i.e.,
functional correctness) is validated by executing it using hidden test cases.
More detail about the evaluation of generated programs is described in Section
III-E. We report pass@$k$ at $k\in\\{1,10,100\\}$ where $n=100$ samples are
generated for each wrong program.

####  III-C2 Compilability

Compilability is the syntactic correctness of programs, showing whether the
program passes the compilation. It does not account for semantic correctness.
Therefore, a compilable program can be a wrong program. Inspired by the
pass@$k$, we define compilable@$k$ as Formula 2, where $n\geq k$ is the number
of samples and $c\leq n$ is the number of compilable samples.

$\text{Compilable@$k$}:=\mathop{\mathbb{E}}_{\text{Programs}}\left[1-\frac{{\binom{n-c}{k}}}{\binom{n}{k}}\right]$
(2)

We report compilable@$k$ at $k\in\\{1,10,100\\}$ where $n=100$.

####  III-C3 BLEU

To evaluate the syntactic similarity of generated programs against the
expected correct programs, we report smoothed BLEU-4 scores [46, 47]. Although
several works reported that BLEU is not a good metric in code-related tasks,
as it does not account for functional correctness [48, 49, 15], we use this
metric to show how much the generated programs syntactically match the
expected programs for reference. In this work, BLEU scores are computed based
on tokens, which are tokenized using the pre-trained byte-pair encoding (BPE)
tokenizer of CodeT5,
codet5-base222https://huggingface.co/Salesforce/codet5-base, from the
tokenizers333https://github.com/huggingface/tokenizers. library. To compute
the BLEU scores, we employ the
evaluate444https://github.com/huggingface/evaluate. library.

####  III-C4 Exact Match

Exact Match is a metric that measures the percentage of generated programs
that exactly match the expected target programs. This metric provides insights
into the model’s ability to replicate the exact solution, which can be
particularly useful in certain use cases where the exact replication of the
solution is required. However, it is noteworthy that a low Exact Match score
does not necessarily imply poor performance, as the model might generate
functionally correct but syntactically different programs. Therefore, while
Exact Match provides valuable information, it should be interpreted with other
metrics that measure functional correctness and syntactic similarity, such as
pass@$k$, compilable@$k$, and BLEU. We report the ratio of the Exact Match.

####  III-C5 Edit Distance

Edit distance (also known as Levenshtein distance [50]) is used to measure the
dissimilarity between the source and the generated programs. It quantifies the
minimum number of character-level changes (insertions, deletions, and
substitutions) required to transform the source program into the generated
one. This metric indicates the magnitude of alterations the model makes to
obtain the correct program, as well as the number of edits required to repair
the wrong program.

In addition to the character-based edit distance, we also report two specific
edit distances: correct and top-1. The correct edit distance is computed
between the source and correctly generated programs, indicating the
alternations required to correct the wrong program, whereas the default edit
distance includes edits from wrong to wrong programs. The top-1 edit distance,
on the other hand, is calculated between the source and the most syntactically
similar correct program, providing insight into the best-case scenario of
successful program repair.

Unlike other metrics, the edit distance does not involve the target program;
the calculation is performed solely using the source and generated programs.
This makes it a helpful metric in understanding the model’s strategy in
problem-solving - whether it heavily modifies the source program or makes
minimal edits. This work primarily focuses on minimizing the edit distance
metrics while keeping the functional correctness of the generated programs.

###  III-D Models

####  III-D1 Naive

For the simplest baseline models to compare with the fine-tuned LM, we employ
two types of naive models: Naive Copy and Naive Retrieval.

##### Naive Copy

We refer to the model Naive Copy as the model to copy the input program as the
output program. Since the input program is always wrong, the output program is
always wrong (i.e., pass@$k$ is always 0% at any $k$). However, note that the
output program can be compilable (i.e., compilable@$k$ can be greater than 0%)
since the wrong program includes the wrong answer, which passed the
compilation, but the output is wrong. Although Naive Copy does not repair
programs, it can be a base comparison from the perspective of BLEU scores, as
it constantly generates a similar program to the target program.

##### Naive Retrieval

We refer to the model Naive Retrieval as the model to retrieve the most
similar program from the training data in each programming problem using
linear search. The program with the shortest edit distance in the training
data is considered the most similar program. Since Naive Retrieval retrieves a
correct program from the training data, programs generated by this model are
ensured to be correct (i.e., pass@$k$ and compilable@$k$ are always 100% at
any $k$). The key aspect of comparing with this model is the edit distance.
This model can result in 100% correctness but does not necessarily generate
the most helpful program.

####  III-D2 Seq2Seq

For the baseline model based on LMs, we also use an LSTM-based Seq2Seq model.
A Seq2Seq model is composed of an encoder and a decoder parts. The encoder
utilizes a BiLSTM to parse the input sequences and extract their features. The
decoder, on the other hand, employs an LSTMAttn. The attention mechanism
allows the decoder access to all parts of the input sequences. The total
number of model parameters is 12.4M. We employ
fairseq555https://github.com/facebookresearch/fairseq. [51] for model
training.

####  III-D3 CodeT5

CodeT5 [17] is a Transformer-based [12] LM specifically tailored for source
code. It is a variant of the T5 [40] model, which is designed to handle any
text-to-text conversion tasks. CodeT5 has shown the capability in the code
refinement (program repair) task from the CodeXGLUE benchmark [38] by fine-
tuning. We use the codet5-base666https://huggingface.co/Salesforce/codet5-base
model, which has 220M parameters, and fine-tune it on our dataset. We use the
transformers777https://github.com/huggingface/transformers. library to load
the model and conduct the fine-tuning.

###  III-E Environment

For the evaluation of program correctness, generated programs are executed on
an isolated judge system to validate the functional correctness. The judge
system uses hidden test cases for the programming problem provided by AOJ. The
program is judged correct if it passes all hidden test cases and is incorrect
otherwise.

Experiments for Seq2Seq and CodeT5 models (especially training and inference)
are conducted in a GPU environment with one NVIDIA A100 40GB GPU. Experiments
for naive models and evaluations by the judge systems are conducted in a CPU
environment.

##  IV Results

TABLE II: Results evaluated on the test set. Naive Copy copies the input data as the output data, which is ensured to be incorrect but can be compilable. Naive Retrieval retrieves the most similar program from the training data, which is ensured to be correct. Seq2Seq and CodeT5 models generate 100 samples for each code pair. Correct indicates the average edit distance between input and correctly generated programs, and Top-1 indicates the average edit distance between input and the most similar correctly generated programs. The best score in LM-based models for each metric is represented in bold. Model | Pass@$k$ | Compilable@$k$ | BLEU | Exact Match | Edit Distance (Std)
---|---|---|---|---|---
$k=1$ | $k=10$ | $k=100$ | $k=1$ | $k=10$ | $k=100$ | All | Correct | Top-1
Naive Models
Copy | 0.00% | — | — | 3.32% | — | — | 90.80 | 0.00% | 0.00 (0.00) | — | —
Retrieval | 100.00% | — | — | 100.00% | — | — | 66.25 | 8.46% | 37.50 (51.78) | 37.50 (51.78) | 37.50 (51.78)
Language Models
Seq2Seq | 38.36% | 52.43% | 62.58% | 74.51% | 89.42% | 95.24% | 88.67 | 24.35% | 13.36 (25.27) | 7.10 (8.16) | 7.22 (9.32)
CodeT5 | 72.52% | 88.34% | 91.95% | 97.78% | 99.49% | 99.76% | 99.64 | 44.48% | 8.54 (11.70) | 8.31 (10.28) | 6.84 (8.69)

###  IV-A Training Results

For training and fine-tuning, we adopt an early-stopping strategy to avoid
overfitting, where the patience for BLEU is set to 5. The training or fine-
tuning stops when the validation BLEU is not improved for 5 epochs.

Figure 4: Valid BLEU throughout training/fine-tuning. The best BLEU score for
each model is represented in red point.

Figure 4 shows the BLEU scores on validation set throughout training or fine-
tuning. The training takes 21.0 hours for 21 epochs in the Seq2Seq model, and
the fine-tuning takes 11.5 hours for 11 epochs in the CodeT5 model. The best
validation BLEU for Seq2Seq is 88.84 at epoch 16, and that for CodeT5 is 94.68
at epoch 6.

###  IV-B Evaluation Results

Table II shows the evaluation results of the test set. For sampling in Seq2Seq
and CodeT5 models, we generate $n=100$ samples for each code pair, where the
sampling temperature is set to $\mathcal{T}=0.7$, and the number of maximum
tokens is set to 256. Note that pass@$k$ of Naive Copy is ensured to be 0%
since it copies the wrong program, whereas the compilable@$k$ can be greater
than 0% since it contains the wrong but compilable program, such as the output
value is wrong. Similarly, pass@$k$ and compilable@$k$ of Naive Retrieval are
ensured to be 100% since the Naive Retrieval retrieves the correct program
from the training data. Since the naive models copy or retrieve only one
program, we only report pass@$k$ and compilable@$k$ at $k=1$. In addition,
since the Naive Copy cannot generate any correct programs, the edit distance
of correct and top-1 is invalid, and the cells are in NA.

Fine-tuned CodeT5 model performs the best on pass@$k$ and compilable@$k$ at
any $k$, compared with the Seq2Seq model. The pass@100 of 91.95% by CodeT5
indicates that the fine-tuned CodeT5 can generate at least one correct program
for 91.95% of wrong programs by generating 100 candidates, whereas the Seq2Seq
can do it for only 62.58% of the programs.

In addition, CodeT5 performs the best on BLEU and Exact Match, compared with
all baseline models. Although the higher BLEU and Exact Match do not
necessarily indicate the performance in generating better correct programs, it
shows the better understanding capability of CodeT5 in generating the target
programs.

For the edit distance, Seq2Seq and CodeT5 achieve 13.36 ($\pm$ 25.27) and 8.54
($\pm$ 11.70), respectively. As the edit distance of collected code pairs is
10.76 ($\pm$ 13.91), as shown in Table I, it shows that CodeT5 performs better
than humans in repairing wrong programs with minimal edits, whereas Seq2Seq
performs worse than humans.

##  V Discussion

##### Naive Copy achieves a high BLEU score

Naive Copy achieves a BLEU score of 90.80, outperforming the Seq2Seq of 88.67,
although the Exact Match is 0.00%. This is because, as the edit distance of
the collected code pairs is small, as shown in Table I, the program repair
task does not require many edits, i.e., there is already much duplication in
tokens between wrong and correct programs. Therefore, the BLEU score, which is
calculated based on the matching degree of tokens between the wrong and
correct programs, is likely to be high. Although the Naive Copy cannot program
repair at all, it achieves a high BLEU score due to the nature of the
calculation of BLEU. However, the fact that Seq2Seq is much worse than the
Naive Copy on BLEU indicates that Seq2Seq makes unnecessary edits and makes
the source program further away from the target programs.

##### Naive Retrieval achieves 100% in pass@1

As we mentioned, pass@1 and compilable@1 of Naive Retrieval are ensured to be
100% since the Naive Retrieval retrieves the correct program from the training
data. Although the Naive Retrieval achieves 100% in pass@1, the edit distance
is 37.50 ($\pm$ 51.78), and it is more than three times higher than those of
the collected code pairs of 10.76 ($\pm$ 13.91). It presents a problem of the
Naive Retrieval of making extensive edits, e.g., some of the input programs
are converted into a completely different program if there is no similar
program in the training data to be corrected. However, although the edit
distance can be large, the Naive Retrieval is still helpful in suggesting the
correct program when the LMs, such as CodeT5, fail to generate the correct
program. Therefore, Naive Retrieval can be used as a hybrid with machine
learning models.

(a) Seq2Seq

(b) CodeT5

Figure 5: Edit distance of original v.s. generated programs. The code pair is
considered correct if at least one generated program is correct.

##### Edit distance of correct programs is shorter in Seq2Seq than in CodeT5

Seq2Seq achieves 7.10 ($\pm$ 8.16) on the edit distance of correctly generated
programs, and it outperforms those of CodeT5 at 8.31 ($\pm$ 10.28). From this
result, it seems that Seq2Seq performs better in generating programs with
shorter edits for correct programs than CodeT5. However, this result is
strongly affected by the bias that Seq2Seq fails to generate correct programs
for the wrong programs that require longer edits, and it does not indicate
that Seq2Seq is more capable than CodeT5. As shown in Figure 5, the edit
distance of the generated programs by Seq2Seq (Figure 5(a)) is much larger
than CodeT5 (Figure 5(b)). In the figure, the points on the right indicate the
programs that require longer edits, and the points on the top indicate the
generated programs that have longer edits. Therefore, Figure 5 indicates that
(1) incorrectly generated programs have longer edits in Seq2Seq, and (2) more
incorrectly generated programs for programs requiring longer edits in Seq2Seq.
In addition, Figure 6 shows that CodeT5 can generate correct programs for
programs requiring longer edit distance, whereas Seq2Seq fails.

Figure 6: Mean pass@100 grouped by original edit distance, which is calculated
between source and target programs.

##  VI Conclusion

In this paper, we propose using a language model trained on source code,
CodeT5, to suggest correct programs with minimal edits for program repair. We
fine-tune the pre-trained CodeT5 model on code pairs consisting of wrong and
correct programs and evaluate its performance compared to several baseline
models. Our experimental results show that the fine-tuned CodeT5 model
outperforms the baseline models in generating correct programs with shorter
edit distances from the input programs. While the naive retrieval model
achieved 100% correctness in suggesting code repairs, the average edit
distance between the suggested programs and the input programs was 36.37,
which is much longer than the average edit distance of 11.34 for the test
data. On the other hand, the CodeT5 model achieves a pass@100 of 91.95%, which
indicates that at least one correct program can be suggested by generating 100
candidate programs, and an average edit distance of 8.54 between the input and
the generated programs, demonstrating its effectiveness in suggesting concise
program repairs. While the Seq2Seq model seems to generate programs with a
shorter average edit distance than the CodeT5 model when filtering only the
correct programs, it fundamentally fails to generate correct programs for
incorrect programs that require longer edits. In conclusion, the proposed
method using CodeT5 shows promise in program repair by suggesting accurate and
concise program repairs with minimal edits for solving introductory
programming problems. Future work includes further improvements of the
correctness and edit distance and exploring other LM-based approaches for
program repair.

## References

  * [1] H. A. Nguyen, A. T. Nguyen, T. T. Nguyen, T. N. Nguyen, and H. Rajan, “A study of repetitiveness of code changes in software evolution,” in Proceedings of the 28th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 180–190, 2013.
  * [2] S. Chakraborty, Y. Ding, M. Allamanis, and B. Ray, “CODIT: Code editing with tree-based neural models,” IEEE Transactions on Software Engineering, vol. 48, no. 4, pp. 1385–1399, 2022.
  * [3] B. Ray, M. Kim, S. Person, and N. Rungta, “Detecting and characterizing semantic inconsistencies in ported code,” in Proceedings of the 28th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 367–377, 2013.
  * [4] A. Svyatkovskiy, S. K. Deng, S. Fu, and N. Sundaresan, “IntelliCode Compose: Code generation using transformer,” in Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), p. 1433–1443, 2020.
  * [5] K. Terada and Y. Watanobe, “Code completion for programming education based on deep learning,” International Journal of Computational Intelligence Studies, vol. 10, no. 2-3, pp. 78–98, 2021.
  * [6] B. Berabi, J. He, V. Raychev, and M. Vechev, “TFix: Learning to fix coding errors with a text-to-text transformer,” in Proceedings of the 38th International Conference on Machine Learning (ICML), vol. 139, pp. 780–791, 2021.
  * [7] M. M. Rahman, Y. Watanobe, and K. Nakamura, “A bidirectional lstm language model for code evaluation and repair,” Symmetry, vol. 13, no. 2, 2021.
  * [8] T. Matsumoto, Y. Watanobe, and K. Nakamura, “A model with iterative trials for correcting logic errors in source code,” Applied Sciences, vol. 11, no. 11, 2021.
  * [9] H. Joshi, J. Cambronero Sanchez, S. Gulwani, V. Le, G. Verbruggen, and I. Radiček, “Repair is nearly generation: Multilingual program repair with llms,” Proceedings of the AAAI Conference on Artificial Intelligence, vol. 37, no. 4, pp. 5131–5140, 2023.
  * [10] A. Madaan, A. Shypula, U. Alon, M. Hashemi, P. Ranganathan, et al., “Learning performance-improving code edits,” arXiv preprint, 2023.
  * [11] A. Madaan, N. Tandon, P. Gupta, S. Hallinan, L. Gao, et al., “Self-Refine: Iterative refinement with self-feedback,” arXiv preprint, 2023.
  * [12] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, et al., “Attention is all you need,” in Advances in Neural Information Processing Systems (NIPS), vol. 30, 2017.
  * [13] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of deep bidirectional transformers for language understanding,” in Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171–4186, 2019.
  * [14] T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, et al., “Language models are few-shot learners,” in Advances in Neural Information Processing Systems (NeurIPS), vol. 33, pp. 1877–1901, 2020.
  * [15] M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. de Oliveira Pinto, et al., “Evaluating large language models trained on code,” arXiv preprint, 2021.
  * [16] Y. Li, D. Choi, J. Chung, N. Kushman, J. Schrittwieser, et al., “Competition-level code generation with AlphaCode,” Science, vol. 378, no. 6624, pp. 1092–1097, 2022.
  * [17] Y. Wang, W. Wang, S. Joty, and S. C. Hoi, “CodeT5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation,” in Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 8696–8708, 2021.
  * [18] D. Fried, A. Aghajanyan, J. Lin, S. Wang, E. Wallace, et al., “InCoder: A generative model for code infilling and synthesis,” in Proceedings of the 11th International Conference on Learning Representations (ICLR), 2023.
  * [19] E. Nijkamp, B. Pang, H. Hayashi, L. Tu, H. Wang, et al., “CodeGen: An open large language model for code with multi-turn program synthesis,” in Proceedings of the 11th International Conference on Learning Representations (ICLR), 2023.
  * [20] Q. Zheng, X. Xia, X. Zou, Y. Dong, S. Wang, et al., “CodeGeeX: A pre-trained model for code generation with multilingual benchmarking on humaneval-x,” in Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD), p. 5673–5684, 2023.
  * [21] R. Li, L. B. Allal, Y. Zi, N. Muennighoff, D. Kocetkov, et al., “StarCoder: may the source be with you!,” arXiv preprint, 2023.
  * [22] Z. Luo, C. Xu, P. Zhao, Q. Sun, X. Geng, et al., “WizardCoder: Empowering code large language models with evol-instruct,” arXiv preprint, 2023.
  * [23] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, et al., “An image is worth 16x16 words: Transformers for image recognition at scale,” in Proceedings of the 9th International Conference on Learning Representations (ICLR), 2021.
  * [24] A. Arnab, M. Dehghani, G. Heigold, C. Sun, M. Lučić, and C. Schmid, “ViViT: A video vision transformer,” in Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 6816–6826, 2021.
  * [25] Y. Watanobe, “Aizu Online Judge,” 2004.  https://onlinejudge.u-aizu.ac.jp.
  * [26] S. Bhatia and R. Singh, “Automated correction for syntax errors in programming assignments using recurrent neural networks,” 2016.
  * [27] Y. Pu, K. Narasimhan, A. Solar-Lezama, and R. Barzilay, “Sk_p: A neural program corrector for moocs,” in Companion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH), p. 39–40, 2016.
  * [28] M. Tufano, C. Watson, G. Bavota, M. D. Penta, M. White, and D. Poshyvanyk, “An empirical study on learning bug-fixing patches in the wild via neural machine translation,” ACM Transactions on Software Engineering and Methodology, vol. 28, no. 4, 2019.
  * [29] Z. Chen, S. Kommrusch, M. Tufano, L.-N. Pouchet, D. Poshyvanyk, and M. Monperrus, “SequenceR: Sequence-to-sequence learning for end-to-end program repair,” IEEE Transactions on Software Engineering, vol. 47, no. 9, pp. 1943–1959, 2021.
  * [30] M. M. Rahman, Y. Watanobe, P. Szmeja, P. Sowiński, M. Paprzycki, and M. Ganzha, “Code semantics learning with deep neural networks: An ai-based approach for programming education,” in Proceedings of the 23rd International Conference on Computational Science (ICCS), pp. 737–750, 2023.
  * [31] H. Hata, E. Shihab, and G. Neubig, “Learning to generate corrective patches using neural machine translation,” arXiv preprint, 2019.
  * [32] E. Dinella, H. Dai, Z. Li, M. Naik, L. Song, and K. Wang, “Hoppity: Learning graph transformations to detect and fix bugs in programs,” in Proceedings of the 16th International Conference on Learning Representations (ICLR), 2020.
  * [33] T. Lutellier, H. V. Pham, L. Pang, Y. Li, M. Wei, and L. Tan, “CoCoNuT: Combining context-aware neural translation models using ensemble for program repair,” in Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA), p. 101–114, 2020.
  * [34] S. Gulwani, I. Radiček, and F. Zuleger, “Automated clustering and program repair for introductory programming assignments,” in Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), p. 465–480, 2018.
  * [35] Y. Lu, N. Meng, and W. Li, “FAPR: Fast and accurate program repair for introductory programming courses,” arXiv preprint, 2021.
  * [36] S. Parihar, Z. Dadachanji, P. K. Singh, R. Das, A. Karkare, and A. Bhattacharya, “Automatic grading and feedback using program repair for introductory programming courses,” in Proceedings of the 2017 ACM Conference on Innovation and Technology in Computer Science Education (ITiCSE), p. 92–97, 2017.
  * [37] D. Drain, C. Wu, A. Svyatkovskiy, and N. Sundaresan, “Generating bug-fixes using pretrained transformers,” in Proceedings of the 5th ACM SIGPLAN International Symposium on Machine Programming (MAPS), p. 1–8, 2021.
  * [38] S. Lu, D. Guo, S. Ren, J. Huang, A. Svyatkovskiy, et al., “CodeXGLUE: A machine learning benchmark dataset for code understanding and generation,” in Proceedings of the Neural Information Processing Systems (NeurIPS) Track on Datasets and Benchmarks, vol. 1, 2021.
  * [39] Z. Feng, D. Guo, D. Tang, N. Duan, X. Feng, et al., “CodeBERT: A pre-trained model for programming and natural languages,” in Findings of the Association for Computational Linguistics: EMNLP, pp. 1536–1547, 2020.
  * [40] C. Raffel, N. Shazeer, A. Roberts, K. Lee, S. Narang, et al., “Exploring the limits of transfer learning with a unified text-to-text transformer,” Journal of Machine Learning Research, vol. 21, no. 140, pp. 1–67, 2020.
  * [41] J. A. Prenner, H. Babii, and R. Robbes, “Can openai’s codex fix bugs? an evaluation on quixbugs,” in Proceedings of the 3rd International Workshop on Automated Program Repair (APR), p. 69–75, 2022.
  * [42] J. Zhang, J. Cambronero, S. Gulwani, V. Le, R. Piskac, et al., “Repairing bugs in python assignments using large language models,” arXiv preprint, 2022.
  * [43] M. Jin, S. Shahriar, M. Tufano, X. Shi, S. Lu, et al., “InferFix: End-to-end program repair with llms,” arXiv preprint, 2023.
  * [44] H. Pearce, B. Tan, B. Ahmad, R. Karri, and B. Dolan-Gavitt, “Examining zero-shot vulnerability repair with large language models,” in Proceedings of the 2023 IEEE Symposium on Security and Privacy (SP), pp. 2339–2356, 2023.
  * [45] Y. Watanobe, M. M. Rahman, T. Matsumoto, U. K. Rage, and P. Ravikumar, “Online judge system: Requirements, architecture, and experiences,” International Journal of Software Engineering and Knowledge Engineering, vol. 32, no. 4, pp. 1–30, 2022.
  * [46] K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu, “BLEU: A method for automatic evaluation of machine translation,” in Proceedings of the 40th Annual Meeting on Association for Computational Linguistics (ACL), pp. 311–318, 2002.
  * [47] C.-Y. Lin and F. J. Och, “ORANGE: a method for evaluating automatic evaluation metrics for machine translation,” in COLING 2004: Proceedings of the 20th International Conference on Computational Linguistics, pp. 501–507, 2004.
  * [48] S. Ren, D. Guo, S. Lu, L. Zhou, S. Liu, et al., “CodeBLEU: a method for automatic evaluation of code synthesis,” arXiv preprint, 2020.
  * [49] B. Roziere, M.-A. Lachaux, L. Chanussot, and G. Lample, “Unsupervised translation of programming languages,” in Advances in Neural Information Processing Systems (NeurIPS), vol. 33, pp. 20601–20611, 2020.
  * [50] V. I. Levenshtein, “Binary Codes Capable of Correcting Deletions, Insertions and Reversals,” Soviet Physics Doklady, vol. 10, p. 707, 1966.
  * [51] M. Ott, S. Edunov, A. Baevski, A. Fan, S. Gross, et al., “fairseq: A fast, extensible toolkit for sequence modeling,” in Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), pp. 48–53, 2019.


The Single-Photon Annihilation of Channeled Positron in Si Crystal

K.B. Korotchenko1$\star$, Y.P. Kunashenko2

1 National Research Tomsk Polytechnic University, Lenin Ave. 30, 634050 Tomsk,
Russia

2 Tomsk State Pedagogical University, Kievskaya Str. 60, 634061 Tomsk, Russia

⋆ CorrespondingAuthor<EMAIL_ADDRESS>
## Abstract

The differential cross-section of the single-photon annihilation of channeled
positron on the K-shell electron of one of the crystal atoms is calculated and
angular distribution of emitted photons is investigated. It is shown that
cross-section has a complicated dependence on positron entrance angle with
respect to crystal plane. It is demonstrated that this orientation dependence
is different for different positron transverse energy levels. The dependence
of the differential cross-section on the electron longitudinal energy is
studied.

###### Contents

  1. 1 Introduction
  2. 2 Single-photon annihilation probability
  3. 3 Calculation of the single-photon annihilation matrix element
  4. 4 Numerical results
  5. 5 Discussion
  6. 6 Conclusions

##  1 Introduction

It is well known that due to momentum and energy conservation laws free
electrons and positrons can annihilate only into two or more photons. The
situation changes if this process occurs in an external electromagnetic field
when part of the transmitted momentum is taken by the field and as a result,
single-photon annihilation (SPA) becomes possible [1, 2]. At present, the
phenomenon of SPA of the electron and the positron in the external fields was
studied theoretically and experimentally.

Fermi and Uhlenbeck [3] first considered the SPA of the free positron with the
atomic electron. The more detailed theory was developed in [4, 5, 6, 7, 8, 9,
10, 11, 12, 13]. The cross-section of the SPA of relativistic positron with
$K$-shell electron of the atom was calculated in [4], where also the
interaction of the positron with the atom was taken into account. In the paper
[7] it was discussed SPA of positrons, where the positive electron (positron)
was regarded as a hole in the negative energy electrons distribution, and the
process of annihilation was described as an atomic electron jumping down into
this hole with the emission of a single photon.

The cross-sections for the SPA of longitudinally polarized positrons and for
the photoelectric effect produced by longitudinally polarized photons were
derived in [8]. A photoelectric effect and SPA in hydrogen with large momentum
transfer were studied, taking into account the recoil and anomalous magnetic
moment of proton in [9]. The calculations of the cross-section for SPA of
positrons by $K$-shell electrons in the Coulomb field of a nucleus were
presented in [10]. In this paper, the numerical results were given for nuclear
charges $Z=73,74,78,79,82$, and $90$ and for positron energies from threshold
to $1.75$ MeV. Angular distributions of radiation arising from the SPA of
positrons with $K$-shell electrons were calculated in [11]. Numerical
calculations of the differential and total cross-sections of the SPA of
positrons in an atomic field were presented in [12] for the $K$ and $L$ shells
for atomic nuclei with $Z=47$ to $Z=92$. The process of annihilation of a fast
positron with a $K$-shell electron, accompanied by emission of a photon and a
second $K$-shell electron was studied in [13].

The experimental investigations of the SPA of positron in the field of atom
was performed in [14, 15].

The SPA of an electron-positron pair in the pulsed light field was
investigated theoretically in [16]. The pulsed laser field was described by
the plane circularly polarized electromagnetic wave. The analytical
expressions for the probability of the studied process were derived.

The one- and two-photon annihilation processes of the electron-positron pairs
in an ultra-strong magnetic field at a middle relativistic regime were
considered in [17, 18]. In the paper [19] it was studied the annihilation of
free electrons and positrons in intense magnetic fields. It was shown when
both the electron and the positron are in the lowest energy state the
resulting gamma rays emerge predominantly transverse to the field direction;
in the case where one of the particles is in an excited state, the radiation
is predominantly along the field direction.

The interaction of charged particles with oriented crystal for a long time is
a perceptive field of research both theory and experiment. The passage of
particles through crystals is accompanied by various physical phenomena, for
example, coherent bremsstrahlung and coherent pair production, channeling
radiation, the electron-positron pair creation, and others. These phenomena
are described in detail in a number of monographs and original articles (see
for example [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
and references therein).

When relativistic positrons pass through the crystal in the channeling regime,
one- and two-photon annihilation processes are possible. For the first time,
SPA of the channeled positron was theoretically considered in [36]. In this
paper, the orientation dependence of SPA on the positron incidence angle with
respect to the crystal plane was qualitatively studied. The annihilation of
the channeled in crystal positron was experimentally studied in [37, 38] in
order to investigate the features of the crystal lattice. From the
experimental point of view, it was more convenient to use a two-photon
process.

In the present paper, for the first time we carried out an exact calculation
of the differential cross-section of SPA of the planar channeled positron, and
for the first time, it is detailed investigated the angular distribution of
photons arising in SPA of the channeled positrons with the $K$-shell electron
of one of the crystal atoms was calculated.

##  2 Single-photon annihilation probability

The channeled phenomenon arises when a particle moved in the continuous
potential of the system of crystal planes (axes) in the bound states. The
positron passing through a crystal in a planar channeled mode can collide with
a $K$-shell electron of one of the crystal atoms and as a result, electron and
positron could annihilate. Because both electron and positron travel in the
external fields, therefore, there is a possible SPA process.

The single-photon annihilation of the electron-positron pair is described by a
first-order Feynman diagram (Fig.1).

Figure 1: Feynman diagram for single-photon annihilation of channeled positron
on $K$-shell electron. The double arrow represents the $K$-shell electron of
the atom, the single arrow is channeled positron and waved arrow is the
photon.

In our case when the channeled positron annihilate with the electron of the
atom of crystal this Feynman diagram coincides with one for positron
Channeling Radiation (CR) if one replaced the wave function of the crystal
atom $K$-shell electron by the positron wave function of the final state.

Consequently, the probability of SPA of a channeled positron in a crystal is
written similarly to the probability of radiation, but additionally, it is
necessary to change the final state density of CR onto
$d\varrho_{f}=L^{3}d^{3}{\boldsymbol{\kappa}}/(2\pi)^{3}$, where and
${\boldsymbol{\kappa}}$ is the wave vector of the photon at the final states
and $L$ is the normalization length

$dw_{if}=\frac{2\pi}{\hbar}\mid
M_{if}\mid^{2}\delta(E_{i}-E_{f})d\varrho_{f}\>.$ (1)

Here $M_{if}$ is a matrix element of SPA of channeled positron with the
$K$-shell electron of one of the crystal atoms. According to Feynman diagram
(Fig.1), the matrix element has a form

$M_{if}=-e\int j^{\mu}_{if}A^{\ast}_{\mu}d^{3}{\bf r}\>,$ (2)

where the 4-vector $A_{\mu}$ represents the wave function of a photon,
$j^{\mu}_{if}=\bar{\Psi}_{f}\boldsymbol{\gamma}^{\mu}\psi_{i}$ is the
particles ’current operator’, $\boldsymbol{\gamma}^{\mu}$ is the Dirac matrix,
$\psi_{i}$ is the wave function of a channeled positron and $\Psi_{f}$ is the
wave function of a $K$-shell electron.

If for the 4-vector $A_{\mu}$ we chose Coulomb gauge ${\bf\nabla A}=0$ and
take into account $\varphi_{0}=A_{0}=0$, then we obtain
$j^{\mu}_{if}A^{\ast}_{\mu}\Rightarrow{\bf j}_{if}{\bf A}$ with

${\bf A}=\sqrt{\frac{2\pi\hbar c^{2}}{\omega
L^{3}}}e^{\mathbf{i}\boldsymbol{\kappa}\mathbf{r}}\boldsymbol{\epsilon}_{\boldsymbol{\kappa}}\>,$
(3)

where $\boldsymbol{\epsilon}_{\boldsymbol{\kappa}}$ is the photon polarization
vector.

It is convenient to choose the coordinate axes as follows: the X-axis
perpendicular to the crystal plane, the Z and Y axes parallel to the crystal
plane, and the positron longitudinal momentum is directed along Z-axis. Then
wave function of a planar channeled positron in the initial quantum state $i$
can be written in the form [40]

$\displaystyle\psi_{i}(\mathbf{r})$ $\displaystyle=$
$\displaystyle\sqrt{\big{(}E_{i\|}+mc^{2}\big{)}\big{/}E_{i\|}}u_{i}\phi_{i}(\mathbf{r}_{\perp})e^{\mathbf{i}\mathbf{p}_{i\|}\mathbf{r}_{\|}/\hbar}\>,$
$\displaystyle u_{i}$ $\displaystyle=$
$\displaystyle\left(\begin{array}[]{c}w\\\
\frac{\boldsymbol{\sigma}\cdot\hat{\mathbf{p}}c}{c^{2}m+E_{i\|}}\end{array}\right)\>.$
(6)

Here $w$ is the 2D-spinor normalized by the condition $w^{+}w=1$,
$\boldsymbol{\sigma}$ are the Pauli matrixes. The transverse wave function
$\phi_{i}(\mathbf{r}_{\perp})$ describes the quantum states of the
relativistic channeled particle and satisfies the Schrödinger-like equation
[24, 40] with relativistic mass $\gamma m$ ($\gamma=E_{\|}/mc^{2}$ is Lorentz
factor).

As for the final state, for our purposes, the wave function of the electron in
the atom can be chosen in a simple enough form

$\Psi_{f}=u_{K}\Psi_{K}\>,u_{K}=\left(\begin{array}[]{c}w\\\
0\end{array}\right)\>.$ (7)

Here $\Psi_{K}$ is a nonrelativistic $K$-shell electron wave function
(solution of the Schrödinger equation, see below), $w$ is again the 2D-spinor.

Substitution of defined in such a way wave functions into the expression of
’current operator’, after some algebra, results in the following

${\bf j}_{if}{\bf
A}={C_{M}}\Psi_{K}^{\ast}(w^{+}(c\boldsymbol{\sigma}\cdot\hat{\mathbf{p}})(\boldsymbol{\sigma}\cdot\boldsymbol{\epsilon}^{\ast})w)\phi_{i}(x)e^{-\mathbf{i}\boldsymbol{\kappa}\mathbf{r}}e^{\mathbf{i}\mathbf{p}_{i\|}\mathbf{r}_{\|}/\hbar}\>,$
(8)

where we introduce the following definition

$C_{M}=\frac{1}{L}\sqrt{\frac{E_{i\|}+mc^{2}}{E_{i\|}}}\sqrt{\frac{2\pi\hbar
c^{2}}{\omega L^{3}}}\frac{1}{E_{i\|}+mc^{2}}\>.$ (9)

Usually, the initial beam of channeled particles is not polarized. Therefore,
formula (8) should be averaged over the spin states of the positron. In
addition, it is necessary to average over the spin states of the electron in
the crystal atom. After that we have

${\bf j}_{if}{\bf
A}={C_{M}}\Psi_{K}^{\ast}c(\hat{\mathbf{p}}\cdot\boldsymbol{\epsilon}^{\ast})\phi_{i}(x)e^{-\mathbf{i}\boldsymbol{\kappa}\mathbf{r}}e^{\mathbf{i}\mathbf{p}_{i\|}\mathbf{r}_{\|}/\hbar}\>,$
(10)

Now the matrix element $M_{if}$ takes the form

$M_{if}=\boldsymbol{\mathfrak{L}}\cdot\boldsymbol{\epsilon}^{\ast}\>,$ (11)

where we denote

$\boldsymbol{\mathfrak{L}}=-ecC_{M}\int\Psi_{K}^{\ast}e^{-\mathbf{i}\boldsymbol{\kappa}\mathbf{r}}\hat{\mathbf{p}}\>\phi_{i}(x)e^{\mathbf{i}\mathbf{p}_{i\|}\mathbf{r}_{\|}/\hbar}d^{3}{\bf
r}\>,$ (12)

##  3 Calculation of the single-photon annihilation matrix element

First, let us consider the transverse wave function $\phi_{i}(x)$ of the
planar channeled positron. Due to crystal periodicity in a direction
perpendicular to crystal planes, this function should be the Bloch one and
satisfy the Schrödinger-like equation.

The method of the solution of this equation was developed in [41, 42] and is
well known now. According to [41, 42] transverse wave function $\phi_{i}(x)$
has the following form

$\phi_{i}(x)=\sum_{m}e^{\mathbf{i}xG_{m,i_{n}}}X_{i,i_{n},m}\>,$ (13)

where $X_{i,i_{n},m}$ is Fourier components (with number $m$) of the wave
function, $G_{m,i_{n}}=2\pi m/d$ $+\pi i_{n}/10d$, $d$ is an interplanar
distance.

To take into account that the energy levels of a particle in a periodic
potential are energy bands, we divide each band into ten subbands $n=10$ and
introduced the following index $i_{n}$ for numbering $n$-th subband of the
band $i$.

Substitution of the wave function (13) into vector $\boldsymbol{\mathfrak{L}}$
results in:

$\displaystyle\boldsymbol{\mathfrak{L}}_{x}=-ecC_{M}\hbar
G_{m,i_{n}}\int\Psi_{K}^{\ast}e^{-\mathbf{i}\boldsymbol{\kappa}\mathbf{r}}\phi_{i}(x)e^{\mathbf{i}\mathbf{p}_{i\|}\mathbf{r}_{\|}/\hbar}d^{3}{\bf
r}\>,$ (14)
$\displaystyle\boldsymbol{\mathfrak{L}}_{y}=-ecC_{M}p_{y}\int\Psi_{K}^{\ast}e^{-\mathbf{i}\boldsymbol{\kappa}\mathbf{r}}\phi_{i}(x)e^{\mathbf{i}\mathbf{p}_{i\|}\mathbf{r}_{\|}/\hbar}d^{3}{\bf
r}\>,$ (15)
$\displaystyle\boldsymbol{\mathfrak{L}}_{z}=-ecC_{M}p_{z}\int\Psi_{K}^{\ast}e^{-\mathbf{i}\boldsymbol{\kappa}\mathbf{r}}\phi_{i}(x)e^{\mathbf{i}\mathbf{p}_{i\|}\mathbf{r}_{\|}/\hbar}d^{3}{\bf
r}\>.$ (16)

Let us consider in more detail the calculation of the
$\boldsymbol{\mathfrak{L}}_{x}$ component. Substitute positron transverse wave
function (13) into (14) we rewrite $\boldsymbol{\mathfrak{L}}_{x}$ in the
following form

$\boldsymbol{\mathfrak{L}}_{x}=ecC_{M}\sum_{m_{i}}Ix_{i_{n},m_{i}}X_{i,i_{n},m_{i}}\>.$
(17)

where

$Ix_{i_{n},m_{i}}=\hbar G_{m,i_{n}}\int
e^{-\mathbf{i}\kappa_{x}x}e^{\mathbf{i}G_{m,i_{n}}x)}\left(\int\Psi_{K}^{\ast}(x,y,z)e^{\mathbf{i}(p_{y}/\hbar-
ky)y}e^{\mathbf{i}(p_{z}/\hbar-kz)z}dydz\right)dx$ (18)

The wave function of the electron of crystal atom $K$-shell can be written as
the Slater wave function [43]. For electron on the $K$-shell the Slater wave
function [43] does not depend on angle variables, i.e.
$\Psi_{K}(r,\theta,\phi)\rightarrow\Psi_{K}(r)$. For the further calculation
the function $\Psi_{K}(r)$ is borrowed from the paper [43]:

$\Psi_{K}(r)=\sum_{p}\frac{(2\zeta_{0,p})^{3/2}e^{-\zeta_{0,p}r}(2\zeta_{0,p}r)^{{n\lambda}_{0,p}-1}C_{p,n,0}}{\sqrt{\left(2n\lambda_{0,p}\right)!}}\>.$
(19)

Here $C_{p,n,0}$, ${n\lambda}_{0,p}$ and $\zeta_{0,p}$ are parameters defined
in [43].

Taking into account the identity

$\frac{(2\zeta_{0,p}r)^{n\lambda_{0,p}-1}}{e^{\zeta_{0,p}r}}=(-2\zeta_{0,p})^{n\lambda_{0,p}-1}(\partial_{\zeta_{0,p}}^{{n\lambda}_{0,p}-1}e^{-\zeta_{0,p}r})\>.$
(20)

we rewrite the integral over $dydz$ as follows

$\displaystyle\int...dydz=\sum_{p}\frac{(2\zeta_{0,p})^{3/2}C_{p,n,0}}{\sqrt{\left(2n\lambda_{0,p}\right)!}}(-2\zeta_{0,p})^{{n\lambda}_{0,p}-1}$
(21) $\displaystyle\partial_{\zeta_{0,p}}^{{n\lambda}_{0,p}-1}\int
e^{-\zeta_{0,p}r}e^{\mathbf{i}(p_{y}/\hbar-ky)y}e^{\mathbf{i}(p_{z}/\hbar-
kz)z}dydz\>.$

To calculate the new integral in (21) we use a cylindrical coordinate system
($\rho,\varphi$). The integration over angle $\varphi$ gives

$\displaystyle\int e^{-\zeta_{0,p}r}...dydz=\int
e^{-\zeta_{0,p}\sqrt{\rho^{2}+x^{2}}}...\rho d\rho d\varphi=$ $\displaystyle
2\pi\int
e^{-\zeta_{0,p}\sqrt{\rho^{2}+x^{2}}}J_{0}(\rho\sqrt{q_{y}^{2}+q_{z}^{2}})\rho
d\rho\>.$ (22)

Here $J_{0}(z)$ is the Bessel function, $q_{y}=p_{y}/\hbar-k_{y}$,
$q_{z}=p_{z}/\hbar-k_{z}$. As a result, we get the tabular integral [44]

$\displaystyle I_{1}=\int e^{-\zeta_{0,p}}...\rho
d\rho=\zeta_{0,p}(\zeta_{0,p}^{2}+q_{y}^{2}+q_{z}^{2})^{-3/2}\times$
$\displaystyle\times\left(x\sqrt{\zeta_{0,p}^{2}+q_{y}^{2}+q_{z}^{2}}+1\right)e^{-x\sqrt{\zeta_{0,p}^{2}+q_{y}^{2}+q_{z}^{2}}}\>.$
(23)

Finally, we arrive at the following expression for the (21)

$\int...dydz=2\pi\sum_{p}\frac{(2\zeta_{0,p})^{3/2}C_{p,n,0}}{\sqrt{\left(2n\lambda_{0,p}\right)!}}(-2\zeta_{0,p})^{{n\lambda}_{0,p}-1}\partial_{\zeta_{0,p}}^{{n\lambda}_{0,p}-1}I_{1}\>.$
(24)

Similar transformations can be done for the rest components
$\boldsymbol{\mathfrak{L}}_{y}$ and $\boldsymbol{\mathfrak{L}}_{z}$. For this,
generalizing formula (20), we introduce the function

$DI_{p,q_{yz}}(x)=\frac{\partial^{p}}{\partial\zeta_{0,p}^{p}}\frac{\zeta_{0,p}\Big{(}x\sqrt{q_{yz}^{2}+\zeta_{0,p}^{2}}+1\Big{)}e^{-x\sqrt{q_{yz}^{2}+\zeta_{0,p}^{2}}}}{(q_{yz}^{2}+\zeta_{0,p}^{2})^{3/2}}\>,$
(25)

where $q_{yz}^{2}=q_{y}^{2}+q_{z}^{2}$. Now we obtain

$\displaystyle\boldsymbol{\mathfrak{L}}_{x}$ $\displaystyle=$ $\displaystyle-
ecC_{M}\hbar\sum_{m}G_{m,i_{n}}X_{i,i_{n},m}Io_{m,i_{n}}\>,$ (26)
$\displaystyle\boldsymbol{\mathfrak{L}}_{y}$ $\displaystyle=$ $\displaystyle-
ecC_{M}p_{y}\sum_{m}X_{i,i_{n},m}Io_{m,i_{n}}\>,$ (27)
$\displaystyle\boldsymbol{\mathfrak{L}}_{z}$ $\displaystyle=$ $\displaystyle-
ecC_{M}p_{z}\sum_{m}X_{i,i_{n},m}Io_{m,i_{n}}\>,$ (28)

where we introduce the following notation:

$Io_{m,i_{n}}=2\pi\sum_{p}\frac{(2\zeta_{0,p})^{3/2}C_{p,n,0}}{\sqrt{2n\lambda}_{0,p}!}(-2\zeta_{0,p})^{{n\lambda}_{0,p}-1}IDI_{p,q_{yz}}\>.$
(29)

Here the notation $IDI_{p,q_{yz}}$ is the integrals of the derivatives (25)
$DI_{p,q_{yz}}(x)$

$IDI_{p,q_{yz}}=\int_{0}^{d}DI_{p,q_{yz}}(x)dx\>.$ (30)

After substitution (25) into (30) those integrals can be easily analytically
calculated. The results depend on index $p$ (from $1$ to $10$) therefore, it
is necessary to calculate $10$ integrals. So for example for $p<3$ we have

$\displaystyle IDI_{p,q_{yz}}$ $\displaystyle=$
$\displaystyle\frac{e^{-q_{z}\zeta_{p}d}\zeta_{0,p}}{q_{z}\zeta_{p}^{3}(q_{x}^{2}+q_{z}\zeta_{p}^{2})^{2}}\Big{(}q_{x}[q_{x}^{2}(q_{z}\zeta_{p}d+1)+q_{z}\zeta_{p}^{2}(q_{z}\zeta_{p}d+3)]\sin(q_{x}d)-$
(31) $\displaystyle-$ $\displaystyle
q_{z}\zeta_{p}^{2}[(q_{x}^{2}+q_{z}\zeta_{p}^{2})d+2q_{z}\zeta_{p}]\cos(q_{x}d)+2q_{z}\zeta_{p}^{3}e^{q_{z}\zeta_{p}d}\Big{)}\>.$

For other values of the parameter $p$, we have similar expressions but are
longer, cumbersome, and difficult for visual perception. Therefore, we do not
give the rest formulas here.

As we don’t interest photon polarization we sum up matrix element (11) squared
over the photon polarizations by the well-known formula [1, 2]

$\overline{(\boldsymbol{\mathfrak{L}}\cdot\boldsymbol{\epsilon}^{\ast})(\boldsymbol{\mathfrak{L}}^{\ast}\cdot\boldsymbol{\epsilon})}=(\boldsymbol{\mathfrak{L}}\times\boldsymbol{n})\cdot(\boldsymbol{\mathfrak{L}}^{\ast}\times\boldsymbol{n})\>,$
(32)

where ${\bf n}=(\sin\Theta\cos\Phi,\sin\Theta\sin\Phi,\cos\Theta)$ is a photon
emission direction.

Finally, the matrix element $M_{if,i_{n}}$ squared is written as

$\displaystyle\mid M_{if,i_{n}}\mid^{2}$ $\displaystyle=$
$\displaystyle(cC_{M}\hbar)^{2}\Bigg{\\{}\Bigg{|}\cos\Theta\sum_{m_{i}}G_{m,i_{n}}X_{i,i_{n},m}Io_{m,i_{n}}-\frac{p_{z}}{\hbar}\cos\Phi\sin\Theta\sum_{m_{i}}X_{i,i_{n},m}Io_{m,i_{n}}\Bigg{|}^{2}+$
(33) $\displaystyle+$
$\displaystyle\Bigg{|}\sum_{m_{i}}G_{m,i_{n}}X_{i,i_{n},m}Io_{m,i_{n}}\Bigg{|}^{2}+\Bigg{(}\frac{p_{z}}{\hbar}\sin\Theta\sin\Phi\Bigg{)}^{2}\Bigg{|}\sum_{m_{i}}X_{i,i_{n},m}Io_{m,i_{n}}\Bigg{|}^{2}\Bigg{\\}}\>.$

##  4 Numerical results

Substituting the obtained matrix element (33) into (1) and dividing the result
by the flux of initial particles $J$, we find the cross-section of the SPA
process $d\sigma=dw_{if,i_{n}}/J$

$d\sigma=\langle P_{\theta,i_{n}}dw_{if}\rangle_{i_{n}}/J\>.$ (34)

Here $J=v/V$ with $v$ being positron velocity and $V=L^{2}d$ being
normalization volume, where $L$ is normalization length and $d$ is the
distance between neighbor crystal planes. In the equation (34) notation
$\langle...\rangle_{i_{n}}$ means an averaging over $i$-th energy band. The
physical meaning of the indices $i_{n}$ is described above (before formulas
(14-16)). Additionally, during averaging, we take into consideration an
initial population of the $n$-th section $P_{\theta,i_{n}}$ of the $i$-th
energy band of the positron’s transverse motion. The initial population
$P_{\theta,i_{n}}$ depends on the entry angle $\theta$ relative to the crystal
plane.

The continuous approximation for the crystal planes system potential is valid
only for the relativistic particles, therefore, we have to limit the minimal
positron energy. We choose a silicon crystal, oriented by the $(110)$ planes
as a target, and perform numerical calculations for the positron energy range
$50-100$ MeV. The obtained results are as follows.

Fig. 2 shows the result of calculating the angular distribution of photons
arising due to the SPA of positrons with $60$ MeV energy channeled along the
$(110)$ planes of the Si crystal. The positron initial angle is equal to
$\theta=0.5\theta_{C}$ with respect to the crystal plane, where $\theta_{C}$
is the critical channeling angle (Lindhard angle). Fig. 2 is plotted in polar
coordinates.

Figure 2: Polar plot of the angular distribution of emitted photons (red
lines) during SPA of a channeled positron with an energy of $60$ MeV on the
K-electron of the atom of Si crystal. The red lines length denotes the value
of the cross-section. The $x$ and $z$ are the cartesian coordinate axes. The
positron entry angle with respect to the crystal plane is equal to
$\theta\simeq 0.5\theta_{C}$. The calculation was performed for the
annihilation of channeled positrons from the first ($i=1$) excited energy
level.

From Fig.2, it can be seen, photon arising as a result of SPA of a channeled
$60$ MeV positron at the K-electron of the atom of Si crystal is emitted at an
angle $\Theta$ of the order of $\sim 6.2^{\circ}$ to the positron direction of
motion (axis z). In this case, the differential cross-section (over solid
angle $d\Omega$) $d\sigma/d\Omega$ is of the order of $\sim 1$ barn/sr.

Figure 3: Contour plot of the photon angular distribution of SPA of a
channeled positron. The parameters are as in Fig.2.

To clarity, Fig.3 shows the same result, but as a contour plot. The $x$ and
$y$ coordinates are in relative units (the $x$-axis is perpendicular to the
channeling planes). At some space point (for example, $z=0$) the positron
annihilates and emits a photon that moves at a small angle to the Z-axis. This
photon collides on an imaginary screen placed at a distance of $5$ ’arbitrary’
units, the $x$ and $y$ are coordinates of the photon on this screen. The plane
of the screen is perpendicular to the Z-axis (to longitudinal positron
momentum $p_{z}$). The figure shows, the picture that can be observed
experimentally on this screen. Different colors correspond to different values
$d\sigma/d\Omega$.

Let us introduce the angle of photon emission $\Theta_{max}$ at which the
differential cross-section of the positron SPA on $K$-shell electron reaches
its maximum value $d\sigma_{max}/d\Omega$. It is obvious that $\Theta_{max}$
changes with changing positron energy. We investigated this dependence by
formulas (33, 34) obtained above. The result of this study is present in Fig.
4, where we plot the angle $\Theta_{max}$ value versus positron energy. The
polar angle $\Phi$ is fixed and equals $0^{\circ}$.

Figure 4: Dependence of the angle $\Theta_{max}$ on the energy of the
channeled positron. The $\Phi$ angle is fixed and equals $\Phi=0$.

It is very important to notice that the angle of emission of photons
$\Theta_{max}$ corresponding to the maximum of the differential cross-section
$d\sigma_{max}/d\Omega$ is independent on either angle $\theta$ of entry of
positrons into the crystal or sub-barrier energy level $i$ from which the
positron annihilates.

In Fig. 5 it is shown the maximal value $d\sigma_{max}/d\Omega$ of the
differential cross-section $d\sigma/d\Omega$ of SPA of positrons channeled in
Si crystal as a function of its energy for 8 different angles of incidence of
the positron (from $\theta=0$ to $\theta=0.825\theta_{C}$). The calculation
was performed for the annihilation of channeled positrons from the first
($i=1$) excited transverse energy level.

Consider Fig. 5 in more detail. For $k=0$ (positron entry angle $\theta=0$)
one can see that curve is a nearly straight line. A logarithmic scale is used
on the ordinate, therefore, the dependence of the maximal value of the
differential cross-section $d\sigma_{max}/d\Omega$ from the energy of
channeled positron describes by exponential law. We fit this dependence by
function

$d\sigma_{max}=\sigma_{0}~{}e^{-\eta\gamma}\>.$ (35)

where $\sigma_{0}\simeq 5.6\times 10^{5}$ barn/sr, $\eta=-0.085$. The relative
error does not exceed $8\%$.

As for other curves, we see their oscillations with increasing the
longitudinal energy of the channeled positron. The larger the entry angle, the
shorter the period of the oscillations and the greater their amplitude. These
oscillations occur against the background of a decrease in the maximal value
of the differential cross-section with an increase in energy approximately
exponentially.

Figure 5: Dependencies of the maximum value of differential cross-section
$d\sigma_{max}/d\Omega$ on the longitudinal energy of the channeled positron.
The number $k$ corresponds to different angles of entry of the positron into
the crystal $\theta=k\theta_{C}$ relative to the channeling plane. The
calculation is performed for the annihilation of channeled positrons from the
first ($i=1$) excited transverse energy level. The ordinate uses a logarithmic
scale.

In addition, it is important to note that, similar to Parametric X-Radiation
at the Channeling (PXRC), the breakpoints of the curves correspond to the
value of positron longitudinal energy at which a new odd level (band) appears,
for under-barrier energy [46].

##  5 Discussion

As far as we know there is only one work devoted to the theoretical
consideration of SPA of a channeled positron on the K-electron of an atom of
crystal [39].

In the paper [39], based on a qualitative analysis of the populations of
transverse quantum states of a channeled positron it was studied the
dependence of the cross-section on the angle between positron momentum and
crystal plane. It was concluded for a positron with energy $25$ MeV channeled
in (110) Si that with increasing of the entry angle of the positron into the
crystal the differential cross-section increase.

Our calculations show that for the positrons channeled in the same crystal,
the maximum of the cross-section $d\sigma_{max}/d\Omega$ of SPA behaves much
more complicated (see Fig. 5, 6).

Figure 6: Dependences of the maximum value $d\sigma_{max}/d\Omega$ of the
differential cross-section $d\sigma/d\Omega$ on the longitudinal energy of
channeled positrons entering into the crystal at different angles
$\theta=k\theta_{C}$ to the channeling plane for different transverse energy
bands (similar to Fig. 5 notation is used). The numbers $0...14$ on the
picture are the numbers of the sub-barrier energy levels of the channeled
positron. The ordinate uses a logarithmic scale.

Let us consider the behavior of the maximum value $d\sigma_{max}/d\Omega$ of
the differential cross-section $d\sigma/d\Omega$ on the angle of entry of the
positron into the crystal for different sub-barrier bands of transverse energy
(Fig. 5, 6). For positrons that occupy low levels of transverse energy, the
following tendency is observed: the value $d\sigma_{max}/d\Omega$ decreases
with an increasing angle of entry of the positron into the crystal. This is
most clearly manifested for positrons of the first excited transverse level
$i=1$ (see Fig. 5). With an increase in the number of the energy band of the
transverse energy of the positron, the picture changes. The magnitude of the
maximum value $d\sigma_{max}/d\Omega$ for large angles of entry of the
positron into the crystal gradually increases, and for small angles of entry,
it decreases. Finally, for positrons located at the highest sub-barrier
transverse energy band, the picture becomes the opposite: the magnitude of the
maximum value $d\sigma_{max}/d\Omega$ of the differential cross-section
$d\sigma/d\Omega$ strictly increases with increasing angle of entry of the
positron into the crystal. Moreover, the values $d\sigma_{max}/d\Omega$ itself
are different for different transverse energy bands. All the calculations are
performed taking into account the populations of different transverse energy
levels.

In a real experiment, at any angle of incidence (not exceeding the Lindhard
angle) of the positron into the crystal, all sub-barrier levels of the
transverse energy are populated (with some probability) and, therefore, all
curves in Fig. 5 and 6 ($k=0...14$) must be summed up and the pictures
described above is not available for observation. Instead, some average curve
will be observed.

Neve the less, in the case of SPA of a channeled positron on the K-electron of
an atom of crystal, some kind of orientation dependence should be observed. A
detailed study of orientation dependence is planned to be carried out in a
separate work. Overall, the results of our calculations confirm the
qualitative conclusion of [39] about the orientation dependence of the process
under study.

From Fig. 5 \- 6 follows that for all incident positron angles and for all
positron energies bands the maximum value $d\sigma_{max}/d\Omega$ of the
differential cross-section $d\sigma/d\Omega$ decreases with increasing
positron energy (i.e. relativistic factor).

The obtained results should be compared with ones for positron annihilation
with $K$-shell electron of a separate atom.

The cross-section of SPA of positron with $K$-shell electron of a separate
hydrogen-like atom with the different atomic number $Z$ was studied in [3, 4,
5, 6, 7, 8, 9, 10, 11, 12]. The various approximations for the wave function
of $K$-shell electron and for positron one in the electric field of the atom
were used in these papers.

In order to have an idea about the dependence of SPA of positron with
$K$-shell electron of a separate atom on positron energy we use the simplest
expression [1, 2], which for our purpose it is convenient to rewrite in a next
form

$\displaystyle\frac{d\sigma^{1}}{d\Omega}=\frac{\alpha^{6}Z^{5}\hbar^{2}}{2c^{2}m^{2}}(\gamma^{2}-1)(4+\Big{(}\beta\gamma(1+\gamma)\cos\Theta-$
$\displaystyle-\gamma(1+\gamma)\Big{)}(3+\gamma)/\gamma^{3}(1+\gamma)^{5}(1-\beta\cos\Theta^{4})\>.$
(36)

where $\beta=v/c$ and $\gamma$ is the relativistic factor
$\gamma=(1-\beta^{2})^{-1/2}$, $v$ is the positron longitudinal velocity,
$\alpha$ is fine-structure constant.

Using the formula (36) it is easy to find the angle of photon emission
$\theta_{max}$ at which the differential cross-section of the positron SPA on
$K$-shell electron reaches its maximum value $d\sigma^{1}_{max}/d\Omega$. Then
one can calculate the maximum value of differential cross-section
$d\sigma^{1}_{max}/d\Omega$ as a function of the positron relativistic factor.
The calculation result is shown in Fig. 7.

Figure 7: Dependences of the maximum value of the cross-section
$d\sigma^{1}_{max}$ on the relativistic factor of channeled positrons (a
logarithmic scale is used). We had chosen the $Z=14$, i.e. Si atom.

One can see, Fig. 7 is observed opposite picture - the maximum magnitude of
the differential cross-section $d\sigma^{1}_{max}/d\Omega$ increasing with
increasing positron relativistic factor. The reason for such disagreement is
as follows: in the case of the positron annihilation with the electron of the
separate atom, the positron moves in the Coulomb field of the atom, and so
positron wave functions in such field should be used. But in our case, the
movement of the positron is controlled by a continuous potential of a system
of crystal planes. Therefore, positron wave function in direction
perpendicular planes is transverse wave function (solution of the Schrodinger-
like equation), while in directions parallel to planes is a plane wave.

The differential cross-section $d\sigma^{B}/d\Omega$ of the positron
annihilation with the $K$-shell electron of the separate atom in Born
approximation we obtain by the way similar to the one used in this paper by
replacing wave function of the channeled positron by a plane wave. For
simplicity, we use a hydrogen-like wave function for $K$-shell electrons. As a
result, we get

$\frac{d\sigma^{B}}{d\Omega}=\frac{32\pi a_{B}^{3}\alpha
c(\gamma^{2}-1)mZ^{5}\hbar^{7}\sin^{2}\Theta}{\gamma[-2a_{B}^{2}c^{2}(\gamma+1)\sqrt{\gamma^{2}-1}m^{2}\cos\Theta+2a_{B}^{2}c^{2}\gamma(\gamma+1)m^{2}+Z^{2}\hbar^{2}]^{4}}\>.$
(37)

where $a_{B}$ is Bohr radius.

Figure 8: Dependences of the maximum value of the cross-section
$d\sigma^{B}_{max}/d\Omega$ of positron SPA on Si atom ($Z=14$) as a function
of the relativistic factor of channeled positrons (a logarithmic scale is
used).

Result of calculation of the maximum value $d\sigma^{B}_{max}/d\Omega$ of the
differential cross-section $d\sigma^{B}$ of the positron annihilation with the
electron of the separate atom in Born approximation shown in Fig. 8 and gives
dependence qualitatively consistent with our results.

##  6 Conclusions

In the framework of QED for the first time, is derived differential cross-
section of the SPA of positron passing through a crystal in the planar
channeled mode with a $K$-shell electron of one of the crystal atoms. Using
the obtained formula, we obtained the following results:

  * •

The cross-section of SPA of channeled positron for fixed positron transverse
energy level depends on the entry angle of positron with respect to the
crystal plane:

    * –

For positrons that occupy low levels of transverse energy, the value
$d\sigma_{max}/d\Omega$ decreases with increasing angle of entry of the
positron into the crystal.

    * –

For positrons located at the highest sub-barrier transverse energy band, the
picture is the opposite: the magnitude of the maximum value
$d\sigma_{max}/d\Omega$ increases with increasing angle of entry of the
positron into the crystal.

  * •

Neve the less, in the case of SPA of a channeled positron, some kind of
orientation dependence should be observed.

In a real experiment, at any angle of incidence (not exceeding the Lindhard
angle) of the positron into the crystal, all sub-barrier levels of the
transverse energy are populated (with some probability) and therefore, some
average curve will be observed.

## Acknowledgements

This research is carried out at the Tomsk Polytechnic University within the
framework of the TPU Competitiveness Enhancement Program grant.

## References

  * [1] A.I. Akhiezer V.B. Berestetski, Quantum Electrodynamics, New York, Interscience Publishers, ISBN 9780470018484 (1965)
  * [2] V.B. Berestetskii, E.M. Lifshitz, L.P. Pitaevskii, Relativistic Quantum Theory, Pergamon Press, ISBN 9780080160252 (1971)
  * [3] E. Fermi, E.G. Uhlenbeck, On the Recombination of Electrons and Positrons, Phys. Rev. 44 510 (1933), DOI: https://doi.org/10.1103/PhysRev.44.510.2
  * [4] H.R. Hulme, H.J. Bhabha, The annihilation of fast positrons by electrons in the K-shell Proc.Soy. Soc. 146 723 (1934), DOI: https://doi.org/10.1098/rspa.1934.0184
  * [5] Y. Nishina, S. Tomonaga, H. Tamaki, On annihilation of electron and positron, Sci. Papers IPCR, 18 7 (1934)
  * [6] H. Bethe, On the annihilation radiation of positrons, Proc.Soy. Soc. A 150 129 (1935), DOI: https://doi.org/10.1098/rspa.1935.0092
  * [7] J.C. Jager, H.R. Hulme, On the annihilation of positrons, In Mathematical Proceedings of the Cambridge Philosophical Society, 32 158 (1936) DOI:https://doi.org/10.1017/S030500410001896X
  * [8] Kirk W. McVoy, Polarization Phenomena in the One-Quantum Annihilation of Positrons and the Photoelectric Effect, Phys. Rev. 108 365 (1957) DOI:https://doi.org/10.1103/PhysRev.108.365
  * [9] D.S. Moroi, Photoelectric Effect and Pair Annihilation with Large Momentum Transfer, Phys. Rev. 123 167 (1961), DOI: https://doi.org/10.1103/PhysRev.123.167
  * [10] W.R. Johnson, D.J. Bass, C.O. Carroll, Single-Quantum Annihilation of Positrons, Phys. Rev. 135 A1232 (196), DOI: https://doi.org/10.1103/PhysRev.135.A1232
  * [11] W.R. Johnson, Angular Distribution of Single-Quantum Annihilation Radiation, Phys. Rev. 159 61 (1967), DOI: https://doi.org/10.1103/PhysRev.159.61
  * [12] K.W. Broda and W.R. Johnson, Single-Quantum Annihilation of Positrons by Screened K-and L-Shell Electrons, Phys. Rev. A 6 1693 (1972), DOI: https://doi.org/10.1103/PhysRevA.6.1693
  * [13] A.I. Mikhailov, I.A. Mikhailov, Annihilation of a relativistic positron and K-electron to yield a photon and second K-electron, JETP 86 429 (1998), DOI: https://doi.org/10.1134/1.558515
  * [14] L. Sodickson, W. Bowman, J. Stephenson and R. Weinstein, Single-Quantum Annihilation of Positrons, Phys. Rev. 124 1851 (1961), DOI: https://doi.org/10.1103/PhysRev.124.1851
  * [15] J.C. Palathingal, P. Asoka-Kumar, K.G. Lynn, Y. Posada and X.Y. Wu, Single-quantum annihilation of positrons with shell-bound atomic electrons, Phys. Rev. Lett 67 3491 (1991), DOI: https://doi.org/10.1103/PhysRevLett.67.3491
  * [16] A.I. Voroshilo, E.A. Padusenko and S.P. Roshchupkin, One-photon annihilation of an electron-positron pair in the field of pulsed circularly polarized light wave, Laser Physics 20 1679 (2010), DOI: 10.1134/S1054660X10130177
  * [17] S. Lewicka & J. Dryzek, Positron Annihilation Characteristics in Superstrong Magnetic Fields, Materials Science Forum, 666 31 (2010), DOI: 10.4028/www.scientific.net/MSF.666.31
  * [18] S. Lewicka, Electron-Positron Annihilation in Ultra-Strong Magnetic Fields. Comparison of One- and Two-Photon Annihilation at Middly Relativistic Regime, Acta Physica Polonica A 125 3 (2013), DOI: 10.12693/APhysPolA.125.688
  * [19] Myron Bander, H.R. Rubinstein, Electron-positron annihilation in strong magnetic fields, Astroparticle Physics, 1 277 (1993), DOI: 10.1016/0927-6505(93)90013-4
  * [20] M.L. Ter-Mikelian, High Energy Electromagnetic processes in Condensed Media, Wiley Interscience, New-York, ISBN 9780471851905 (1972)
  * [21] V.G. Baryshevsky, Channeling, Radiation and Reactions in Crystals under High Energy, Belarusian State University, Minsk (1982), URL: http://www.inp.bsu.by/library/channeling1982-2016.pdf
  * [22] V.N. Baier, V.M. Katkov, V.M. Strakhovenko, Electromagnetic Processes at High Energy in Oriented Single Crystals, World Scientific, Singapore, ISBN 9789812817532 (1998)
  * [23] A.I. Akhiezer, N.F. Shuliga, High-Energy Electrodynamics in Matter, CRC Press, ISBN 9782884490146 (1996)
  * [24] J.C. Kimball, N. Cue, Quantum electrodynamics and channeling in crystals, Phys. Rep. 125 69 (1985), DOI: https://doi.org/10.1016/0370-1573(85)90021-3
  * [25] H. Uberall, High-Energy Interference Effect of Bremsstrahlung and Pair Production in Crystals, Phys. Rev. 103 1055 (1956), DOI: https://doi.org/10.1103/PhysRev.103.1055
  * [26] V.V. Lasukov, Yu.L. Pivovarov and O.G. Kostareva, Spontaneous radiation of relativistic electrons under planar channeling and band structure of transverse energy, Phys. stat. sol. B 109 761 (1982), DOI: https://doi.org/10.1002/pssb.2221090236
  * [27] V.V. Lasukov, S.A. Vorobiev, Solitons at the electron channeling, Phys. Lett. A 99 399 (1983), DOI: https://doi.org/10.1016/0375-9601(83)90303-1
  * [28] V.V. Lasukov, S.A. Vorobiev, Neutrino radiation by ultrarelativistic electrons at channeling in crystals, Phys. Lett. A 106 179 (1984), DOI: https://doi.org/10.1016/0375-9601(84)90313-X
  * [29] H. Nitta, Y.H. Ohtsuki, Secondary electron emission by channeled positrons and electrons, Phys. Rev. B 39 2051 (1989), DOI: https://doi.org/10.1103/PhysRevB.39.2051
  * [30] T. Ikeda, Y. Matsuda, H. Nitta, Y.H.Ohtsuki, Parametric X-ray radiation by relativistic channeled particles, Nucl. Instrum. Methods Phys. Res., Sect. B 115 380 (1996), DOI: https://doi.org/10.1016/0168-583X(96)00167-X
  * [31] H.A. Olsen, Yu.P. Kunashenko, Dirac states of relativistic electrons channeled in a crystal and high-energy channeling electron-positron pair production by photons, Phys. Rev. A 56 527 (1997), DOI: https://doi.org/10.1103/PhysRevA.56.527
  * [32] S.B. Dabagov, N.K. Zhevago, On radiation by relativistic electrons and positrons channeled in crystals, La Riv. del Nuovo Cimento, 31 491 (2008), DOI: https://doi.org/10.1393/ncr/i2008-10036-x
  * [33] K.B. Korotchenko, Y.P. Kunashenko, T.A. Tukhfatullin, Secondary electron emission induced by channeled relativistic electrons in a (1 1 0) Si crystal, Nucl. Instrum. Methods Phys. Res., Sect. B 276 14 (2012), DOI: https://doi.org/10.1016/j.nimb.2012.01.006
  * [34] K.B. Korotchenko, Yu.P. Kunashenko, Quantum theory of X-ray radiation at Bragg angles at channeling, Radiation Physics and Chemistry 109 83 (2015), DOI: https://doi.org/10.1016/j.radphyschem.2014.12.018
  * [35] Yu.P. Kunashenko, Combined effect in coherent bremsstrahlung of channeled electrons, Nucl. Instrum. Methods Phys. Res., Sect. B 355 110 (2015), DOI: https://doi.org/10.1016/j.nimb.2015.03.076
  * [36] R. Haakenaasen, L.V. Hau, J.A. Golevchenko, J.C. Palathingal, J.P. Peng, P. Asoka-Kumar, K.G. Lynn, Quantum Channeling Effects for 1 MeV Positrons, Phys. Rev. Lett. 75 1650 (1995), DOI: https://doi.org/10.1103/PhysRevLett.75.1650
  * [37] L.V. Hau, J.A. Golevchenko, R. Haakenaasen, A.W. Hunt, J.P. Peng, P. Asoka-Kumar, K.G. Lynn, M. Weinert, J.C. Palathingal, On the role of classical and quantum notions in channeling and the development of fast positrons as a solid state probe of valence electron and spin densities, Nucl. Instrum. Methods Phys. Res. Sect. B 119 30 (1996), DOI: https://doi.org/10.1016/0168-583X(96)00307-2
  * [38] A.W. Hunt, D.B. Cassidy, F.A. Selim, R. Haakenaasen, T.E. Cowan, R.H. Howell, K.G. Lynn, J.A. Golevchenko, In-flight annihilation during positron channeling, Nucl. Instrum. Methods Phys. Res. Sect. B 44 164-165 (2000), DOI: https://doi.org/10.1016/S0168-583X(99)01004-6
  * [39] N.P. Kalashnikov, E.A. Mazur, A.S. Olczak, Annihilation of relativistic positrons in single crystal with production of one photon, International Journal of Modern Physics A 30 22 (2015) 1550137, DOI: https://doi.org/10.1142/S0217751X15501377
  * [40] V.V. Beloshitsky, M.A. Kumakhov, Quantum theory of spontaneous and induced radiation of channeled electrons and positrons, JETP 47 652 (1978), URL: http://jetp.ras.ru/cgi-bin/dn/e_047_04_0652.pdf
  * [41] N.W. Ashcroft, N.D. Mermin, Solid State Physics, Holt, Rinehart, and Winston, New York (1976), DOI: https://doi.org/10.1002/piuz.19780090109
  * [42] C. Kittel, Quantum Theory of Solids, New York, London, John Wiley and Sons, Inc, ISBN: 9780471624127 (1963)
  * [43] C.F. Bunge, J.A. Barrientos, A.V. Bunge, Roothaan-Hartree-Fock Ground-State Atomic Wave Functions: Slater-Type Orbital Expansions and Expectation Values for Z = 2-54, Atom Data and Nuclear Tables, 53 113 (1993), DOI: https://doi.org/10.1006/adnd.1993.1003
  * [44] A.P. Prudnikov, Y.A. Brychkov, O.I. Marichev, Integrals and Series: Special functions, ISBN 9782881240904 (2003)
  * [45] K.B. Korotchenko, Yu.L. Pivovarov, Y. Takabayashi, S.B. Dabagov, Cherenkov-Channeling radiation from sub-GeV relativistic electrons, Physics Letters B 795 592 (2019), DOI: https://doi.org/10.1016/j.physletb.2019.06.063
  * [46] K.B. Korotchenko, Yu.L. Pivovarov, Quantum Features of the Angular Distributions of Parametric Xray Radiation of Channeled Relativistic Electrons in a Crystal, JETP Letters 101 719 (2015), DOI: 10.1134/S0021364015100070