0% found this document useful (0 votes)
8 views22 pages

Automatic Optimisation of A Parallel-Plate Avalanche 1 Counter With Optical Readout

This document presents an automatic optimization procedure for the operational parameters of a Parallel-Plate Avalanche Counter with Optical Readout, aimed at enhancing heavy-ion tracking and imaging. By utilizing differentiable programming and automatic differentiation, the study develops a surrogate model to minimize reconstruction errors for detecting 5.5 MeV alpha particles, focusing on optimizing the pressure of the scintillating gas and the length of the collimator. The findings demonstrate the potential of these techniques in improving detector design and performance in nuclear physics applications.

Uploaded by

Hussain Sangji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views22 pages

Automatic Optimisation of A Parallel-Plate Avalanche 1 Counter With Optical Readout

This document presents an automatic optimization procedure for the operational parameters of a Parallel-Plate Avalanche Counter with Optical Readout, aimed at enhancing heavy-ion tracking and imaging. By utilizing differentiable programming and automatic differentiation, the study develops a surrogate model to minimize reconstruction errors for detecting 5.5 MeV alpha particles, focusing on optimizing the pressure of the scintillating gas and the length of the collimator. The findings demonstrate the potential of these techniques in improving detector design and performance in nuclear physics applications.

Uploaded by

Hussain Sangji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Automatic optimisation of a Parallel-Plate Avalanche 1

Counter with Optical Readout 2

María Pereira Martínez1, 3 , Xabier Cid Vidal1, 3 , and Pietro Vischia2, 3 3

1
Instituto Galego de Física de Altas Enerxías (IGFAE), Universidade de Santiago de 4

Compostela, Santiago de Compostela, Spain 5


arXiv:2503.02538v1 [physics.ins-det] 4 Mar 2025

2 Universidad de Oviedo and ICTEA, Oviedo, España 6


3 MODE Collaboration https://mode-collaboration.github.io 7

5th March 2025 8

Abstract 9

An automatic optimisation procedure is proposed for some operational para- 10

meters of a Parallel-Plate Avalanche Counter with Optical Readout, a detector 11

designed for heavy-ion tracking and imaging. Exploiting differentiable program- 12

ming and automatic differentiation, we model the reconstruction of the position of 13

impinging 5.5 MeV alpha particles for different detector configurations and build an 14

optimisation cycle that minimizes an objective function. We analyse the perform- 15

ance improvement using this method, exploring the potential of these techniques in 16

detector design. 17

Keywords: Differentiable programming; Machine Learning; Detector optimisation; 18

Nuclear physics. 19

1. Introduction 20

Over the last decades, the availability of high-performance computing and the develop- 21

ment of deep learning [1] have transformed the optimization of complex systems. When 22

the dimensionality of the space of relevant design parameters exceeds a few units or the 23

relationships between different parameters are not trivial, automated processes can be de- 24

veloped to identify configurations corresponding to the minimum of a carefully specified 25

objective function. 26

1
The core of these optimization searches is differentiable programming (DP), a paradigm 27

in which computer programs can be differentiated end-to-end automatically, enabling 28

gradient-based optimization of parameters within the program leveraging automatic dif- 29

ferentiation (AD) [2–5]. 30

Despite the long-established use of AD in various fields, such as circuit design, aero- 31

dynamic design, and engineering in general [6–8], its application to particle and nuclear 32

physics detectors remains challenging. This difficulty primarily arises from the intrinsic 33

stochasticity introduced by the quantum nature of the physical processes involved. As a 34

result, building differentiable pipelines becomes complex, since most Monte Carlo (MC) 35

particle simulators, such as GEANT4 [9–11], are not inherently differentiable. Although 36

efforts have been made to overcome this limitation for specific physical processes [12], the 37

full optimization of particle detectors remains an open challenge. To date, only a handful 38

of studies have addressed this problem [12–17]. 39

This approach is becoming feasible due to the ongoing efforts of collaborative research 40

such as MODE Collaboration [12], which aims to utilize DP and AD for optimizing de- 41

tector designs in particle physics by developing modular and customizable differentiable 42

pipelines for the optimization of objective functions. The recent success of MODE Col- 43

laboration in applying these concepts to fully model a muon tomography system and 44

develop a package called TomOpt [18] led to this study, where this package is adapted to 45

a gaseous detector designed for heavy-ion tracking and imaging: the Optical Parallel-Plate 46

Avalanche Counter (O-PPAC). 47

The basic design of the O-PPAC, introduced by Cortesi et al. in Reference [19], consists 48

of two parallel squared electrodes separated by a small 3 mm gap filled with a low-pressure 49

scintillating gas, with an array of small, collimated photo-sensors along the edges of the 50

gap. The position of an impinging particle is reconstructed using the information provided 51

by the distributions of detected photons along the edges of the gas gap. 52

The main goal of this study is to identify the optimal values of two detector paramet- 53

ers: the pressure of the scintillating gas (p) and the length of the collimator (L), both of 54

which affect the spatial resolution. To achieve this, a differentiable pipeline is developed 55

to minimize the reconstruction error as a function of the detector parameters. This is per- 56

formed by developing a surrogate model that replicates an existing GEANT4 simulation 57

of this detector fully described in Reference [19], where 5.5 MeV alpha particles traverse 58

the detector perpendicularly to the electrodes. 59

