Changes between Version 256 and Version 257 of DatabaseBasedAnalysis/Spectrum
 Timestamp:
 Dec 10, 2019, 3:29:56 PM (11 months ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

DatabaseBasedAnalysis/Spectrum
v256 v257 274 274 === Analysis Query === 275 275 276 The analysis of Data and !MontaCarlo files must be done totally identical to produce reasonable results. Therefore, the exact same query (or code) should be used for the analysis of both. In this example, the query has to provide two columns, `Weight` and `LogEnergyEst` for all gammaline events. The weight must be +1 for events in the onregion and 0.2 for an event in the offregion (corresponding to the number of five wobble positions). !LogEnergyEst must contain \(\log_{10}\) of the estimated energy for each event. Only events surviving background suppression and spatial (theta) cuts should be considered. 276 The analysis of Data and !MontaCarlo files must be done totally identical to produce reasonable results. Therefore, the exact same query (or code) should be used for the analysis of both. In this example, the query has to provide two columns, `Weight` and `LogEnergyEst` for all gammaline events. The weight must be +1 for events in the onregion and 0.2 for an event in the offregion (corresponding to the number of five wobble positions). !LogEnergyEst must contain \(\log_{10}\) of the estimated energy for each event. Only events surviving background suppression and spatial (theta) cuts should be considered. 277 277 278 278 {{{#!Spoiler … … 434 434 === Analyze Monte Carlo Data === 435 435 436 Similarly to the analysis of Data, another query summarizes the !MonteCarlo Analysis. 436 Similarly to the analysis of Data, another query summarizes the !MonteCarlo Analysis. The result is stored in a temporary table (`AnalysisMC`). 437 437 438 438 {{{#!Spoiler … … 514 514 === Summarize Corsika Production === 515 515 516 The following queries produces a summary of the events simulated at first by Corsika. The result is stored in a temporary table (`SimulatedSpectrum`). 517 516 518 {{{#!Spoiler 517 519 {{{#!sql … … 529 531 INTERVAL(LOG10(Energy), %0:energyest) AS `.energy`, 530 532 COUNT(*) AS CountN, 531 SUM( (% 2:spectrum)/pow(Energy, SpectralIndex) ) AS CountW,532 SUM(POW((% 2:spectrum)/pow(Energy, SpectralIndex),2)) AS CountW2533 SUM( (%1:spectrum)/pow(Energy, SpectralIndex) ) AS CountW, 534 SUM(POW((%1:spectrum)/pow(Energy, SpectralIndex),2)) AS CountW2 533 535 FROM 534 536 MonteCarloFiles … … 545 547 }}} 546 548 549 The placeholder `%0:energyest` is the binnings (as used previously) for the logarithm (base 10) of the estimated energy. `%1:spectrum` is the (unknown) 'true' source spectrum, for example `POW(Energy, 2.4)`. 550 547 551 548 552 === Result (Spectrum) ===