Skip to content

Commit

Permalink
deploy: af2438f
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleosynthesis committed Feb 1, 2024
1 parent ad5fc57 commit 2d64ca2
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -527,5 +527,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>

<!--
MkDocs version : 1.5.3
Build Date UTC : 2024-01-25 14:38:51.280263+00:00
Build Date UTC : 2024-02-01 12:51:38.711462+00:00
-->
42 changes: 21 additions & 21 deletions part2/physicsmodels/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,26 +266,26 @@ <h1 id="physics-models">Physics Models</h1>
deltaS lnN 1.20 - 20% uncertainty on signal
deltaB lnN - 1.50 50% uncertainty on background
</code></pre>
<p>If we run <code>text2workspace.py</code> on this datacard and take a look at the workspace (<code>w</code>) inside the <code>.root</code> file produced, we will find a number of different objects representing the signal, background, and observed event rates, as well as the nuisance parameters and signal strength <strong>r</strong>.</p>
<p>If we run <code>text2workspace.py</code> on this datacard and take a look at the workspace (<code>w</code>) inside the <code>.root</code> file produced, we will find a number of different objects representing the signal, background, and observed event rates, as well as the nuisance parameters and signal strength <span class="arithmatex"><span class="MathJax_Preview">r</span><script type="math/tex">r</script></span>. Note that often in the statistics literature, this parameter is referred to as <span class="arithmatex"><span class="MathJax_Preview">\mu</span><script type="math/tex">\mu</script></span>. </p>
<p>From these objects, the necessary PDF has been constructed (named <code>model_s</code>). For this counting experiment we will expect a simple PDF of the form</p>
<div class="arithmatex">
<div class="MathJax_Preview">
p(n_{\mathrm{obs}}| r,\delta_{S},\delta_{B})\propto
\dfrac{[r\cdot n_{S}(\delta_{S})+n_{B}(\delta_{B})]^{n_{\mathrm{obs}}} }
{n_{\mathrm{obs}}!}e^{-[r\cdot n_{S}(\delta_{S})+n_{B}(\delta_{B})]}
\cdot e^{-\frac{1}{2}(\delta_{S}- \delta_{S}^{\mathrm{In}})^{2}}
\cdot e^{-\frac{1}{2}(\delta_{B}- \delta_{B}^{\mathrm{In}})^{2}}
p(n_{\mathrm{obs}}| r,\nu_{S},\nu_{B})\propto
\dfrac{[r\cdot n_{S}(\nu_{S})+n_{B}(\nu_{B})]^{n_{\mathrm{obs}}} }
{n_{\mathrm{obs}}!}e^{-[r\cdot n_{S}(\nu_{S})+n_{B}(\nu_{B})]}
\cdot e^{-\frac{1}{2}(\nu_{S}- y_{S})^{2}}
\cdot e^{-\frac{1}{2}(\nu_{B}- y_{B})^{2}}
</div>
<script type="math/tex; mode=display">
p(n_{\mathrm{obs}}| r,\delta_{S},\delta_{B})\propto
\dfrac{[r\cdot n_{S}(\delta_{S})+n_{B}(\delta_{B})]^{n_{\mathrm{obs}}} }
{n_{\mathrm{obs}}!}e^{-[r\cdot n_{S}(\delta_{S})+n_{B}(\delta_{B})]}
\cdot e^{-\frac{1}{2}(\delta_{S}- \delta_{S}^{\mathrm{In}})^{2}}
\cdot e^{-\frac{1}{2}(\delta_{B}- \delta_{B}^{\mathrm{In}})^{2}}
p(n_{\mathrm{obs}}| r,\nu_{S},\nu_{B})\propto
\dfrac{[r\cdot n_{S}(\nu_{S})+n_{B}(\nu_{B})]^{n_{\mathrm{obs}}} }
{n_{\mathrm{obs}}!}e^{-[r\cdot n_{S}(\nu_{S})+n_{B}(\nu_{B})]}
\cdot e^{-\frac{1}{2}(\nu_{S}- y_{S})^{2}}
\cdot e^{-\frac{1}{2}(\nu_{B}- y_{B})^{2}}
</script>
</div>
<p>where the expected signal and background rates are expressed as functions of the nuisance parameters, <span class="arithmatex"><span class="MathJax_Preview">n_{S}(\delta_{S}) = 4.76(1+0.2)^{\delta_{S}}~</span><script type="math/tex">n_{S}(\delta_{S}) = 4.76(1+0.2)^{\delta_{S}}~</script></span> and <span class="arithmatex"><span class="MathJax_Preview">~n_{B}(\delta_{B}) = 1.47(1+0.5)^{\delta_{B}}</span><script type="math/tex">~n_{B}(\delta_{B}) = 1.47(1+0.5)^{\delta_{B}}</script></span>.</p>
<p>The first term represents the usual Poisson expression for observing <span class="arithmatex"><span class="MathJax_Preview">n_{\mathrm{obs}}</span><script type="math/tex">n_{\mathrm{obs}}</script></span> events, while the second two are the Gaussian constraint terms for the nuisance parameters. In this case <span class="arithmatex"><span class="MathJax_Preview">{\delta^{\mathrm{In}}_S}={\delta^{\mathrm{In}}_B}=0</span><script type="math/tex">{\delta^{\mathrm{In}}_S}={\delta^{\mathrm{In}}_B}=0</script></span>, and the widths of both Gaussians are 1.</p>
<p>where the expected signal and background rates are expressed as functions of the nuisance parameters, <span class="arithmatex"><span class="MathJax_Preview">n_{S}(\nu_{S}) = 4.76(1+0.2)^{\nu_{S}}~</span><script type="math/tex">n_{S}(\nu_{S}) = 4.76(1+0.2)^{\nu_{S}}~</script></span> and <span class="arithmatex"><span class="MathJax_Preview">~n_{B}(\nu_{B}) = 1.47(1+0.5)^{\nu_{B}}</span><script type="math/tex">~n_{B}(\nu_{B}) = 1.47(1+0.5)^{\nu_{B}}</script></span>. The <span class="arithmatex"><span class="MathJax_Preview">y_{S},~y_{B}</span><script type="math/tex">y_{S},~y_{B}</script></span> are the auxiliary observables. In the code, these will have the same name as the corresponding nuisance parameter, with the extension <code>_In</code>. </p>
<p>The first term represents the usual Poisson expression for observing <span class="arithmatex"><span class="MathJax_Preview">n_{\mathrm{obs}}</span><script type="math/tex">n_{\mathrm{obs}}</script></span> events, while the second two are the Gaussian constraint terms for the nuisance parameters. In this case <span class="arithmatex"><span class="MathJax_Preview">{y_S}={y_B}=0</span><script type="math/tex">{y_S}={y_B}=0</script></span>, and the widths of both Gaussians are 1.</p>
<p>A combination of counting experiments (or a binned shape datacard) will look like a product of PDFs of this kind. For parametric/unbinned analyses, the PDF for each process in each channel is provided instead of the using the Poisson terms and a product runs over the bin counts/events.</p>
<h2 id="model-building">Model building</h2>
<p>For more complex models, <code>PhysicsModels</code> can be produced. To use a different physics model instead of the default one, use the option <code>-P</code> as in</p>
Expand Down Expand Up @@ -450,34 +450,34 @@ <h3 id="multi-process-interference">Multi-process interference</h3>
with the number of POIs, and can get extremely expensive for 10 or more, as may
be encountered often with EFT analyses. To alleviate this issue, an accelerated
interference modeling technique is implemented for template-based analyses via
the <code>interferenceModel</code> physics model. In this model, each bin yield <span class="arithmatex"><span class="MathJax_Preview">y</span><script type="math/tex">y</script></span> is parameterized</p>
the <code>interferenceModel</code> physics model. In this model, each bin yield <span class="arithmatex"><span class="MathJax_Preview">w</span><script type="math/tex">w</script></span> is parameterized</p>
<div class="arithmatex">
<div class="MathJax_Preview">
y(\theta) = y_0 (\theta^\top M \theta)
w(\vec{\mu}) = w_0 (\vec{\mu}^\top M \theta)
</div>
<script type="math/tex; mode=display">
y(\theta) = y_0 (\theta^\top M \theta)
w(\vec{\mu}) = w_0 (\vec{\mu}^\top M \theta)
</script>
</div>
<p>as a function of the POI vector <span class="arithmatex"><span class="MathJax_Preview">\theta</span><script type="math/tex">\theta</script></span>, a nominal template <span class="arithmatex"><span class="MathJax_Preview">y_0</span><script type="math/tex">y_0</script></span>, and a scaling matrix <span class="arithmatex"><span class="MathJax_Preview">M</span><script type="math/tex">M</script></span>.
<p>as a function of the POI vector <span class="arithmatex"><span class="MathJax_Preview">\vec{\mu}</span><script type="math/tex">\vec{\mu}</script></span>, a nominal template <span class="arithmatex"><span class="MathJax_Preview">w_0</span><script type="math/tex">w_0</script></span>, and a scaling matrix <span class="arithmatex"><span class="MathJax_Preview">M</span><script type="math/tex">M</script></span>.
To see how this parameterization relates to that of the previous section, we can define:</p>
<div class="arithmatex">
<div class="MathJax_Preview">
y_0 = A_b^2, \qquad
w_0 = A_b^2, \qquad
M = \frac{1}{A_b^2} \begin{bmatrix}
|A_s|^2 &amp; \Re(A_s^* A_b) \\
\Re(A_s A_b^*) &amp; |A_b|^2
\end{bmatrix}, \qquad \theta = \begin{bmatrix}
\end{bmatrix}, \qquad \vec{\mu} = \begin{bmatrix}
\sqrt{\mu} \\
1
\end{bmatrix}
</div>
<script type="math/tex; mode=display">
y_0 = A_b^2, \qquad
w_0 = A_b^2, \qquad
M = \frac{1}{A_b^2} \begin{bmatrix}
|A_s|^2 & \Re(A_s^* A_b) \\
\Re(A_s A_b^*) & |A_b|^2
\end{bmatrix}, \qquad \theta = \begin{bmatrix}
\end{bmatrix}, \qquad \vec{\mu} = \begin{bmatrix}
\sqrt{\mu} \\
1
\end{bmatrix}
Expand Down
12 changes: 6 additions & 6 deletions part2/settinguptheanalysis/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,14 @@ <h3 id="binned-shape-analyses">Binned shape analyses</h3>
</ul>
<p>In addition, user-defined keywords can be used. Any word in the datacard <strong>$WORD</strong> will be replaced by <strong>VALUE</strong> when including the option <code>--keyword-value WORD=VALUE</code>. This option can be repeated multiple times for multiple keywords.</p>
<h4 id="template-shape-uncertainties">Template shape uncertainties</h4>
<p>Shape uncertainties can be taken into account by vertical interpolation of the histograms. The shapes (fraction of events <span class="arithmatex"><span class="MathJax_Preview">f</span><script type="math/tex">f</script></span> in each bin) are interpolated using a spline for shifts below +/- 1σ and linearly outside of that. Specifically, for nuisance parameter values <span class="arithmatex"><span class="MathJax_Preview">|\theta|\leq 1</span><script type="math/tex">|\theta|\leq 1</script></span> </p>
<p>Shape uncertainties can be taken into account by vertical interpolation of the histograms. The shapes (fraction of events <span class="arithmatex"><span class="MathJax_Preview">f</span><script type="math/tex">f</script></span> in each bin) are interpolated using a spline for shifts below +/- 1σ and linearly outside of that. Specifically, for nuisance parameter values <span class="arithmatex"><span class="MathJax_Preview">|\nu|\leq 1</span><script type="math/tex">|\nu|\leq 1</script></span> </p>
<div class="arithmatex">
<div class="MathJax_Preview"> f(\theta) = \frac{1}{2} \left( (\delta^{+}-\delta^{-})\theta + \frac{1}{8}(\delta^{+}+\delta^{-})(3\theta^6 - 10\theta^4 + 15\theta^2) \right) </div>
<script type="math/tex; mode=display"> f(\theta) = \frac{1}{2} \left( (\delta^{+}-\delta^{-})\theta + \frac{1}{8}(\delta^{+}+\delta^{-})(3\theta^6 - 10\theta^4 + 15\theta^2) \right) </script>
<div class="MathJax_Preview"> f(\nu) = \frac{1}{2} \left( (\delta^{+}-\delta^{-})\nu + \frac{1}{8}(\delta^{+}+\delta^{-})(3\nu^6 - 10\nu^4 + 15\nu^2) \right) </div>
<script type="math/tex; mode=display"> f(\nu) = \frac{1}{2} \left( (\delta^{+}-\delta^{-})\nu + \frac{1}{8}(\delta^{+}+\delta^{-})(3\nu^6 - 10\nu^4 + 15\nu^2) \right) </script>
</div>
<p>and for <span class="arithmatex"><span class="MathJax_Preview">|\theta|&gt; 1</span><script type="math/tex">|\theta|> 1</script></span> (<span class="arithmatex"><span class="MathJax_Preview">|\theta|&lt;-1</span><script type="math/tex">|\theta|<-1</script></span>), <span class="arithmatex"><span class="MathJax_Preview">f(\theta)</span><script type="math/tex">f(\theta)</script></span> is a straight line with gradient <span class="arithmatex"><span class="MathJax_Preview">\delta^{+}</span><script type="math/tex">\delta^{+}</script></span> (<span class="arithmatex"><span class="MathJax_Preview">\delta^{-}</span><script type="math/tex">\delta^{-}</script></span>), where <span class="arithmatex"><span class="MathJax_Preview">\delta^{+}=f(\theta=1)-f(\theta=0)</span><script type="math/tex">\delta^{+}=f(\theta=1)-f(\theta=0)</script></span>, and <span class="arithmatex"><span class="MathJax_Preview">\delta^{-}=f(\theta=-1)-f(\theta=0)</span><script type="math/tex">\delta^{-}=f(\theta=-1)-f(\theta=0)</script></span>, derived using the nominal and up/down histograms.<br />
This interpolation is designed so that the values of <span class="arithmatex"><span class="MathJax_Preview">f(\theta)</span><script type="math/tex">f(\theta)</script></span> and its derivatives are continuous for all values of <span class="arithmatex"><span class="MathJax_Preview">\theta</span><script type="math/tex">\theta</script></span>. </p>
<p>The normalizations are interpolated linearly in log scale, just like we do for log-normal uncertainties. If the value in a given bin is negative for some value of <span class="arithmatex"><span class="MathJax_Preview">\theta</span><script type="math/tex">\theta</script></span>, the value will be truncated at 0.</p>
<p>and for <span class="arithmatex"><span class="MathJax_Preview">|\nu|&gt; 1</span><script type="math/tex">|\nu|> 1</script></span> (<span class="arithmatex"><span class="MathJax_Preview">|\nu|&lt;-1</span><script type="math/tex">|\nu|<-1</script></span>), <span class="arithmatex"><span class="MathJax_Preview">f(\nu)</span><script type="math/tex">f(\nu)</script></span> is a straight line with gradient <span class="arithmatex"><span class="MathJax_Preview">\delta^{+}</span><script type="math/tex">\delta^{+}</script></span> (<span class="arithmatex"><span class="MathJax_Preview">\delta^{-}</span><script type="math/tex">\delta^{-}</script></span>), where <span class="arithmatex"><span class="MathJax_Preview">\delta^{+}=f(\nu=1)-f(\nu=0)</span><script type="math/tex">\delta^{+}=f(\nu=1)-f(\nu=0)</script></span>, and <span class="arithmatex"><span class="MathJax_Preview">\delta^{-}=f(\nu=-1)-f(\nu=0)</span><script type="math/tex">\delta^{-}=f(\nu=-1)-f(\nu=0)</script></span>, derived using the nominal and up/down histograms.<br />
This interpolation is designed so that the values of <span class="arithmatex"><span class="MathJax_Preview">f(\nu)</span><script type="math/tex">f(\nu)</script></span> and its derivatives are continuous for all values of <span class="arithmatex"><span class="MathJax_Preview">\nu</span><script type="math/tex">\nu</script></span>. </p>
<p>The normalizations are interpolated linearly in log scale, just like we do for log-normal uncertainties. If the value in a given bin is negative for some value of <span class="arithmatex"><span class="MathJax_Preview">\nu</span><script type="math/tex">\nu</script></span>, the value will be truncated at 0.</p>
<p>For each shape uncertainty and process/channel affected by it, two additional input shapes have to be provided. These are obtained by shifting the parameter up and down by one standard deviation. When building the likelihood, each shape uncertainty is associated to a nuisance parameter taken from a unit gaussian distribution, which is used to interpolate or extrapolate using the specified histograms.</p>
<p>For each given shape uncertainty, the part of the datacard describing shape uncertainties must contain a row</p>
<ul>
Expand Down
Loading

0 comments on commit 2d64ca2

Please sign in to comment.