% Created 2025-02-03 Mon 09:55
% Intended LaTeX compiler: pdflatex
\documentclass[usenames,dvipsnames,colorlinks,aspectratio=169]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{color}
\usepackage{listings}
\usepackage{pdfpages}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{xspace}
\usepackage{siunitx}
\usepackage{libertine}
\usepackage{fontawesome}
\mode<beamer>{\usetheme{Boadilla}}
\setbeamertemplate{navigation symbols}{}
\setbeamerfont{alerted text}{series=\bfseries}
\setbeamercolor{alerted text}{fg=blue}
\usecolortheme{default}
\usefonttheme{serif}
\usefonttheme{professionalfonts}
\lstloadlanguages{[ISO]C++}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.50,0,0.82}
\definecolor{codeorange}{rgb}{0.95,0.3,0.1}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
commentstyle=\color{codegreen},
keywordstyle=\color{codeorange},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
\usetheme{default}
\author{Brett Viren}
\date{\today}
\title{Anode Faces in Wire-Cell Toolkit}
\hypersetup{
 pdfauthor={Brett Viren},
 pdftitle={Anode Faces in Wire-Cell Toolkit},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 28.2 (Org mode 9.8-pre)},
 pdflang={English}}
\begin{document}

\maketitle
\begin{frame}[label={sec:orgd059cbe}]{Topics}
\begin{itemize}
\item Review/summarize detector representations in Wire-Cell Toolkit.
\item Review/summarize how ``faces'' apply to WCT imaging and clustering.
\item Describe my view of essential cluster ``stitching'' info to exploit.
\item Face representation (lack of) in current PC tree.
\item Proposal to update PC tree to represent and use ``faces''.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:orga0b415e},fragile]{The ``anode plane'' data hierarchy}
 WCT describes a TPC detector with a tree (forest) of objects with layers of type:

\begin{enumerate}
\item \texttt{IAnodePlane}
\item \texttt{IAnodeFace}
\item \texttt{IWirePlane}
\end{enumerate}

These provide structure to overall set of \texttt{IWire} and \texttt{IChannel}.

\begin{verbatim}
                      IAnodePlane
[ (drift) IAnodeFace -> |||][||| <- IAnodeFace (drift) ]
           IWirePlanes _^^^  ^^^_ IWirePlanes
                 --------------------
                 IWires and IChannels
\end{verbatim}
\end{frame}
\begin{frame}[label={sec:orgcf6ef43},fragile]{\texttt{IAnodePlane}}
 A TPC sub-detector with channel-level sensitivity to shared drift volumes

\begin{itemize}
\item A DUNE APA is represented by one \texttt{IAnodePlane}
\item Wrapped or jumpered wires conflate sensitivity over \alert{two} drift volumes.
\item The ``plane'' refers to the entire assembly, not a single wire plane.
\end{itemize}

Main data:
\begin{itemize}
\item ``ident'' number
\item collection of \texttt{IWireFace}.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:org9c71632},fragile]{\texttt{IAnodeFace}}
 A TPC sub-sub-detector with wire-level sensitivity to a single drift volume

\begin{itemize}
\item Wrapped wires: a face on either side of the anode plane.
\item Jumpered wires: faces are side-by-side across one anode plane.
\item Roughly corresponds to a LArSoft ``TPC''.
\end{itemize}

Main data:
\begin{itemize}
\item ``ident'' number
\item sensitive volume bounding box
\item ``ray grid'' coordinate system
\item collection of \texttt{IWirePlane}
\end{itemize}
\end{frame}
\begin{frame}[label={sec:org54a7f6c},fragile]{\texttt{IWirePlane}}
 A collection of co-planar of electrodes.
\begin{itemize}
\item One \texttt{IAnodeFace} mother and one \texttt{IAnodePlane} grandmother.
\end{itemize}

Main data:
\begin{itemize}
\item ``ident'' number
\item \texttt{WirePlaneId} (apa/face/plane numbers as packed \texttt{int})
\item ``Pimpos'' wire-plane coordinate system
\item collection of \texttt{IWire} and \texttt{IChannel}.
\begin{itemize}
\item \texttt{IWires} in wire-in-plane order.
\item \texttt{IChannels} in wire-attachment-number order.
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[label={sec:orgbebf907},fragile]{Bring \texttt{IAnodePlane} to data}
 Typically, configuration arranges for a \alert{coincidence}:

