-
Notifications
You must be signed in to change notification settings - Fork 0
/
clustering.tex
87 lines (75 loc) · 5.2 KB
/
clustering.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
\section{GEM clustering and (pre-2019) analysis}
\label{clustering}
The clustering aims to reconstruct the GEM hits with which the tracks will be reconstructed.
This section describes the decoding of the GEM strips, the selection of ``good'' strips, and clustering, that has been used until early 2019.
The clustering is made independently in each readout coordinates, then the hits are being recombined after some tracking steps.
\subsection{Strip decoding and selection}
\label{strip_sel}
The GEM data are decoded strip-per-strip independently for each readout plane.
For each strip all 6 ADC samples are read and the sum of ADC samples is evaluated.
For the strip to be selected as a potentially good signal strip, this sum has to reach a threshold configurable by the database.
We had set it to 180 which corresponds to the equivalent of the sum over the 6 samples of 2 standard deviations of a sample pedestal.
While the samples are read, we check the variable noted ``MaxADC'' which is the maximal ADC values over the second, third, fourth samples (which is where the signal peak should tyipcally be). This maximum has to be at least 40 ADC (configurable in the database) for the strip to be selected as a potentially good signal strip.
Finally, the strips samples are being fitted by a function of the form:
%
\begin{equation}
f(t) = A \frac{t-t_0}{\tau} \times \exp{\frac{t-t_0}{\tau}},
\label{eq:pulse_fcn}
\end{equation}
%
to detemine the peak of the distribution. The peak of the fitted function has to be located within the time range covered by the 6 samples.
As a recap, a strip will be considered as good if:
%
\begin{itemize}
\item{The sum of all 6 ADC samples is $\geq$ 180 ADC channels;}
\item{One sample among the second, third, and fourth has an ADC value $\geq$ 40;}
\item{the peak of the function described in equation \ref{eq:pulse_fcn} fitted over the 6 samples is within the time span covered by those 6 samples.}
\end{itemize}
%
Only the strips meeting this requirement are used for the clustering described in the next subsection.
\subsection{Clustering, cluster selection}
\label{cluster_algo}
%The basic idea behind the clustering is to group together all
By the algorithm we are going to describe, a cluster is a group of ``good'' adjacent strips ({\it i.e.} a group of strips meeting the conditions stated in the previous subsection).
When the strips are grouped together, the algorithm compares the size of the group of strips
with a limit (noted ``MaxClustSize'') defined in the database (in our case, 6 strips -{\em need to check that as well}).
If the strip group size is smaller than the limit, the algorithm performs the clustering directly. This is described in subsubsection~\ref{single_cluster}.
If it is larger, the algorithm attempts to split the cluster in size and time. This is described in subsubsection~\ref{cluster_split}.
\subsubsection{single cluster analysis}
\label{single_cluster}
In the simple case of a single cluster ({\it i.e.} with a number of strips below ``MaxClustSize''), the amplitude is calculated as the sum of the strips ADC; the position is calculated as the ADC weighted average of the position of the strips involved in the cluster; the time of the hit is the time of the strip with the largest ``MaxADC'' value.
\subsubsection{cluster splitting}
\label{cluster_split}
In the event where there is a consecutive number of valid strips above ``MaxClustSize'', a ``peak-valley-peak'' pattern is searched. In practice, a first ADC maximum is searched, then the strips with a minimum ADC value is searched for.
If this minimum is less than a fraction defined by the database parameter ``'' and is followed by another maximum, then the strip is split between the two consecutive clusters.
What that means is the strip will be accounted for in both clusters, and the ADC value will be split between both clusters {\it i.e.} the ADC sum of this strip is divided between both clusters.
If the group the strips after the first minimum is larger than ``MaxClustSize'', the algorithm repeats this procedure until it has scanned all the group of strips.
All the clusters obtained can now be treated as single clusters for the calculation of their position, amplitude and time.
If in a group of strips larger than ``MaxClustSize'' a ``peak-valley-peak'' pattern cannot be found, the algorithm considers it as a ``large'' cluster, which in practice is treated as a single cluster for the calculation of its position, amplitude and time.
%and the rest hits.
%\subsection{performance for $G_E^p$}
%
%\begin{itemize}
%\item{The ;}
%\item{one signal event is digitized;}
%\end{itemize}
%
%The superimposition of signal and background is made as such:
%
%
%
%\begin{equation}
% A_{\text {LU}} = \frac{N_+-N_-}{N_++N_-}
%\end{equation}
%
%\begin{figure}[htb!]
%\centerline{\includegraphics[width=8cm]{TDIS-calibration.pdf}}
%\caption[]{Setup for mTPC calibration. SBS will be located at the same angle of 12 degrees, and HCAL at 60 degrees and 15 meters distance from target.}
%\label{fig:tpccalib}
%\end{figure}
%
%\begin{eqnarray}
%\mathrm{D}({\vec e},e'\gamma) X &=& d({\vec e},e'\gamma)d + n({\vec e},e'\gamma)n + p({\vec e},e'\gamma)p + \ldots \nonumber \\
%&=& \text{d-DVCS}\,+\,\text{n-DVCS}\,+\,\text{p-DVCS}+\ldots
%\label{ImAp22}
%\end{eqnarray}