The surrogate acts as a differentiable approximation of the detector’s behavior, en- 60

abling a gradient-based optimization using AD. In this study, PyTorch’s [20] AD features 61

are employed. 62

The structure of the document is as follows: Section 2 briefly introduces the operational 63

2
principle of the detector and provides a detailed explanation of the optimization methods 64

applied. Section 3 presents the results obtained from the optimization process. Lastly, 65

Section 4 discusses the conclusions drawn from this work. 66

2. Materials and Methods 67

2.1 The O-PPAC Detector 68

Despite being an older detector concept, position-sensitive parallel-plate avalanche coun- 69

ters (PPACs) remain widely used today in various subatomic physics applications, par- 70

ticularly for heavy-ion position and timing measurements [21]. 71

As discussed in Reference [19], unlike conventional PPACs that use charge division 72

or delay-line methods, electroluminescence-based detectors benefit from high-sensitivity 73

solid-state photosensors, such as SiPMs, which provide better signal-to-noise ratios and 74

energy resolution, making them well suited for heavy-ion tracking and imaging. 75

One example of this approach is the O-PPAC design [19], which consists of two parallel 76

electrodes separated by a narrow 3 mm gap. This gap is filled with a low-pressure scin- 77

tillating gas, such as CF4, known for its high electroluminescence light yield. Along the 78

edges of the avalanche gap, arrays of small, collimated SiPMs are strategically arranged 79

to maximize light collection and improve detection efficiency. 80

When an ionizing particle crosses the active volume, it releases a small amount of 81

energy in the form of ionization electrons, which are multiplied in the gas by a uniform 82

electric field established between the two metalized parallel plates. The scintillation light 83

emitted during the avalanche process, known as secondary scintillation or electrolumin- 84

escence, is reflected back and forth by the two metallized electrode foils and guided to 85

be recorded by the arrays of collimated photo-sensors (see Figure 1). The collimation 86

is crucial for the precise localization of the impinging particles, as it narrows down the 87

detected photon distributions, so its peak is more heavily weighted near the position of 88

the avalanche. 89

In this study, the parameters of interest were the pressure of the scintillating gas and 90

the length of the collimator, as they are crucial parameters for the characteristics of the 91

detected photon distributions. 92

The pressure of the gas is directly related to the electroluminescence yield, as explained 93

in Reference [22]. As a general rule, higher pressure implies a higher electroluminescence 94

yield, which translates into a higher number of detected photons in each event and, 95

3
Figure 1: Schematic representation of the operational principle of the Optical Parallel-
Plate Avalanche Counter (O-PPAC). The photosensors are highlighted in yellow, the
collimator in black, and the gas volume in blue. The left side shows a lateral view of the
O-PPAC, illustrating the avalanche process initiated when a particle traverses the active
medium, with the scintillating photons and their trajectories highlighted in red. On the
right, the front view of the detector is presented, demonstrating the effect of collimation.
Image adapted from Reference [19].

therefore, higher statistics in the detected photon distributions. 96

As the width of the collimator walls (1 mm) is determined by the manufacturing con- 97

straints of the SiPMs selected by the detector designers [19] and alternative technologies 98

were not explored in this study, the optimization efforts were focused on the other relevant 99

parameter regarding collimation: the collimator length. The optimal collimator length 100

results from a trade-off between achieving more accurate light spot localization with larger 101

L and obtaining higher statistics with smaller L. 102

It is also worth mentioning that the number of SiPMs was fixed to 33 per wall, the 103

SiPM effective area was 2 × 3 mm2 , the pitch was 3 mm long, and the cathode and anode 104

metalized foils (Al) were characterized by a reflectivity of 90%. The remaining simulation 105

parameters not mentioned in this study are exactly as detailed in Reference [19], with the 106

exception of the collimator length and pressure, which are studied in this work. 107

2.2 End-to-End Optimization 108

As mentioned earlier, applying gradient-based optimization techniques requires the de- 109

tector response to be in a differentiable form. However, GEANT4 simulations remain 110

4
non-differentiable, which makes it challenging to directly apply gradient-based methods. 111

To overcome this, approximate surrogate models can be used as an alternative to 112

Monte Carlo simulations [23]. These models, which are typically obtained by employing 113

some form of supervised training on events previously generated by the MC simulator, 114

not only enable differentiation but also offer practical benefits: once trained, they run 115

significantly faster than a gradient-aware MC simulation and often provide a smoother 116

approximation, which is better suited for gradient-based optimization [24, 25]. 117

In this study, a surrogate model is obtained by training a Neural Network (NN) on 118

a grid of MC simulated points of the parameter space. After the training step, a differ- 119

entiable model that can be inserted into a differentiable pipeline just as a closed-form 120

expression is obtained, which is the key to this approach. Specifically, once trained, this 121

NN will predict the reconstructed position of the particle as a function of the detector 122

parameters and its initial position. 123

Once the model is trained, the next step is to build an optimization loop that will min- 124

imize an objective function by iteratively updating the values of the detector parameters 125

according to the gradients of this function at each step. 126

In the following subsections, each step involved in the optimization of the detector is 127

described in detail. 128

2.2.1 Simulation 129

The first step to optimize the detector is to generate a set of datasets corresponding to 130

a grid of the interest parameters and the beam position. As stated before, our goal is to 131

