ex-4: review

This commit is contained in:
Giù Marcer 2020-06-03 10:50:39 +02:00 committed by rnhmjoj
parent a7d923620a
commit 89596f7f25

View File

@ -24,7 +24,6 @@ $|P_v|$ of the particles with a given $P_h$?
\node at (8.5,0.9) {$y$}; \node at (8.5,0.9) {$y$};
\node at (5,8.4) {$z$}; \node at (5,8.4) {$z$};
% Momentum % Momentum
\definecolor{cyclamen}{RGB}{146, 24, 43}
\draw [ultra thick, ->, cyclamen] (5,2) -- (3.8,6); \draw [ultra thick, ->, cyclamen] (5,2) -- (3.8,6);
\draw [thick, dashed, cyclamen] (3.8,0.8) -- (3.8,6); \draw [thick, dashed, cyclamen] (3.8,0.8) -- (3.8,6);
\draw [thick, dashed, cyclamen] (5,7.2) -- (3.8,6); \draw [thick, dashed, cyclamen] (5,7.2) -- (3.8,6);
@ -52,7 +51,6 @@ $$
{\int_{\{ P_v \}} d P_v f_{P_h , P_v} (x, P_v)} {\int_{\{ P_v \}} d P_v f_{P_h , P_v} (x, P_v)}
= \frac{f_{P_h , P_v} (x, P_v)}{I} = \frac{f_{P_h , P_v} (x, P_v)}{I}
$$ $$
where $f_{P_h , P_v}$ is the joint PDF of the two variables $P_v$ and $P_h$ and where $f_{P_h , P_v}$ is the joint PDF of the two variables $P_v$ and $P_h$ and
the integral $I$ runs over all the possible values of $P_v$ given a certain the integral $I$ runs over all the possible values of $P_v$ given a certain
$P_h$. $P_h$.
@ -62,12 +60,10 @@ same considerations done in @sec:3 lead to:
$$ $$
f_{\theta} (\theta) = \frac{1}{2} \sin{\theta} \chi_{[0, \pi]} (\theta) f_{\theta} (\theta) = \frac{1}{2} \sin{\theta} \chi_{[0, \pi]} (\theta)
$$ $$
whereas, being $P$ uniform: whereas, being $P$ uniform:
$$ $$
f_P (P) = \chi_{[0, P_{\text{max}}]} (P) f_P (P) = \chi_{[0, P_{\text{max}}]} (P)
$$ $$
where $\chi_{[a, b]} (y)$ is the normalized characteristic function which value where $\chi_{[a, b]} (y)$ is the normalized characteristic function which value
is $1/N$ between $a$ and $b$ (where $N$ is the normalization term) and 0 is $1/N$ between $a$ and $b$ (where $N$ is the normalization term) and 0
elsewhere. Since $P,\theta$ are independent variables, their joint PDF is elsewhere. Since $P,\theta$ are independent variables, their joint PDF is
@ -77,9 +73,8 @@ $$
= \frac{1}{2} \sin{\theta} \chi_{[0, \pi]} (\theta) = \frac{1}{2} \sin{\theta} \chi_{[0, \pi]} (\theta)
\chi_{[0, P_{\text{max}}]} (P) \chi_{[0, P_{\text{max}}]} (P)
$$ $$
and they are related to the vertical and horizontal components and they are related to the vertical and horizontal components by a standard
by a standard polar coordinate transformation: polar coordinate transformation:
\begin{align*} \begin{align*}
\begin{cases} \begin{cases}
P_v = P \cos(\theta) \\ P_v = P \cos(\theta) \\
@ -91,12 +86,12 @@ by a standard polar coordinate transformation:
\theta = \text{atan2}(P_h, P_v) \theta = \text{atan2}(P_h, P_v)
\end{cases} \end{cases}
\end{align*} \end{align*}
where: where:
- $\theta \in [0, \pi]$, - $\theta \in [0, \pi]$,
- and atan2 is defined by: - and atan2 is defined by:
$$ $$
\begin{cases} \begin{cases}
\arctan(P_h/P_v) &\incase P_v > 0 \\ \arctan(P_h/P_v) &\incase P_v > 0 \\
@ -104,7 +99,6 @@ $$
\arctan(P_h/P_v) + \pi &\incase P_v < 0 \arctan(P_h/P_v) + \pi &\incase P_v < 0
\end{cases} \end{cases}
$$ $$
The Jacobian of the inverse transformation is easily found to be: The Jacobian of the inverse transformation is easily found to be:
$$ $$
|J^{-1}| = \frac{1}{\sqrt{P_v^2 + P_h^2}} |J^{-1}| = \frac{1}{\sqrt{P_v^2 + P_h^2}}
@ -117,9 +111,8 @@ $$
\frac{\chi_{[0, p_{\text{max}}]} \left(\sqrt{P_v^2 + P_h^2} \right)} \frac{\chi_{[0, p_{\text{max}}]} \left(\sqrt{P_v^2 + P_h^2} \right)}
{\sqrt{P_v^2 + P_h^2}} {\sqrt{P_v^2 + P_h^2}}
$$ $$
The integral $I$ can now be computed. Note that the domain is implicit in the
The integral $I$ can now be computed. Note that the domain characteristic functions:
is implicit in the characteristic function:
$$ $$
I(x) = \int_{-\infty}^{+\infty} dP_v \, f_{P_h , P_v} (x, P_v) I(x) = \int_{-\infty}^{+\infty} dP_v \, f_{P_h , P_v} (x, P_v)
= \int \limits_{- \sqrt{P_{\text{max}}^2 - P_h}} = \int \limits_{- \sqrt{P_{\text{max}}^2 - P_h}}
@ -143,7 +136,6 @@ $$
\chi_{[0, p_{\text{max}}]} \left(\sqrt{P_v^2 + P_h^2}\right)}{2 \, \arctan \chi_{[0, p_{\text{max}}]} \left(\sqrt{P_v^2 + P_h^2}\right)}{2 \, \arctan
\left( \sqrt{\frac{P_{\text{max}}^2}{x^2} - 1} \right)} \left( \sqrt{\frac{P_{\text{max}}^2}{x^2} - 1} \right)}
$$ $$
Finally, putting all the pieces together, the average value of $|P_v|$ can be Finally, putting all the pieces together, the average value of $|P_v|$ can be
computed: computed:
$$ $$
@ -152,7 +144,6 @@ $$
= \frac{x \ln \left( \frac{P_{\text{max}}}{x} \right)} = \frac{x \ln \left( \frac{P_{\text{max}}}{x} \right)}
{\arctan \left( \sqrt{ \frac{P^2_{\text{max}}}{x^2} - 1} \right)} {\arctan \left( \sqrt{ \frac{P^2_{\text{max}}}{x^2} - 1} \right)}
$$ {#eq:dip} $$ {#eq:dip}
The result is plotted in the figure below: The result is plotted in the figure below:
![Plot of the expected dependence of $\langle |P_v| \rangle$ with ![Plot of the expected dependence of $\langle |P_v| \rangle$ with
@ -163,30 +154,28 @@ The result is plotted in the figure below:
This dependence should be found by running a Monte Carlo simulation and This dependence should be found by running a Monte Carlo simulation and
computing a binned average of the vertical momentum. A number of $N = 50000$ computing a binned average of the vertical momentum. A number of $N = 50000$
particles were generated as pair of values ($P$, $\theta$), with $P$ particles was generated as pairs of values ($P$, $\theta$), with $P$ uniformly
uniformly distributed between 0 and $P_{\text{max}}$ and $\theta$ given by the distributed between 0 and $P_{\text{max}}$ and $\theta$ given by the same
same procedure described in @sec:3, namely: procedure described in @sec:3, namely:
$$ $$
\theta = \arccos(1 - 2x) \theta = \arccos(1 - 2x)
$$ $$
where $x$ is uniformly distributed between 0 and 1. where $x$ is uniformly distributed between 0 and 1.
The binning turned out to be quite a challenge: once a $P$ is sampled and The binning turned out to be quite a challenge: once a $P$ is sampled and
$P_h$ computed, the bin containing the latter has to be found. If $P_h$ computed, the bin containing the latter has to be found. If
the range $[0, P_{\text{max}}]$ is divided into $n$ equal bins the range $[0, P_{\text{max}}]$ is divided into $n$ equal bins
of the width of width:
$$ $$
w = \frac{P_{\text{max}}}{n} w = \frac{P_{\text{max}}}{n}
$$ $$
then (counting from zero) $P_h$ goes into the $i$-th bin where then (counting from zero) $P_h$ goes into the $i$-th bin, where:
$$ $$
i = \left\lfloor \frac{P_h}{w} \right\rfloor i = \left\lfloor \frac{P_h}{w} \right\rfloor
$$ $$
Then, the sum $S_j$ of all the $|P_v|$ values relative to the $P_h$ of the Then, the sum $S_j$ of all the $|P_v|$ values relative to the $P_h$ of the
$j$-th bin itself and number num$_j$ of the bin counts are stored in an array $j$-th bin and the number num$_j$ of the bin counts are stored in an array
and iteratively updated. Once every bin has been updated, the average value of and iteratively updated. Once every point has been sampled, the average value
$|P_v|_j$ is computed as $S_j / \text{num}_j$. of $|P_v|_j$ is computed as $S_j / \text{num}_j$.
For the sake of clarity, for each sampled couple the procedure is the For the sake of clarity, for each sampled couple the procedure is the
following. At first $S_j = 0 \wedge \text{num}_j = 0 \, \forall \, j$, then: following. At first $S_j = 0 \wedge \text{num}_j = 0 \, \forall \, j$, then:
@ -217,14 +206,12 @@ The following results were obtained:
The $\chi^2$ and $p$-value show a very good agreement. The $\chi^2$ and $p$-value show a very good agreement.
In order to compare $P^{\text{oss}}_{\text{max}}$ with the expected value In order to compare $P^{\text{oss}}_{\text{max}}$ with the expected value
$P_{\text{max}} = 10$, the following compatibility $t$-test was applied: $P_{\text{max}} = 10$, the usual compatibility $t$-test was applied:
$$ $$
p = 1 - \text{erf}\left(\frac{t}{\sqrt{2}}\right)\ \with p = 1 - \text{erf}\left(\frac{t}{\sqrt{2}}\right)\ \with
t = \frac{|P^{\text{oss}}_{\text{max}} - P_{\text{max}}|} t = \frac{|P^{\text{oss}}_{\text{max}} - P_{\text{max}}|}
{\Delta P^{\text{oss}}_{\text{max}}} {\Delta P^{\text{oss}}_{\text{max}}}
$$ $$
where $\Delta P^{\text{oss}}_{\text{max}}$ is the $P^{\text{oss}}_{\text{max}}$ where $\Delta P^{\text{oss}}_{\text{max}}$ is the $P^{\text{oss}}_{\text{max}}$
uncertainty. At 95% confidence level, the values are compatible if $p > 0.05$. uncertainty. At 95% confidence level, the values are compatible if $p > 0.05$.
In this case: In this case: