---
# System prepended metadata

title: SBND Comprehensive Notes

---

> # SBND Comprehensive Notes


[TOC]



---


# Neutrino Physics


## Outlines
- Profile:
  - Mass: < 0.120 eV (< $2.14 × 10^{−37}$ kg, ~500,000 times smaller than electron)
  - Speed: $\lesssim$ Speed of light
- Properties:
  - Leptons
  - Neutral
  - Interact with weak, gravity only
- Oscillation: change flavor periodically with time
- Flavor problem: the origin of the fermion families and of the masses and mixing of quarks and leptons.
- Types (flavour):
  - Muon, electron, tau
- Interactions:
  - Couple with $Z^0$ boson
  - Couple with $W^{+/-}$ boson
  - $W^+$ → lepton(+) + neutrino
  - $W^-$ → lepton(-) + anti-neutrino
- Productions:
  - Electron neutrino (**beta decay**): $$n \rightarrow p + e^- + \bar{\nu}_e$$ 
  - Muon neutrino: 
      $$\pi^+ \rightarrow \mu^+ + \bar{\nu}_{\mu}$$ $$\mu^+ \rightarrow e^+ + \nu_e + \bar{\nu}_{\mu}$$
  - Tau neutrino: 
      $$\begin{split}
      \tau^- &\rightarrow \nu_{\tau} + W^{-} \\
    &\rightarrow \nu_{\tau} + e^{-} + \bar{\nu}_e \\
    &\rightarrow \nu_{\tau} + \mu^- + \bar{\nu}_{\mu}
    \end{split}$$




## Neutrino-Nucleus Scattering
- Types:
  - Energy: Elastic vs. Inelastic
  - Phase/fluctuation: Coherent vs. Incoherent
- Charged current (CC) cross sections:
  - CC exclusive: Specific hadronic final states, i.e. CC $\nu_{\mu}$ with a single proton ($p$), with a single pion ($\pi^+$), etc.
  - CC inclusive: Sum the contributions from all exclusive channels.


### Particles in Matter
- Bethe-Bloch formula (how much energy lost of a charged particle when traveling through matter):
    $$-\frac{dE}{dx} = K z^2 \frac{Z}{A} \frac{1}{\beta^2} \left[\frac{1}{2} \ln\frac{2 m_e c^2 \beta^2 \gamma^2}{I^2} - \beta^2 - \frac{\delta(\beta \gamma)}{2} \right]
$$
    - $\frac{dE}{dx}$: Energy loss per unit path length
    - $K$: A constant
    - $z$: Charge of the particle
    - $Z$: Atomic number of the medium
    - $A$: Atomic mass of the medium
    - $\beta$: Velocity of the particle in units of the speed of light
    - $\gamma$: Lorentz factor ($\gamma = 1/\sqrt{1 - \beta^2}$)
    - $m_e$: Electron mass
    - $c$: Speed of light
    - $I$: Mean excitation energy of the medium
    - $\delta(\beta \gamma)$: Density effect correction
- For small velocities ($\beta \ll 1$):
    $$-\frac{dE}{dx} = K z^2 \frac{Z}{A} \frac{4 \pi}{m_e c^2} \frac{n Z}{v^2} \left[ \ln\frac{2 m_e v^2}{I} - \beta^2 \right]
$$



---

# Detectors

## TPC (time projection chamber)

### Purpose: 
Reconstruct 3D particle trajectories or interactions using E-field, B-field, and a volume of gas or liquid

### LArTPC (Liquid Argon Time Projection Chamber):
#### Why argon (Ar)?
1. Electronegravity = 0 → electrons produced by ionizing radiation will not be absorbed as they drift toward the detector readout. 
2. Scintillation →  When a charged particle passes by, Ar releases photons that is proportional to the energy deposited in the Ar by the passing particle.
3. High density → Increase likelihood of particle interaction therein.

#### Function:
1. Cathode: Establishes a 500 V/cm drift field across opposite the anode.
2. Anode: Comprises multiple wire planes, including induction planes and a collection plane, for signal readout and 2D event reconstruction.
3. Field Cage: Maintains a uniform electric field to minimize drift electron trajectory distortion during event reconstruction.
![Screenshot 2024-04-23 at 1.56.23 PM](https://hackmd.io/_uploads/rkaoUuHbC.jpg)

#### Signal (light) collection:
- **Photomultipliers (PDS)**

#### Signal readout: 
- RC circuit → amplify & digitize signals from event construction
- 3 wire planes → signals created:
    1. 1D standard deconvolution on wire signals
    2. 2D deconvolution using wirecell
    3. CNNs

#### Goals:
1. Get the number of electrons reaching a specific wireplane crossing
2. Use the interaction time from the PDS to resolve the drift coordinate



## PDS (Photon Detection System)
* Components:
    - **Photomultiplier tubes (PMTs)**:
        - Purpose: convert photons to electric signals.
        - Measurement: signal waveforms on the anode
            1. Calibration source → determine single photoelectrons (SPE) strength in ADC
            2. Waveforms are calibrated by setting the gains of all the PMTs to match using this SPE calibration (typical gain: $5\times10^6$) 
            3. Each of the 120 PMTs are calibrated to have the same gain.

            ![PhotoMultiplierTubeAndScintillator](https://hackmd.io/_uploads/rkcbDuH-R.svg)


    - Silicone based photomultipliers (**X-ARAPUCAs**): Similar to PMTs but use optical electronics with a light trapping surface instead of dynodes (lower voltage than PMTs) → lower detection efficiency


* Passive component: Tetra-Phenyl-Butadiene (TPB) coating
    - Role: wavelength shifter (128 nm vacuum UV from de-exciting argon → 430 nm blue light)
    - Convert VUV photons released from argon scintillation light to the wavelength where the active PDS components peak in detection efficiency.
    - 96/120 PMTs & 92/196 X-ARAPUCAs are coated.


* Purpose: Reject cosmic rays as neutrino events & determine interaction time
    - PDS has to be very fast to resolve short time scale events
    - The whole PDS is attached to digitizer modules that are able to resolve waveforms with 2 ns resolution.


* Cosmic ray taggers (CRTs): 
    - Purposes: reject cosmic rays & beyond SM searches
    - Components: panels filled with liquid scintillator strips that surround SBND’s cryostat.
    - Principles: Similar to PDS but the incoming particle is a cosmic particle → waveform’s ADC corresponds to its energy (timing can be synced with PDS)



---

# ML Reconstruction

## ML reco chain for LArTPC

![Screenshot 2024-04-23 at 2.04.58 PM](https://hackmd.io/_uploads/Sy9cO_HZ0.png)

* Key components:
    1. **Input**: The reconstruction chain takes 3D particle interaction images as input.
    2. **Semantic Segmentation and Point Proposal**: The first module in the reconstruction chain is designed to identify the abstract particle type of each voxel and the location of important points. This module uses a backbone architecture called "Sparse U-ResNet" for voxel-level feature extraction and point identification.
    3. **UResNet**: The Sparse U-ResNet is a U-Net architecture composed of a down-sampling encoder and an up-sampling decoder for feature extraction at various scales.
    4. **PPN** (Point Proposal Network): This network is used for reconstructing 3D particle positions with sub-pixel precision in LArTPCs.
    5. **GNN** (Graph Neural Network): Graph networks are used to assemble shower objects, identify primary fragments, aggregate particles into interactions, and identify their species.
    6. **Primaries**: The network identifies primary fragments before aggregating particles into interactions.
    7. **Particles GNN**: Graph networks are used to identify individual particle types and trajectories.
    8. **Interactions/Identification**: The network aggregates particles into interactions and identifies their species.


* Recap:
    1. #### Space points: 
        - Tomographic construction: By cluster 3D
        - Ghosts: artifact spacepoints by false three-fold wire coincidence
    2. #### Semantic segmentation:
        - Semantic labeling by sparse UResNet
        - Five classes: **shower, track, delta, Michel, low energy**
        - Michel electrons = electron produced in the decay of a muon
    3. #### PPN (Point Proposal Network):
        - CNN with encoder-decoder architecture
        - Labels start/end points of tracks, deltas, and shower start points
    4. #### Clustering:
        - Coordinates → embedded space (where tracks spatially isolated)
        - Cluster IDs: leared by graphSPICE
    5. #### Aggregator:
        - Particle level:
            - Graph particle aggregator (GrapPA) → Identify shower primaries & cluster individual particles
            - Aggregating clusters into particles for showers
            - 92% shower primary ID accuracy
        - Interaction level:
            - Determine interaction primaries, interaction clusters and PID
            - 91% primary identification accuracy; overall primary accuracy = 86.3%


## Principal Component Analysis (PCA)

Principal Component Analysis (PCA) is a dimensionality reduction technique used to simplify datasets with many correlated variables into a smaller set of uncorrelated variables, called principal components (PCs), while retaining most of the original information.

### Objective
PCA aims to find new directions (principal components) where the variance of the data is maximized.

### Steps
1. **Mean Centering**: Subtract the mean from each feature.
   - $X_{\text{centered}} = X - \text{mean}(X)$

2. **Covariance Matrix ($\Sigma$)**: Compute the covariance matrix of the centered data.
   - $\Sigma = \frac{1}{n} X_{\text{centered}}^T X_{\text{centered}}$

3. **Eigenvalues and Eigenvectors**: Calculate the eigenvectors $v$ and eigenvalues ($\lambda$) of the covariance matrix.
   - $\Sigma v = \lambda v$

4. **Select Principal Components**: Choose the top ($k$) eigenvectors with the highest eigenvalues.

5. **Transform Data**: Project the original data onto the selected principal components.
   - $X_{\text{new}} = X_{\text{centered}} \cdot \text{eigenvectors}$

### Example
Suppose we have a 2D dataset $X$ with two features (columns) $x_1$ and $x_2$:

$$
X = \begin{bmatrix}
1 & 2 \\
2 & 3 \\
3 & 4 \\
4 & 5 \\
\end{bmatrix}
$$

1. **Mean Centering**: Subtract the mean of each column.
   $$X_{\text{centered}} =
     \begin{bmatrix}
     -1.5 & -1.5 \\
     -0.5 & -0.5 \\
     0.5 & 0.5 \\
     1.5 & 1.5 \\
     \end{bmatrix}$$

2. **Covariance Matrix $\Sigma$**:
   $$\Sigma = \frac{1}{4} X_{\text{centered}}^T  X_{\text{centered}} = 
     \begin{bmatrix}
     1.6667 & 1.6667 \\
     1.6667 & 1.6667 \\
     \end{bmatrix}
     $$

3. **Eigenvalues and Eigenvectors**:
   - Solve $\Sigma v = \lambda v$ to get eigenvectors $v$ and eigenvalues $\lambda$:
     - Eigenvectors: $v_1 = [0.7071, 0.7071]$, $v_2 = [-0.7071, 0.7071]$
     - Eigenvalues: $\lambda_1 = 3.3333$, $\lambda_2 = 0$

4. **Select Principal Components**: Choose $v_1$ (highest $\lambda$).

5. **Transform Data**:
   - $X_{\text{new}} = X_{\text{centered}} \cdot \text{eigenvector}$
    - $X_{\text{new}} = \begin{bmatrix}
     -2.1213 \\
     -0.7071 \\
     0.7071 \\
     2.1213 \\
     \end{bmatrix}$

This result represents the original data $X$ projected onto the first principal component $v_1$. The data is now in a new coordinate system where the variance is maximized along $v_1$, reducing the dimensionality from 2D to 1D.



# Other Links

* Getting started with particle gun simulator: https://sbnsoftware.github.io/SBNYoung/particle_gun_tut.html
* Techical note: https://hackmd.io/@castalyfan1012/rJytx3tOp/edit