simulate a reduced number of datasets and then train an NN model that extrapolates all 132

the possible configurations with a differentiable model. For this, the GEANT4 simulation 133

described in Reference [19] is employed. 134

The grid of parameters employed for the simulation is provided in Table 1. It is 135

important to highlight that each dataset consisted of 10,000 events, each involving a 5.5 136

MeV alpha particle entering the detector perpendicular to the parallel plates. 137

Table 1: Summary of the simulated parameter values. The simulation explored all possible
combinations of the listed parameters, resulting in a total of 2025 unique configurations.

Parameter Simulated Values


Pressure (Torr) 10, 20, 30, 40, 50
Collimator length (mm) 5 , 16.25, 27.5, 38.75, 50.
X position of the beam (cm) − 4, −3, −2, −1, 0, 1, 2, 3, 4
Y position of the beam (cm) −4, −3, −2, −1, 0, 1, 2, 3, 4

5
As can be observed, the pressure and the collimator length were bound to lie within 138

a certain interval. The minimum pressure value is justified by the photon distribution 139

statistics, as trial simulations showed that below 10 Torr, few to no photons were detec- 140

ted. The upper limit of 50 Torr is determined by the fact that higher pressure requires 141

an increase in the voltage between the parallel plates, which cannot exceed a certain 142

maximum. 143

In a similar manner, the lower limit of the collimator length is set taking into account 144

the poor precision obtained, as the dispersion of the distribution when L < 5 mm is too 145

high. The upper limit is set due to the poor statistics obtained when L > 50 mm. 146

2.2.2 Reconstruction of the Position 147

The reconstruction of the avalanche location, which corresponds to the position of the 148

charged-particle crossing the detector volume (x̂, ŷ), is achieved by combining the data 149

recorded by the four photo-sensor arrays located in each wall of the PPAC, as illustrated 150

in Figure 2. 151

This task can be performed in several ways, but the simplest is to compute the arith- 152

metic mean between the photon distribution peaks recorded by each pair of opposing 153

arrays weighted by the total number of detected photons and the dispersion of each dis- 154

tribution [19]: 155

! !
Px1 · Nx1 Px2 · Nx2 Nx1 Nx2
x̂ = + + (1)
σx1 σx2 σx1 σx2

! !
Py1 · Ny1 Py2 · Ny2 Ny1 Ny2
ŷ = + + , (2)
σy1 σy2 σy1 σy2
where P and σ correspond to the mean and the standard deviation of the distribution on 156

each wall and N is the total number of photons detected in each wall. 157

2.2.3 Surrogate Model 158

As stated before, the algorithm employed to parametrize the reconstruction is a Neural 159

Network developed employing PyTorch [20]. This particular NN receives four inputs (x, 160

y, p, L) and predicts two outputs (x̂, ŷ), i.e., the reconstructed position. 161

In order to optimize, train, and evaluate the model, the simulated events were divided 162

into different datasets, as illustrated in Table 2. For instance, a small fraction (around 163

5 × 104 events) was employed for hyperparameter tuning, a bigger dataset for training 164

6
40 N = 241
35 = 16.32
30 = 3.35

# photons
25
20
15
10
5
0
0 10 20 30
# of SiPMs in the array
40
X1 40
N = 225 N = 220
35 = 16.64 35 = 16.68
30 = 3.18 30 = 3.19
# photons

# photons
25 25

Y1

Y2
20 20
15 15
10 10
5 PPAC 5
0 X2 0
0 10 20 30 0 10 20 30
# of SiPMs in the array # of SiPMs in the array
40 N = 218
35 = 16.59
30 = 3.45
# photons

25
20
15
10
5
0
0 10 20 30
# of SiPMs in the array

Figure 2: Illustration of the reconstruction process for a simulated event induced by a 5.5
MeV alpha particle at the center of the parallel plates. The photon counts registered by
each photosensor are used to generate four distributions, one for each wall. The resulting
plots provide the statistical information required for reconstruction, with the mean of
each distribution highlighted in red. The particle’s position along each axis is determined
by analyzing the signals from opposing walls.

(around 1 million), and the remaining MC events were used for the evaluation of the NN. 165

Table 2: Number of simulated events used in the different phases of the surrogate model
development process, including hyperparameter tuning, training, and evaluation.

Dataset Training Validation Evaluation


Hyperparameter 2.5 × 104 2.5 × 104 —
tuning
Training 5 × 105 5 × 105 —
Evaluation — — 2 × 107

It is worth mentioning that the splitting in the different datasets was made maintaining 166

the proportion of the different parameters, so that all combinations are equally represented 167

in each dataset. 168

To optimize the performance of the NN, a hyperparameter tuning process was con- 169

7
ducted to identify the optimal set of model parameters. The package employed for hyper- 170

parameter tuning was Optuna [26], which utilizes the Tree-structured Parzen Estimator 171

(TPE) as its default algorithm for sampling candidates in the search space. TPE is a 172

widely utilized Bayesian optimization method that iteratively constructs two probability 173

density functions: one for the hyperparameters of successful trials (i.e., favorable con- 174

figurations), and another for unsuccessful trials (i.e., unfavorable configurations). The 175

algorithm employs these probability density functions to sample new hyperparameters 176

that are likely to improve the objective function. This method has demonstrated greater 177

