148 | | == Test == |
149 | | |
150 | | xxxx |
151 | | |
152 | | \[\frac{d\phi'}{dM_\textrm{exc}} = \frac{N'_\textrm{src}}{N'_\textrm{exc}}\] |
153 | | \[\frac{d\phi'}{dN'_\textrm{exc}} = -\frac{M_\textrm{exc}\cdot N'_\textrm{src}}{\left(N'_\textrm{exc}\right)^2}\] |
154 | | \[\frac{d\phi'}{dN'_\textrm{src}} = \frac{M_\textrm{exc}}{N'_\textrm{exc}}\] |
155 | | |
156 | | |
157 | | \[\sigma^2(\phi) = \left(\frac{1}{A_0\cdot \Delta T\cdot\delta E}\right)^2\cdot\left[\left(\frac{N'_\textrm{src}}{N'_\textrm{exc}}\right)^2\sigma^2(M_\textrm{exc}) + \left(\frac{M_\textrm{exc}\cdot N'_\textrm{src}}{(N'_\textrm{exc})^2}\right)^2\sigma^2(N'_\textrm{exc}) + \left(\frac{M_\textrm{exc}}{N'_\textrm{exc}}\right)^2\sigma^2(N'_\textrm{src})\right]\] |
158 | | |
159 | | |
160 | | \[= \left(\frac{1}{A_0\cdot \Delta T\cdot\delta E\cdot N'_\textrm{exc}}\right)^2\cdot\left[\left(N'_\textrm{src}\right)^2\sigma^2(M_\textrm{exc}) + \left(\phi'\right)^2\sigma^2(N'_\textrm{exc}) + \left(M_\textrm{exc}\right)^2\sigma^2(N'_\textrm{src})\right]\] |
161 | | |
162 | | === Monte Carlo === |
163 | | |
164 | | |
165 | | \[\omega_i(E) = \frac{\phi_\textrm{src}(E)}{\phi_0(E)}=\frac{E^{-\gamma}}{E^{-2.7}}\] |
166 | | |
167 | | \[\omega_i(\Delta \theta) = \frac{\sum_{\Delta\theta}\Delta T_i}{\sum_\theta\Delta T_i} \cdot \frac{M_0}{M_0(\Delta \theta)} \] |
168 | | |
169 | | \[\epsilon(E) = \frac{N_\textrm{exc}(E)}{N_0(E)}\] |
170 | | |
171 | | \[\phi(E) = \frac{N_\textrm{exc}(E)}{A_\epsilon(E)\cdot\Delta T} = \frac{N_\textrm{exc}(E)}{N_\textrm{exc}^\textrm{MC}(E)}\cdot \frac{N_0(E)}{A_0\cdot\Delta T}\] |
172 | | |
173 | | |
174 | | \[\phi(E) = \frac{N_\textrm{sig}(E) - \hat N_\textrm{bg}(E)}{N_\textrm{sig}^\textrm{MC}(E) - \hat N_\textrm{bg}^\textrm{MC}(E)}\cdot \frac{N_0(E)}{A_0\cdot\Delta T}\] |
175 | | |
176 | | |
177 | | \[N_\textrm{sig}^\textrm{MC} = \sum_\textrm{sig}^\textrm{MC}\omega_i(E)\omega_i(\theta)\] |
178 | | \[N_\textrm{bg}^\textrm{MC} = \sum_\textrm{bg}^\textrm{MC}\omega_i(E)\omega_i(\theta)\] |
179 | | \[N_0(E) = \sum_\textrm{corsika}^\textrm{MC}\omega_i(E)\omega_i(\theta)\] |
180 | | |
181 | | |
182 | | \[\sigma^2(\phi(E)) = \left(\frac{d\phi(E)}{dN_0}\right)^2\sigma^2(N_0) + \left(\frac{d\phi(E)}{dN_\textrm{exc}^\textrm{MC}}\right)^2\sigma^2(N_\textrm{exc}^\textrm{MC}) + \left(\frac{d\phi(E)}{dN_\textrm{exc}}\right)^2\sigma(N_\textrm{exc})^2\] |
183 | | |
184 | | \[\sigma^2(N_0) = \sum_\textrm{corsika}\omega_i^2(E)\omega_i^2(\theta)\] |
185 | | |
186 | | \[\sigma^2(N_\textrm{exc}^\textrm{MC}) = \left(\frac{dN_\textrm{exc}^\textrm{MC}}{dN_\textrm{sig}^\textrm{MC}}\right)^2\sigma^2(N_\textrm{sig}^\textrm{MC}) + \left(\frac{dN_\textrm{exc}^\textrm{MC}}{d\hat N_\textrm{bg}^\textrm{MC}}\right)^2\sigma^2(\hat N_\textrm{bg}^\textrm{MC}) \] |
187 | | |
188 | | |
189 | | \[\sigma^2(N_\textrm{sig}) = N_\textrm{sig}\] |
190 | | |
191 | | \[\sigma^2(\hat N_\textrm{bg}) = \frac{1}{5^2}\sigma^2(N_\textrm{bg}) = \frac{1}{5^2} N_\textrm{bg}\] |
192 | | |
193 | | \[\sigma^2(N_\textrm{sig}^\textrm{MC}) = \sum_\textrm{sig}^\textrm{MC}\omega^2_i(E)\omega^2_i(\theta)\] |
194 | | |
195 | | \[\sigma^2(\hat N_\textrm{bg}^\textrm{MC}) = \frac{1}{5^2}\sigma^2(N_\textrm{bg}^\textrm{MC}) = \frac{1}{5^2}\sum_\textrm{bg}^\textrm{MC}\omega^2_i(E)\omega^2_i(\theta)\] |
196 | | |
197 | | |
198 | | \[\frac{dN_\textrm{exc}}{dN_\textrm{sig}}=1\] |
199 | | \[\frac{dN_\textrm{exc}}{d\hat N_\textrm{bg}}=1\] |
200 | | |
201 | | == Errors == |
202 | | |
203 | | |
204 | | |
205 | | === Theta and Spectral Weights === |
206 | | |
207 | | While the source spectrum \(N_0\) is of course independent of the zenith angle \(\theta\) of the observation, the efficiency is not, so that |
208 | | |
209 | | \[\epsilon(E) = \epsilon(E, \theta)\] |
210 | | |
211 | | In addition, the observed differential flux depends on the zenith angle, so that |
212 | | |
213 | | \[\epsilon(E, \theta) = \epsilon(E, \theta, \Delta T(\theta))\] |
214 | | |
215 | | That means that for a correct calculation of the efficiency, the number of simulated events per zenith angle interval has to match the observation time distribution. This can be achieved by applying zenith angle dependent weights \(\omega(\theta)\) to each simulated event. Similarly, the discussed requirement of the match between result spectrum and simulated spectrum can be achieved applying energy dependent weights \(\omega(E)\). |
216 | | |
217 | | As the simulated energy spectrum is independent of zenith angle, it can be expressed as |
218 | | |
219 | | \[N_0(E,\theta) = N_0\cdot \fract{\eta(E)}{\int_E\eta(E)dE}\cdot \fract{\eta(\theta)}{\int_\theta\eta(\theta)d\theta}\] |
220 | | |
221 | | with the differential energy spectrum \(\eta(E)\) and the zenith angle distribution \(\eta(\theta)\). |
222 | | |
223 | | |
224 | | |
225 | | \[dN_0(E,\theta) = N_0\cdot d\eta(E)\cdot d\eta(\theta)\] |
226 | | |
227 | | |
228 | | |
229 | | \[N_0 = \int_{E_\textrm{min}}^{E_\textrm{max}}\int_{\theta_\textrm{min}}^{\theta_\textrm{max}} dN_0(E,\theta) = N_0\int_{E_\textrm{min}}^{E_\textrm{max}}\int_{\theta_\textrm{min}}^{\theta_\textrm{max}}\eta(E) dE \cdot \eta(\theta) d\theta= N_0\int_{E_\textrm{min}}^{E_\textrm{max}}\eta(E) dE\cdot \int_{\theta_\textrm{min}}^{\theta_\textrm{max}}\eta(\theta) d\theta\] |
230 | | |
231 | | consequently |
232 | | |
233 | | \[\int_{E_\textrm{min}}^{E_\textrm{max}}\eta(E) dE = \int_{\theta_\textrm{min}}^{\theta_\textrm{max}}\eta(\theta) d\theta = 1\] |
234 | | |
235 | | or |
236 | | |
237 | | \[N_0 = N_0\cdot \sum_{E_\textrm{min}}^{E_\textrm{max}}\omega_i(E) \cdot \sum_{\theta_\textrm{min}}^{\theta_\textrm{max}}\omega_i(\theta)\] |
238 | | |
239 | | with |
240 | | |
241 | | \[\sum_{E_\textrm{min}}^{E_\textrm{max}}\omega_i(E) =\sum_{\theta_\textrm{min}}^{\theta_\textrm{max}}\omega_i(\theta) = 1\] |
242 | | |
243 | | |
244 | | |
245 | | |
246 | | \[\int_{E_\textrm{min}}^{E_\textrm{max}}\int_{\theta_\textrm{min}}^{\theta_\textrm{max}}\eta(E)\eta(\theta) dE d\theta =\int_{E_\textrm{min}}^{E_\textrm{max}}\eta(E) dE = \int_{\theta_\textrm{min}}^{\theta_\textrm{max}}\eta(\theta) d\theta = 1\] |
247 | | |
248 | | and \(N_0\) the total number of generated Monte Carlo events. For the generated number of events \(n_0\) in the energy interval \(\Delta E=E_\textrm{max}-E_\textrm{min}\) and zenith angle interval \(\Delta \theta=\theta_\textrm{max}-\theta_\textrm{min}\) this is |
249 | | |
250 | | \[n_0(\Delta E) = \frac{\sum_{\Delta E}\sum_{\theta_\textrm{min}}^{\theta_\textrm{max}} \omega_i(E)\cdot\omega_i(\theta)}{\sum_{E}\sum_{\theta} \omega_i(E)\omega_i(\theta)}\] |
251 | | |
252 | | \[n_0(\Delta E) = \frac{\sum_{\Delta E}\sum_{\theta_\textrm{min}}^{\theta_\textrm{max}} \omega_i(E)\cdot\omega_i(\theta)}{\sum_{\Delta E}\sum_{E_\textrm{min}}^{E_\textrm{max}} \omega_i(E) \cdot \sum_{\Delta \theta}\sum_{\theta_\textrm{min}}^{\theta_\textrm{max}} \omega_i(\theta)}\] |
253 | | |
254 | | with the weights chosen such that the sum over all intervals |
255 | | |
256 | | \[\sum_{\Delta E}\sum_{E_\textrm{min}}^{E_\textrm{max}} \omega_i(E)=\sum_{\Delta \theta}\sum_{\theta_\textrm{min}}^{\theta_\textrm{max}} \omega_i(\theta)=1\] |
257 | | |
258 | | |