\begin{itemize}
\item A data-flow graph node is configured with the \alert{type/name} of an \texttt{IAnodePlane}
\begin{itemize}
\item eg the \texttt{"anode"} config parameter.
\end{itemize}
\item The flow graph is constructed so that the node receives data that is
associated with the same \texttt{IAnodePlane}.
\end{itemize}

So far, components tend to use exactly 0 or 1 \texttt{IAnodePlane}.
\begin{itemize}
\item In general, a component may access multiple \texttt{IAnodePlane}'s.
\item Or, may be limited to use a single \texttt{IAnodeFace} or \texttt{IWirePlane}.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:org1ee7ee4},fragile]{\texttt{IAnodeFace} and WCT imaging}
 An \texttt{IBlob} is naturally a \alert{per-face} object because collection wire planes (at least) are per-face.

\begin{itemize}
\item \texttt{IAnodeFace::pointer IBlob::face()} captures/represents this association.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:org0b0d44d},fragile]{\texttt{IAnodeFace} and WCT clustering}
 Initial clusters are points sampled from blobs so are \alert{implicitly} per-face.
\begin{itemize}
\item MicroBooNE has only 1 face so multi-face is not an issue.
\end{itemize}

Next and novel clustering stage is to \alert{stitch clusters}.
\begin{itemize}
\item 3 stitching cases: across \alert{anode} faces, \alert{cathode} faces and drift volume \alert{sides}.
\end{itemize}

How do we handle the ``face issue''?
\end{frame}
\begin{frame}[label={sec:org05b6a04}]{Essential stitching algorithm exploits (imo)}
\begin{block}{Anode stitching - time/drift dimension}
Anode-crossing track puts ADC in \alert{common ticks} on both faces.
\end{block}
\begin{block}{Cathode stitching - time/drift dimension}
Cathode-crossing track puts ADC in \alert{common ticks} after \alert{adjusting} for:

\begin{itemize}
\item drift velocity/duration over known drift distance.
\end{itemize}
\end{block}
\begin{block}{Side stitching - time/drift dimension}
Side-crossing track puts ADC in \alert{common ticks} after \alert{adjusting} for:
\begin{itemize}
\item drift velocity/duration over unknown drift distance (need Q-L match)
\end{itemize}
\end{block}
\begin{block}{All cases - transverse dimensions}
Must model the track the location/direction.

\begin{itemize}
\item Side stitching may require space-charge effect corrections.
\end{itemize}
\end{block}
\end{frame}
\begin{frame}[label={sec:org051d994},fragile]{Faces and point-cloud tree}
 PC tree layers represent: \alert{grouping}, \alert{cluster}, \alert{blob}.
\begin{itemize}
\item The blob nodes have a \texttt{Dataset} representing blob sample points.
\item All nodes may carry additional \texttt{Datasets}.
\end{itemize}

Currently, no face information in the PC tree (?)
\begin{itemize}
\item No ``face'' ID recorded on ``blob nodes'' (?)
\item No ``blob node'' \(\leftrightarrow\) \texttt{IBlob} connection (?) so no \texttt{IBlob::face()} call.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:orgafc2e0d},fragile]{Proposal to represent and use ``faces'' in next-stage clustering}
 \begin{itemize}
\item Form a \alert{drift volume ID} (DVID) from the pair of numbers: \texttt{(anode ident,face)}.
\begin{itemize}
\item Save DVID to each blob node as a \texttt{Dataset} (PC).
\item An initial (per-face) cluster has DVID that of any of its blobs.
\end{itemize}

\item Form a \alert{drift volume neighbor map}.
\begin{itemize}
\item Dense 3D array of DVID values, elements correspond to detector layout.
\item Store in PC tree as a \texttt{Dataset} on the \alert{grouping} node.
\end{itemize}

\item Family of DVID lookup functions.
\begin{itemize}
\item DVID pairs by ``anode'', ``cathode'' and ``side'' neighboring.

\item Must be parameterized by ``wrapped'' or ``jumpered'' assumption.

\item And by layout (eg, DUNE C-A-C-A-C vs PD A-C-A vs ICARUS C-A-C|C-A-C).
\end{itemize}
\end{itemize}

Stitching of ``anode'', ``cathode'' or ``side'' type starts by finding sets of
``initial'' (per-anode) clusters of the corresponding neighboring.
\end{frame}
\begin{frame}[label={sec:org92fe2b5}]{}
\Huge
\[\mathcal{FIN}\]
\end{frame}
\begin{frame}[label={sec:org27d38a3}]{Backups}
\end{frame}
\end{document}