efficiency and effectiveness compared to other well-established hyperparameter tuning 178

methods, such as Grid Search or Randomized Search. 179

The hyperparameter tuning process was conducted in two distinct phases: the initial 180

phase focused on architecture optimization, while the subsequent phase aimed at further 181

enhancing performance and regularization. 182

To achieve this objective, the hidden size, number of hidden layers, and learning rate 183

are optimized in the initial phase. The considered values of these hyperparameters, along 184

with the optimal parameters obtained from 100 trials, are detailed in Table 3. 185

Table 3: Results from the first hyperparameter tuning with Optuna, showing the best
trial out of 100. The table lists the hyperparameters considered, their tested values, and
the optimal values based on model performance.

Hyperparameter Considered Values Best Trial


Hidden size 32, 64, 128, 256, 512 64
Number of layers 2, 3, 4, 5, 6, 7, 8 3
Learning rate From 0.001 to 0.1 0.0352

As stated before, the second phase of the hyperparameter tuning was focused on 186

further improving the performance of the NN, on regularization and stability. For this 187

purpose, hyperparameters like dropout, optimizer, learning rate scheduler, batch normal- 188

ization, and activation function were studied. Again, the considered options and the 189

Optuna’s best trial out of 1000 trials is specified in Table 4. 190

In Table 5, the evaluation of the models for each round of hyperparameter tuning 191

is shown. Specifically, the root mean squared error (RMSE) between the reconstructed 192

position and the NN prediction is evaluated for the large dataset. As shown, the eval- 193

uation yields an RMSE of 0.035 cm both for the x- and y-axes after the second phase, 194

which is an improvement with respect to the model resulting from the first phase of 195

hyperparameter tuning. 196

v
n
u1 X
u
RMSE = t |⃗xi NN − ⃗xˆi |2 (3)
n i=1

8
Table 4: Results from the second hyperparameter tuning with Optuna, showing the best
trial out of 1000. The table lists the hyperparameters considered, their tested values, and
the optimal values based on model performance.

Hyperparameter Considered Values Best Trial


Dropout 0, 0.1, 0.2, 0.3, 0.4, 0.5 0
Optimizer Adam, NAdam, Adamax Adamax
Step Size Scheduler 1, 2, 3, 4, 5 2
Gamma Scheduler 0.9, 0.99, 0.999 0.9
Use Batch Normalization True, False False
Activation Function ReLU, SELU, ELU, LeakyReLU ELU

Table 5: NN prediction error (RMSE) after each step of the hyperparameter tuning
process. The table shows the root mean square error (RMSE) for both the x- and y-
coordinates at each step of the tuning.

Step RMSE(x̂, xN N ) [cm] RMSE(ŷ, yN N ) [cm]


1 0.040 0.041
2 0.035 0.035

Additionally, the learning curve for the final model is illustrated in Figure 3. As can 197

be seen, the validation loss curve exhibits an erratic behavior during the first 20 epochs, 198

but it stabilizes afterwards, with the training loss value closely matching the validation 199

loss, which suggests a low level of overfitting. 200

0.10
Training
Validation
0.09

0.08
Loss (RMSE) [cm]

0.07

0.06

0.05

0.04

0.03
0 10 20 30 40 50 60 70
Epochs

Figure 3: Learning curve of the NN surrogate model following the second phase of hyper-
parameter tuning. The plot illustrates the model’s training progress, with early stopping
applied using a tolerance (δ) of 0.001 and a patience of 10 epochs to prevent overfitting
and reduce computational time.

9
2.2.4 Optimization 201

This section provides an overview of the optimization process and its implementation in 202

the repository [27]. It describes the core components of the optimization package and 203

offers a detailed explanation of the optimization loop. It is important to note that this 204

code is derived from TomOpt package [28]. 205

Below are the key components necessary for implementing the optimization, along 206

with their descriptions: 207

Alpha Batch: 208

In order to perform the optimization loop, a class named AlphaBatch is built. This 209

class has the main goal of producing batches of alpha beams in the form of random 210

Pytorch tensors. The random numbers are generated uniformly both in the x- and y-axes 211

in the interval [−4, 4] cm, as the surrogate model is trained on that interval. 212

Volume: 213

The Volume refers to the detector volume itself, represented as a class defined by the 214

detector parameters at each step in the optimization loop. It is initialized with values for 215

pressure and collimator length, which are the parameters of interest. 216

The primary purpose of this class is to accept a specific detector configuration and an 217

alpha batch, then to predict the reconstructed position for each impinging alpha particle 218

using the surrogate model. 219

Moreover, the Volume class includes a method that ensures the parameter values re- 220

main within a predefined interval during the optimization loop. If a parameter exceeds the 221

boundaries of this interval during training, its value is clamped to the nearest limit. This 222

functionality is crucial for the optimization process, as the surrogate model is trained only 223

within specific parameter ranges and should not be extrapolated outside these intervals. 224

Objective function: 225

The objective function is the metric minimized during the optimization process. It 226

can be designed to prioritize parameter combinations that enhance both the detector’s 227

performance and cost-efficiency. In this study, the objective function was performance- 228

focused, using the root mean square error (RMSE) between the reconstructed position 229

and the beam position as the optimization criterion. 230

10
Volume Wrapper and optimization Loop: 231

The Volume class includes a Wrapper that contains the fit method, responsible for 232

optimizing the detector by determining the optimal configuration based on the NN re- 233

construction model. This optimization is conducted within a loop designed to iteratively 234

identify the best detector configuration. The structure of this loop is illustrated in Fig- 235

ure 4. 236

Alpha Batch

Volume

Optimization Loop

VolumeWrapper.fit(n_epochs)

epoch = 0

epoch ==
n_epochs Yes

epoch+=1 No

Update detector NN predicts


parameters reconstructed position

Backpropagate Loss Compute loss (MSE)


End

Figure 4: Breakdown of the detector optimization loop, outlining the process of initializing
and updating the parameters (p and L) based on the gradient of the loss function. The
loop runs through multiple epochs, where each iteration includes model prediction, loss
calculation, and parameter updates to minimize the loss function.

As explained in Figure 4, the first step is to initialize an alpha batch with N alphas 237

generated in random positions in the interval [−4, 4] cm both in the x- and y-axes. Then, 238

the volume wrapper class is initialized with the alpha batch and initial values of the 239

pressure (p) and the collimator length (L). 240

Before initializing the loop, the optimizer is initialized to update the values of both 241

parameters based on the gradient of the loss function, according to a previously specified 242

learning rate. In this study, the Adam optimizer was employed with a learning rate of 0.1 243

and default values for (β1 , β2 ). 244

At each epoch, the NN reconstruction model receives the inputs, which are the alpha 245

batch and the initial detector configuration. The model then predicts the reconstructed 246

position of each alpha particle. 247

11
These predicted positions, along with the real beam positions, are fed into the loss 248

function. The next step involves backpropagating the loss to compute the gradients of 249

this function with respect to the parameters to be optimized (p, L). Once the gradients 250

are obtained, the optimizer takes a step, updating the detector parameters according to 251

the computed gradients. 252

This process is repeated over a certain number of epochs until all values stabilize and, 253

as a result, the detector configuration that minimizes the loss function is obtained. 254

3. Results 255

3.1 Optimization for a Random Initial Configuration 256

First, a single optimization loop was carried out with an alpha batch of 10,000 alphas 257

located at random positions and a random initial configuration of the detector during 258

1500 epochs. In Figure 5, the evolution of the loss function, as well as the evolution of 259

the parameters throughout the optimization loop is presented. The optimal values of the 260

pressure and the collimator length found with this method are presented in Table 6. 261

Table 6: Optimal values of pressure (p) and collimator length (L) found for a random
initial configuration and an Alpha Batch of 105 particles, randomly distributed following
a uniform distribution in the interval [−4, 4] cm.

Parameter Found Optimal Value


Pressure 39.03 Torr
Collimator length 15.11 mm

The result for the collimator length agrees with a previous result obtained in Reference [19],
262

where traditional optimization techniques were employed, involving simulations of the de- 263
tector under different parameter combinations, assessing their performance, and selecting 264
the optimal one. In Figure 6, the spatial resolution as a function of the collimator length 265
for different number of SiPMs per wall is illustrated. The minimum of the curve for 33 266
SiPMs, which is the value used in this study, corresponds to a collimator length of approx- 267
imately 15 mm. This is very close to the value obtained through automatic optimization 268
for a similar pressure (30 Torr). 269

12
40

35
35

Collimator Length [mm] 30

Pressure [Torr]
30

25

25
20

20
15
0 250 500 750 1000 1250 1500 1750 2000 0 250 500 750 1000 1250 1500 1750 2000
Epoch Epoch
(a) (b)

0.034

0.033

0.032
Loss (RMSE) [cm]

0.031

0.030

0.029

0.028

0.027

0 250 500 750 1000 1250 1500 1750 2000


Epoch
(c)

Figure 5: Evolution of the (a) collimator length, (b) pressure, and (c) loss function
throughout the optimization loop for a random initial configuration of pressure and col-
limator length. The figures show the progression of these parameters as the optimization
loop iterates, with the values adjusting to minimize the loss function and improve the
detector configuration.

3.2 Optimization for a Detector Configuration Grid 270

To verify whether the previous result is independent of the initial configuration of the 271

parameters—which would indicate that the identified minimum is the absolute minimum 272

of the objective function—the optimization loop was repeated across a grid of initial 273

detector configurations. The values considered for both parameters are detailed in Table 7. 274

This grid translates into 400 different configurations and, therefore, 400 optimization loops 275

that are carried out just as described in Section 3.1. 276

As shown in Figure 7, all configurations converge to the same optimal values for 277

pressure and collimator length, indicating that this minimum of the loss function is the 278

absolute minimum within the studied range. 279

13
Figure 6: Position resolution as function of the collimator length, for SiPMs arrays of
different granularity—the number of photo-sensor per array ranges from 12 to 33 elements.
The pressure was fixed to 30 Torr. Image from Reference [19].

Table 7: Initial values of the parameter grid considered for the optimization loop, spe-
cifying the range of values tested for both the pressure (p) and collimator length (L).

Parameter Values
Pressure 20 values uniformly distributed between 10 and 50 Torr
Collimator length 20 values uniformly distributed between 5 and 50 mm

Lastly, Figure 8 presents a 3D representation of several optimization curves. This visu- 280

alization effectively ’samples’ the function E(p, L), where E represents the reconstruction 281

error in the z-axis, p is the pressure in Torr in the x-axis, and L is the collimator length 282

in mm in the y-axis. From this, it can be inferred that the collimator length has a greater 283

impact on the reconstruction error than the pressure, as the gradient along L is steeper 284

than the gradient along p. 285

14
50 50

45
40
Collimator Length [mm] 40

Pressure [Torr]
35
30
30

25
20
20

10 15

10
0 250 500 750 1000 1250 1500 1750 2000 0 250 500 750 1000 1250 1500 1750 2000
Epoch Epoch
(a) (b)

0.09

0.08
Loss (RMSE) [cm]

0.07

0.06

0.05

0.04

0.03

0 250 500 750 1000 1250 1500 1750 2000


Epoch
(c)

Figure 7: Evolution of the (a) collimator length, (b) pressure, and (c) loss function
throughout the optimization loop for a grid of initial configurations of pressure and col-
limator length. Despite different starting points, the optimization process consistently
converges to the same final result, suggesting that the found minimum of the loss func-
tion is the absolute minimum.

15
(a)

(b)

Figure 8: 3D representation of several optimization curves along (a) the collimator length
axis and (b) the pressure axis, starting from 30 random initial configurations. The min-
imum of the curve along both axes is clearly observed. Additionally, a significantly higher
gradient is observed along the collimator length axis compared to the pressure axis.

16
4. Discussion 286

This study aimed to optimize a Parallel-Plate Avalanche Counter with Optical Readout 287

(O-PPAC) for heavy-ion tracking and imaging, focusing on two key detector parameters: 288

pressure and collimator length. A surrogate model was developed to predict the outputs 289

of a GEANT4 simulation based on inputs provided to the simulator. By integrating this 290

model into an optimization loop, we identified the optimal combination of parameters that 291

minimizes reconstruction error. The optimization was performed on a batch of 105 alpha 292

particles, and the optimal parameters for a randomly generated distribution of particles 293

covering an area of 8 × 8 cm2 were found to be a pressure of 39.03 Torr and a collimator 294

length of 15.11 mm. 295

As shown in Section 3, the optimal collimator length is in agreement with previous 296

results obtained with traditional methods, as reported in Reference [19], which validates 297

the approach used in this study. The pressure value, on the other hand, is relatively high 298

within the specified range, which could be attributed to the higher statistics observed at 299

increased pressures. However, this result cannot be explained purely by the statistics, 300

as this would suggest that the optimal pressure should be the highest value within the 301

imposed limits. We hypothesize that other factors, potentially related to the physical 302

behavior of the detector or the limitations of the simulation, may be influencing the 303

outcome. 304

To ensure the robustness of the results, a grid of different initial configurations was 305

explored. This analysis confirmed that the minimum value of the loss function is independ- 306

ent of the initial values of pressure and collimator length, suggesting that the identified 307

minimum represents the absolute minimum of the reconstruction error. Furthermore, a 308

3D representation of the optimization curves was used to illustrate the loss function and 309

the difference in the gradient along the two axes. A significantly larger gradient was found 310

along the collimator length axis, indicating that this parameter has a greater influence on 311

the loss function compared to pressure. 312

These findings align with recent efforts to apply DP techniques to particle and nuc- 313

lear physics detectors. As remarked before, despite the extensive application of DP in 314

other technical fields, its application to particle detectors remains challenging mainly due 315

to the stochasticity of quantum processes. However, the development of modular dif- 316

ferentiable pipelines such as TomOpt [18] is gradually making detector and experiment 317

optimization in nuclear and particle physics more feasible. As proof, this study was suc- 318

cessfully conducted by adapting TomOpt software to the specific problem of the O-PPAC 319

optimization. 320

17
5. Summary and Conclusions 321

Recent advancements in deep learning and computational capabilities have significantly 322

enhanced the ability to optimize complex systems. Differentiable programming and auto- 323

matic differentiation are at the forefront of this transformation, enabling automated op- 324

timization of complex processes. This study demonstrates the potential of applying these 325

techniques to optimize detectors in nuclear and particle physics. By developing a sur- 326

rogate model, we were able to identify the optimal parameters for an O-PPAC detector 327

designed for heavy-ion tracking and imaging. 328

The next steps in this research will focus on incorporating the position reconstruction 329

process directly into the differentiable pipeline, as the expressions applied to the photon 330

distributions in order to obtain the reconstructed position are differentiable. This will in- 331

volve exploring generative models that can directly predict photon distributions instead of 332

the reconstructed position. Future work will also involve optimizing additional paramet- 333

ers, potentially including cost-related factors in the loss function. Furthermore, we plan 334

to extend this research to a more complex system, which incorporates the O-PPAC as a 335

fundamental component. This could include exploring the effects of higher particle rates, 336

different particle types, and other operational conditions that may influence performance. 337

In conclusion, this study highlights the potential of differentiable programming and 338

machine learning in the design and optimization of particle detectors. The ongoing work 339

and future directions will further refine this approach, expanding its applicability to a 340

wider range of detector designs and experimental setups. 341

Funding 342

The work of M. Pereira and X. Cid is supported by the Spanish Research State Agency un- 343

der projects PID2022-139514NA-C33 and PCI2023-145984-2; by the “María de Maeztu” 344

grant CEX2023-001318-M, funded by MICIU/AEI /10.13039/501100011033; and by the 345

Xunta de Galicia (CIGUS Network of Research Centres). Pietro Vischia’s work was sup- 346

ported by the “Ramón y Cajal” program under Project No. RYC2021-033305-I funded 347

by the MCIN MCIN/AEI/10.13039/501100011033 and by the European Union NextGen- 348

erationEU/PRTR. 349

The views and opinions expressed are solely those of the authors and do not necessarily 350

reflect those of the European Union or the European Commission. Neither the European 351

Union nor the European Commission can be held responsible for them. 352

18
Data Availability 353

The raw data supporting the conclusions of this article will be made available by the 354

authors on request. 355

Acknowledgments 356

We express our gratitude to Yassid Ayyad for kindly providing the Geant4 simulation of 357

the detector and for his valuable technical assistance in this work. 358

References 359

[1] Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, 360

MA, USA, 2016. Available online: http://www.deeplearningbook.org (accessed 361

on 3 June 2024 ). 362

[2] Blondel, M.; Roulet, V. The Elements of Differentiable Programming. arXiv 2024, 363

arXiv:2403.14606. https://doi.org/10.48550/arXiv.2403.14606. 364

[3] Baydin, A.G.; Pearlmutter, B.A.; Radul, A.A.; Siskind, J.M. Automatic differenti- 365

ation in machine learning: A survey. J. Mach. Learn. Res. 2017, 18, 5595. 366

[4] Aehle, M.; Blühdorn, J.; Sagebaum, M.; Gauger, N.R. Forward-Mode Automatic 367

Differentiation of Compiled Programs. arXiv 2022, arXiv:2209.01895. https://doi. 368

org/10.48550/arXiv.2209.01895. 369

[5] Aehle, M.; Blühdorn, J.; Sagebaum, M.; Gauger, N.R. Reverse-Mode Automatic 370

Differentiation of Compiled Programs. arXiv 2022, arXiv:2212.13760. https://doi. 371

org/10.48550/arXiv.2212.13760. 372

[6] Barthelemy, J.F.M.; Hall, L.E. Automatic differentiation as a tool in engineering 373

design. Struct. Optim. 1995, 9, 76–82. https://doi.org/10.1007/BF01758823. 374

[7] Feldmann; Melville; Moinian. Automatic differentiation in circuit simulation and 375

device modeling. In Proceedings of the 1992 IEEE/ACM International Conference 376

on Computer-Aided Design, Santa Clara, CA, USA, 8–12 November 1992; pp. 248– 377

253. https://doi.org/10.1109/ICCAD.1992.279380. 378

[8] Bombardieri, R.; Cavallaro, R.; Sanchez, R.; Gauger, N.R. Aerostructural wing 379

shape optimization assisted by algorithmic differentiation. Struct. Multidiscip. Op- 380

tim. 2021, 64, 739–760. https://doi.org/10.1007/s00158-021-02884-5. 381

19
[9] Agostinelli, S.; Allison, J.; Amako, K.; Apostolakis, J.; Araujo, H.; Arce, P.; 382

Asai, M.; Axen, D.; Banerjee, S.; Barrand, G.; et al. Geant4—A simulation 383

toolkit. Nucl. Instruments Methods Phys. Res. Sect. Accel. Spectrometers, Detect. 384

Assoc. Equip. 2003, 506, 250–303. https://doi.org/https://doi.org/10.1016/ 385

S0168-9002(03)01368-8. 386

[10] Allison, J.; Amako, K.; Apostolakis, J.E.A.; Araujo, H.A.A.H.; Dubois, P.A.; Asai, 387

M.A.A.M.; Barrand, G.A.B.G.; Capra, R.A.C.R.; Chauvie, S.A.C.S.; Chytracek, 388

R.A.C.R.; et al. Geant4 developments and applications. IEEE Trans. Nucl. Sci. 389

2006, 53, 270–278. https://doi.org/10.1109/TNS.2006.869826. 390

[11] Allison, J.; Amako, K.; Apostolakis, J.; Arce, P.; Asai, M.; Aso, T.; Bagli, E.; 391

Bagulya, A.; Banerjee, S.; Barrand, G.J.N.I.; et al. Recent developments in Geant4. 392

Nucl. Instr. Meth. A 2016, 835, 186–225. https://doi.org/10.1016/j.nima. 393

2016.06.125. 394

[12] Baydin, A.; Cranmer, K.; Manzano, P.; Delaere, C.; Derkach, D.; Donini, J.; 395

Dorigo, T.; Giammanco, A.; Kieseler, J.; Layer, L.; et al. Toward Machine Learn- 396

ing Optimization of Experimental Design. Nucl. Phys. News 2021, 31, 25–28. 397

https://doi.org/10.1080/10619127.2021.1881364. 398

[13] Ratnikov, F. Using machine learning to speed up and improve calorimeter R&D. J. 399

Instrum. 2020, 15, C05032. https://doi.org/10.1088/1748-0221/15/05/C05032. 400

[14] Cisbani, E.; Dotto, A.D.; Fanelli, C.; Williams, M.; Alfred, M.; Barbosa, F.; Barion, 401

L.; Berdnikov, V.; Brooks, W.; Cao, T.; et al. AI-optimized detector design for 402

the future Electron-Ion Collider: the dual-radiator RICH case. J. Instrum. 2020, 403

15, P05009. https://doi.org/10.1088/1748-0221/15/05/P05009. 404

[15] Koser, D.; Waites, L.; Winklehner, D.; Frey, M.; Adelmann, A.; Conrad, J. Input 405

Beam Matching and Beam Dynamics Design Optimizations of the IsoDAR RFQ 406

Using Statistical and Machine Learning Techniques. Front. Phys. 2022, 10, 875889. 407

https://doi.org/10.3389/fphy.2022.875889. 408

[16] Van der Veken, F.; Azzopardi, G.; Blanc, F.; Coyle, L.; Fol, E.; Giovannozzi, M.; 409

Pieloni, T.; Redaelli, S.; Ferrando, B.; Schenk, M.; et al. Machine learning in accel- 410

erator physics: Applications at the CERN Large Hadron Collider. PoS 2020, 044, 411

AISIS2019. 412

https://doi.org/10.22323/1.372.0044. 413

[17] Dorigo, T. Geometry optimization of a muon-electron scattering detector. Phys. 414

Open 2020, 4, 100022. https://doi.org/https://doi.org/10.1016/j.physo. 415

2020.100022. 416

20
[18] Strong, G.C.; Lagrange, M.; Orio, A.; Bordignon, A.; Bury, F.; Dorigo, T.; Giam- 417

manco, A.; Heikal, M.; Kieseler, J.; Lamparth, M.; et al. TomOpt: Differential op- 418

timisation for task- and constraint-aware design of particle detectors in the context 419

of muon tomography. Mach. Learn. Sci. Tech. 2024, 5, 035002, [arXiv:physics.ins- 420

det/2309.14027]. https://doi.org/10.1088/2632-2153/ad52e7. 421

[19] Cortesi, M.; Ayyad, Y.; Yurkon, J. Development of a parallel-plate avalanche counter 422

with optical readout (O-PPAC). J. Instrum. 2018, 13, P10006–P10006. 423

[20] Paszke, A.; Gross, S.; Massa, F.; Lerer, A.; Bradbury, J.; Chanan, G.; Killeen, T.; 424

Lin, Z.; Gimelshein, N.; Antiga, L.; et al. PyTorch: An Imperative Style, High- 425

Performance Deep Learning Library. Adv. Neural Inf. Process. Syst. 2019, 32, 8024. 426

[21] Di Carlo, S.; Cortesi, M. Parallel-plate avalanche counters for heavy-ion beam 427

tracking: History and mysteries. Phys. Rev. Accel. Beams 2024, 27, 044801. 428

https://doi.org/10.1103/PhysRevAccelBeams.27.044801. 429

[22] Cortesi, M.; Yurkon, J.; Stolz, A. Measurements of secondary scintillation in low- 430

pressure CF4 with a SiPM, from a parallel-plate avalanche geometry. J. Instrum. 431

2016, 11, P04017. 432

[23] Shirobokov, S.; Belavin, V.; Kagan, M.; Ustyuzhanin, A.; Baydin, A.G. Black-Box 433

Optimization with Local Generative Surrogates. In Advances in Neural Information 434

Processing Systems; Larochelle, H.; Ranzato, M.; Hadsell, R.; Balcan, M.; Lin, H., 435

Eds.; Curran Associates, Inc.: Red Hook, NY, USA, 2020; Volume 33, pp. 14650– 436

14662. 437

[24] Aehle, M.; Arsini, L.; Barreiro, R.B.; Belias, A.; Bury, F.; Cebrian, S.; Demin, A.; 438

Dickinson, J.; Donini, J.; Dorigo, T.; et al. Progress in End-to-End Optimization of 439

Detectors for Fundamental Physics with Differentiable Programming. arXiv 2023, 440

arXiv:2310.05673. https://doi.org/10.48550/arXiv.2310.05673. 441

[25] Kasim, M.F.; Watson-Parris, D.; Deaconu, L.; Oliver, S.; Hatfield, P.; Froula, D.H.; 442

Gregori, G.; Jarvis, M.; Khatiwala, S.; Korenaga, J.; et al. Building high accur- 443

acy emulators for scientific simulations with deep neural architecture search. Mach. 444

Learn. Sci. Technol. 2021, 3, 015013. https://doi.org/10.1088/2632-2153/ 445

ac3ffa. 446

[26] Akiba, T.; Sano, S.; Yanase, T.; Ohta, T.; Koyama, M. Optuna: A Next- 447

generation Hyperparameter Optimization Framework. In Proceedings of the 25th 448

ACM SIGKDD International Conference on Knowledge Discovery & Data Mining 449

(KDD), Anchorage, AK, USA, 4–8 August 2019. 450

21
[27] Pereira, M.; Vischia, P.; Cid, X. OPPAC_OPT: Automatic optimisation of a Parallel- 451

Plate Avalanche Counter with Optical Readout. 2024. Available online: https: 452

//github.com/Mariapm267/OPPAC_opt. 453

[28] Strong, G.; Lamparth, M.; Lagrange, M.; Vischia, P.; Nardi, F.; Giammanco, A.; 454

Orio Alonso, A.; Zaraket, H. GilesStrong/Tomopt: v.0.1.0: 1st Publication Version; 455

Geneva, Switzerland, 2024 . https://doi.org/10.5281/zenodo.10673885. 456

22

You might also like