astroparticle physics Spectral and Spatial Analysis of MAGIC Telescope Data in a Standardized Format Simone Mender 2023 A document submitted in partial fulfillment of the requirements for the degree of Doctor rerum naturalium at Fakultät Physik, Technische Universität Dortmund Supervised by Prof. Dr. Dr. Wolfgang Rhode and Dr. Chris Malena Delitzsch “Science is not a boy’s game, it’s not a girl’s game. It’s everyone’s game. It’s about where we are and where we’re going. (...) And we ain’t stopped yet. There’s more exploration to come.” NICHELLE NICHOLS Abstract The precise understanding of the emission and acceleration processes of very-high-energy radiation in the Universe is still an unsolved mystery today. To study the nature of very-high-energy gamma rays, Imaging Air Cherenkov Telescopes such as the MAGIC telescopes detect Cherenkov light produced by particle showers in the atmosphere. State-of-the-art spectral and spatial analyses of gamma-ray data rely on the open-source Python package Gammapy. Due to this new approach from the gamma-ray community, the input data needs to be provided in a standardized format which requires a combination of event lists with instrument response functions. In this thesis, a spectral analysis of the two TeV radio galaxy candidates TXS 0149+710 and 4C +39.12 observed by MAGIC is conducted. F0o.3r2t𝜎his, st0a.n98dardized data is produced in an automated and reproducibleway using the new database-driven tool AutoMAGIC, partly developed in the course of this thesis.Li&Ma significances of and 𝜎 are calculated for TXS 0149+710 and 4C +39.12, respectively. Therefore, only upper limits on the differential flux are given. For spatial analyses, background models have to be included in the standardized data, which is not covered by AutoMAGIC yet. To address this challenge, 1441 observations of off data are processed with AutoMAGIC and the background shape is characterized depending on the azimuth, zenith distance, and the reconstructed energy. Also, dependencies of the background rate on the zenith distance, the transmission of the atmosphere, the NSB and the galactic latitude are investigated. A new method is developed, which creates background models according to the new-found relations with the azimuth and zenith distance. These background models are compared with background models created from non-simultaneous off data with more conventional methods. Spectral and spatial analyses of Crab Nebula data are performed to validate the background methods. Zusammenfassung Emissions- und Beschleunigungsprozesse von hochenergetischen Teilchen im Universum sind weitestgehend noch nicht verstanden. Um hochenergetische Gammateilchen zu untersuchen, de- tektieren Tscherenkow-Teleskope, wie beispielsweise die MAGIC-Teleskope, Tscherenkow-Licht, welches durch Teilchenschauer in der Atmosphäre erzeugt wird. Um mit dem open-source Python Paket Gammapy reproduzierbare spektrale und räumliche Analysen von MAGIC-Beobachtungen durchzuführen, werden die Daten in einem standardisierten Datenformat benötigt. Dieses Daten- format erfordert Listen mit Ereignissen, die als Gammaschauer klassifiziert wurden, sowie die zu- gehörigen Funktionen der Detektorantwort. Für die spektrale Analyse von MAGIC-Beobachtungen der beiden TeV Radiogalaxiekandidaten TXS 0149+710 und 4C +39.12 werden die standardisierten Daten auf automatisierte und reproduzierbare Weise mit der neuen, datenbankgestützten Software AutoMAGIC erzeugt, welche im Rahmen dieser Arbeit mitentwickelt wurde. Für TXS 0149+710 und 4C +39.12 werden Li&Ma-Signifikanzen von 0,32 𝜎 und 0,98 𝜎 berechnet, weshalb nur obere Grenzen des differentiellen Flusses angegeben werden. Für räumliche Analysen m1it44Gammapy müssen Hintergrundmodelle in den standardisiertenDaten enthalten sein, was AutoM1AGIC momentan noch nicht inkludiert. Um diese Herausforde-rung zu bewältigen, werden Beobachtungen mit AutoMAGIC prozessiert und die Form des Hintergrunds in Abhängigkeit von Azimut, Zenitdistanz und der rekonstruierten Energie charak- terisiert. Außerdem werden die Abhängigkeiten der Hintergrundrate von der Zenitdistanz, der Atmosphärentransmission, dem Nachthimmelhintergrund und der galaktischen Breite untersucht. Eine neue Methode wird vorgestellt, welche aufgrund der neu gewonnenen Erkenntnisse Hin- tergrundmodelle in Abhängigkeit von Azimut und Zenitdistanz erstellt. Zum Vergleich werden zudem Hintergrundmodelle mit herkömmlichen Methoden erstellt. Zur Validierung der Methoden werden spektrale und räumliche Analysen von Krebsnebeldaten durchgeführt. v Contents I Gamma-Ray Astronomy with Imaging Air Cherenkov Telescopes 1 1 Introduction 3 2 Sources of Very-High-Energy Gamma Rays 5 2.1 The Crab Nebula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Active Galactic Nuclei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3 Imaging Air Cherenkov Telescopes 11 3.1 Extensive Air Showers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2 The Cherenkov Effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 Extragalactic Background Light . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.4 The MAGIC Telescopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4 Analysis of IACT Data 21 4.1 Low-Level Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2 Automated Production of Standardized Data for the MAGIC Telescopes . . . . . 25 4.3 High-Level Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 II Spectral Analysis of the Radio Galaxies TXS 0149+710 and 4C +39.12 33 5 Introduction 35 6 Hunting TeV Radio Galaxies with the MAGIC Telescopes 37 7 Analysis of the Radio Galaxy TXS 0149+710 43 7.1 Data Inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 7.2 Validation of the Analysis Pipeline with Crab Nebula Data . . . . . . . . . . . . 46 7.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 8 Analysis of the Radio Galaxy 4C +39.12 55 8.1 Data Insepction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 8.2 Special Offset Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 8.3 Validation of the Analysis Pipeline with Crab Nebula Data . . . . . . . . . . . . 61 8.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 9 Conclusions and Future Prospects 67 vi Contents III Construction of Background Models for the MAGIC Telescopes 69 10 Introduction 71 11 Methods for Background Estimation 73 11.1 Background from Wobble Observations . . . . . . . . . . . . . . . . . . . . . 73 11.2 Background from Non-Simultaneous Off Data . . . . . . . . . . . . . . . . . . 74 11.3 Adaption of Background Models with Gammapy . . . . . . . . . . . . . . . . . 74 12 Systematic Effects on the Background 77 12.1 The MAGIC Telescopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 12.2 The Geomagnetic Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 12.3 The Atmosphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 12.4 The Night Sky Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 13 Background Shape Characterization 85 13.1 Statistical Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 13.2 Observational and Simulated Datasets . . . . . . . . . . . . . . . . . . . . . . 87 13.3 Energy Dependence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 13.4 Azimuth-dependent Rotation of the Background Shape . . . . . . . . . . . . . 93 13.5 Zenith Distance Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . 103 14 Creation of Background Models 107 14.1 Creation of Initial Background Models . . . . . . . . . . . . . . . . . . . . . . 107 14.2 Comparison of binning-method and rotation-method Background Models . . . 108 14.3 Background Rate Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . 112 14.4 Final Background Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 15 Validation 119 15.1 Creation of Map Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 15.2 Spectral and Spatial Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 15.3 Creation of Significance Maps . . . . . . . . . . . . . . . . . . . . . . . . . . 124 16 Conclusions and Future Prospects 127 IV Appendix 129 A AutoMAGIC and magicDL3 Configuration Files 131 B Validation of the Off Data Analysis Pipeline with Crab Nebula Data 145 C Rotation Angle Visualization 159 Bibliography 171 Acknowledgements 182 vii viii Part I Gamma-Ray Astronomy with Imaging Air Cherenkov Telescopes 1 Introduction 3 2 Sources of Very-High-Energy Gamma Rays 5 2.1 The Crab Nebula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Active Galactic Nuclei . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3 Imaging Air Cherenkov Telescopes 11 3.1 Extensive Air Showers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2 The Cherenkov Effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 Extragalactic Background Light . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.4 The MAGIC Telescopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4 Analysis of IACT Data 21 4.1 Low-Level Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2 Automated Production of Standardized Data for the MAGIC Telescopes . . . . . 25 4.3 High-Level Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 1 Introduction 1 Astronomy is considered the oldest of all sciences. At all times, the MilkyWay and the fixed stars as well as seven celestial objects of our solar system can be observed with the naked eye. These seven objects, the Moon, Mars, Mercury, Jupyter, Venus, Saturn, and the Sun itself, gave their names to the days of our weeks. Since the invention of the refracting telescope in 1609, technology has steadily advanced so that we can observe many more celestial objects today. We can now observe astronomical objects not only in visible light but also in other wavelengths. The atmosphere of Earth is transparent to radio wavelengths, optical light and partially to infra red (IR) windows. Thus, photons at these wavelengths can be observed directly from Earth. For photons at higher energies, however, the atmosphere is opaque protecting biological life from X-rays and gamma rays. In order to detect the radiation of objects at these energies directly, the measurements have to be performed above the atmosphere, e.g. with the Chandra X-ray Observatory (Weisskopf et al. 2002) measuring X-rays and the Large Area Telescope (LAT) experiment (Atwood et al. 2009) on the Fermi satellite measuring high-energy gamma rays. Since the detector area of instruments in space is limited and the source fluxes at very high energies are very weak, this technique is inefficient at higher energies and satellite missions are expensive. Contrary, ground-based Cherenkov telescopes measure Very-High-Energy (VHE) gamma rays indirectly by detecting the Cherenkov light emitted by secondary particles. Cherenkov telescopes use water, in form of large water tanks, or the atmosphere as in the case of Imaging Air Cherenkov Telescopes (IACTs) as an observation medium. These techniques make it possible to measure the electromagnetic spectrum up to VHE gamma rays. In the scope of multi-wavelength (MWL) campaigns, different telescopes organize measurements of sources simultaneously at different energies from radio to VHE gamma rays. The measured MWL data can help enormously in understanding the emission and acceleration processes of the sources. Besides photons of different energies, Earth is reached by other messengers such as cosmic rays, neutrinos and gravitational waves. During seven balloon flights, ionizing radiation was measured by Hess 1912 dependent on the height. Contrary to the expectation, the flux rate did not decrease but increased with increasing distance to Earth. These were the first measurements of radiation, which Vicor Hess called “Höhenstrahlung” at the time, but which is known as cosmic rays today. Charged cosmic rays mainly consist of protons but have also a fraction of heavier nuclei such as helium or iron. The origin of cosmic rays is mainly unknown, which is also a consequence of the deflection of the charged particle by magnetic fields making a direction reconstruction a huge challenge. The emission of cosmic rays requires hadronic processes, in which also neutrinos are produced and hence, the detection of neutrino sources is an indicator of a source producing cosmic rays. Neutrinos are weakly interacting particles with a very low interaction cross-section, which requires large detector volumes to detect them. Up to now, the IceCube collaboration identified three sources 3 1 Introduction of astrophysical neutrinos: the blazar TXS 0506+056 (IceCube Collaboration 2018b), the galaxy NGC 1068 (IceCube Collaboration 2022) and the galactic plane of the Milky Way (IceCube Collaboration 2023). Motivated by the detection of a neutrino with a high likelihood of astrophysical origin on September 22nd 2017 associated with TXS 0506+056 in a flaring state an enormous MWL campaign was started (IceCube Collaboration 2018a), whereby also VHE gamma rays were detected by the MAGIC telescopes. In addition to the detection of neutrinos, also VHE gamma-ray observations can classify a source as a cosmic-ray-emitting candidate in an indirect way by observing gamma-ray emissions which can only be explained by hadronic scenarios including neutrino emission. With the first direct detection of gravitational waves from the binary black hole merger GW150914 in 2015 (Abbott et al. 2016), the multi-messenger astronomy was extended by another information channel. In 2017, the binary neutron star merger event GW170817 was associated with a short gamma-ray burst near the galaxy NGC 4993 by the Fermi Gamma-ray Burst Monitor (Abbott et al. 2017). This first gravitational wave event observable in the electromagnetic spectrum was then monitored within an extensive MWL campaign, leading to detection in the radio, optical, IR, and X-rays, but neither in gamma rays nor neutrinos. Many unresolved questions motivate further observations and analyses of astrophysical sources with a variety of different techniques optimized for a specific messenger. This thesis is about gamma-ray astronomy with the MAGIC telescopes and makes a contribution with the 1D spectral analyses of the TeV radio galaxy candidates TXS 0149+710 and 4C +39.12, presented in Part II. Furthermore, in Part III, the gamma-like background of the MAGIC telescopes is characterized and based on this, background models are created and validated with spectral and morphological analyses. Part I provides the basic framework and is structured as follows: Chapter 2 introduces sources of very-high-energy gamma rays. Particular attention is given to the Crab Nebula, the standard candle of very-high-energy gamma-ray astronomy, and the class of Active Galactic Nuclei (AGN). It is emphasized how observations of TeV-detected radio galaxies can contribute to addressing open key-science questions. Chapter 3 presents the operating principle of IACTs, where at first the principles of Extended Air Showers (EASs) and the Cherenkov effect are explained. Then the MAGIC telescope system and its data acquisition are described. Chapter 4 explains the analysis chain to obtain science results, such as spectra, light curves, and sky maps, from data taken by IACTs. The low-level analysis up to the standardized data format DL3 is presented and it is described how the new software project AutoMAGIC, partly developed in the course of this thesis, enables the creation of MAGIC Data Level (DL)3 files in an automated and reproducible way. The high-level analysis, divided into 1D spectral and 3D morphological analysis, with the open-source software Gammapy is presented. 4 Sources of Very-High-Energy Gamma Rays 2 The first ever detection in the TeV range was achieved by the Whipple telescope detecting the Crab Nebula (Weekes et al. 1989), opening a new era of gamma-ray astronomy. Until then, 271 additional sources of VHE gamma rays were detected and all of them are listed in the TeV Gamma-Ray Source Catalog (TeVCat) (Wakely and Horan 2008). In our galaxy, the Milky Way, most of the sources emitting VHE rays are Supernova Remnants (SNRs) and pulsars. The extra-galactic gamma-ray sky is dominated by AGN, but also starburst galaxies can emit gamma rays. Also, the first TeV gamma-ray burst 190114C was recently detected by the MAGIC telescopes (V. Acciari et al. 2019). In this chapter, the SNR Crab Nebula and the classes of AGN are presented in more detail, as they play an important role in the course of this thesis. 2.1 The Crab Nebula In the year 1045 A.D. Chinese and other astronomers observed a “guest star”, which became brighter and brighter over weeks and could then even be seen in the sky during the day. Today, this event can be declared as a supernova explosion and is associated with its relic, the SNR called the Crab Nebula. The Crab Nebula emits radiation over the whole electromagnetic spectrum and is a very well-studied celestial object. In Figure 2.1, a composition of the Crab Nebula of X-ray, optical and IR data is shown. In the center, the Crab Pulsar, a highly magnetized neutron star is visible (Dubner et al. 2017). It was formed during the supernova by the collapse of the star. Powered by the pulsar, a Pulsar Wind Nebula (PWN) surrounding the pulsar as well as jets moving away from the object are formed. In the VHE gamma-ray regime, the Crab Nebula was observed by multiple instruments. As the observed emission is constant over time, the Crab Nebula is often used as a standard candle in VHE gamma-ray astronomy. The differential spectrum of the Crab Nebula was investigated in detail by the MAGIC telescopes (Aleksić et al. 2015) a1nd can be𝐸described by a log-parabola spectral modeld𝐹/d𝐸 = (3.23 ± 0.03) 10−11 TeV cm2 s (1 TeV)−(2.47±0.01)−(−0.24±0.01) log(𝐸/1 TeV) (2.1) in an energy range between 50GeV and 30 TeV. Also, the average flux above 300GeVwas published by Aleksić et al. 2015: 𝐹>300GeV = (1.20 ± 0.08 −10 1stat ± 0.17sys) 10 cm2 s . (2.2) The published differential spectrum and averaged flux are used as a reference in Part II and Part III of this thesis for the validation of the analysis pipelines. 5 2 Sources of Very-High-Energy Gamma Rays Figure 2.1: Composite of the Crab Nebula with X-ray data from Chandra (blue and white), optical data from Hubble (purple), and IR data from Spitzer (pink). Image credits: NASA/CXC/SAO (X-ray), NASA/STScI (optical), NASA-JPL-Caltech (IR). 2.2 Active Galactic Nuclei 1F0ro2m≲⊙ab1o%ut 2 trillion galaxies in our Universe, probably most of them have a supermassive (≳M ) black hole in their center, but in most cases the black hole is inactive. In the exceptionalcase ( ) of an Active Galactic Nucleus, the super-massive black hole is actively accreting matter, which is partly converted into radiation (Padovani et al. 2017). This makes AGN the most powerful non-explosive sources in our Universe. In this section, the classification of AGN based on physical features and the orientation regarding Earth is presented. Furthermore, open key-science questions and the potential capability of TeV radio galaxies answering these questions are presented. Since the first discovery of the AGN 3C 273 by Schmidt 1963, many other AGN with different properties have been discovered. This led to a massive zoo of classes and subclasses (Mickaelian 2015). Based on their characteristics, many AGN classes can be described by unification schemes (Urry and Padovani 1995, Antonucci 1993, Beckmann and Shrader 2012). According to Padovani 2023, three main properties 1. jetted / non-jetted AGN 2. radiatively efficient / radiatively inefficient AGN 3. orientation of the AGN regarding Earth are sufficient to divide the AGN into the most important classes. 6 2.2 Active Galactic Nuclei The majority (≳ 90%) of AGN belong to the class of non-jetted AGN, whose Spectral Energy Distribution (SED) is represented in Figure 2.3. As visible, non-jetted AGN mainly emit photons in the IR, optical and X-ray range. These thermal emissions are related to the accretion disk, which is formed around the black hole. Since non-jetted AGN are very weak radio sources, they could not be detected by radio telescopes for a long time. Therefore, they were called radio-quiet (Urry and Padovani 1995, Antonucci 1993), but in fact, they are radio-weak sources (Padovani 2023). As a counterpart, the class of radio-loud AGN has been established. Indeed, the physical difference is the presence of a strong, relativistic jet (Padovani 2023). In Figure 2.2, the composition of a jetted AGN is illustrated by an artist’s impression. In the center, a super-massive black hole is accreting matter, which forms an accretion disk. Around it, a dust torus, which can obscure the inner part of the AGN dependent on the viewing angle, has formed. Additionally, two jets form out perpendicular to the accretion disk. Figure 2.3 shows the multi-wavelength emission of jetted Dust torus Jet Supermassive black hole Accretion disk Figure 2.2: Artist’s impression of a jetted AGN (Saxton and NRAO/AUI/NSF 2019): In the center, a super-massive black hole is accreting matter, which forms an accretion disk. Around it, a dust torus, which can obscure the inner part of the AGN dependent on the viewing angle, has formed. In the case of a jetted AGN, two jets form out perpendicular to the accretion disk. AGN, which are observed under small viewing angles. The viewing angle 𝜃 is the angle between the jet’s axis and the line of sight. Thus, in the case of 𝜃 ≈ 0° the jet is directly pointing towards Earth. This type of jetted AGN is called blazar and is subdivided into BL Lac and flat-spectrum radio quasar (FSRQ) objects (Urry and Padovani 1995). Their multi-wavelength emissions range 7 2 Sources of Very-High-Energy Gamma Rays over the complete electromagnetic spectrum up to energies of TeV. As visible in Figure 2.3, blazars have a two-humped structure composed of a low-energy and a high-energy hump. It is commonly assumed, that the total emission can be explained by non-thermal emission processes in the jet. The low-energy hump can be explained by a leptonic scenario, in which electrons accelerated in magnetic fields emit synchrotron radiation (Ghisellini 2013). For the high-energy bump, leptonic and hadronic scenarios exist: In a leptonic one, high-energy electrons transfer energy to low- energy photons. In this so-called inverse Compton scattering, the photons could originate from synchrotron processes of the same electron population, from other parts of the jet or from regions completely external to the jet (Ghisellini 2013). In a hadronic scenario, ultra-relativistic protons accelerated in the jet induce pion production (Dermer and Giebels 2016). Through pion decay, high-energy photons, but also electrons and muons would be produced. As visible in Figure 2.3, the low-energy as well as the high-energy humps peek at higher energies for BL Lac objects in comparison to FSRQs. This has a huge impact on the detectability in the VHE gamma-ray regime, in which the blazars play an important role as they are dominating the extragalactic gamma-ray sky. In the optical, BL Lac objects show none or only weak emission lines, while FSRQs show Figure 2.3: Schematic representation of the SED of jetted and non-jetted AGN. In the case of the jetted AGN, two SEDs are shown representing BL Lac and FSRQ objects. The curves are based on data from Mrk 421 and 3C 454.3 respectively. The plot is adapted from Padovani 2017, originally the image credit is C. M. Harrison. 8 2.2 Active Galactic Nuclei broad emission lines (Urry and Padovani 1995). The distinction between BL Lac objects and FSRQs originates from the characteristic of BL Lacs being radiatively efficient while FSRQs are radiatively i/neffic≥ie0n.t01(Padovani 2023). The term “radiatively efficient” refers𝐿to the effect, that some sources𝐿𝐿pr𝐿oduce more power at a given black hole mass than others. For a source to be considered efficient,Edd must hold for the ratio of the bolometric luminosity and the Eddington luminosity1Edd (Heckman and Best 2014). In the case of larger viewing angles 𝜃, jetted AGN are classified as radio galaxies. Radio galaxies were categorized into Fanaroff-Riley (FR)-I and FR-I galaxies by Fanaroff and Riley 1974 based on their radio morphology. Today, radiatively efficient radio galaxies are assigned to FR-I galaxies, while radiatively inefficient radio galaxies are assigned FR-II galaxies (Padovani et al. 2017). This means that BL Lac objects and FR-I galaxies, as well as FSRQs and FR-II galaxies, are considered to be the same type of object intrinsically. It is important to note, that blazars and radio galaxies are not complet𝜃ely separate categoriesbut rather a continuu10m° . There is no fixed15t°h−re2s0h°old of the viewing angle , below a jetted AGN isconsidered as blazar, and above as radio galaxy. In the literature, different threshold ranges of theviewing angle from (Rulten 2022) to (Padovani 2017) are referred. Since the jets of radio galaxies do not point towards Earth and thus the Doppler boosting is low compared to blazars, it was rather unexpected that radio galaxies were detected in the TeV range. Nevertheless, six radio galaxies have been detected in the TeV regime: M 87 (Aharonian et al. 2003), Centaurus A (Aharonian et al. 2009), PKS 0625-354 (Dyrda et al. 2009), IC 310 (Aleksić et al. 2010), NGC 1275 (Aleksić et al. 2012), and 3C 264 (Archer et al. 2020). All of them are FR-I galaxies, and more information about each individual source are provided by the review of Rulten 2022. Radio galaxies offer unique observation possibilities as measurements of individual components in the jets with high-resolution Very-Long-Baseline Interferometry (VLBI) in the radio regime. Therefore, MWL observations of TeV-detected radio galaxies provide the option to study emission regions of gamma rays in the jet. With this, TeV radio galaxies can help to understand also the characteristics of AGN in general. Themain open key-science questions about AGN are summarized by Padovani 2023: • Why do only a minority of AGN have jets? • What are the acceleration processes in jets? • Why are only some blazars neutrino emitters? • What is the composition, geometry, and morphology of the obscuring dust? Additionally, Rulten 2022 summarizes open key-science questions directly connected to TeV- detected radio galaxies: • What role does the environment play? • Is it right to classify the TeV-detected radio galaxies as misaligned blazars, or are these objects simply blazar-like, with much smaller jet inclination angles to the line-of-sight than currently derived or assumed? 1The Eddingto𝐿n luminosity is the maximal luminosity a body with the mass 𝑀 can have, reached by thestate of balan⊙ced radiational and gravitational force: 𝐿Edd ≈ 33000 ⋅ 𝑀/𝑀⊙ ⋅ 𝐿⊙, with the mass 𝑀⊙ and theluminosity of the Sun. 9 2 Sources of Very-High-Energy Gamma Rays • Where does gamma-ray emission occur? • Which emission model describes the TeV-detected radio galaxies in the best way? • Are TeV-detected radio galaxies cosmic-ray sources? In order to make observations and analyses of radio galaxies help to answer these questions, it is essential to increase the population so that the population itself can be characterized. This goal is addressed by Part II of this thesis, in which the MAGIC analyses of two TeV radio galaxy candidates are presented. 10 Imaging Air Cherenkov Telescopes 3 At the moment, three established IACT systems are operating: the Major Atmospheric Gamma Imaging Cherenkov (MAGIC) telescopes (Aleksić et al. 2016a), the High Energy Stereoscopic System (H.E.S.S.) (Hinton 2004) and the Very Energetic Radiation Imaging Telescope Array System (VERITAS) (Perkins et al. 2009). Furthermore, the construction of the Cherenkov Telescope Array (CTA) is planned, a next-generation IACT system located at two sites. The LST-1, the prototype of the Large Size Telescope (LST) - one telescope type of the CTA, was built on La Palma next to the MAGIC telescopes and is already in the phase of commissioning (Abe et al. 2023). IACTs are built to investigate the physics of gamma rays, but they do not detect those particles directly. To understand the indirect detection, the phenomena of extensive air showers and the Cherenkov effect are explained in this chapter. Additionally, the influence of the EBL absorption is introduced. As the MAGIC telescope system plays an important role in the scope of this thesis, it is also described in more detail in this chapter. 3.1 Extensive Air Showers Earth’s atmosphere is 𝛾not transparent to gamma rays. Instead, when entering the atmosphere,a gamma-ray particle decays into an electron 𝑒− and a positron 𝑒+ via pair production in the presence of an atomic nucleus: 𝛾 → 𝑒− + 𝑒+. (3.1) As the produced particles are charged andm𝑒ovi→ng𝑒in+Ea𝛾r.th’smagnetic field, they emit bremsstrahlung:± ± (3.2) A cascade called an Extended Air Shower is developing (Heitler 1936) as long as the energy of the produced 𝛾 particles is high enough to produce further electrons and positrons by pair production. A leptonic shower initiated by a gamma-ray particle, an electron or a positron is called electromagnetic (EM) Extended Air Shower. In Figure 3.1, the left illustration indicates the shower 𝐾evolution induced by a primary gamma-ray particle.EAS cannot only be initialized by leptons but also by hadrons like protons 𝑝, pions 𝜋, or kaons. In an interaction with an atomic nucleus in the atmosphere, lots of decay channels are possible and multiple subshowers can develop. If a neutral pion is produced, it can decay into two gamma rays, so that an EM subshower develops. In Figure 3.1, the right illustration indicates an exemplary shower evolution induced by a primary hadron. Hadronic airshowers are much more frequent than gamma-ray-induced airshowers. Thus, the distinction between these two types of EAS is one of the key challenges of the analysis of IACT data. 11 3 Imaging Air Cherenkov Telescopes Primary 𝛾 Primary hadron 𝑒 𝑒− 𝜇− 𝜋 − + 𝜋 𝜋 0 𝜇+ + 𝛾 𝛾 𝑒+ 𝛾 𝛾 𝑒 𝜈 − 𝜇 𝜈𝜇 𝑒+ 𝑒− Muonic component Hadronic component EM component Figure 3.1: Illustration of gamma-ray (left) and hadronic (right) induced EASs. The graphic is based on tikz code originating from Biederbeck 2023. 3.2 The Cherenkov Effect The Cherenkov effect describes the phenomenon that charged particles emit so-called Cherenkov radiation if they are moving faster than the speed of light in the surrounding medium (Cherenkov 1937). Molecules in the medium get ionized by a bypassing charged particle, and by returning into their ground state they emit energy as light. This light is constructively interfering in case the char𝑣ged particle is moving faster than light in that medium. The emission angle 𝜃 of thecone-formed shock front depends on the refractive in1dex 𝑛 of the medium and the velocity of theparticle : cos (𝜃) = 𝑛 ⋅ 𝑣/𝑐 . (3.3) T42h0empmroduced Cherenkov light consists of a continuous spectrum peaking at a wavelength of(Kulcsár et al. 1982) and is therefore in the visible spectrum. Especially popular is the bluish-shimmering Cherenkov light of underwater reactors. However, the effect also occurs in EASs induced by the charged particles in the shower. Measuring the Cherenkov light produced in EASs is the operating principle of IACTs and enables the view into the sky at the highest energies. 3.3 Extragalactic Background Light Through star-forming processes andAGN, radiation from IR to optical wavelengths has accumulated in the universe called Extragalactic Background Light (EBL). The detection of VHE gammas from 12 3.4 The MAGIC Telescopes distant sources is limited by the EBL as VHE photons 𝛾 interact with these EBL photons 𝛾 via pair production: 𝐹 𝛾 + 𝛾 → 𝑒 VHE EBL + VHE EBL + 𝑒−. (3.4) The attenuation of the emitted flux emitted(𝐸) of a source can be described by an exponential factor dependent on the optical depth 𝜏 (𝐸, 𝑧), which itself depends on the energy 𝐸 and the redshift 𝑧 of the source (Venters et al. 2009). Wi𝐹th t(h𝐸i)s,=th𝐹e obse(r𝐸ve)d⋅ 𝑒flux 𝐹−𝜏(𝐸,𝑧)obs(𝐸) results to The optical depth 𝜏 (𝐸, 𝑧) obs emitted . (3.5)is described by multiple models, for the analyses presented in this thesis the one by Domıńguez et al. 2011 is used. 3.4 The MAGIC Telescopes Camera 17m Figure 3.2: The MAGIC-II telescope on the Roque de los Muchachos during observations. Author of this thesis as a comparison for scale. Photo credit: Urs Leutenegger and Jose Ignacio Gil. MAGIC is a stereoscopic system consisting of two IACTs, located at a height of 2200m above sea level at the Observatorio del Roque de los Muchachos (ORM) on La Palma, Canary Islands. The two telescopes, MAGIC-I and MAGIC-II, were built in 2004 and 2009, respectively, and both were 13 3 Imaging Air Cherenkov Telescopes upgraded in the years 2011 and 20125(A0GleekVsić et al. 2016a).5M0ATeGVIC is able to observe VHE gammarays in an energy range from about to more than (Aleksić et al. 2016b) and is one of the most sensitive instruments of that energy regime besides H.E.S.S. and VERITAS. In the following, the main components of MAGIC are introduced as well as MAGIC’s observing strategy and required simulation. 3.4.1 Telescope Dish, Camera and Trigger To be sensitive to the Cherenkov light produced in gamma-ray particle showers, large mirrors reflecting the light into a camera are re1q7umired. This process as well as the data acquisition willbe explained in more detail in the following. As visible in Figure 3.2, in the case of the MAGICtelescopes, each dish has a diameter of consisting of individual mirrors. Each mirror can be adjusted by the1A7cmtive Mirror Control (AMC), which ensures an optimal Point Spread Function(PSF) at different zenith angles (Aleksić et 3a.l5. 2016a). The collected light is reflected to the camera,which is about from the mirror dish. B°oth cameras consist of 1039 Photomultiplier Tubes(PMTs) and have a field-of-view (FoV) of (Aleksić et al. 2016a)5.4T7he optical signals from thecameras are then converted to 0electrical signals and are further processed by the trigger system.MAGIC’s trigger system consi1sts of three trigger levels based on the inner pixels of each camera:The first trig1g9er level is called L trigger and ju3s6t based on amplitude discriminators for each pixel.Outgoing signals reach the L trigger, the individual telescope trigger. This second trigger levelis based on macrocells, each consisting of pixels as visualized in Figure 3.3. The trigger is activated if there is a cert1ain number of activated Next Neighbors (NN) in at least one of the cells.The logics of 2NN, 3NN, 43NN and 5NN are implemented, but for standard stereo observations, the3N3N logic is used. Both L trigge1r signals of the two telescopes are sent to the third and last triggerlevel, the 1stereo trigger L . Taking3the differe≈n2t0a0rrnivsal times of both telescopes into account, theL trigger is issued when both L triggers send a signal. The maximal allowed time delay betweenthe two L signals producing an L signal is (Aleksić et al. 2016a). Every signal of the L3 trigger is called an event, which can belong to one of three different kinds: Accidental triggers due to fluctuations of the Night Sky Background (NSB) or car flashes1. Muon rings created by local muons moving at ultra-relativistic velocities. Extended air showers induce1d0−b3y gamma rays or hadrons. The fraction of gamma-ray-inducedevents is in the order of – even in the case of observations of bright sources like the Crab Nebula (Aleksić et al. 2016b). 3.4.2 Observation Strategies The most intuitive way to observe a source is to just point the telescope toward the source, so it is located at the center of the FoV. Observations taken with this strategy are called on-mode observations. Although it is an important step of the analysis to separate gamma-induced and hadron-induced shower events, the selected gamma sample will never have a purity of 100 %. 1Already since 1988, La Palma has a law to protect against light pollution, which provides almost ideal conditions at the ORM. Nevertheless, it sometimes happens that car headlights create suddenly increasing trigger rates. This phenomenon is called car flash and is mostly caused by tourists driving up the roque. 14 3.4 The MAGIC Telescopes Fig of 1u0r3e9 3.3: The geometry of the MAGIC cameras (Aleksić et al. 2016a), each consistingPMTs represented as hexagonal pixels. The grey pixels are outside the trigger region and not used for any trigger level. The 19 macrocells used by the L1 trigger are visualized by blue pixels. As the macrocells are overlapping, some pixels belong to two or even three cells, which are represented by green and orange pixels, respectively. 15 3 Imaging Air Cherenkov Telescopes Thus, it is essential to estimate the background consisting of hadron-induced events. For on-mode observations, dedicated “off observations” have to be performed by tracking an empty field under very similar conditions. This means, that the off observations should match the on observations in the azimuth and altitude of the pointing position and also in environmental conditions like the transmission of the atmosphere and the NSB. This results in the disadvantage that a lot of observation time has to be spent for off observations. Another disadvantage is that it is often not feasible to actually perform the off observations under the exact same conditions. This is because environmental influences can change quickly and thus it might be difficult to find a time when all environmental conditions match the on observation. To avoid this issues, the so-called “wobble mode” was invented (Fomin et al. 1994). While observing with the wobble mode, the telescopes are not pointed directly at the source, but at a position separated from the source by a certain offset. Assuming that the acceptance of the telescopes is constant along a certain offset from the center of the FoV, off data can be sampled along this radius. As a result, this observing mode enables the possibility to take on and off data at the same time under exactly the same environmental conditions. Observing with the wobble mode is the default for MAGIC observations. To compensate for possible irregularities in the FoV, t2h0emtienlescopes are pointed at four different wobble positions around the source as illustrated inFigure 3.4. A single observation at a certain wobble position is called “run” and takes around 15 or. The offset between source and wobble positions is chosen so that events of the source do not spread into the off positions and is therefore dependent on the PSF of the telescope. In the case of standard MAGIC observations, the offset is set to 0.4°. 3.4.3 Monte Carlo Simulations As mentioned before, one of the key tasks in analyzing IACT data is the separation of gamma-ray and hadron-induced showers. To train supervised machine learning models, labeled hadronic and gamma-ray data is required. On the one hand, observations not containing a very bright source can be used as a hadronic training dataset since a major part of the triggered events originates from hadrons. On the other hand, gamma-ray Monte Carlo (MC) simulations are required for the creation of gamma-ray training datasets. Furthermore, those MC simulations are needed to calculate the detector response of the telescope system. The simulations for the MAGIC telescopes are based on the software COsmic Ray SImulations for KAscade (Corsika), which was developed for Karlsruhe Shower Core and Array Detector (Kaskade) (Heck et al. 1998). The version adapted for the MAGIC telescopes names MAGIC Monte Carlo Software (Mmcs). In general, two types of MCs can be produced: • For the production of diffuse MCs, events originating from the center of the FoV up to a certain offset are simulated. Usually, MCs are produced up to an offset of 1.5° or 2.5°. • For the production of ringw0o.4b°ble MCs, events originating from a ring around the centerof the FoV with a radius of are simulated. As events are only simulated for a smaller range of the FoV, a higher amount of events can be produced using the same amount of computing resources compared to diffuse MCs. As the simulated showers depend a lot on the Ze8n0it°h distance (Zd) of the pointing positions, MCsare produced in multiple Zd bins up to a value of . In this thesis, MCs from the following ranges 16 3.4 The MAGIC Telescopes ◦ 41 ◦ 40 W1 W3 W4 ◦ 39 W2 ◦ 38 ◦ 37 h m m m m 3 42 36 30 24 Right Ascension Figure 3.4: I3llustration of the wobble positions around a source, which is indicatedby a black star.5. °The four different wobble positions and the corresponding FoVs withdiameters of are represented b0y.4d° ifferent colors. The offset between the source andeach wobble position amounts to . 17 Declination 3 Imaging Air Cherenkov Telescopes are used: • Low Zd: 5° to 35° • Medium Z5d: 35° to 50°• High Zd: 0° to 62° Since the telescopes are exposed to the weather day and night, dust can settle on the mirrors and also can be washed away by rain. This leads to a variable reflectivity of the mirrors and a non-constant PSF. In order to take these effects into account, different analysis periods are defined for which suitable MC are produced in each case. The start and stop dates of the analysis periods used in this thesis are listed in Table 3.1. For the analysis, explained in detail in chapter 4, it is essential to choose MC data matching the observational conditions of each run. Table 3.1: Analysis periods used in this thesis and the corresponding MC sets. It should be noted, that the observational conditions of ST.03.07 and ST.03.09 were so similar, that no dedicated MCs were produced for ST.03.09. Analysis period Start date Stop date MC set ST.03.07 2016-04-29 2017-08-02 ST.03.07 ST.03.08 2017-08-02 2017-11-02 ST.03.08 ST.03.09 2017-11-10 2018-06-29 ST.03.07 ST.03.12 2019-09-16 2020-02-22 ST.03.12 ST.03.16 2020-10-24 2021-09-29 ST.03.16 3.4.4 Observations under Moonlight The MAGIC telescopes achieve their best performance under dark conditions; but to extend the duty cycle, observations are also performed when the moon is above the horizon. Ahnen et al. 2017 studied the performance of the MAGIC telescopes under moonlight in detail for different NSB conditions. The NSB is not measured directly during observations but is monitored by the Dark Current (DC) in every camera pixel of the camera of MAGIC-I. In the following, the median DC of those pixels DC1 is used to describe the brightness of the m1.o1onA. For1.a3llAanalysis periodsstudied by Ahnen et al. 2017, DC1_dark was measured in a range of µ to µ analyzing dark observations of the Crab Nebula. With this, the=NSB level can be calculated toNSB_lvl DC1 . (3.6) DC1_dark The observations are limit=ed1b2y the safety limits of the PMTs in the camera, which can be operatedup to a value of NSB_lvl at nominal High Voltage (HV) settings. Above this limit, the PMTs have to be operated with reduced HV settings. In Table 3.2, all moon conditions from which data is used in this thesis are listed. Each condition requires a dedicated analysis. 18 3.4 The MAGIC Telescopes Table 3.2: Moon conditions used in this thesis and their corresponding NSB_lvl and the range of the DC1. Name NSB_lvl Minimal DC1 / µA Maximal DC1 / µA moon0 1–2 0.0 2.2 moon1 2–3 2.2 3.3 moon2 3–5 3.3 5.5 moon3 5–8 5.5 8.8 3.4.5 Monitoring the Environmental Conditions To monitor the weather conditions and the transmission of the atmosphere in particular, a Light Detection And Ranging (LIDAR53) 2synsmtem and a pyrometer are operating besides the MAGIC tele-scopes.The LIDAR is operating at wavelength which is close to the wavelength where the C9 khmerenkov spectrum is peaking (Fruck et al. 2014). The LIDAR is working simultaneously with theMAGIC observations pointing close to the observed region in the sky. Usually, the transmission atis used as a selection criterion. Another parameter, which can be used as a quality characteristic is the Cloudiness. This parameter is obtained by a pyrometer mounted on the reflector surface of the MAGIC-I telescope and is therefore taking simultaneous data pointing to the same sky region as the telescopes. The pyrometer measures the sky temperature and can therefore indicate warm clouds in the observed sky region. 19 20 Analysis of IACT Data 4 In the past, data formats and software were developed individually for each IACT and their access is restricted to the members of the collaborations. In contrast to that, the open-source Python package Gammapy (Deil et al. 2017, Donath, Axel et al. 2023) is being developed by the gamma-ray community to ensure reproducible results especially with regard to the CTA observatory, which will be fully operational in the future. Gammapy can be used to analyze not only data from CTA but also data from existing IACTs. In Figure 4.1, the different DLs planned for CTA (Contreras et al. 2015) are shown from data of the Data Acquisition (DAQ) (DL0) to science products (DL5) and even legacy observatory data (DL6). In 2016, the Data formats for gamma-ray astronomy (GADF) was established by the gamma-astronomy community (Nigro et al. 2021). For this effort a GitHub repository1 was created to define common and open high-level data formats for gamma-ray instruments. Mainly GADF focus on the DL3 format, consisting of selected gamma-ray events and corresponding Instrument Response Functions (IRFs). In this chapter, the low-level analysis up to the standardized DL3 format is described in more detail. Additionally, it is presented how an automatization of the creation of MAGIC DL3 data has been developed, for which this thesis has made a great contribution. Finally, the high-level analysis of IACT data using Gammapy is introduced. DL0: DL1: DL2: raw DAQ output image parameters shower parameters DL3 4 DL5/6:: DL : science products / event list + IRFs binned data observatory data Figure 4.1: Data formats for gamma-ray astronomy. 4.1 Low-Level Analysis Low-level data from the data acquisition hardware and software at DL0 consists of the lowest level of event, calibration and technical data, which is stored permanently (Contreras et al. 2015). 1GADF GitHub repository: https://github.com/open-gamma-ray-astro/gamma-astro-data-formats 21 4 Analysis of IACT Data After calibration of the events (for further descriptions of the calibration process of the MAGIC telescope system see: Aleksić et al. 2016a and Aleksić et al. 2016b), the arrival time and the number of photons are extracted. As a result, one achieves the characteristic shower image in the camera, which is presented in Figure 4.2. Not every pixel contains information about the shower as the readout from all pixels is stored when an event is triggered. Thus, the relevant pixels are selected in the so-called cleaning process (see: Zanin 2013). An exemplary cleaned image is also visualized in Figure 4.2. Number of photons Number of photons 0 10 20 30 0 10 20 30 0.4 0.2 0.0 −0.2 −0.4 −0.50 −0.25 0.00 0.25 0.50 −0.50 −0.25 0.00 0.25 0.50 X / m X / m Figure 4.2: Visualization of a calibrated (left) and cleaned (right) shower image in the MAGIC camera created by a toy-model simulation using the Python package ctapipe (Nöthe et al. 2021). The camera coordinates are named 𝑋 and 𝑌. Based on the cleaned image, features describing the showers are generated. In addition to the Hillas parameters invented by Hillas 1985, further features have proven to be beneficial, for example, the size parameter, which is the sum of all photons of the cleaned event, or the leakage parameter describing the amount of shower pixels at the edge of the camera. These image parameters are considered as data at DL1. In combination with MC simulations, DL1 data can be processed up to DL2. For this, an event reconstruction of the energy and the origin of the event has to be performed, which is typically done with supervised machine learning algorithms, e.g. a random forest. In the process of calculating the reconstructed event right ascension and declination, it is common to use the so-called DISP parameter. The Distance between the Image centroid and the Source Position (DISP) can be calculated based on the Hill=as1p−arameters (Lessard et al. 2001). Furthermore, a parameter calledgammaness or hadronness gammaness is estimated similarly to the event reconstruction using a supervised machine learning approach. The hadronness parameter has a value between 0 22 Y / m Y / m 4.1 Low-Level Analysis and 1, where a value of hadronness = 0 indicates an event to be most likely gamma-ray-induced. With this, the data containing reconstructed shower parameters are at the DL2 stage. DL2 data can be transformed to DL3, which is the standardized data format for gamma-ray data. The standardized format GADF DL3 allows many advantages as the easier combination of data from multiple telescopes and the possibility of making standardized data publicly available. GADF DL3 data contains a list of information about selected gamma-ray-like events in combination with informa?̂?tion about the telescope’s response.𝒑T̂ he respons𝐸e 𝑅(𝒑 ̂, ?̂?|𝒑, 𝐸) of the telesc𝒑ope describes theprobability of reconstructing an event with true energy and true point of origin at an estimated energy and an estimated poin𝑡 t of origin2𝐹.(𝐸T,h𝒑is, 𝑡i)nformation is essential, as the observed counts𝑁(?̂?, 𝒑̂) = ∫𝑡 1 d0 d𝑡 ∫𝛺∫𝐸 𝐸 𝒑 𝑅(𝒑̂, ?̂?|𝒑, 𝐸) d𝐸 d𝒑 + 𝑏(?̂?, 𝒑̂) (4.1)d d depend on t𝑏h(e?̂?,t𝒑rû)e gamma-ray flux 𝐹(𝐸, 𝒑, 𝑡), the instrument’s response 𝑅(𝒑̂, ?̂?|𝒑, 𝐸) and thebackground . In the following, the two components of DL3 data, the event list and the IRFs are presented in more detail. 4.1.1 Event Lists One part of the informa=ti0o.n3 stored in DL3 files are event lists containing key information about allselected events. The event selection is based on the shower parameters: Applying a hadronnesscut at e.g. hadronness , only events with hadronness ≤ 0.3 end up in the final event selection. In addition to the hadronness cut, a cut is made on the parametersize, e.g. size ≥ 50. According to the documentation2 of the GADF, the mandatory columns of the EVENTS table are: EVENT_ID Event identification number at the DL3 level. TIME Event time. RA Reconstructed event right ascension. DEC Reconstructed event declination. ENERGY Reconstructed event energy. 4.1.2 Instrument Response Functions Not all gamma-ray-induced EAS passing an IACT end up in the list of gamma-like events. Some will not even be triggered and even more will not pass the event selection criteria. Whether a gamma-ray-induced shower is detected depends largely on the detector characteristics as well the primary gamma ray’s true point of origin in the FoV and its true energy 𝐸. As no artific gamma-ray source of VHE gamma rays exists, the response of the telescope system 𝑅(𝒑̂, ?̂?|𝒑, 𝐸asia)l cannot be measured directly. Instead, MC simulations are used to create multiple IRFs describing the detector characteristics. According to the GAD𝑁F, IRFs can contain the following components:Effective Area 𝐴 = 𝑁 detectedeff ⋅ 𝐴 (4.2)simulated 2GADF documentation: https://gamma-astro-data-formats.readthedocs.io/ 23 4 Analysis of IACT Data 𝑁combines the efficiency of the telescope with the observable area 𝐴, in which events weresimul𝐴ate(d𝐸. ,T𝒑h)e efficiency can be calculated by the ratio of the number of detected eventsdetected and the number omf simulated events 𝑁simulated. According to the GADF, the effectivearea eff is stored as 2AEFF_2D in bins of FoV offset and true energy 𝐸. The effectivearea is stored in units of . Energy Dispersion 𝐸disp(?̂?|𝐸, 𝒑) gi𝐸ves the probability of an event with true energy 𝐸true to bereconstructed with an energy reco. According to the GADF, t𝐸he energy dispersion is storedas EDSIP_2D in FoV offs(e𝒑t ̂|b𝐸i,n𝒑s)as a matrix with axes of true and reconstructed energy ?̂?.Point Spread Function PSF gives the probability of an event to be reconstructed in a solid angle d𝛺, describing the estimated position 𝒑,̂ at a specific offset from a point source. Integrated over all s𝐸olid angles, the PSF is normalized to 1. According to GADF, the PSF canbe stored in differen1t/fsorrmats. For IACTs, it was agreed to store the PSF as PSF_TABLE inbins of true energy , the FoV offset and the offset angle from the source position. The PSFis stored in units of . With these components𝑅,(t𝒑ĥ,e?̂?d|𝒑et,e𝐸c)to=r 𝐴resp(o𝐸neff , s𝒑e)b⋅ e𝐸comesdisp(?̂?|𝐸: , 𝒑) ⋅ PSF(𝒑̂|𝐸, 𝒑). (4.3) The IRFs are strongly dependent on observational conditions like the Zd of the pointing and the NSB resulting in a time dependency. Therefore, each observation is assigned to IRFs created with MCs matching the particular observational conditions. With this, it is assumed that the IRFs do not change significantly during a single observation. In general, the IRFs can be calculated using diffuse or ring-wobble MCs: In the case of diffuse MCs, the IRFs can be calculated in multiple offset bins and are therefore called multiple-offset IRFs. By using ring-wobble MCs, the IRFs can only be calculated in one offset bin and are therefore called single-offset IRFs. In addition to the presented IRFs based on MCs, background models are sometimes considered as an IRF as well. Background models describe the irreducible gamma-like background rate induced by cosmic rays after the application of all cuts. According to the GADF, background models can be stored as BKG_2D or BKG_3D: Assuming that the background is radially symmetric in the FoV, BKG_2D models can be stored in bins of the FoV offset and the reconstructed energy. Additionally, BKG_3D background models can be stored in bins of F The background rate is given in units of 1/(sMeV sr)oV coordinates and the reconstructed energy.. How background models can be created is described in detail in chapter 11 and is then also realized in the course of this thesis. If IRFs contain the PSF in addition to the effective area and the energy dispersion, they are called full-enclosure IRFs. As it is very common for VHE observations to observe point sources with a gamma-ray flux 𝐹(𝐸, 𝑡) the so-called point-like IRFs have been established. In addition to the effective area and the energy dispersion, point-like IRFs include the parameter rad_max describing the radius of an optimized directional cut around the assumed source position. According to the GADF, rad_max can be stored as RAD_MAX and as RAD_MAX_2D: RAD_MAX is given as a single value without any dependencies. RAD_MAX_2D is given in bins of the reconstructed energy and the FoV offset. rad_max is given in units of degree. Depending on further analysis, there are limitations to the parameter range of rad_max, explained in detail in section 8.2. The effective area and the 24 4.2 Automated Production of Standardized Data for the MAGIC Telescopes energy dispersion have to be calculated especially for the selection of the on region, which is given as a circle with radius rad_max around a source position at a specific offset from the FoV. With this, (4.3) simplifies to 𝑅(?̂?|𝐸) = 𝐴eff(𝐸) ⋅ 𝐸disp(?̂?|𝐸) (4.4) and the number of observed counts (4𝑡.1) has o𝐹n(l𝐸y,a𝑡)n energy dependency left:𝑁(?̂?) = ∫𝑡 1 d0 d𝑡 ∫𝐸 𝐸 𝑅(?̂?|𝐸) d𝐸 + 𝑏(?̂?). (4.5)d 4.2 Automated Production of Standardized Data for the MAGIC Telescopes To analyze data taken by the MAGIC telescopes, the proprietary software MAGIC Analysis and Reconstruction Software (MARS) was developed (Zanin 2013). MARS includes lots of executables performing all steps of the MAGIC analysis including the low-level and the high-level analysis. The event reconstruction and the estimation of the hadronness parameter is performed by the MARS executables “coach” and “melibea”. With coach, machine learning models are trained using off data labeled as hadronic data and MC simulations of gamma-ray induced events. With melibea, the trained models are applied to data and also to MC test datasets. To convert the output from melibea into standardized GADF conform DL3 format, the magicDL3 converter was developed (Nigro 2023). In a configuration file passed to the magicDL3 converter, all final cuts are defined. As described in subsection 3.4.3, MCs matching to the Zd range of the measured data and the analysis period have to be chosen. Additionally, some steps in the low-level analysis of MARS have to be adapted to the different moon conditions introduced in subsection 3.4.4. If one wants to analyze data taken under different conditions, it can therefore easily come to the point that one has to perform many individual analyses. To automatize the whole MAGIC analysis chain including the magicDL3 converter, the AutoMAGIC project was initiated by Lena Linhoff, Cosimo Nigro and myself in 2020. By the same people and Jan Lukas Schubert, the software was further developed in the following years. AutoMAGIC is a database-driven code project written in Python and is based on a Postgres database, where all jobs, needed to perform each step of the analysis, are monitored. In an automated way, all jobs are created and submitted, so that the user only has to provide a AutoMAGIC configuration file, in which all settings for the analysis are provided. AutoMAGIC enables a reproducible and automated analysis up to GADF conform DL3 data and the opportunity to perform the high-level analysis with the open-source software Gammapy. More details about the AutoMAGIC project as well as the first results are presented in Lena Linhoff’s PhD thesis (Linhoff 2021). Motivated by the analysis presented in Part II of this thesis, I implemented the option to validate a specific analysis with data from the Crab Nebula as well as the option to analyze non-standard offset data with AutoMAGIC. AutoMAGIC is able to produce point-like as well as full-enclosure IRFs, but up to now background models are not included. To address the challenge of creating background models for data taken under various conditions, Part III of this thesis presents studies on background dependencies and new ways to create background models from non-simultaneous off data. 25 4 Analysis of IACT Data 4.3 High-Level Analysis To create science products (DL5 data) out of standardized DL3 data, the open-source Python package Gammapy (Deil et al. 2017, Aguasca-Cabot et al. 2023) is developed by the community of gamma-ray astronomers. Gammapy mainly builds on the Python packages astropy (Astropy Collaboration et al. 2013, Astropy Collaboration et al. 2018, Astropy Collaboration et al. 2022), SciPy (Virtanen et al. 2020) and Numpy (Harris et al. 2020). In the first step, reduced DL4 datasets are produced: The events (and IRFs) are binned along two spatial axes and an energy axis. Thus, in general, 3D dataset geometries are generated. Two more specific cases are the 2D image analysis, in which a cube in only one energy bin is considered, and the 1D spectral analysis, in which one spatial bin in multiple energy bins is considered. In this section, the 1D spectral analysis and the 3D analysis producing scientific results like spectra, flux points, lightcurves and sky maps are presented. 4.3.1 1D Spectral Analysis In order to create a reduced 1D dataset, an on region around the assumed source position has to be defined. For the analysis of DL3 data containing point-like IRFs, the on region is given by a circle around the source position with the radius rad_max (see subsection 4.1.2). For the 1D analysis of DL3 data containing full-enclosure IRFs, the on region can be defined as an arbitrary region. Additionally, expected off counts have to be estimated. As introduced in subsection 3.4.2, most observations of IACTs are performed in the wobble mode, which enables the definition of 𝑁off-regions off regions with the so-called reflected-regions background method, visualized in Figure 4.3. As the off regions have the same size as the on𝑏 r=egi/on, ⋅t𝑁he b. ackground counts in the on region can beestimated with: 𝑡⏟o∶n=𝑡𝛼off off (4.6) The parameter 𝛼 gives the fraction of observational times 𝑡on and 𝑡off off the on and off regions respectively. If the off counts are determined by the wobble method, it is calculated by 𝛼 = 1/𝑁off-regions. In case of a DL3 dataset including rad_max stored as RAD_MAX_2D, on and off regions have to be defined in each energy bin. If the observations were performed in on mode or no off regions can be found, it can also be required to estimate the off counts from a background model. This procedure has to be done for every observation producing a spectral DL4 dataset for each observation. Datasets of multiple observations can be stacked and further analyzed. Based on this, Li&Ma significances, spectra and lightcurves can be created which is further described in the following. Source Detection To determine if a source has been detected𝑁, the=n𝑠u+m𝑏ber of events 𝑁on in the on region must becounted on (4.7) composed of signal counts 𝑠 and backgrou𝑠n=d c𝑁oun−ts𝛼𝑏.⋅ 𝑁In combination with the estimated off countscalculated by (4.6) the excess on off (4.8) 26 4.3 High-Level Analysis 5068549 ◦ ′ 22 30 20 On region ′ 00 15 10 ◦ ′ 21 30 5 Off regions ′ 00 0 h m m m m 5 36 34 32 30 Right ascension 0F.i4g°ure 4.3: Visualization of the reflected regions method applied to an exemplary CrabNebula observation. The observation was taken with the wobble mode and an offset ofbetween Crab Nebula and the pointing position, indicated by a white cross. The on region is defined as a circle with a radius of rad_max = 0.15° around the position of the Crab Nebula. With the reflected region method, off regions are found, which have the same size and the same offset to the pointing position as the on region. Also, the off regions are not allowed to overlap with another off region or the on region. 27 Declination Number of events 4 Analysis of IACT Data as well as the Li&Ma significance (Li and Ma 1983) 𝜎Li&Ma = √2 ⋅ √𝑁 ⋅ ln (1 +𝛼 𝛼 ⋅ 𝑁 𝑁+onon on 𝑁 ) + 𝑁off ⋅ ln ((1 + 𝛼) ⋅ 𝑁 𝑁off on +off𝑁 ) (4.9)off can b𝜎e calc=ulated. Traditionalwhile a signifi5cance of 𝜎Li&Ma =ly,5a significanceis required toand Li&Ma are equivalent to a chance of 0.3 % of 𝜎Li&0M.0a0=0 036 i%s considered as a hint𝜎for sig=nal,speak about a detection. Values of Li&Ma 3and respectively of being a random fluctuation. Spectral Modeling Extracting a spectrum describing the differential flux from an astrophysical source is one of the main targets of the 1D analysis. The spectral model of a source is always investigated from data from a time period in which the spectral model is assumed to be constant. To extract the gamma-ray flux 𝐹(𝐸, 𝑡 = const.) = d2𝑁 (4.10) d𝑡 d𝐴 out of (4.5) from an 1DDL4 dataset, twomethods exist: First, unfolding, which ismodel-independent, but not implemented in Gammapy yet. And second, forward folding, fitting an assumed spectrum to the data. Motivated by the first-order Fermi acceleration (Fermi 1954), most models base on a power-law (PL) spectrum. Here the spectral models used in this thesis are presented: PL spectral model 𝛤 𝐹(𝐸) = 𝜙0 (𝐸 𝐸0 )−𝛤 (4.11) with the PL index , the amplitude 𝜙0, and the reference energy 𝐸0. Log-parabola spectral model 𝛼 𝛽 𝐹(𝐸) = 𝜙0 (𝐸 𝐸 )−𝛼−𝛽 log(𝐸/𝐸0)0 (4.12) with the indices and , the amplitude 𝜙0, and the reference energy 𝐸0. In the cases of both models, the reference energy 𝐸0 is fixed and not fitted to the data. As introduced in section 3.3, the flux of a distant source will be attenuated by the EBL. Applying the EBL absorption factor of (3.5) to the PL spectrum (4.11), for example, becomes: 𝐹(𝐸) = 𝜙0 (𝐸𝐸0 )−𝛤 ⋅ 𝑒−𝜏(𝐸,𝑧). (4.13) As a result of a fit, an optimized parameter set of the assumed spectral model is achieved. With this, the number of predicted counts can be estimated by (4.5). How well the assumed spectral model with the optimized parameter set actually fits the data can be checked by inspecting the residuals between data and model as shown in Figure 4.4. In this example, a log-parabola spectral model (4.12) was fitted to a stacked dataset of Crab Nebula observations taken with the MAGIC telescopes. 28 4.3 High-Level Analysis 3 10 2 10 1 10 Predicted signal counts Excess counts 0 10 100 0 −100 −1 0 1 10 10 10 Energy/TeV Figure 4.4: Energy-dependent comparison of the predicted signal counts by the fitted spectral model and the observed excess counts for an exemplary stacked dataset of Crab Nebula observations taken with the MAGIC telescopes. Flux Point Calculation In addition to the fitted spectrum, flux points can be estimated by fitting the norm parameter 𝜙0 of the global spectral model in multiple energy bins. In Gammapy, a binned Poisson log-likelihood approach is implemented, which was once developed for the analysis of Fermi-LAT data (Acero et al. 2015). As the counts originate from event-ba𝜆sed measurements, they are expected to follow aPoisson distribution 𝑃𝜆(𝑘) = 𝑘𝑘! ⋅ 𝑒−𝜆, (4.14) which assigns the probability to measure the number of counts 𝑘 ∈ ℕ0 in case of a mean value 𝜆. The measured counts are a result of the flux of the source and the IRFs of the instrument. As the spectral model−, dloesgcrib(i𝜙ng the source is fixed except for the norm parameter 𝜙0 and the IRFs arealso stable, the likeli(hℒood0)ℒ) (𝜙0) only depends on the 𝜙n0̂orm parameter. Minimizing the negativelog-likelihood gives the(b𝜙es)t-fit value of . With this, a test statistic𝑇 𝑆 = −2 log (ℒℒ(𝜙00̂ ) ) = −2 (log (ℒ(𝜙0)) − log (ℒ(𝜙0̂ ))) (4.15) comparing a hypothesis 𝐻0 with the hypothesis 𝐻1 describing the best fit: 𝜙0 = 𝜙0̂ is defined. In a binned log-likelihood appro𝐻ach the best-fit value of 𝜙0 ̂ and the 𝑇 𝑆 profile are calculated in all energy bins. In every energy bi0n, it has to be decided if a significant flux was measured, so thatthe so-called null-hypothesis , e.g. no signal, is tested. For the calculation, the 𝑇 𝑆 value (4.15) 29 Residuals data - model Number of counts 4 Analysis of IACT Data is calculated for 𝜙0 = 0 ⋅ 1/(TeV cm2 s). As the 𝑇 𝑆 value is 𝜒 2 distributed, it is connected with the Li&Ma significance (4.9): 𝜎Li&Ma = {−√𝑇√𝑆−𝑇𝑆 for 𝑇𝑇 𝑆for 𝑆 ≥< 00. (4.16) Usually the null-hypothesis 𝐻0 is rejected for 𝜎 ̂Li&Ma ≥ 3σ and the best-fit value 𝜙0 is presented as a significant flux point. For cases of 𝜎Li&Ma < 3σ, 2-𝜎 upper limits (UL) are determined by finding the value 𝜙0UL > 𝜙̂ for which the test statistic value is 𝑇 𝑆 = √4 = 2. 1-𝜎 uncertainties of flux points are calculated in the same way by finding the lower error 𝜙0LE < 𝜙̂ and higher error 𝜙0HE > 𝜙,̂ for which the test statistic value is 𝑇 𝑆 = √1 = 1. For an exemplary dataset of the Crab Nebula, the results of the binned Poisson log-likelihood approach are presented in Figure 4.5 on the axis of the differential energy flux multiplied by the sq𝐹uare of the energy𝐸2 d d𝐸 = 𝐸2 d𝑡d3𝑁 . (4.17)d𝐴d𝐸 In addition to the best-fit flux values and their uncertainties or the upper limit, the fit statistic difference is visualized in each energy bin. 0.0 Assumed spectral model Flux points −0.5 −10 10 −1.0 −1.5 −2.0 −11 10 −2.5 −3.0 −3.5 −12 10 −4.0 −1 0 1 10 10 10 Energy/TeV Figure 4.5: Visualization of the results from the binned Poisson log-likelihood approach applied to an exemplary Crab Nebula dataset: In each bin, the estimated flux points and 1-𝜎 uncertainties or 2-𝜎 UL are presented by orange markers. Also, the fit statistic difference is shown in each energy bin. Additionally, the assumed spectral model is presented by a gray line. 30 E2dF/dE/(erg cm−2s−1) Fit statistic difference 4.3 High-Level Analysis Lightcurve To investigate the time-dependency of the flux of a source, a so-called lightcurve is created. The calculation is equivalent to the calculation of flux points, but this time, the norm parameter 𝜙0 of the global spectral model is fitted in one energy bin, but in multiple time bins. The time bins can be chosen arbitrarily, but typically the lightcurve is calculated with run-wise or night-wise binning. For a weak source, it can make sense to choose even larger time bins due to low statistics, like month-wise or year-wise bins, and for a strong source with strong variability, smaller bins should be chosen dependent on the variability. 4.3.2 3D Morphological Analysis With a 3D analysis, not only the energy dependency but also spatial components are analyzed. To analyze parts of the sky including extended sources, DL3 datasets containing multi-offset full-enclosure IRFs are required. In order to create a reduced 3D dataset, a geometry with two spatial and one energy axis is defined. For each observation, a map dataset with this predefined geometry is created. In this step, typically the background model stored in the DL3 data is adjusted to the particular observation. The created map datasets can also be stacked into DL4 map dataset. To model sources in the FoV, for each one a source model containing a spectral and a spatial component have to be defined. The spectral component is handled as explained in the 1D analysis, for example, it can be described as a PL model (4.11) or a log-parabola model (4.12). For the description of spatial components, various models are implemented in Gammapy, for example: Point spatial model 𝐹(𝑙𝑜𝑛, 𝑙𝑎𝑡) = 𝛿(𝑙𝑜𝑛 − 𝑙 dependent on the longitude 𝑙𝑜𝑛 and the latitude 𝑙𝑎𝑜𝑡𝑛0, 𝑙𝑎𝑡 − 𝑙𝑎𝑡0) (4.18)and the source coordinates (𝑙𝑜𝑛0, 𝑙𝑎𝑡0). Disk spatial model 𝐹(𝑙𝑜𝑛, 𝑙𝑎𝑡) 1 1 for 𝜃 ≤ 𝑟0 dependent on the sky separation 𝜃= 2𝜋 (1 − cos(𝑟0)) ⋅ {0 for 𝜃 > 𝑟0 (4.19)from the center position (𝑙𝑜𝑛0, 𝑙𝑎𝑡0) and the radius 𝑟0. Based on a DL4 map dataset and the source models, Gammapy can calculate correlated excess, significance and flux maps. For this kind of morphological analysis, the DL3 data is required to contain background models. 31 32 Part II Spectral Analysis of the Radio Galaxies TXS 0149+710 and 4C +39.12 5 Introduction 35 6 Hunting TeV Radio Galaxies with the MAGIC Telescopes 37 7 Analysis of the Radio Galaxy TXS 0149+710 43 7.1 Data Inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 7.2 Validation of the Analysis Pipeline with Crab Nebula Data . . . . . . . . . . . . 46 7.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 8 Analysis of the Radio Galaxy 4C +39.12 55 8.1 Data Insepction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 8.2 Special Offset Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 8.3 Validation of the Analysis Pipeline with Crab Nebula Data . . . . . . . . . . . . 61 8.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 9 Conclusions and Future Prospects 67 33 Introduction 5 The exploration of black holes has captivated the human imagination, especially since the ground- breaking achievement of the first image of a black hole by The Event Horizon Telescope Collab- oration et al. 2019. Together with the first detection of a neutrino flux from a blazar (IceCube Collaboration 2018b), significant discoveries have been made in the field of AGN in recent years. With this, lots of fundamental questions were answered, but numerous new questions have arisen challenging scientists in different astronomical fields. As summarized in section 2.2, also many questions about AGN remain unanswered. TeV-detected radio galaxies are crucial in answering these questions since they offer unique opportunities for MWL observations of individual jet components and gamma flux, as described in section 2.2. Part II is about increasing the - up to now - small population of only six sources and is structured as follows: Chapter 6 introduces the proposal “Hunting TeV Radio Galaxies” and gives an overview of the two TeV radio galaxy candidates TXS 0149+710 and 4C +39.12. Chapter 7 and 8 present the MAGIC analyses of TXS 0149+710 and 4C +39.12, respectively. Standardized DL3 data including point-like single-offset IRFs are created with AutoMAGIC. For each source, a 1D spectral analysis, as described in subsection 4.3.1, is performed using Gammapy. Additionally, the analysis pipeline with AutoMAGIC and Gammapy is validated with analyses from the Crab Nebula data taken under various observational conditions. Chapter 9 gives concluding remarks and presents future prospects for the enlargement of the TeV-detected radio galaxy population. 35 36 Hunting TeV Radio Galaxies with the MAGIC Telescopes 6 A former study (Mender 2019) searches for a set of radio galaxies, for which there is a reasonable chance of detecting themwith theMAGIC telescopes. In this study, morphological information from the all-sky catalog of local radio galaxies (van Velzen et al. 2012) was combined with information about the GeV-gamma-ray emission from the Third Catalog of Hard Fermi-LAT Sources (3FHL) (Ajello et al. 2017). As a result, two sources – TXS 0149+710 and 4C +39.12 – were identified as promising TeV radio galaxy candidates. Observations of both sources with the MAGIC telescopes were suggested by the proposal named “Hunting TeV Radio Galaxies”. In the following, known characteristics of these sources delivered from different wavelengths are presented: Radio: TXS40.91G49H+z710 was observed with the Very Large Array1.(4VGLAH)zat a frequency of 1.4 GHzand (Lara et al. 2001). From the obtained image at , presented in Figure 6.1, it is visible that the morphology is dominated by one wide jet, but also a component assigned to a possible counter jet was detected. Additionally, the source was monitored by the 𝛽Moni=torin/g O=f0J.e2t8s6i±n 0A.0ct3i2ve galactic nuclei with VLBA Experiments (MOJAVE) program(Lister 𝑣et amax max 𝑐l. 2018) between 2017 and 2021. From this data, a maximum jet velocity ofwas derived by Lister et al. 2021. The radio morphology of 4C +39.12 was observed by Giovannini et al. 2001 with the Very- 1L5onpgc-Baseline Array (VLBA) and one single VLA antenna at a frequency of 5GHz. In theVLBA image, whi𝛽ch=is/sh>ow0.n5 in Figure 6.2, a one-sided jet is visible for more than 50 pc. Atfrom the core, a𝑣li𝑐mb-brightened structure of the jet could be present. The jet velocityis c𝛾on=st5rained to , s3o5°th≤e L𝜃orentzthe allowed rangeof , the allow1o.f0t1he≥v𝛿iewin≥g0a.n6g5le is coned rang𝛾e=5is 𝛾=5 ≤ 45 fa°ctor is co𝜃ns 1.15. Additionally,strained to . Assuming a Lorentz factor. In this scenario, the allowed range of the Doppler factor is . In conclusion, Giovannini et al. 2001 state that the source could be classified as intermediate or low-power BL Lac source, whose observed core power is too low to dominate the optical emission and is therefore classified as galaxy. Optical: In the optical spectrum of TXS 0149+710, measured with the Multiple Mirror Telescope, narrow spectral emission lines are present, whereas broad spectral emission lines are not (Marchã et al. 1996). This indicates, that the broad line region is obscured and therefore the viewing angle is tendentious large. Also, the redshift distances from the NED1𝑧li≈ste0d.0i2n Table 6.1 originate from optical observa-tions. Both sources have a redshift about and are therefore relatively close. 1NASA Extragalactic Database (NED): https://ned.ipac.caltech.edu/ 37 6 Hunting TeV Radio Galaxies with the MAGIC Telescopes Figure 6.1: VLA map of TXS 0149+710 at 1.4 GHz (Lara et al. 2001). The arrow marks the core position of the galaxy. −Fi0g.2ure 6.2: VLBA image of 4C +39.12 with natural weight at 5GHz. The Half PowerBeam5 0W.2i5dt, ,m0h.5J(yH, b0P.e7Ba5mW) is 6mas. The noise, 1−,1 1.5, 3, 5, 10, 20, 30, 5l0eve, 70l is 0.08mJ, and 100myJbyeabmea −m1,−a1nd the levels are. The unit of the colorbar is . Figure and caption originate from Giovannini et al. 2001. 38 (High-Energy) Gamma Rays: In an energy range from 10GeV to 2 TeV the 3FHL catalog (Ajello et al. 2017) offers infor- mation about variability and spectral shape. The variability analysis based on the Bayesian blocks method led to no evidence for time vari5a0biMliteyVin t1heTecVase of T𝛾XS 0149+710 and 4C+39.12. Thi1s3i.s93also c1onfirmed by the Fourth Fermi-LAT catalog of -ray sources (4FGL)(Abdollahi et al. 2020) i4n.2a2n energy range from to , from which the variabilityindices are and for TXS 0149+710 and 4C +39.12 respectively. Only a variability index above the threshold of 72.44 would indicate a < 1% chance of being a steady source. The 3FHL c𝜙atalog reports no significant curvature for the spectrum of both sources, thusthe spectral0flux can be described by a PL spectrum (4.11). The parameters PL index 𝛤,amplitude , and reference energy 𝐸0 are listed in Table 6.1. VHE Gamma Rays: Motivated by a detection of a 93GeV photon by Fermi-LAT, TXS 0149+710was observed by MAGIC during two nights in 2017 for a total observation time of 1.6 h without a detection. 410Cm+39.12was already obs9e9r.v9e%d between October 2000 and February 2001 with the WhippleT3e9le0sGcoepVe (de La Calle and VERITAS Collaboration 2001). 12.7 h of good-quality on-source data resulted in a confidence upper limit to the flux of 21 × 10−12 1/(cm2 s)above . Table 6.1:𝜙Redshift distance 𝑧 from𝐸NED and parameters of the PL spectrum from the3FHL catalog0 (Ajello et al. 2017) for the sources TXS 0149+710 and 4C +39.12: PL index 𝛤,amplitude , and reference energy 0. 𝑧 TXS 0149+710 4C +39.12𝛷𝛤𝐸00//G(1e0V−13cm−2GeV−1s−1) 34 01..092283.566 ±± 01.3 2 01.020227...38612 ±± 00..38 To estimate how much observation time is required for a detection with the MAGIC telescopes, a spectrum in the TeV range has to be assumed. For this, Mender 2019 extrapolated the 3FHL PL spectra from the GeV to the TeV range. Combined with an exponential term describing the EBL absorption, the following spectra are assumed according to (4.13): 𝐸2d𝐹/d𝐸(𝐸) −13 −2 −1 −1 𝐸 −(1.9±0.3)TXS 0149+710 = (⋅4ex±p1()−1𝜏0(𝐸, 0c.0m228G))eV s (33.566GeV) (6.1) 𝐸2d𝐹/d𝐸(𝐸) = (⋅2e.x3p±(−0.𝜏8()𝐸1,00−134C +39.12 .020cm2)−)2.GeV−1s−1 (27.61𝐸2GeV) −(1.8±0.3) (6.2) 39 6 Hunting TeV Radio Galaxies with the MAGIC Telescopes The PL paramete𝑧rs are those, listed in Table 6.1. The optical depth 𝜏 (𝐸, 𝑧) depends on the energy 𝐸and the redshift of the source. For the following calculations, the EBL modeling by Domıńguez et al. 2011 is used. In Figure 6.3, the data extracted from the 3FHL catalog and the assumed spectra is presented. Additionally, the MAGIC sensitivity (Aleksić et al. 2016b) for observations under low and medium zenith distances is shown. With this information, expected Li&Ma significances were calcula7te.7d𝜎by M3e0nhder 2019 using the MAGIC Source Simulator 2020 resulting in• 8.3 𝜎 for 30 h medium zenith distance observations of TXS 0149+710 and• for low zenith distance observations of 4C +39.12. The sensitivities of different zenith distance ranges were used, as for the MAGIC telescopes TXS 0149+710 is only visible in the medium zenith distance range whereby 4C +39.12 can also be observed under low zenith distance conditions. Initiated by the “Hunting TeV Radio Galaxies” proposal, observations of both sources have been performed in the time period from 2019 to 2023. Unfortunately, due to external circumstances such as the outbreak of the Covid-19 pandemic in 2020 as well as the volcanic eruption on La Palma in 2021, only ≈ 13 h of good-quality data were collected for each source. The results of all observations are presented in chapter 7 and chapter 8 for TXS 0149 and 4C +39.12 respectively. 40 TXS 0149+710 PL spectrum from 3FHL −10 10 PL spectrum + EBL absorption 3FHL catalog MAGIC sensitivity (low zenith) −11 10 −12 10 −13 10 1 2 3 4 10 10 10 10 Energy / GeV 4C +39.12 PL spectrum from 3FHL −10 10 PL spectrum + EBL absorption 3FHL catalog MAGIC sensitivity (med. zenith) −11 10 −12 10 −13 10 1 2 3 4 10 10 10 10 Energy / GeV Figure 6.3: Illustration of the spectral information of TXS 0149+710 (upper plot) and 4C +39.12 (lower plot) from the 3FHL catalog (Ajello et al. 2017): The flux points are presented by blue markers whereas the PL spectra are presented by dashed blue lines. The assumed spectra (6.1) and (6.2) composed by this PL spectrum and an EBL absorption factor are presented by solid blue lines. The grey bands indicate 1-𝜎 uncertainty regions. Additionally, the MAGIC sensitivity (Aleksić et al. 2016b) is presented by black markers. 41 E2dF/dE / (erg cm−2 s−1) E2dF/dE / (erg cm−2 s−1) 42 Analysis of the Radio Galaxy TXS 0149+710 7 The MAGIC analysis of TXS 0149+710 is performed using the software AutoMAGIC V0.2 and Gammapy v1.0.1, which are introduced in section 4.2 and section 4.3, respectively. For the analysis, MAGICDL3 data containing point-like single-offset IRFs are producedwith AutoMAGIC. All available data is inspected, and quality cuts are applied. Then the𝜃 analysis pipeline of AutoMAGIC andGammapy is validated with analyses of the Crab Nebula da2ta taken with multiple observationalconditions. Finally, the results of a 1D spectral analysis, a plot, a lightcurve and a SED of TXS 0149+710 are presented. 7.1 Data Inspection TXS 0149+710 was observed w93itGhetVhe MAGIC Telescopes for 17 nights. Table 7.1 lists the datesof those observations and the corresponding analysis periods. The observations in ST.03.08 weretriggered by a detection of a photon by Fermi-LAT, whereas all following observations were induced by the “Hunting TeV Radio Galaxies” proposal. To ensure good data quality, only observations taken under good weather conditions are selected for the analysis. For t9hkemdefinition of the selection criteria measurements of the LIDAR and thepyrometer, both introduced in subsection 3.4.5, ar0e.8used. The first criterion is the transmissionof the atm3o0sphere at , which has t9okbme above . If the LIDAR was not working during theobservation, the Cloudiness is used as selection criteria: in this case the Cloudiness value has tobe below . If neither transmission at nor Cloudiness is provided, the observations will not be used in the following analysis. In the two uppermost plots of Figure 7.1, the averaged transmission at 9 km and the averaged Cloudiness are shown for each run respectively. As a result of the data selection, rejected runs are displayed by orange markers whereas blue markers represent the runs used for the following analysi3s.5°In 5th0°e two lower plots of Figure 7.1, the averaged zenith distance and DC1 (see: sub-section 3.4.4) are shown. As visible, all observations were taken in the medium zenith distancerange ( – ). Furthermore, all selected runs are taken under moon0 or moon1 conditions (see: subsection 3.4.4). To take all observation conditions into account, the analysis is divided into three separate ones listed in Table 7.2. To validate the gamma/hadron separation and the energy and direction reconstruction of these analyses, Crab Nebula observations taken under the same observational conditions are analyzed. Those results are presented in section 7.2. 43 7 Analysis of the Radio Galaxy TXS 0149+710 Table 7.1: Overview of all MAGIC observations of TXS 0149+710. Analysis period Date of observation Comment 2017-08-30 ST.03.08 2017-09-14 2020-12-09 2020-12-19 2020-12-21 2020-12-22 ST.03.16 2021-01-21 2021-08-29 2021-08-30 2021-09-01 2022-01-09 ST.03.17 All data discarded 2022-01-10 2022-08-20 ST.03.18 All data discarded 2022-08-24 2022-12-21 ST.03.19 2022-12-24 MCs not available yet 2023-02-26 Table 7.2: Overview of all separate analyses, which are performed to analyze the data of TXS 0149+710. Analysis period Moon condition Zenith distance range ST.03.08 moon0 medium ST.03.16 moon0 medium ST.03.16 moon1 medium 44 7.1 Data Inspection Selected runs Rejected runs 1 0.8 0 NaN NaN 100 30 0 62 50 35 5 8 6 4 2 0 Run number Figure 7.1: Observational9ckomnditions of the MAGIC observations of TXS 0149+710. Theaveraged transm9ission at , the averaged Cloudiness, the averaged zenith distance,and the DC1 are shkomwn for each run respectively. The data selection is based on thetransmission at , and if this parameter is not available on the Cloudiness. The accepted and rejected value ranges are visualized by the green and red colored background, respectively. The blue markers represent the selected runs whereas rejected runs are displayed by orange markers. For the zenith distance and the DC1, dashed lines represent ranges in which different analyses are required. 45 Cloudiness Transmission @ 9 km / (10−6A) Zenith distance / degDC1 5093525 5093526 5093815 5093816 5093817 5093818 5093904 5093905 5093906 5093907 5093908 5093909 5093947 5093950 5093951 5093952 5093953 5093954 5093955 5093956 5093957 5094177 5094178 5094179 5094180 5099490 5099491 5099492 5099493 5099545 5099546 5099547 5099548 5099549 5099550 5099551 5099552 5099553 5099554 5099555 5099556 5066664 5066665 5066666 5066667 5066888 5066889 5100357 5100358 5100359 5100360 5100383 5100384 5100385 5100386 5104593 5104594 5104595 5104596 5104597 5104738 5104739 5104740 5104741 7 Analysis of the Radio Galaxy TXS 0149+710 7.2 Validation of the Analysis Pipeline with Crab Nebula Data To validate all analyses listed in Table 7.2, Crab Nebula runs taken under the same observational conditions are analyzed. In the analysis period ST.03.08, only tw9okCmrab Nebula observations (run numbers: 5066372,5066373) were taken under these observational conditions. Unfortunately, the weather conditionswere very bad (averaged transmission at : 0.29, 0.34), so the observation cannot be used for validation. Therefore, two observations (run numbers: 5061686, 5061687) from the previous analysis period ST.03.07 are used. In AutoMAGIC, it is not implemented to analyze observations from another analysis period. Thus, the MARS executable melibea and the magicDL3 converter are executed by hand. For this, MARS V2-19-14 and magicDL3 v0.1.9 were used. The corresponding magicDL3 configuration file can be found in section A.1. For the analyses of data from the analysis period ST.03.16, the corresponding DL3 data was created using AutoMAGIC V0.2, the corresponding configuration file can be found in section A.2. It should be noted that in the configuration file forced_coach_job_ids is set. This ensures that exactly the same coach jobs used for the analysis of TXS 0149+710 are used. This feature was implemented in AutoMAGIC for the validation of the analysis pipeline with Crab Nebula data. As a result of a 1D spectral analysis (see: subsection 4.3.1), Figure 7.2 shows the 𝜃2 distributions of the on and off events are for each analysis. The displayed Li&Ma significances show, that the Crab Nebula is detected in every case. To compare the analyses with a former analysis (Aleksić et al. 2015), lightcurves and SEDs are produced. The results shown in Figure 7.3 and Figure 7.4 indicate good agreement for each analysis. In the case of the moon analysis, it should be noted that the spectrum is a bit below the reference as visible in Figure 7.4c. This could be an effect of statistics as only 1.57 h of data is available. Also, it could be an effect of the moon analysis. All in all, the analyses of the Crab Nebula validate the analysis pipeline, which is therefore applied to the data of TXS 0149+710. The results of this analysis are presented in the next section. 46 7.2 Validation of the Analysis Pipeline with Crab Nebula Data 300 Non = 414 Non = 7929 Noff = 130 4000 Noff = 2424 200 σLi&Ma = 12.48 σLi&Ma = 55.53 tobs = 0.32 h tobs = 6.37 h 2000 100 On On Off Off 0 0 0.00 0.05 0.10 0.15 0.20 0.00 0.05 0.10 0.15 0.20 θ2 / deg2 θ2 / deg2 (a) ST.03.08, medium zenith, moon0. (b) ST.03.16, medium zenith, moon0. 800 Non = 1406 Noff = 405 600 σLi&Ma = 24.2 tobs = 1.57 h 400 On 200 Off 0 0.00 0.05 0.10 0.15 0.20 θ2 / deg2 𝜃2 (c) ST.03.16, medium zenith, moon0.F0.i1gTu𝑁erVe 7.23:0 TeVdistributions of the on and off events in the energy range ofto for observations of the Crab Nebula. The displayed values of 𝑁onand off are on and off counts, which survive the energy-dependent 𝜃2 cut. Additionally, the resulting Li&Ma significance, calculated by (4.9), and the total selected observation time are shown. Each plot presents the results for dedicated analysis conditions. 47 Counts Counts Counts 7 Analysis of the Radio Galaxy TXS 0149+710 10−10× 10−10× 1.5 1.5 1.0 1.0 0 Reference.5 0 5 Reference Run-wise binning . Run-wise binning 15 01 15 01 15 01 15 01 15 1− − − − − − − − −1 12 12 01 01 02 02 03 03 3:3 0 3:3 5 40 45 50 0− 0− −: : : 2 2 20 21 − 1− − − − − 3 3 3 0 0 2 2 1 21 21 21 2 2 2 2 2 2 2 20 20 20 20 20 20 20 Time on 2017-02-08 Date (a) ST.03.08, medium zenith, moon0. (b) ST.03.16, medium zenith, moon0. 10−10× Reference 1.5 Run-wise binning 1.0 0.5 01 01 01 01 01 1− 2− 1− − −1 1 0 02 03 20 − 20 − 1− − −2 21 21 20 20 20 20 20 Date (c) ST.03.16, medium zenith, moon1. Figure 7.3: Each plot presents the run-wise lightcurve of the Crab Nebula above 300GeV for dedicated analysis conditions. The fluxes are stable and in good agreement with the reference (2.2) of former observations (Aleksić et al. 2015), which is indicated by a grey dashed line. 48 Flux −1 −2E>300GeV/ (s cm ) FluxE>300GeV/ (s −1 cm−2) Flux / (s−1E>300GeV cm −2) 7.2 Validation of the Analysis Pipeline with Crab Nebula Data −10 −10 10 10 −11 −11 10 10 Reference Reference Gammapy fit Gammapy fit Gammapy flux points Gammapy flux points −12 −12 10 10 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (a) ST.03.08, medium zenith, moon0. (b) ST.03.16, medium zenith, moon0. −10 10 −11 10 Reference Gammapy fit Gammapy flux points −12 10 −1 0 1 10 10 10 Energy / TeV (c) ST.03.16, medium zenith, moon1. Figure 7.4: SED1s𝜎of the Crab Nebula for dedicated analysis conditions. The results arecompatible the reference (2.1) from former observations (Aleksić et al. 2015). The greybands indicate - uncertainty regions. 49 E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) 7 Analysis of the Radio Galaxy TXS 0149+710 7.3 Results In total, 13.24 h of observations of TXS 0149+710 were selected by the quality criteria presented in section 7.1. Up to DL3, the analysis is performed with AutoMAGIC V0.2. The corresponding configuration files can be found in A.3 and A.4 for the analysis periods ST.03.08 and ST.03.16, respectively. The followi𝑁ng high-level analysis is performed using Gammapy V1.0.1 (Aguasca-Cabot et al. 2023). To avoid the effects of a non-symmetric acceptance, one off region symmetricto the on region is used: Off-regions = 1. As displayed in Figure 7.5, applying the Li&Ma formula (4.9) gives a significance of 𝜎Li&Ma = 0.32. Thus, neither a hint of detection nor a detection can be claimed. In Figure 7.6, the r detected in any individual b UL at a confidence level of𝑇9 u5n%-w(i𝐸seda𝐹n/ddy𝐸e)ar-wise lightcurve UL are shown. Th𝐸e2sdo𝐹u/rce was notin. Det2ailed information about the resulting best fit d𝐸 and theUL can be found in Table 7.3. For the calculations, the s5p.4e2cTtreuVm described by (6.√1),𝑆consisting of a PL spectral model and an EBL absorption factor, wasassumed. As visible, the value is significantly negative for the energy bin from 3.06 TeV toresulting in a negative upper limit value. This result is non-physical and most probably caused by a statistical effect. All physical ULs of the differential energy spectrum are presented in Figure 7.7. For comparison, the data points and the PL spectrum from the 3FHL catalog are displayed (Ajello et al. 2017). The MAGIC results generated with this analysis are consistent with the Fermi-LAT data points and the assumed spectrum. In Figure 7.8, the results are presented in an overall multi-wavelength context. A two-humped structure, as described in section 2.2 can be recognized. Table 7.3: Information about the √𝑇𝑆 value, whether the result is an upper limit, the best-fit value 𝐸2d𝐹/d𝐸, and the upper limits (𝐸2d𝐹/d𝐸)UL at a confidence level of 95.00 % 𝐸 in each energy bin for TXS 0149+710./_min 𝐸/_max √𝑇𝑆 is_ul0T.e1V0 0T.e1V8 / (103 𝐸2d𝐹/d𝐸 TeV cm−2 s−1) / (1(0𝐸32d𝐹/d𝐸)ULTeV cm−2 s−1) 0.18 0.31 n0.31 0.55 −00 a.9n2 False na.80 True −49..62 n3 × nan 0.55 0.98 −0.18 True −7.190 ×× 11 10− 00−−11 16 nan 76 76..0895 ×× 1100−−16 10..798 1.73 0.41 True 16 True 1.22 × 10−16 3.063 53..4026 −31..4585 True −84..3461 ×× 1100−−1166 −1 7.15 × 10−16 5.42 9.59 −0.24 True −7.91 × 10−17 64 ..0.00 2 85 × ×× 1 11 00−−1165 169..9569 3106..09 True 06 −11..0193 True −11..3919 ×× 1100−−1166 8.20 × 10 0−−1166 True nan 50 7.3 Results 1600 On Off 1400 1200 1000 800 600 400 Non = 4588 Noff = 4557 σ = 0.32 200 Li&Ma tobs = 13.24 h 0 0.000 0.025 0.050 0.075 0.100 0.125 0.150 0.175 0.200 θ2 / deg2 0F.i1gTuerVe𝑁7.53:0 T𝜃 2e𝑁Vdistributions of the on and off events in the energy range ofto for all selected observations of TXS 0149+710. The displayed val-ues of on and off are on and off counts, which survive the energy-dependent 𝜃2 cut. Additionally, the resulting Li&Ma significance, calculated by (4.9), and the total selected observation time are shown. 51 Counts 7 Analysis of the Radio Galaxy TXS 0149+710 −12 ×10 Night-wise binning 5 Year-wise binning 4 3 2 1 0 01 01 01 01 01 01 1− 1− 1− 1− 1− −0 0 0 0 0 01 7− 8− 9− 0− 1− 2− 20 1 20 1 20 1 20 2 2 2 20 20 Date Figure 7.6: Night-wise and year-wise lightcurve of TXS 0149+710. The obtained 2-σ ULs are calculated assuming the spectrum given by (6.1), consisting of a PL spectral model and an EBL absorption factor. 52 Flux / (s−1 −2E>300GeV cm ) 7.3 Results PL spectrum from 3FHL −10 10 PL spectrum + EBL absorption 3FHL catalog MAGIC (this work) −11 10 −12 10 −13 10 1 2 3 4 5 10 10 10 10 10 Energy / GeV Figure 7.7: Upper limits at a confidence level of 95 % for the SED of TXS 0149+710. For this calculation, the spectrum (6.1), consisting of a PL spectral model and an EBL absorption factor, is assumed. For comparison, the data points from the 3FHL catalog are displayed (Ajello et al. 2017). −9 10 −11 10 −13 10 −15 10 NED MAGIC (this work) Fermi 3FHL Fermi 4FGL −17 10 −15 −12 −9 −6 −3 0 3 10 10 10 10 10 10 10 Energy / GeV Figure 7.8:Multi-wavelength SED of TXS 0149+710 consisting of information from NED, the 4FGL (Abdollahi et al. 2020) and the 3FHL (Ajello et al. 2017) catalogs and MAGIC UL. 53 2 −2 −1 E2dN/dE / (erg cm−2 s−1) E dF/dE / (erg cm s ) 54 Analysis of the Radio Galaxy 4C +39.12 8 The MAGIC analysis of 4C +39.12 is performed very similarly to the analysis of TXS 0149+710 presented in chapter 7 using the software AutoMAGIC V0.2 and Gammapy v1.0.1, which are intro- duced in section 4.2 and section 4.3, respectively. Due to incorrect pointing, however, there is a peculiarity in the data that must be taken into account in this analysis. In the following, available data is inspected and the adapted analysis is presented in particular. Again, resulting analyses are validated by analyses of the Crab Nebula data taken under similar observational conditions. Finally, the results of a 1D spectral analysis of 4C +39.12 are presented. 8.1 Data Insepction Table 8.1: Overview of all MAGIC observations of 4C +39.12. Analysis period Date of observation Comment 2019-10-28 2019-10-29 2019-10-30 2019-11-03 ST.03.12 Regular pointing 2019-11-04 2019-11-26 2019-11-28 2019-11-29 2019-12-21 2019-12-22 2019-12-23 ST.03.12 2019-12-24 Irregular pointing 2019-12-28 2019-12-31 2020-01-03 The MAGIC observations of 4C +39.12 were performed in the nights between 2019-10-28 and 2020- 01-03, which are all listed in Table 8.1. All observations were induced by the ”Hunting TeV radio galaxies” proposal. From the night of 2019-12-20 on, the observations were performed with the wrong settings of the source position. In Figure 8.1, the pointing positions of the regular and also the irregular observations are shown. As visible, some offsets from the irregular pointing positions 55 8 Analysis of the Radio Galaxy 4C +39.12 to the source position deviate significantly from the standard of 0.04.°1. 6In° Table 8.2, the observationdurations are listed for the different wobble offsets. For those non-standard observations, thefollowing procedures are used: Observations with an offset of are discarded because all potential off regions are too close to the source position and could therefore contain gamma rays originating from the source. Observations with an offset of 0.42° are analyzed with the standard analysis using standard-ringwobble MCs. For observations with an offset of 0.53° and 0.66° an adjusted analysis is applied, which is presented in section 8.2. Table 8.2: Overview of the durations of the 4C +39.12 observations. Wobble positions Wobble o0.ff4set / deg Observation duration / hRegular pointings W1, W2, W′ 3, W4 8.40W1′ 00..5432 2.05W2 1.74 Irregular pointings W3′′ 00..6166 1.66W4 2.06 All observations 15.92 W1′ ◦ ′ W1 39 45 ′ 30 W3′ W4′ W3 W4 ′ 15 W2′ ′ 00 4C +39.12 W2 4C +39.12 h m m m m m m h m m m m m m 3 37 36 35 34 33 32 3 37 36 35 34 33 32 Right Ascension Right Ascension Figure 8.1: Pointing positions of the observations of 4C +39.12, whose position in the sky is represented by an orange star. In the case of regular wobble observations (left side), the pointing positions have an offset of 0.4° to the source position. Due to a mistake during telescope operations, some observations were performed with the wrong source position. This leads to wobble positions with irregular offsets to the source position (right side) and the need for an adjusted analysis. In both plots, the regular pointing positions are marked by blue crosses, while the irregular pointing positions are marked by green crosses. 56 Declination 8.1 Data Insepction Selected runs Rejected runs 1 0.8 0 NaN NaN 100 30 0 62 50 35 5 8 6 4 2 0 Run number Figure 8.2: Observationa9lkcmonditions of the MAGIC observations of 4C +39.12. Theaveraged transm9isksimon at , the averaged Cloudiness, the averaged zenith distance,and the DC1 are shown for each run respectively. The data selection is based on thetransmission at , and if this parameter is not available on the Cloudiness. The accepted and rejected value ranges are visualized by the green and red colored background, respectively. The blue markers represent the selected runs whereas rejected runs are displayed by orange markers. For the zenith distance and the DC1, dashed lines represent ranges in which different analyses are required. Runs with a wobble offset of 0.16° are not shown. 57 Cloudiness Transmission @ 9 km / (10−6A) Zenith distance / degDC1 5086253 5086254 5086255 5086301 5086302 5086303 5086336 5086337 5086338 5086339 5086340 5086341 5086342 5086343 5086392 5086393 5086449 5086450 5086451 5086893 5086894 5086895 5086896 5087038 5087039 5087040 5087041 5087042 5087043 5087044 5087495 5087497 5087498 5087499 5087501 5087502 5087503 5087505 5087535 5087536 5087611 5087612 5087640 5087752 5087754 5087755 5087932 5088095 5088096 8 Analysis of the Radio Galaxy 4C +39.12 Furthermore, the transmission of the atmosphere at 9 km and the Cloudiness are considered to ensure high-quality data. The same selection criteria as in the analysis of TXS 0149+710 are applied (see section 7.1). The overall data selection is illustrated in Figure 8.2, where also the observational conditions in terms of zenith distance and DC1 are presented. All observations are performed under dark5c°ond3i5t°ions (moon0: 0 µA – 2.2 µA), where some runs are t3a5k°en5in0°the lowzenith distance range ( – ) and others in the medium zenith distance range ( – ). All in all, four different analyses listed in Table 8.3 have to be performed. Those are validated by analyses of the Crab Nebula presented in section 8.3. Table 8.3: Overview of all separate analyses, which are performed to analyze the data of 4C +39.12. Analysis period Moon condition Zenith distance range MC set ST.03.12 moon0 low ring-wobble ST.03.12 moon0 low diffuse ST.03.12 moon0 medium ring-wobble ST.03.12 moon0 medium diffuse 8.2 Special Offset Analysis To analyze a point source like 4C +39.12, DL3 data with point-like single-offset IRFs are created. In the case of a standard offset of 0.4° ring-wobble MCs are used. To analyze observations with a non-standard wobble offset, diffuse MCs have to be used. Before, it w0.a4s°not implemented in themagicDL3 converter to create single-offset IRFs for other offsets than . In contrast to multiple- offset IRFs, single-offset IRFs have the advantage that the edges of the single offset can be adjusted to be centered around the offset where the point source was observed. To take advantage of this, I implemented th0i.s4°option to the magicDL3 converter and the version v0.0.11 was released. Withthis, IRFs are then calculated in single offset bins, whose limits are listed in Table 8.4. The valuesfor an offset of are only used for t not for the actual analysis of 4C +390h.4e°analysis of Crab Nebula data in section 8.3 for validation,.12 observations, where the standard analysis is applied toobservations with a wobble offset of . Furthermore, the parameter range of rad_max (see subsection 4.1.2) has to be adapted for non- standard wobble observation. To avoid overlapping on and off regions, the upper edge of the parameter range has to be calculated depending on the wobble_offset and the number of off regions 𝑁off-regions. The𝑁geometric=c3onsiderations for the calculation of rad_max are visualized inFigure 8.3 for the case off-regions . Th𝜙e=drawn a𝜋ngle𝑁 (8.1)𝑁 off-regions + 1depends on the off-regions. With this, the maximum allowed value𝜋of rad_max is calculated asrad_maxmax = wobble_offset ⋅ sin (𝑁 ) . (8.2)off-regions + 1 58 8.2 Special Offset Analysis Thus, the maximum allowed value of rad_max is equal to the wobble_offset in the case that only one off position is selected. For the most common case of 𝑁off-regions = 3 the resulting maximal allowed valu≈es0.o1f°rad_max are listed in Table 8.5, for all different values of the wobble_offset ofthis dataset. The lower end is constrained by the PSF of the telescope, which is in case of MAGICrad_maxmin (Aleksić et al. 2016b). The described adaption for non-standardwobble observations has been implemented to AutoMAGIC and can thus be performed in an automated and reproducible procedure. Table 8.4: Offset range of point-like single-offset IRFs produced from diffuse MCs. wobble_offset / deg dl3.minOffset / deg dl3.maxOffset / deg 0.4 0.3 0.48 0.53 0.48 0.58 0.66 0.61 0.71 On region W1 ◦ ′ 40 20 Off regions 4C +39.12 ′ 00 r a d _ m a x φ wobble_offset ◦ ′ 39 40 ′ 20 h m m m m 3 38 36 34 32 Right Ascension Figure 8.3: Illustration of the on and off regions in case of 𝑁off-regions = 3. Dependent on the wobble_offset the maximal allowed value of rad_max can be calculated. 59 Declination 8 Analysis of the Radio Galaxy 4C +39.12 T𝑁abl=e 83.5: Parameter range of rad_max dependent on the wobble_offset for the caseOff . wobble_o0f.f4set / deg rad_maxmin / deg rad_maxmax / deg00..5636 0.1 0.280.1 0.370.1 0.47 0.45 Offset: 0.4 deg Offset: 0.53 deg 0.40 Offset: 0.66 deg 0.35 0.30 0.25 0.20 0.15 0.10 −2 −1 0 1 10 10 10 10 Eest / TeV 0F.i4g°u0r.e538°.4: En0e.r6g6y° dependency of the parameter rad_max calculated for multiple offsets, and . The allowed parameter range for each offset is listed in Table 8.5. 60 rad_max / deg 8.3 Validation of the Analysis Pipeline with Crab Nebula Data 8.3 Validation of the Analysis Pipeline with Crab Nebula Data To valida0te.4all required analyses listed in Table 8.3, Crab Nebula data from ST.03.12 taken underlow and med° ium zenith distances are analyzed. As only Crab Nebula data with a standard wobbleoffset of is available, these data is analyzed twice: once using models trained with standard ring-wobble MCs and once using models trained with diffuse MCs. Up to DLs data, the analyses are performed with AutoMAGIC V0.3 using the configu𝜃r2ation files provided in section A.5 andsection A.6. In Figure B.2, Figure B.5 and Figure B.7 the distributions, lightcurves and SEDs are presented, respectively. As visible, the results are in good agreement with the reference (Aleksić et al. 2015) and also the adapted analysis using diffuse MCs is producing almost the same results as the standard analysis. 60000 Non = 82632 Non = 21533 Noff = 26421 10000 Noff = 6901 40000 σLi&Ma = 174.4 σLi&Ma = 88.9 tobs = 58.02 h tobs = 15.92 h 5000 20000 On On Off Off 0 0 0.00 0.05 0.10 0.15 0.20 0.00 0.05 0.10 0.15 0.20 θ2 / deg2 θ2 / deg2 (a) ST.03.12, low zenith, moon0, ring-wobble MC. (b) ST.03.12, medium zenith, moon0, ring-wobble MC. Non = 81701 Non = 20169 Noff = 26664 10000 Noff = 6184 40000 σLi&Ma = 171.17 σLi&Ma = 88.41 tobs = 58.02 h tobs = 15.92 h 5000 20000 On On Off Off 0 0 0.00 0.05 0.10 0.15 0.20 0.00 0.05 0.10 0.15 0.20 θ2 / deg2 θ2 / deg2 (c) ST.03.12, low𝜃2zenith, moon0, diffuse MC. (d) ST.03.12, medium zenith, moon0, diffuse MC.F0.i1gTu𝑁erVe 8.53:0 TeVdistributions of the on and off events in the e𝜃nergy range fromto for observations of the Crab Nebula. The displa2yed values of 𝑁onand off are on and off counts, which survive the energy-dependent cut. Additionally, the resulting Li&Ma significance, calculated by (4.9), and the total selected observation time are shown. Each plot presents the results for dedicated analysis conditions. 61 Counts Counts Counts Counts 8 Analysis of the Radio Galaxy 4C +39.12 ×10−10 10−10× 1.5 1.5 1.0 1.0 0 5 Reference 0 5 Reference. . Run-wise binning Run-wise binning 01 01 01 01 01 01 01 01 01 01 0− 1− 2− 1− − − − − − −1 1 1 0 02 10 11 12 01 02 9− 9− 9− 0− 0− 9− 9− 9− − − 01 01 01 02 02 01 01 01 02 0 02 0 2 2 2 2 2 2 2 2 2 2 Date Date (a) ST.03.12, low zenith, moon0, ring-wobble MC. (b) ST.03.12, medium zenith, moon0, ring-wobble MC. 10−10 −10× ×10 1.5 1.5 1.0 1.0 0 5 Reference 0 Reference. .5 Run-wise binning Run-wise binning 01 01 01 01 01 01 01 01 01 01 10 − − 11 12 − 01 − − − − 02 10 11 12 − 1− 2−0 0 19 − 19 − 19 − 20 − 20 − 9− 9− 9− −1 1 1 20 20 − 20 20 20 20 20 20 20 20 20 20 Date Date (c) ST.03.12, low zenith, moon0, diffuse MC. (d) ST.03.12, medium zenith, moon0, diffuse MC. Figure 8.6: Each plot presents the run-wise lightcurve of the Crab Nebula above 300GeV for dedicated analysis conditions. The fluxes are stable and in good agreement with the reference (2.2) of former observations (Aleksić et al. 2015) which is indicated by a grey dashed line. 62 Flux −1 −2E>300GeV/ (s cm ) Flux −1 E>300GeV/ (s cm −2) Flux −1 −2 −1 −2E>300GeV/ (s cm ) FluxE>300GeV/ (s cm ) 8.3 Validation of the Analysis Pipeline with Crab Nebula Data −10 −10 10 10 −11 −11 10 10 Reference Reference Gammapy fit Gammapy fit Gammapy flux points Gammapy flux points −12 −12 10 10 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (a) ST.03.12, low zenith, moon0, ring-wobble MC. (b) ST.03.12, medium zenith, moon0, ring-wobble MC. −10 −10 10 10 −11 −11 10 10 Reference Reference Gammapy fit Gammapy fit Gammapy flux points Gammapy flux points −12 −12 10 10 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (c) ST.03.12, low zenith, moon0, diffuse MC. (d) ST.03.12, medium zenith, moon0, diffuse MC. Figure 8.7: SED1s𝜎of the Crab Nebula for dedicated analysis conditions. The results arecompatible with a reference (2.1) of former observations (Aleksić et al. 2015). The greybands indicate - uncertainty regions. 63 E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) 8 Analysis of the Radio Galaxy 4C +39.12 8.4 Results In total, 13.74 h of observations of 4C +39.12 were selected applying quality criteria presented in section 8.1. Up to DL3, the analysis is performed with AutoMAGIC V0.3 using the configuration file in section A.7. The following high-level analysis is performed identically as the analysis of TXS 0149+710, presented in section 7.3. As visible in Figure 8.8, also for 4C +39.12 neither a detection nor a hint for a detection can be claimed as the calculated significance is 0.98 σ. The 3re.0s6ulTtienVg lig5h.t4c2uTrveVe, presented in𝑇F𝑆ig=ur2e.680.9, shows that the source was not flaring in a singlenight. Spectral information𝑇 𝑆is=sh2o√wn in Figure 8.10 and summarized in Table 8.6. In the b𝑇i𝑆n fromto a va√lue of 5 was calculated. Technically, this value is over theupper limit threshold of . But as the source was not detected overall and the √ valueis not above the detection limit of , the datapoint should be considered as a statistic effect. In comparison to the data points and the PL spectrum from the 3FHL catalog (Ajello et al. 2017), one MAGIC UL excludes the direct extrapolation of the PL model. This is most likely due to the EBL absorption or an intrinsic effect of the source. In Figure 8.11, the results of 4C +39.12 are shown in a multi-wavelength context. Also for this source, a two-humped structure, as described in section 2.2 can be recognized. 3000 On Off 2500 2000 1500 1000 Non = 5000 Noff = 4902 500 σLi&Ma = 0.98 tobs = 13.74 h 0 0.000 0.025 0.050 0.075 0.100 0.125 0.150 0.175 0.200 θ2 / deg2 F0.i1gTuerVe 8.83:0 T𝜃2𝑁 eVdistributions of the on and off events in the e𝜃nergy range fromto for all selected observations of 4C +39.12. The displ2ayed values of 𝑁onand off are on and off counts, which survive the energy-dependent cut. Additionally, the resulting Li&Ma significance, calculated by (4.9), and the total selected observation time are shown. 64 Counts 8.4 Results −12 ×10 Night-wise binning 8 6 4 2 0 01 15 01 15 01 − − − 11 11 12 12 − − 01 9− 9−1 1 19 − 19 − − 0 0 0 2 0 2 2 2 20 20 Date Figure 8.9: Night-wise lightcurve of 4C +39.12. The obtained 2 σ upper limits are calculated assuming the spectrum (6.2), consisting of a PL spectral model and an EBL absorption factor. Table 8.6: In𝐸fo2rdm𝐹a/tdi𝐸on about the √𝑇𝑆 value, whether the result is an upper limit, thebest-fit value , and the upper limits (𝐸2d𝐹/d𝐸)UL at a confidence level of 95.00 % 𝐸 in each𝐸energy bin√f𝑇or𝑆4C +39.12./_min /_max is_ul / (103𝐸2d𝐹/d𝐸−2 −1) / (1(0𝐸32d𝐹/d𝐸)UL0T.e1V0 0T.e1V8 0.30 TeV cm s TeV cm−2 s−1)0.18 0.31 0.37 True 4.84 × 10−16 nan0.31 0.55 0.04 True 32..1021 ×× 1100−−1167 11..918 × 10−150 True0..5958 01..9783 11..7254 True 74..2388 ×× 1100−−1166 11..5 26 ×× 1100−−1155 13..7036 35..06 −0.15 True 42 2.60 True −14..083 × 10−17 17 × 10−15 5.42 9.59 0.95 False 6.541 ×× 1100−−1156 1 6..1.9 243 ×× 1100−−1156 196..5996 1360..9060 00..00 True 00 True −−21..9260 ×× 110−1 54 0−293 8.51 ×× 1100−−1156 True nan 65 Flux −1 −2E>300GeV/ (s cm ) 8 Analysis of the Radio Galaxy 4C +39.12 PL spectrum from 3FHL −10 10 PL spectrum + EBL absorption 3FHL catalog MAGIC (this work) −11 10 −12 10 −13 10 1 2 3 4 5 10 10 10 10 10 Energy / GeV Figure 8.10: Upper limits at a confidence level of 95 % for the SED of 4C +39.12. For this calculation, the spectrum described by (6.2) consisting of a PL spectral model and an EBL absorption factor is assumed. For comparison, the data points from the 3FHL catalog are displayed (Ajello et al. 2017). −9 10 −11 10 −13 10 −15 10 NED MAGIC (this work) Fermi 3FHL Fermi 4FGL −17 10 −15 −12 −9 −6 −3 0 3 10 10 10 10 10 10 10 Energy / GeV Figure 8.11:Multi-wavelength SED of 4C +39.12 consisting of information from NED, the 4FGL (Abdollahi et al. 2020) and the 3FHL (Ajello et al. 2017) catalogs and MAGIC UL. 66 2 E2dN/dE / (erg cm−2 s−1) E dF/dE / (erg cm −2 s−1) Conclusions and Future Prospects 9 For the first time, the tools AutoMAGIC and Gammapy are used to perform and validate a MAGIC analysis. In particular, the offset analysis and the validation of specific coach jobs were implemented in AutoMAGIC. The analyses of Crab Neb workflow. For each TXS 0149+710 and 4C +39.12, 3u0lha datasets validate the automatic and reproducibleof observation 1ti3mhe with the MAGIC telescopes wasrequested. Due to external circumstances such as the outbreak of the COVID-19 pandemic in 2020and the volcanic eruption on La Palma in 2021, only approx good-quality data was taken for each source. By analyzing the data, neither a detection nor a hint for a detection could be found. Nevertheless, the determined spectral upper limits can be taken into account for further theoretical considerations. Additional MAGIC observations of the MAGIC telescopes or a combination with observations from other current-generation IACT telescopes like VERITAS could gain stricter upper limits or even detections of these sources. In the next years, the future-generation IACT observatory CTA will be built and start operations. According to the description of the key science project “Extragalactic Survey” of CTA, detections of several new radio galaxies are expected (Science with the Cherenkov Telescope Array 2018). Angioni 2020 simulated CTA observations of local radio galaxies based on the 4FGL catalog. Assuming a high-energy cutoff at 𝐸cut = 0.5 TeV, the study predicts that CTA will be able to detect eleven new TeV radio galaxies. Among these sources would be TXS 0149+710 and 4C +39.12 as well as the first FR II objects ever detected in the TeV range. New opportunities to analyze and understand the emission and acceleration mechanisms of AGN will arise with an enlargement of the TeV radio galaxy population This enhancement will have an enormous impact on the process of completing the overall picture of AGN. 67 68 Part III Construction of Background Models for the MAGIC Telescopes 10 Introduction 71 11 Methods for Background Estimation 73 11.1 Background from Wobble Observations . . . . . . . . . . . . . . . . . . . . . 73 11.2 Background from Non-Simultaneous Off Data . . . . . . . . . . . . . . . . . . 74 11.3 Adaption of Background Models with Gammapy . . . . . . . . . . . . . . . . . 74 12 Systematic Effects on the Background 77 12.1 The MAGIC Telescopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 12.2 The Geomagnetic Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 12.3 The Atmosphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 12.4 The Night Sky Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 13 Background Shape Characterization 85 13.1 Statistical Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 13.2 Observational and Simulated Datasets . . . . . . . . . . . . . . . . . . . . . . 87 13.3 Energy Dependence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 13.4 Azimuth-dependent Rotation of the Background Shape . . . . . . . . . . . . . 93 13.5 Zenith Distance Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . 103 14 Creation of Background Models 107 14.1 Creation of Initial Background Models . . . . . . . . . . . . . . . . . . . . . . 107 14.2 Comparison of binning-method and rotation-method Background Models . . . 108 14.3 Background Rate Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . 112 14.4 Final Background Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 15 Validation 119 15.1 Creation of Map Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 15.2 Spectral and Spatial Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 15.3 Creation of Significance Maps . . . . . . . . . . . . . . . . . . . . . . . . . . 124 16 Conclusions and Future Prospects 127 69 Introduction 10 As shown in Part II, the combination of AutoMAGIC and Gammapy is capable of analyzing point sources with a well-known source position. Nevertheless, sometimes the exact position of a source is unknown, like in the case of follow-up observations of neutrino and gravitational-wave events. The uncertainty region of the estimated coordinates of a neutrino or a gravitational-wave alert is often larger than the FoV of the MAGIC telescopes. Unless no counterpart was found in other wavelengths, the source could be anywhere in the MAGIC FoV. Thus, a spatial analysis creating 2D skymaps over the whole energy range or in multiple energy bins is required. As described in subsection 4.3.2, this can be done with Gammapy if DL3 data is available, which contains full-enclosure multi-offset IRFs including background models. Furthermore, it is a requirement for analyses with a 3D likelihood approach, also described in subsection 4.3.2. With this, it is possible to analyze point-like and extended sources at any position in the FoV. Furthermore, it becomes possible to describe a source using multiple spectral components as it has already been done by Mohrmann et al. 2023. Up to now, MAGIC DL3 data containing full-enclosure multi-offset IRFs created by AutoMAGIC do not contain background models. As no software creates background models for any observational condition and could easily be integrated into AutoMAGIC exists, new methods need to be developed. In Part III, the background detected by the MAGIC telescopes is characterized and, based on the results, a new method for the generation of background models is developed. In particular, this part is structured as follows: Chapter 11 explains different methods for the estimation of background models as well as their advantages and disadvantages. Additionally, the current capabilities of Gammapy to adapt a background model to a specific observation are presented. Chapter 12 lists and explains systematic effects, which are expected to affect the gamma-like background of MAGIC observations: the geometry of the telescope configuration of MAGIC, Earth’s magnetic field, the atmosphere and the NSB. Chapter 13 presents the results of the background shape characterization dependent on the reconstructed energy and the azimuth and zenith distance of the pointing position. The presented studies are based on a DL3 dataset of 1441 observations processed with AutoMAGIC. The dependency of the orientation of the background shape is also investigated with MC simulations. Chapter 14 introduces a newway to create azimuth backgroundmodels based on non-simultaneous off data (NSOD). The results are compared with background models created from NSOD using a more conventional method. Additionally, background rate dependencies on zenith distance, the 71 10 Introduction transmission of the atmosphere, the NSB, and the galactic latitude are investigated. Finally, a new approach to creating background models depending on the azimuth and zenith distance is presented. Chapter 15 validates the created background models by analyses of Crab Nebula observations. Chapter 16 gives concluding remarks and shows which further steps can be taken to create backgroundmodels for all MAGIC observations. Additionally, the resulting possibilities for physical analyses are presented. 72 Methods for Background Estimation 11 As introduced in chapter 4, GADF-conform background models are a prerequisite for a morpholog- ical analysis with Gammapy. In general, there are two different approaches to create background models for specific observations. On the one hand, there are methods of estimating a background from wobble observations itself. On the other hand, background models can be estimated from non-simultaneous off data observations. Both approaches are presented in this chapter and their advantages and disadvantages are listed. Additionally, it is introduced how Gammapy can be used to adapt background models to a specific observation. 11.1 Background fromWobble Observations The creation of background models from wobble observations themselves is the default way to analyze MAGIC data up to now. As introduced in section 4.2, the analysis of MAGIC data is traditionally performed with the proprietary software MARS, which includes the executable caspar for the creation of 2D images, so-called sky maps. For this, caspar estimates background maps from the observational data itself by using half of the measured map opposite to the source position in each wobble observation. This procedure is called wobble method (Zanin 2013). In addition to the wobble method, the blind method is implemented in caspar. For the creation of a background map with this method, no source position has to be assumed. At least two observations of two opposite wobble positions are required, which are transformed into normalized histograms with axes of the FoV. In the case of two wobble positions, both histograms are compared bin by bin, and for each bin the lower value is used for the creation of the background map. The resulting map is corrected by an upward correction. In the case of three or more wobble positions, the median value is selected for each bin. If the observations have a very strong source in the FoV, the background will be overestimated. For an advanced 2D analysis, the MAGIC SkyPrism package was developed (Vovk, I. et al. 2018), using a maximum-likelihood approach for testing source models. Here, also methods of creating background models from wobble observations are implemented: the wobble method and the blind method as in caspar, and additionally, the exclusion method. In the latter case exclusion regions have to be defined, in which gamma-ray sources are expected. Outside those exclusion regions, the background map is estimated as with the blind method choosing the median value for each bin. Independent of the executables caspar and Skyprism, the estimation of background models from wobble observations has certain advantages and disadvantages: 73 11 Methods for Background Estimation Advantages: • Well-validated methods used for lots of publications (e.g. V. A. Acciari et al. 2023, V. Acciari et al. 2022, Ahnen et al. 2018). • The background is estimated from data taken under the same observational conditions. Disadvantages: • Using the wobble method or the exclusion method, assumptions about the spatial models of the gamma-ray sources in the FoV are required. • In case of a source extended over a large part of the FoV, the methods cannot be used. • The observations have to be taken with the wobble mode. 11.2 Background from Non-Simultaneous Off Data For the production of background models, also NSOD can be used. With this attempt, observations of empty fields or observations of known gamma-ray point sources, whose emission regions are excluded, are used. In general, the creation of background models from NSOD has the following advantages and disadvantages: Advantages: • Method can be used for sources extended over a large part of the FoV. • Can be applied to observations taken with the on mode or the wobble mode. • For the creation of an excess skymap, no spatial assumptions about the model of the gamma-ray source or sources in the FoV are required. Disadvantages: • NSOD matching the analysis conditions have to be selected. • For some observations, no matching NSOD may be found. Most advantages and disadvantages are opposite to the ones of background models from wobble observations. At first glance, it may seem that the advantages of using NSOD far outweigh the disadvantages, since “only” the matching off observations to the observation to be analyzed must be found. In practice, however, this is a great challenge, because the background depends on many parameters. In the next chapter, these parameters and the expected dependencies are presented. Based on off observations, the dependencies of the shape and the rate of the background are investigated in chapter 13 and section 14.3, respectively. 11.3 Adaption of Background Models with Gammapy In Gammapy, different methods for adjusting the background model stored in DL3 data to a specific observation are implemented. Especially with background data created by NSOD, it can be reasonable to adjust the background model to the conditions of the observation itself. This requires the definition of exclusion regions to adjust the background outside these regions. The FoVBackgroundMaker implemented in Gammapy normalizes the background model stored in the DL3 data to the dataset counts outside a given exclusion region. This can be done by the 74 11.3 Adaption of Background Models with Gammapy “scale method” and by the “fit method”. Also, a norm spectral model has to be provided. By default, the spectral shape of the background model remains unchanged and only a norm parameter 𝜙0 is fitted to the data. However, any other norm spectral model can be used, e.g. a piece-wise norm spectral model, where multiple norm parameters are adjusted to the data in multiple energy bins, which allows changes in the spectral shape. 75 76 Systematic Effects on the Background 12 The gamma-like background detected by the MAGIC telescopes is influenced by several systematic effects: the MAGIC telescope system, the geomagnetic field, the atmosphere and the night sky background, All of these parameters and the corresponding effects are presented in this chapter. 12.1 The MAGIC Telescopes As introduced in subsection 3.4.3, the efficiency of the MAGIC telescopes varies over time so different analysis periods are required. Thus, the background is expected to depend on the analysis period. Additionally, the geometry of the macrocells (see subsection 3.4.1, Figure 3.3) used by the L1 trigger is a candidate to influence the shape of the background. Furthermore, the geometry of the MAGIC telescope system is expected to influence the back- ground. The system consists of two telescopes, MAGIC-I and MAGIC-II, whose view cones are illustrated in Figure 12.1. Only events seen by both telescopes will trigger the stereo trigger L3 as explained in subsection 3.4.1 in detail. It is assumed that most L3 events are passing the overlapping part of both view cones, which is illustrated in Figure 12.1. From the top view, this so-called L3 region has an eye-shaped form. With this, the background is not expected to be radially symmetric as it would be the case for a single telescope. Projected into th𝛾e(𝐴s𝑧k)y, the orientation of the L3 region rotates depending on the azimuth 𝐴𝑧of the pointing position. In FoV coordinates aligned with the altitude-azimuth (ALTAZ) system,the rotation angle is defined as the angle between the horizontal and the line marking the widest part of the L3 region which is orthogonal to the MAGIC-I–MAGIC-II axis. With an azimuth angle defined to be counted from the geographic North (𝐴𝑧 = 0°) to East (𝐴𝑧 = 90°), the expected theoretical function of the rotation ang 𝛼 𝛾 le is: theory(𝐴𝑧) = 𝐴𝑧 − 𝛼. (12.1) As displayed in Figure 12.2, is defined as the angle between the North-South axis and the MAGIC-I–MAGIC-II axis and is calculated by with the posi⃖⃖𝑀ti⃖⃗on=s (⃖⃖𝑀⃖⃗ 𝛼𝑀⃖⃖=⃖⃗ arctan(−(⃖⃖𝑀⃖⃗1 − 𝑀⃖⃖ ⃖⃗2)𝑦/(𝑀⃖⃖ ⃖⃗1 − 𝑀⃖⃖ ⃖⃗2)𝑥) ≈ 34.23° (12.2)411.a0n5d1 4, −729o.2f7th5,e0t.w25o) temlescao⊤ npdes𝑀⃖⃖:⃖⃗2 = (−29.456, −31.295, 1.42)⊤ m. (12.3) In this definition, the 𝑥-axis points towards North, the 𝑦-axis points towardsWest and the coordinate origin is the dish-area-weighted center of MAGIC-I, MAGIC-II and the LST-1. 77 12 Systematic Effects on the Background MAGIC-I MAGIC-II Figure 12.1: Visualization of the two view cones of MAGIC-I and MAGIC-II from a front view (left) and a top view (right). The overlapping part of both view cones is colored blue. From the top view, this so-called L3 region has an eye-shaped form. MAGIC-I 𝛼 LST-1 𝑥 MAGIC-II𝑦 Figure 12.2: Top view on the MAGIC site: Two solid lines represent the North-South axis and the MAGIC-I–MAGIC-II axis. Also, the angle 𝛼 ≈ 34.23° between both axis is shown. The image originates from Google Earth (visited on 2023-04-14). 78 12.1 The MAGIC Telescopes The exact𝑑fo≈rm83omf the L3 region depends on the azimuth 𝐴𝑧 and the zenith distance 𝑍𝑑 thetelescopes are pointing to. The actual inter-telescope distance on the ground between MAGIC-I andMAGIC-II is . Projected to the sky, the inter-telescope distance 𝑑projected can be calculated by the distance formula of parallel lines: 𝑑 |(?⃗?1 − ?⃗?projected = |𝑛| 2) × 𝑛| (12.4) with 𝑛 = (ssiinn((𝑍𝑍c𝑑𝑑o))s⋅⋅(cs𝑍oin𝑑s()(−−𝐴𝐴𝑧𝑧))) = (−ssinin((𝑍c𝑍o𝑑𝑑s))(⋅𝑍⋅sci𝑑no)(s𝐴(𝐴𝑧)𝑧)) . (12.5) As visible in Figure 12.3, for small zenith distances1 the value is almost constant and close to the actual inter-telescope distance on the ground. For larger zenith distances, the projected inter- telescope distance becomes smaller if0tmhe telescopes are pointing a3long the MAGIC-I–MAGIC-IIaxis. If the telescopes are pointing along this axis for the extreme case of a zenith distance of 90°,the inter-telescope distance becomes . In this special case, the L region becomes a circle from a top view. 0 80 80 70 20 60 60 50 40 40 40 60 30 20 20 80 10 0 0 60 120 180 240 300 360 Azimuth / ° Figure 12.3: Projected inter-telescope distance 𝑑projected depending on the altitude and azimuth of the pointing position of the telescopes. 1Zenith distance and altitude are directly connected as the zenith distance is 90° minus the objects’s altitude above the horizon. 79 Altitude / ° Zenith distance / ° dprojected / m 12 Systematic Effects on the Background 12.2 The Geomagnetic Field Particles with the charge 𝑞 are reflected by the Lorentz force 𝐹L = 𝑞 (𝑣 × 𝐵) (12.6) when moving with the velocity 𝑣 in a magnetic field 𝐵. In the atmosphere of Earth, the charged particles of an EAS are reflected by the geomagnetic field, which can be described by the horizontal intensity, the vertical intensity, and the magnetic declination 𝛥, which is the angle between the geographical North and the magnetic North. As the geomagnetic field is not stable over time and space, the International Geomagnetic Reference Field (IGRF) provides a time and space-dependent model (Alken et al. 2021). The Python package “igrf”2 provides this information based on the geographic latitude gl=at1, 0the geographic longitude glon, the altitude above sea level in km alt_kmand the date. In Figure 12.4 the evolution of the magnetic declination at the ORM is visualized foran altitude of alt_km . This value is chosen because the EASs reach the maximal number of particles at about this height. Figure 12.4: The declination 𝛥 of Earth’s mag- netic field depending on the date. 𝛥 is defined as the angle between the pointing direction of −5 the telescope and the direction of the geomag- netic Pytho=fie−ld1.7T.8h9e03I5G9RF is calculated using then package igrf with gl=at10= 28.761781,−6 glon , alt_km , and multi- ple dates as input parameters. 01 0 01 2 14 16 18 20 20 0 0 0 02 02 4 2 2 2 2 2 2 2 2 With the simplified assumption, that charged particles in the shower are moving parallel to the shower axis, the evolution of an EAS is influenced by the component of the geomagnetic field in the plane orthogonal to the shower axis. Desfiinni(n𝛿g) 𝛿 as the angle between the pointing directionand the directiosnino(f𝛿)the geomagnetic field, is a quantity proportional to the influence ofthe geomagnetic field on showers moving approximately parallel to the pointing direction. InFigure 12.5, the distribution is visualized for the MAGIC site dependent on the altitude and azimuth of the pointing position for the representative date 2017-01-01. This date was chosen because the dataset used for the analyses presented in the next chapter contains observations taken at about this time. 2https://pypi.org/project/igrf/ 80 Magnetic declination ∆ 12.2 The Geomagnetic Field Geomagnetic system E S W N 90 0 1.0 80 10 0.8 70 20 60 30 0.6 50 40 40 50 0.4 30 60 20 70 0.2 10 80 0 90 0.0 0 60 120 180 240 300 360 Azimuth / ° Figure 12.5: Distribution o=f s2in(𝛿) dependent on the altitude and azimuth of the pointing𝑥position. The IGRF is calculat8e.d76u1s7i8n1g the Py=th−o1n7p.8a9c0k3a5g9e igrf for the d=at1e02017-01-01and the coordinates glat , glon , and alt_km . A second-axis at the top represents the direction of the geomagnetic system. The offset between the geomagnetic axis and the geographic axis is the magnetic declination at this specific date. The influence of the geomagnetic field on EAS was first discussed by Cocconi 1954. Qualitative considerations lead to the conclusion that the de𝑒flection of charged particles by the geographicfield is non-neglectable in comparison to the deflec±tion caused by Coulomb scattering. While thedisplacement of multiple Coulomb scatterings of at atomic nuclei is random, the Lorentz force causes a systematic East-West separation of electrons and positrons due to their opposite charge. The effect is expected to be stronger for electromagnetic showers than for hadronic showers because the scattering angles occurring in nu𝑒clear interaction are mostly larger than the displacementexpected from the ge𝑒omagnetic field. F±urthermore, the impact of the geomagnetic field is expectedto be more dominant f±or high-energy than for low-energy 𝑒± relative to the Coulomb scattering,because low-energy are strongly deflected by large-angle scatterings (Cocconi 1954). A dedicated analysis (Commichau et al. 2008) studied the effects at the MAGIC site caused by the geomagnetic field based on gamma-ray MC simulations. It was found, that the orientation of shower images of triggered events can be systematically rotated away from the true source position to the East-West direction around a rotation angle. The value of this rotation angle mainly 81 Altitude / ° Zenith distance / ° sin(δ) 12 Systematic Effects on the Background depends on sin(𝛿) of the pointing position and the orientation of the EAS to the East-West axis of the geomagnetic system. Additionally, the rotation angle is larger for showers close to the camera center as these showers are characteristically less elongated. Furthermore, the angle increases with the energy of the primary gamma ray. According to the results, the geomagnetic field degrades the event reconstruction of the point of origin in the FoV. As a result of the East-West separation, the distribution of the DISP parameter can be significantly elongated perpendicular to the projection of the geomagnetic-North–geomagnetic-South axis in the FoV. Concluding, the geomagnetic field could influence the hadronic-induced background, although the degradation of the event reconstruction due to the geomagnetic field is expected to be lower for hadronic-induced air showers than for gamma-ray-induced air showers 12.3 The Atmosphere The atmosphere of Earth is the detector medium of IACTs and its characteristics, e.g. its transmis- sion and its temperature, influence the detection and the evaluation of particle showers. Intuitively, the background flux is expected to be higher in the case of an atmosphere with a high transmission, because a less-transparent atmosphere absorbs Cherenkov photons and thus, fewer events are triggered. For the H.E.S.S. telescopes, this was also confirmed by observations (Mohrmann et al. 2019). The transmission of the atmosphere can be lowered by clouds, but also by dust. The close distance of La Palma to the Sahara can cause the phenomenon Calima, where sand is blown from the Sahara to the Canary Islands and can affect MAGIC observations (Gaug et al. 2014). Also, the temperature of the atmosphere affects the shower development as the opening angle of the Cherenkov cone depends on the refractive index of the air, see (3.3). The refractive index of the air itself depends on the density of the air and therefore also on the temperature of the atmosphere, which could result in seasonal variations. Furthermore, the distance between the telescopes and the first point of interaction of the shower in the atmosphere plays an important role. The distance mainly depends on the zenith distance of the pointing position of the telescopes: If the telescopes are pointing close to the zenith, the Cherenkov light from observed EASs travels a relatively short distance through the atmosphere. For larger zenith distances, the Cherenkov light travels a much longer distance in the atmosphere. This results in a strong zenith distance dependency of the effective area, displayed in Figure 12.6. For the background, it results in the effect that the composition of the events’ energies depends on the zenith distance. Standard MAGIC observations are performed up to zenith distances of 62°. In order to search for PeVatrons MAGIC is also observing at 𝑍𝑑 ≫ 60° as the effective area at higher energies increases at higher zenith distances (Mirzoyan et al. 2020). At those very large zenith distances, the atmospheric effect even significantly differs within the FoV, which may influence the detected background shape at very high zenith distances. 82 12.4 The Night Sky Background 6 10 Zd: 5.06 deg Zd: 61.25 deg 5 10 4 10 3 10 2 10 1 10 −2 −1 0 1 10 10 10 10 Etrue / TeV Figure 12.6: The effective area 𝐴eff d0e°pen2d.i5n°g on the true energy 𝐸true for a low (blue)and a high (orange) zenith distance observation. For each observation, the effective areawas calculated in five offset bins from to . The effective area is displayed with a low transparency for small offset values and with a high transparency for large offset values. 12.4 The Night Sky Background The Night Sky Background is mainly influenced by the intensity of the moonlight. During moon- light, the energy threshold is higher due to the additional noise (Ahnen et al. 2017). Thus, the NSB level also affects the background, especially at low energies. When pointing close to the galactic plane, the NSB is also increasing due to the high amount of stars in the Milky Way. Furthermore, at∣ 𝑏th∣o≲se5°pointing positions a galactic diffuse gamma-rayemission can be observed at TeV energies (Neronov and Semikoz 2020). Thus, for observationswith small values of the galactic latitude3 , a higher background rate is expected. 3In the Galactic coordinate system, −po9s0i°tion9s0i°n the sky are given by the galactic latitude 𝑏 and longitude 𝑙.The galactic latitude ranges from to , where negative values represent the sky below the galactic plane and positive ones above. 83 2 Aeff / m 84 Background Shape Characterization 13 According to the considerations in chapter 12, the shape and flux of the background are expected to have strong dependencies on multiple parameters. In the high-level analysis with Gammapy it is possible to scale the background rate with a normalization factor as it is explained in chapter 11. With this, it is most important that the background model stored in the DL3 data matches the actual background in the spatial distribution - the shape of the background. In this chapter, the background shape dependencies on energy, azimuth and zenith distance are investigated. For this purpose, the applied statistical methods and datasets are introduced at first. 13.1 Statistical Methods To analyze the variance of the background, a Principal Component Analyis (PCA) is applied to the data. As the results of a PCA do not provide uncertainties, the estimation of uncertainties is covered by a bootstrap approach. In this section both methods, the PCA and bootstrapping, are introduced. The main idea of a PCA is to reduce the dimensionality of a dataset by transforming the data to a new coordinate system (Hastie et al. 2009). The first new axes, named principal components, are designed to contain the most information of the data. This is achieved by finding the eigenvectors and eigenvalues of the covariance of the original data. The eigenvectors represent the direction of each principal component and the eigenvalues represent the amount of variance contained by each component. The highest eigenvalue and its corresponding eigenvector describe the first principal com𝑘ponent, the second highest eigenvalue and its corresponding eigenvector describe the secondprincipal component and so on. For the reduction of a high-dimensional dataset with 𝑛 dimensions,the first principal components can be selected to represent the data in 𝑘 < 𝑛 dimensions. However, the PCA can also be applied to a dataset with only two dimensions, as shown in Figure 13.1. The first principal component indicates the axis with the highest variance. Interpreting the principal components as semi-axes of an𝑒ellipse, th𝑏e eccentricity𝜖 = 𝑎 = √1 − 𝑎22 (13.1) can be calculated as the ratio of the linear eccentricity 𝑒 and the major axis 𝑎 of the ellipse. Between t𝑒h2 e=lin𝑎e2a−r e𝑏c2centricity and the major axi𝜖s 𝑎=an0d the minor axis 𝑏 of the e𝜖lli=pse1, the relationshipholds. An eccentricity of indicates a circle, while indicates a very elongated ellipse. Technically, the python package scikit learn (Pedregosa et al. 2011) is used for the application of PCAs in the following analyses. To overcome the issue of the PCA not providing uncertainties, a bootstrap approach is used. From an original dataset, resamples are created by drawing with replacement. From each of those 85 13 Background Shape Characterization 10 Figure 13.1: Application of the Data PCA to a dat𝑥aset co𝑦ntaining two8 dimensions and . The result- First principal component ing principal components are il- 6 Second principal component lustrated by a blue and a green line. 4 2 0 −2 −4 −6 −7.5 −5.0 −2.5 0.0 2.5 5.0 7.5 x 400 Eccentricity calculated on the complete sample 350 Bootstrapped values Bootstrapped standard deviation 300 250 200 150 100 50 0 0.9955 0.9960 0.9965 0.9970 0.9975 0.9980 0.9985 Eccentricity ǫ Figure 13.2:Visualization of the eccentricity 𝜖 calculated for 1000 resamples of the dataset shown in Figure 13.1. The bootstrapped values and the resulting standard deviation are illustrated. Additionally, the eccentricity calculated for the whole sample is shown. 86 y Number of entries 13.2 Observational and Simulated Datasets bootstrap samples a statistic, e.g. the eccentricity (13.1), is calculated. Based on these results, the standard deviation can be calculated. Technically, the bootstrapping is performed with the Python package resample (Dembinski 2020) in the following analyses. As an example, this procedure is performed for the dataset already presented in Figure 13.1 1000 bootstrapped resamples. The resulting distribution of 𝜖and the eccentricity is calculated onand the resulting standard deviation is shown in Figure 13.2. 13.2 Observational and Simulated Datasets For the following analyses of the shape of the background, observational and simulated datasets are used. The processing of the data, as well as the selection criteria, are presented in this section. Also, the preprocessing of the data including the transformation to FoV coordinates is explained. As mentioned in section 12.1, the background is expected to depend on the analysis period. To exclude this effect, data from the analysis periods ST.03.07 and ST.03.09 are used. In both periods, the telescope efficiency is expected to be similar and the same MC simulations can be used. By combining both analysis periods, data from the largest possible period is available; this ensures the highest possible statistics. Using AutoMAGIC V0.4, DL3 data containing multi-offset full-enclosure IRFs are created. The corresponding configuration files can be found in section A.8 and section A.9 for ST.03.07 and ST.03.09, respectively. In Appendix B, analyses of the Crab Nebula are presented as a cross-check of the analysis pipeline. As the analysis builds on DL3 data, only gamma-like events are considered. For this analysis, a fixed hadronness cut of 0.3 is applied. For the creation of the DL3 files, diffuse MCs with a radius of 2.5° are used, which makes it possible to study the background up to the largest possible offset values. For the creation of the datasets, only observations of FoVs not containing a known VHE gamma-ray source are used. Namely, the created datasets contain data from the observations of the following sources: 0748+333, CTA102, G70.7, GRB160509A, J1839.5, M15, S30218+35, TON599, UrsaMajorII, 3C345, Cyg-X3, GammaCygni, GRB160927, LSI+61, NGC1068, RBS0970, TriangulumII, 3C371, Dragonfly, GRB160504, GRB170728, IceCube16073, LSI+61303, RGB2056+496, ON396, TXS2241, GRB171115A, MAXI-J1820+0, RXJ0805, S50716+714, AT2017gfo, and Draco. As can be seen from the AutoMAGIC configuration files, the DL3 files were created usining a fixed hadronness cut: • hadronness ≤ 0.3. Furthermore, the following quality cuts • good atmospheric conditions: transmission at 9 km ≥ 0.8 • dark observational conditions: DC1 ≤ 2.2 µA are applied. An overview of the numb4e1r3o.7f8sehlected observations and the corresponding observationtime is listed in Table 13.1. All in all, of off observations are available for the analysis. The good altitude-azimuth coverage of this dataset is presented in the upper plot of Figure 13.3. Due to the trajectories in the sky, the selected observations do not cover the altitude-azimuth space uniformly, but some pointing positions have more observation time than others. 87 13 Background Shape Characterization Table 13.1: Overview of the off dataset containing data in the analysis periods ST.03.07 and ST.03.09. All observations are taken under dark conditions (moon0). Zd range Analysis period Number of93o1bservations Observa2ti6o5n.8a1l time / hlow ST.03.07 medium ST.03.07 12683 478..117high ST.03.07 low+med.+high ST.03.07 1122 321.08 low ST.03.09 215 63.99 medium ST.03.09 63 18.27 high ST.03.09 41 10.45 low+med.+high ST.03.09 319 92.7 low+med.+high ST.03.09+ST.03.09 1441 413.78 For some analyses, MC data is required. For this, test gamma MCs analyzed by AutoMAGIC and therefore containing true and reconstructed event information are used. The same cuts as for the production of DL3 data are applied. As visible in the lower plot of Figure 13.3, the MC events are mostly distributed equally over the altitude-azimuth space in each zenith distance range. However, there are fewer events in the medium zenith distance bin than for the low zenith distance and high zenith distance bins. In addition to the standard MCs, low zenith distance gamma MCs with Earth’s magnetic field switched off are produced. The analysis of this dataset is not performed with AutoMAGIC, but by executing MARS V3-0-1 by hand. Thereby machine learning models were trained with and applied to MCs with Earth’s magnetic field switched off. According to GADF (Nigro et al. 2021), backgroundmodels are stored in FoV coordinates in which the center is aligned to the pointing position as introduced in subsection 4.1.2. Contrary, the DL3 data of the off sources contains reconstructed right ascension RA and declination DEC of the events. With this, the sky coordinates are given in the equatorial coordinate system, which is commonly used to provide the position of an astronomical object. The reason for this is that this system offers the advantage that the coordinates of a stationary celestial object can be specified independently of location an(d tim, e. But to investigate the background, the celestial coordinates have to betransformed into a FoV coordinate system. According to GADF, the spherical FoV coordinates canbe defined by LON LAT) with the pointing position on the equator at (LON, LAT) = (0, 0): LON: Longitude (range from −1 LAT: Latitude (range from −90°80° to 180°)deg to 90°). This coordinate system can either be aligned with the ALTAZ or the RADEC system. As explained in chapt(er 12, the backg, round is expected to change depending on the altitude and azimuth.Thus, the alignment along the ALTAZ system is chosen and for the following analysis the coor-dinates FOV_ALTAZ_LON FOV_ALTAZ_LAT) are used. It is worth noting, that according to GADF, FOV_ALTAZ_LON increases with decreasing AZ while FOV_ALTAZ_LAT increases with increasing ALT. For the transformation in the new coordinate system, the reconstructed coordinates (RA, DEC) of 88 13.2 Observational and Simulated Datasets 90 0 3.5 80 10 3.0 70 20 2.5 60 30 2.0 1.5 50 40 1.0 40 50 0.5 30 60 0 90 180 270 360 Azimuth / ° 90 0 80 10 210 70 20 60 30 1 10 50 40 40 50 30 60 0 10 0 90 180 270 360 Azimuth / ° Figure 13.3: Altitude-azimuth coverage of the observational off data (upper plot) and the MC data (lower plot). The different zenith distance ranges are indicated by grey dashed lines. 89 Altitude / Altitude / °° Zenith distance / Zenith distance / °° Number of events tobs / h 13 Background Shape Characterization each event are transformed to (FOV_ALTAZ_LON, FOV_ALTAZ_LAT) based on time and Earth location of the telescopes. For the MCs, the procedure is not only performed on the reconstructed but also on the true coordinates. Technically, the transformation from (RA, DEC) to (ALT, AZ) is performed with Astropy (Astropy Collaboration et al. 2013, Astropy Collaboration et al. 2018, Astropy Col- laboration et al. 2022) and the transformation from (ALT, AZ) to (FOV_ALTAZ_LON, FOV_ALTAZ_LAT) with Gammapy (Deil et al. 2017). 13.3 Energy Dependence To investigate the energy dependency of the background, the DL3 events of the off data presented in the last section are used. First, the spectral shape of the background i𝐸s investigated. Figure 13.4presents the differential flux dependent on the reconstructed energy reco for the low, medium and high zenith distance ranges. The observed shape of the differential energy spectrum can be explained by the effects of the effective area as explained in section 12.3: At lower energies, the low zenith observations have a higher effective area than high zenith observations, at high energies vice versa. Therefore, at lower energies, no counts from high zenith observations are available; a low-energy shower does not provide enough Cherenkov light for a high zenith detection. After the peak, the background spectrum follows a PL, comparing to the CR spectrum and most gamma-ray source spectra. As observations at high zenith distances have a higher effective area at higher energies, more bins can be filled in comparison to the low zenith distance bin. 1 10 0 10 −1 10 −2 10 Energy boundaries −3 10 Low zenith distance Medium zenith distance −4 10 High zenith distance −1 0 1 10 10 10 Ereco / TeV Figure 13.4: Differential background flux depending on the reconstructed energy 𝐸reco for the low, medium and high zenith distance ranges. Grey lines indicate the energy boundaries in which events are considered for the following analysis. 90 ( ) dN/dE/dt/ s−1TeV−1 13.3 Energy Dependence In Figure 13.4 energy boundaries from 0.05 TeV to 20 TeV are indicated. Outside this range, not enough events are available; thus, only events in the given energy range are used for the following analyses of the spatial background distribution. All observations with pointing po- sitions( of all azimuth angles and zenith distance angles from 5° to 62° are used to have a look0a.t0t5hTeesVhape20ofTtehVe bac,kground in the FoV. Figure 13.6 shows the stacked reconstructed coordi-nates FOV_ALTAZ_LON FOV_ALTAZ_LAT) in six logarithmic bins of the reconstructed energy fromto . Only events with an offset less than or equal to 2.3° are considered because the reconstruction is based on diffuse MCs with a radius of 2.5°. Up to an offset of 2.3°, it is assumed, that the reconstruction works properly. It is noticeable that the background looks radially sym- metric from a first view. This is consistent with the considerations about the L3 region presented in section 12.1. From these considerations, the orientation of a not-radial symmetric background shape depends on the azimuth angle. As the coordinates of observations from all azimuth angles are stacked in Figure 13.6, this effect is washed out. For each of the four lowest energy bins, the 2D histograms in Figure 13.6 show that most events are0l.o2c9aTteedV in the center of the FoV. This is inagreement with a performance study of the MAGIC telescopes for gamma-ray sources (Aleksić et al.2016b). In this study, sensitivity and event rate above were studied; it was found that the rate decreases with increasing offset. However, the histogram in Figure 13.6 for the highest energy bins shows, that the acceptance is higher at higher offsets; thus the background is donut-shaped. This can be explained by the following effect: A shower detected in the camera becomes larger with increasing energy. On the one hand, showers originating from the center of the FoV tend to partly lie outside the camera and thus do not end in the final event selection. In the case of VHE showers, that originate from the edge of the FoV, on the other hand, the showers can be oriented in such a way that they lie completely in the FoV, thus still ending up in the final event selection. However, at low energies, the spatial distributio structure. For a closer view, the contour line at a level of 50n0o0f the background has a hexagonalevents is displayed in Figure 13.5. Here, the hexagonal structure is significantly visible. This effect can be explained by the design of the MAGIC trigger, which is explained in subsection 3.4.1. The shape of all macrocells of the L1 trigger has a hexagonal form (see: Figure 3.3) and pixels outside the trigger region are not used for any trigger level. Thus, small low-energy events originating outside the trigger region have a lower probability of being triggered. As an overall result, it can be stated that the shape of the background significantly depends on the energy. 0.05TeV–0.14TeV (Figure 13.5: 2D histogram of theFOV_ALTAZ_LON, FOV_ALTAZ_LAT) coor- 2 d0.i1n4aTteesVof DL3 events from th2e.3o°0ff.0d5aTteaVwith10000 reconstructed energies from to1 and an offset up to . The whit 0 line indicates a contour line at a level of 5000e 5000 events. −1 −2 0 −2 0 2 FOV_ALTAZ_LON / ° 91 FOV_ALTAZ_LAT / ° Number of events 13 Background Shape Characterization 0.05TeV–0.14TeV 0.14TeV–0.37TeV 6000 2 2 10000 1 1 4000 0 0 5000 2000 1 −1− −2 −2 0 0 −2 0 2 −2 0 2 FOV_ALTAZ_LON / ° FOV_ALTAZ_LON / ° 0.37TeV–1.0TeV 1.0TeV–2.71TeV 2 2 400 1500 1 1 300 0 1000 0 200 1 −1− 500 100 −2 −2 0 0 −2 0 2 −2 0 2 FOV_ALTAZ_LON / ° FOV_ALTAZ_LON / ° 2.71TeV–7.37TeV 7.37TeV–20.0TeV 40 2 2 100 1 1 30 75 0 0 20 50 1 −1− 10 25 −2 −2 0 0 −2 0 2 −2 0 2 FOV_ALTAZ_LON / ° FOV_ALTAZ_LON / ° Fig eve2ure 13.6: 2D histogram of the (FOV_ALTAZ_LON, FOV_ALTAZ_LAT) coordinates of DL3n0tTs efrVom the off data in six logarithmic bins of the rto . The events are shown up to an offset of 2.3e°constructed energy from 0.05 TeV. 92 FOV_ALTAZ_LAT / ° FOV_ALTAZ_LAT / ° FOV_ALTAZ_LAT / ° Number of events Number of events Number of events FOV_ALTAZ_LAT / ° FOV_ALTAZ_LAT / ° FOV_ALTAZ_LAT / ° Number of events Number of events Number of events 13.4 Azimuth-dependent Rotation of the Background Shape 13.4 Azimuth-dependent Rotation of the Background Shape In a previous study (Prandini et al. 2016), it was found that the orientation of the shape of the MAGIC acceptance depends on the azimuth angle of the pointing position. Here, it is validated if this effect originates from the L3 region formed by the two overlapping view cones as described in section 12.1. Additionally, the effect is studied in dependency of the reconstructed energy 𝐸 20 TeV reco . For the following analysis, the data is divided into six logarithmic energy bins from 0.05 TeV to and twelve( azimuth bins, w, hich ar2e.3a°ligned with the geomagnetic system. Again,only events with an offset equal or lower to are considered. In each azimuth bin, a PCAis performed on the FOV_ALTAZ_LON FOV_ALTAZ_LAT) coordinates of all events in this bin. If the non-circular elongation originates from the view-cone theory, it is expected that the first principal component is orthogonal to the MAGIC-I–MAGIC–II axis projected to the sky. For further consideration, the rotation angle 𝛾 is defined as the angle between the first principal component and the horizontal. This procedure is visualized in Figure 13.7 for one exemplary bin, containing low zenith distance events in an azimuth range from 69° to 99° and an energy range from 0.05 TeV to 0.14 TeV. Corresponding plots for the other energy bins are provided in Figure C.1 to Figure C.5. In Figure 13.7, it is visible, that the prediction from the view-cone theory 2 MAGIC-I–MAGIC-II axis First principal component 800 Second principal component 1 600 γ 0 400 −1 200 −2 0 −2 −1 0 1 2 FOV_ALTAZ_LON / ° F0igurlo.0w5zTeeenV13.7:ith dto 0is.124DTheiVstogram of the (FOV_ALTAZ_LON, FOV_ALTAZ_LAT) coordinates of alltance events in the azimuth range from 69° to 99° and the energy range from. The blue and green lines represe𝛾nt the first and second principalcomponents resulting from the PCA. Also, the MAGIC-I–MAGIC–II axis projected to thesky is visualized by an orange line. The rotation angle is defined as the angle between the first principal component and the horizontal. 93 FOV_ALTAZ_LAT / ° Number of events 13 Background Shape Characterization i𝛾s in very good agreement with the data. To validate this theory for every case, the rotation angleis determined in every energy/azimuth bin and the uncertainty is estimated with bootstrapping. It is important to note, that the estimated uncertainties only include statistical but no systematic effects. Thus, the estimated uncertainties are underestimated. Assuming that the first princi𝐴p𝑧al−co3m4.2p3o°nent can be switched around 180°, (12.1) becomes𝛾 (𝐴𝑧) = {𝐴𝑧 − 34.23° − 180° for −55.77°theory𝛾 (𝐴𝑧) [−90°,fo90r°1]24.23° ≤ ≤𝐴𝐴𝑧𝑧≤≤310244..2233°° (13.2). With this, theory is in the range of values . In Figure 13.8, 𝛾theory(𝐴𝑧) is compared with the rotation angles resulting from all data in the low zenith distance range. The same plot can be seen for the medium zenith distance range in Appendix C. For the high zenith distance range, data is not available in all azimuth bins (see Figure 13.3). In Figure 13.8, it is visible, that for Geomagnetic system N E S W 90 20 60 7.4 30 2.7 0 1 −30 0.37 −60 0.14 γtheory −90 0.05 0 60 120 180 240 300 Az / ° (Figure 13.8: , Rotation ang)le 𝛾 resulting from 𝐴P𝑧CAs performed onFOV_ALTAZ_LON FOV_𝛾ALTAZ_LAT event coordinates from low zenith distanceevents in multiple energy bins dependent on the azimuth . For comparison, thetheoretic expectation theory(𝐴𝑧) (13.2) motivated by the two overlapping view cones is presented. low energies, theory and data are in very good agreement. This is in agreement with a former study (Mender et al. 2023) where the same study was performed on the overall energy range and the results were dominated by the low-energy events. But here it is visible, that the higher the energy, the higher the discrepancy. To study this effect in more detail, the first-order influence of 94 γ / ° Ereco / TeV 13.4 Azimuth-dependent Rotation of the Background Shape th(e azimuth is removed by)a=co(rrceocst(i−on𝛾: The(𝐴co𝑧ordinates of the evFOV_ALTAZ_LON_ROT sin(−𝛾theory(𝐴𝑧)))) −cosisn((−−𝛾𝛾theory((𝐴𝐴 en𝑧t)s) are FOV_ALTAZ_LAT_ROT 𝑧)) ) ⋅ ( rotated FOV_ALTAZ_LON theory theory FOV_ALTAZ_LAT ) ( (13.3)around the negative theoretical rotation angle 𝛾theory(𝐴𝑧) calculated by (12.1). On the rotated eventcoordinates FOV_ALTAZ_LON_ROT, FOV_ALTAZ_LAT_ROT), again a PCA is performed. This time, the angle between the first principal comp𝛾onent and the horizontal is named 𝛾 ′. In the case of the view-cone theory 𝛾 ′ ′view-cone-theory = 0° (13.4)applies. is determined in 50 azimuth, 50 altitude and six energy bins. Figure 13.9 displays the results for the energy bin from 0.14 TeV to 0.37 TeV. Corresponding plots of all energy bins can be found in Figure C.7 to Figure C.12. A visual inspection leads to the hypothesis that there could 0.14TeV – 0.37TeV 90 0 80 80 10 60 40 70 20 20 60 30 0 −20 50 40 −40 40 50 −60 −80 30 60 0 60 120 180 240 300 360 Azimuth / ° (Figure 13.9: Rot,ation angle 𝛾 ′ resulting from PCAs performed onFOV_ALTAZ_LON_ROT FOV_ALTAZ_LAT_ROT) even0t.1c4oToerVdinate0s.37inTeVazimuth and al-titude bins for an exem𝛾pla=ry energy bin from to . In case of anagreement with the theo′retic expectation 𝛾theory(𝐴𝑧) (13.2) motivated by the twooverlapping view cones, 0° is valid. be a connection with the influence of Earth’s magnetic field (for comparison see Figure 12.5). As explained in section 12.2, Earth’s geomagnetic field can rotate shower images in the East-West direction. The theoretica𝛾l′offset 𝛾 ′MF-theory =to𝛼th−e𝛥vie=w3-4c.o2n3e° +th5e.o5ry can be calculated bymagnetic-field-theory ° = 39.73° (13.5) 95 Altitude / ° Zenith distance / ° ′ γ / ° 13 Background Shape Characterization subtracting the magnetic declination 𝛥 from the angle 𝛼 between the North-South axis and the MAGIC-I–MAGIC-II axis calculated by (12.2). To validate this theory, all observations are sorted into six bins of sin(𝛿), with 𝛿 as the angle between the pointing direction and the direction of the geomagnetic field. The bin edges are chosen so that all bins contain𝛾the same number of events. In Figure 13.10, the resulting rotationangles are displayed depending′on the reconstructed energy. Independent of the sin(𝛿) bin, thegsirne(a𝛿te)r the energy, the greater . This is consistent with the prediction that the magnetic field hasa higher impact to EASs induced by prim𝛾a′ries of higher energies, see section 12.2. Comparing thebins, it is visible that the values o𝛾f are small𝛾er for the lowest sin(𝛿) bin than for the higherones. On the one hand, this supports the′ hypothesis ′that the effect is caused by Earth’s magneticfield. On the other hand, the values of are above magnetic-field-theory for very high energies. 1 60 View-cone theory Magnetic-field theory 0.98 50 40 0.9 30 0.86 20 0.67 10 0.58 0 0 −1 0 1 10 10 10 Ereco / TeV (Figure 13.10: R𝐸o,tation angle 𝛾 ′ )resulting frosimn(𝛿)PCAs performed onFOV_ALTAZ_LON_ROT FOV_ALTAZ_LAT_ROT in bins of dependent on the re- constructed energy reco. The predictions of the view-cone theory and the magnetic-field theory are visualized by dashed lines in black and grey, respectively. To study this effect in more detail, further analyses are performed using MCs with Earth’s magnetic field turned on and turned off. It would be more precise to use hadronic MCs, but only a small number of events would end up in the DL3 data selection and the extremely computationally intensive hadronic showers would have to be resimulated, so gamma-ray MCs are used instead. As presented in section 13.2, the events from the MC datasseints(𝛿a)re esqiuna(l𝛿ly) distributed over the azimuth.Therefore, it is possible to compare two azimuth bsiins in which has a different strength. Onebin is centered around the geomagnetic South, where values are lower, and the other one iscentered around the geomagnetic North, where n(𝛿) values are higher. Therefore, the effect of 96 γ′ / ° sin(δ) 13.4 Azimuth-dependent Rotation of the Background Shape Earth’s magnetic field is𝛾e′xpected to be stronger in the northern bin compared with the southernbin. The rotation angle is expected to differ more between the northern and southern bin for the high zenith distance range compared with the low zenith distance range as the geomagnetic 𝛥fie≈ld−is5a.5z°imuth-dependency at higher zenith distances (see Figure 12.5). The magnetic declinationof Earth’s magnetic field is variable over time, as it is explained in section 12.2. As it has a value ofin 2017, the bins are defined as follows: • Southern azimuth bin: 84.5° to 264.5°. • Northern azimuth bin: 264.5° to 360° and 0° to 84.5°. With this, both azimuth bins cover 180°. This comes with the advantage, that no difference between the results in those bins will be caused by the MAGIC telescope array, as the pattern of the projected inter-telescope distance shows two periods within the entire azimuth range (see: Figure 12.3). Nevertheless, it may be possible that the effects of the viewing cones and the magnetic field influence each other. As in the production of the DL3 data from the previous analysis, the following cuts are applied to the MCs: • size ≥ 50 • hadronness ≤ 0.3 • offset ≤ 2.3°. In six logarithmic bins o(f reconstructed energ,y, a PCA is performed on the reconstructed and trueMCs event coordinates FOV_ALTAZ_LON_ROT FOV_ALTAZ_LAT_ROT). The results based on the reconstructed event coordinates are shown in Figure 13.11 for the low zenith distance range MCs with the geomagnetic field turned on and off. Figure 13.12 shows the corresponding results for the medium and high zenith distance range. The plots visualized the calculated rotation angle 𝛾 ′ and compare it with the expectation of the view-cone theory (13.4) and the magnetic-field theory (13.5). For the low zenith range with Earth’s magnetic field turned off, it is directly noticeable that 𝛾 ′ is fluctu𝛾ating around 𝛾 ′ = 0° or the equivalent 𝛾 ′ = 90°, which indicates an agreement with the view-cone′ theory. For the results of low zenith distance MCswith Earth’s geomagnetic field turned on, has a positive offset and the difference between the northern and southern azimuth bin is small. Additionally, it is noticeable, that the values of 𝛾 ′ of the northern azimuth bin𝛾s are above the values of the southern azimuth bin in every energy bin.For the medium and high′zenith distance range, MCs are only available with geomagnetic fieldturned on. The resulting values of the southern azimuth bin match the view-cone theory, while values of the northern azimuth bin match the magnetic-field theory. This is in agreement with the expectation that Earth’s magnetic field has a higher impact on the northern azimuth bin. The results based on the true event coordinates are shown in Figure 13.13 for the low zenith distance range MCs with the geomagnetic field turned on and off. Figure 13.14 shows the cor- responding results for the medium and high zenith distance range. Also in this study, the same events as𝛾in the study on re𝛾constructed event coordinates are used. In the plo𝛾t′s of low, mediumand high z′enith distance wit′h magnetic field turned on, most data points of are in the rangebetween view-cone-theory and magnetic-field-theory. This indicates the superpositioning of both effects: the influence of the magnetic field and the influence of the view cones of the MAGIC telescopes. 97 13 Background Shape Characterization Low zenith distance 80 60 40 20 0 −20 View-cone theory −40 Magnetic-field theory −60 Southern azimuth bin Northern azimuth bin −80 −1 0 1 10 10 10 Ereco / TeV Low zenith distance (MF turned off) 80 60 40 20 0 −20 View-cone theory −40 Magnetic-field theory −60 Southern azimuth bin Northern azimuth bin −80 −1 0 1 10 10 10 Ereco / TeV Figur(e 13.11: Rotation ang,le resulting from PCA)s performed on reconstructed coordi-nates FOV_ALTAZ_LON_ROT FOV_ALTAZ_LAT_ROT from MCs simulated in the low zenith distance range. In the upper plot, results are shown based on the standard MCs with the geomagnetic field turned on while the lower plot shows results based on MCs with the geomagnetic field turned off. The results are shown for the southern and northern azimuth bins in blue and orange, respectively. 98 γ′ / ° γ′ / ° 13.4 Azimuth-dependent Rotation of the Background Shape Medium zenith distance 80 60 40 20 0 −20 View-cone theory −40 Magnetic-field theory −60 Southern azimuth bin Northern azimuth bin −80 −1 0 1 10 10 10 Ereco / TeV High zenith distance 80 60 40 20 0 −20 View-cone theory −40 Magnetic-field theory −60 Southern azimuth bin Northern azimuth bin −80 −1 0 1 10 10 10 Ereco / TeV Figure 1(3.12: Rotation angle resulting from PCAs performed on reconstructed coor-dinates FOV_ALTAZ_LON_ROT, FOV_ALTAZ_LAT_ROT) from MCs simulated with standard MCs with geomagnetic field turned on. In the upper and lower plots, results are shown for the medium and high zenith distance range, respectively. The results are shown for the southern and northern azimuth bins in blue and orange, respectively. 99 γ′ / ′° γ / ° 13 Background Shape Characterization Comparing the results of the reconstructed event coordinates with the results of the true event coordinates, it is noticeable that the offset to the view-cone theory remains for the northern azimuth bins, when using true instead of reconstructed events coordinates. This indicates that strongly rotated events cannot be reconstructed properly and are discarded, which means that they are neither used for the analysis on reconstructed event coordinates nor for the analysis of true event coordinates. Comparing the results based on reconstructed and true event coordinates in the low zenith distance bin, it is noticeable that in the case of the reconstructed coordinates 𝛾 ′ increases with the reconstructed energy even over the magnetic-field theory line, while in the case of the true coordinates, the value is comparably constant. Looking at the results based on observational data in Figure 13.10, the same effect as with the reconstructed coordinates can be observed: the 𝛾 ′ values are above the magnetic-field theory for high energies. This is a hint, that the effect originates from the event reconstruction. This is supported by the fact, that the reconstruction of the event origin implemented in MARS neither use the azimuth angle nor the reconstructed energy as an input parameter. In summary, it can be concluded that the shape of the gamma-like background of the MAGIC telescopes is not circular symmetric and the orientation of the shape is rotating depending on the azimuth angle of the pointing position of the telescopes. The rotation effect can be described by the overlapping view cones of both telescopes in combination with an effect from Earth’s magnetic field. 100 13.4 Azimuth-dependent Rotation of the Background Shape Low zenith distance 80 60 40 20 0 −20 View-cone theory −40 Magnetic-field theory −60 Southern azimuth bin Northern azimuth bin −80 −1 0 1 10 10 10 Ereco / TeV Low zenith distance (MF turned off) 80 60 40 20 0 −20 View-cone theory −40 Magnetic-field theory −60 Southern azimuth bin Northern azimuth bin −80 −1 0 1 10 10 10 Ereco / TeV (Figure 13.13: Rotati,on angle resulting f)rom PCAs performed on true coordinatesFOV_ALTAZ_LON_ROT FOV_ALTAZ_LAT_ROT fromMCs events simulated in the low zenith distance range. In the upper plot, results are shown based on the standard MCs with the geomagnetic field turned on while the lower plot shows results based on MCs with the geomagnetic field turned off. The results are shown for the southern and northern azimuth bins in blue and orange, respectively. 101 γ′ / ′° γ / ° 13 Background Shape Characterization Medium zenith distance 80 60 40 20 0 −20 View-cone theory −40 Magnetic-field theory −60 Southern azimuth bin Northern azimuth bin −80 −1 0 1 10 10 10 Ereco / TeV High zenith distance 80 60 40 20 0 −20 View-cone theory −40 Magnetic-field theory −60 Southern azimuth bin Northern azimuth bin −80 −1 0 1 10 10 10 Ereco / TeV (Figure 13.14: Rotati,on angle resulting from PCAs performed on true coordinatesFOV_ALTAZ_LON_ROT FOV_ALTAZ_LAT_ROT) fromMCs simulatedwith standardMCswith geomagnetic field turned on. In the upper and lower plots, results are shown for the medium and high zenith distance range, respectively. The results are shown for the southern and northern azimuth bins in blue and orange, respectively. 102 γ′ / ′° γ / ° 13.5 Zenith Distance Dependencies 13.5 Zenith Distance Dependencies To study the influence of the zenith distance on the shap(e of the gamma-like background detected bythe MAGIC telescopes, the rotated event coordinates FOV_ALTAZ_LON_ROT, FOV_ALTAZ_LAT_ROT) calculated by (13.3) from the measured DL3 off data are used. The rotated event coordinates have the advantage, that the first-order influence of the azimuth is already removed by the correction. Equivalent to the study on the azimuth dependency presented in the last section, a PCA is performed in six logari5th°mic6b2°ins of the reconstr2u.3c°ted energy from 0.05 TeV to 20 TeV only considering eventswith an offset less than or equal to . This time the PCA is performed in six bins of the zenithangle from to . The bins are composed of three linear bins for the low zenith distance range, two linear bins𝛾for the medium zenith distance range and one bin for the high zenith distancerange. Again𝛾, the′ angle between the first principal component and the horizontal is named 𝛾 ′. The dependency o′f on the zenith distance is presented in Figure 13.15 for the different energy bins. 𝛾Overall, the values are decreasing with increasing zenith distance of the pointing position. Aso′bserved in the last section, independent of the zenith distance, the higher the energy, the higher. Furthermore, the eccentricity calculated by (13.1) is analyzed. A previous study (Prandini et al. 2016) on the background acceptance of MAGIC stated that the shape of the background is more elliptical at lower zenith distances and becomes more circular for higher zenith distances. This can be confirmed by the present study, which can be seen in the upper plot of Figure 13.17. The eccentricities are now also calculated in multiple bins of reconstructed energy and the results 20 50 7.4 40 2.7 30 20 1 10 0.37 0 View-cone theory 0.14 −10 Magnetic-field theory 0.05 10 20 30 40 50 60 Zenith distance / ° (Figure 13.15: Rotatio, n angle 𝛾 ′ resulting from PCAs performed on event coordinatesFOV_ALTAZ_LON_ROT FOV_ALTAZ_LAT_ROT) dependent on th𝐸e zenith distance of thepointing position in multiple bins of reconstructed energy reco. The zenith distance ranges are illustrated by vertical gray solid lines. 103 γ′ / ° Ereco / TeV 13 Background Shape Characterization are presented in the lower plot of Figure 13.17. It is visible, that the eccentricity depends on the reconstructed energy. In every0.z1e4nTiethVdist0a.3n7ceTebVin, the highest eccentricity is reached for thesecond-lowest energy bin from to . In this specific energy bin, the eccentricity is nearly constant, no clear decreasing or increasing trend could be detected. Comparing the other energy bins, an overall trend is visible neither for the reconstructed energy nor for the zenith distance. Nevertheless, the eccentrici0ty.1i4sTreemVark0a.b3l7yTloewV in the highest zenith distance bins for allenergy bins except for the one from to . Comparing the results for the complete energy range with the ones for the dedicated energy bins, it can be noted that the decreasing eccentricity found for the complete energy range, was not detected in individual energy bins. This can be explained by the correlation between zenith distance and energy of the detected events: at higher zenith distances the propagation of the light through the atmosphere is longer and therefore the sensitivity of the telescopes shifts towards higher energies. An explanation for this is that the energy composition of selected events depends on the zenith distance. This is expected due to the zenith-distance dependency of the effective area (see section 12.3) and can also be found in the data, which is shown in Figure 13.16. As an extraordinarily high eccentricity was observed for the second lowest energy bin, it is suspected that the energy composition plays a role in the zenith-distance dependency of the eccentricity. Concluding, it can be stated that the shape of the gamma-like background detected by the MAGIC telescopes is not that strongly influenced by the zenith distance of the pointing position compared to the azimuth of the pointing position. But still, there are dependencies on the zenith distance, partly due to the differences in the energy composition of selected events. Further investigations focusing on the influence of the zenith distance on the background rate are presented in section 14.3. 6 10 20 7.4 5 10 2.7 1 4 10 0.37 0.14 3 10 0.05 10 20 30 40 50 60 Zenith distance / ° Figure 13.16: Number of events depe𝐸ndent on the zenith distance of the pointing inmultiple bins of reconstructed energy reco. 104 Number of events Ereco / TeV 13.5 Zenith Distance Dependencies 0.85 20.0 17.5 0.80 15.0 0.75 12.5 0.70 10.0 0.65 7.5 0.60 5.0 0.55 2.5 0.50 10 20 30 40 50 60 Zenith distance / ° 0.85 20 0.80 7.4 0.75 2.7 0.70 1 0.65 0.37 0.60 0.14 0.55 0.50 0.05 10 20 30 40 50 60 Zenith distance / ° (Figure 13.17: Eccen,tricity 𝜖 resulting fro)m PCAs performed on event coordinatesFOV_ALTAZ_LON_ROT FOV_ALTAZ_LAT_ROT dependent on the zenith distance of the pointing position𝐸 for the full energy range (upper plot) and in multiple bins of recon-structed energy reco (lower plot). The zenith distance ranges are illustrated by vertical gray solid lines. 105 Eccentricity ǫ Eccentricity ǫ Ereco / TeV Ereco / TeV 106 Creation of Background Models 14 As described in chapter 11, background models can be created by using NSOD. Based on the findings about the background shape presented in chapter 13, a new approach to create azimuth- dependent background models is presented in this chapter. Furthermore, the results are compared with background models from non-simultaneous off data simply grouped in multiple azimuth bins. Next, dependencies of the background rate on the zenith distance, the transmission of the atmosphere and the moonlight conditions are presented. Depending on the azimuth and zenith distance of the averaged pointing position, customized background models can be created for each observation. 14.1 Creation of Initial Background Mod In order to create a Background3D model in units of s−1MeelVs−1 sr−1, a background rate has to be estimated in bins of reconstructed energy and FoV coordinates. There are two ways to provide the background models according to GADF (see subsection 4.1.2): BKG_2D models depend on ENERGY and the offset THETA, and are therefore radially symmetric. BKG_3D models depend on ENERGY and field of view coordinates. As shown in a former study (Prandini et al. 2016), and also in section 13.4, the gamma-lik37e background detected by the MAGIC telescopes is not radially symmetric. As1a5consequenc−e,2i.t is necessary to store the background as BKG_3D model. Here the energy axisis divided in logarithmic bins from 0.01 TeV to 30 TeV, and the spatial axes are defined inbins from 5° to 2.5° for FOV_ALTAZ_LON and FOV_ALTAZ_LAT (see section 13.2). Counts of non-simultaneous off observations are histogrammed in those bins, and then divided by the energy bin width, observation time an𝛺d s=ol(id𝜙 𝜙 sin an(𝜙gle. The solid angle for each pixel bin is defined asN) − sin(𝜙S)) (𝜃E − 𝜃W) sr (14.1) with N and S as north and south lines of FOV_ALTAZ_LON and 𝜃E and 𝜃W as east and west lines of FOV_ALTAZ_LAT. As shown in chapter 13, the shape of the background depends on the azimuth and the zenith distance of the pointing position of an observation. Thus, background models have to be created dependent on azimuth and the zenith distance. For this, two methods are presented. For the creation of initial background models with both methods, observations from the dataset presented in section 13.2 are used. As presented in the last sections, parameters influencing the background are more stable at low energies, e.g. sin(𝛿) or the inter-telescope distance. Thus, background models are created for the low zenith distance range as a first step. In t0h°e ca3s6e0°of the binning-method, background rates are computed from observations in onebin of the averaged zenith distance from 5° to 35° and twelve bins of the averaged azimuth anglefrom to . It is known, that there are still variations in the shape of the background in these 107 14 Creation of Background Models bins. As the number of suitable observations is limited, a finer binning would lead to too large statistical uncertainties, especially at high energies. In the case of the rotation-method, which was first suggested by Mender et al. 2023, the k0°now3l6e0d°ge about the azimuth dep(endency, presented in section 13.4, is applied. For this, allobservations with an aver(aged zenith distance f,rom 5° to 35° and an averaged azimuth angle fromto are used. However, not FOV_ALTAZ_LON, FOV_ALTAZ_LAT))coordinates are considereddirectl𝐴y,𝑧 but the rotated FOV_ALTAZ_LON_ROT FOV_ALTAZ_LAT_ROT coordinates of each eventcalculated by (13.3). To create a background model for an observation with an averaged azimuthangle , the coordinates are rotated once more ( FOV_ALTAZ_LON'FOV_ALTAZ_LAT' ) = ( cos(𝛾theory(𝐴𝛾 (𝐴𝑧) sin(𝛾theory(𝐴𝑧 𝑧)))) −cosisn((𝛾𝛾theory(𝐴theory(𝐴𝑧𝑧)))) ) ⋅ ( FOV_ALTAZ_LON_ROTFOV_ALTAZ_LAT_ROT ) (14.2) around theory calculated by (12.1). Backgro(und models can ,be calculated for all values ofthe azimuth without any loss in statistics usi0n°g F3O6V0_°ALTAZ_LON' FOV_ALTAZ_LAT') coordinates.For a comparison with the binning-method, the rotation-method is applied twelve times usingt𝛾he bin center of twelve azimuth bins from to . As we know by the analysis presented insection 13.4, for high-energy bins the discrepancy of theoretical and observational rotation angleis non-negligible. It should be noted that the rotation-method only assumes that the offset between the theoretical and observational rotation angle is constant over the azimuth angle. This results from the fact that the coordinates are first rotated and then de-rotated again. Additionally, it is assumed that there is no additional azimuth dependency on the background’s shape. As we know by the analysis presented in section 13.4, the results of the low-energy data are largely consistent with the first assumption. As high-energy bins tend to have problems with too low statistics, the disadvantage that high-energy data do not perfectly agree with the above assumptions is taken. Furthermore, the results presented in section 13.5 show, that the offset has no significant dependency on the zenith distance within the low zenith distance range. To validate the assumption that there is no significant additional azimuth dependency on the background’s shape, the shape of the resulting binning-method and rotation-method background models are compared in the following section. 14.2 Comparison of binning-method and rotation-method Background Models For validation, all models of the binning-method, and twelve aligned models of the rotation- method are compared. To compare t𝐵h𝐺e shape, a relat−iv𝐵e𝐺error Error/% = rotatio𝐵n-𝐺method binning-method ⋅ 100 (14.3)rotation-method is computed in every s𝐵p𝐺atial and energy bin. For an exemplary energy bin from 0.07 TeV to 0.09 TeV,the background rat𝐵es𝐺as well as the relative error are shown in Figure 14.1. F2o6r5°the computation ofthe background rate binning-method observations with averaged azimuth angle from 240° to 270°were used, where rotation-method was computed for an azimuth angle of . As expected, the results of the rotation-method look smoother in comparison with the binning-method. When 108 14.2 Comparison of binning-method and rotation-method Background Models rotation-method binning-method 0.04 0.04 2 2 1 1 0.03 0.03 0 0 0.02 0.02 −1 −1 −2 −2 0.01 0.01 −2 −1 0 1 2 −2 −1 0 1 2 FOV_ALTAZ_LON / ° FOV_ALTAZ_LON / ° 0.00 0.00 −1 10 400 −2 10 2 200 1 −3 10 0 0 −4 10 −1 −200 Data −2 −5 10 µ = 11.46, σ = 80.48 Data (offset ≤ 1.5 deg) −2 −1 0 1 2 −400 FOV_ALTAZ_LON / ° µ = −2.62, σ = 20.65 −6 10 −400 −200 0 200 400 Error / % 𝐵Fi𝐺gure 14.1: Compa𝐵r𝐺ison of the background rates 𝐵𝐺rotation-method (upper left) andbinning-method (uppe2r40ri°ght) for an exemplary energy bin from 0.07 TeV to 0.09 TeV.The back2g6r5o°und rate binning-method is computed using all observations with an averagedazimuth angle from to 270°, where 𝐵𝐺rotation-method was computed for an azimuthangle of . Also the relative error Error is visualized for𝜇each pixel (lower left) and byhistograms of the values (lower right). Here, also the mean≤a1n.5d standard deviation 𝜎 aredisplayed and visualized by Gaussian distributions. Histograms aare shown for all pixels (blue) and for pixels with offset °nd Gaussian distribution(orange). 109 FOV_ALTAZ_LAT / ° FOV_ALTAZ_LAT / ° BG/(s−1MeV−1 −1Error / % sr ) Normalized number of bins FOV_ALTAZ_LAT / ° BG/(s−1MeV−1 sr−1) 14 Creation of Background Models looking at the relative error, large values at the edge of the FoV are noticeable. For further investigations, the relative error values of the corresponding pixel are displayed in histograms: one histogram contains all pixels, and another one only contains pixels with offset ≤ 1.5°. Additionally, the mean 𝜇 and the standard deviation 𝜎 of Error are displayed and visualized by Gaussian d𝜇istribu=tio1n1s.4. 6The1h𝜇istogram=s a−n2d.6t2he Gaussian distributions do align well. Comparingthe means no-cut and 𝜎offset-cu=t 80 , it can be found that the value for smaller offsets iscloser to the ideal value of . Also, the standard deviation of 𝜎offset-cut = 20.65 is much smaller foran applied cut than𝜇the value no-cut .48 without an applied offset cut.The parameters offs𝐸et-cut and𝑡𝜎offset-cut are computed for all twelve azimuth bins and all 37 bins inreconstructed energy reco. T𝜎he results are presented in Figure𝐵1𝐺4.2. They depend on the a𝜎zimuthangle and the observation time obs of the data used to create the binning-method rates. A correlationbetween the energy and the offset-cut value is visible: The higher the energy, the higher the offset-cut value. This can be explained by the expectations of higher systematic and statistical effects at higher energies. In addition to the energy-dependent values, also averaged values are presented. 𝐵It𝐺is visible that the mean of 𝜎offset-cut is extraordinarily high in two azimuth bins. However, italso c9ahn be4f6ouhnd that in these two azimuth bins, less data was available for the creation of thebinning-method bac𝜇kground mod𝜎els. Whereas the other bins contain data from observations overfrom to , these𝑡 two bins contain less than 3 h. only a small amount of observation time wasavailable For both offset-cut and offset-cut, the trend can be observed in the right plots of Figure 14.2that with increasing obs, the values decrease, indicating a better agreement of the models. 2 10 24 13 0 6.6 10 3.4 1.8 0.94 0.49 3 10 0.26 0.13 2 10 0.07 0.037 1 10 0.019 0 100 200 300 0 20 40 0.01 Az/° tobs/h Figure 14.2: Absolute value of 𝜇offset-cut (top) and 𝜎offset-cut (bottom) of the Gaussian distribution descr≤ibi1n.5g°the disc𝑡repancies of the background models in all pixels withinthe offset cut at . Both𝐸parameters are given in dependency on the azimuth angle(𝜎left) and the observation time obs (right). The colors of the datapoints indicate the binof the reconstructed energy reco. The black crosses show the mean of all 𝜇offset-cut andoffset-cut values in a given azimuth or obs bin. 110 σoffset−cut |µoffset−cut| Ereco / TeV 14.2 Comparison of binning-method and rotation-method Background Models To compare the energy spectra of the estimated backgro2u.n5d° models of both methods, theintegrated background rate is computed up to an offset to . The results are presented in Figure 14.3 for both methods and all azimuth bins. Overall, it is visible that the rates of both methods are consistent. As all background models created by the rotation-method are based on the same observations, the spectra are very similar to each other. On the contrary, the models created by the binning-method have greater differences from each other. Some of them are not defined at all at higher energies, which is an effect of small statistics and a big disadvantage of this method. −1 10 rotation-method binning-method −2 10 −3 10 −4 10 −5 10 −6 10 −7 10 −8 10 −2 −1 0 1 10 10 10 10 Ereco / TeV Figure 14.3: Integrated background rate dependent on the reconstructed energy 𝐸reco for the background models created by the rotation-method and the binning-method. Each line represents a background model of one azimuth bin. 111 Integrated background rate / (s−1TeV−1) 14 Creation of Background Models 14.3 Background Rate Dependencies To adjust an initial background model to a dedicated observation, Gammapy enables the adjustment of the background model to the counts of the dataset as explained in section 11.3. To study the dependencies of the normalization factor on the zenith distance, the transmission of the atmosphere, DC1 indicating the strength of the NSB, and the galactic latitude 𝑏, the FoVBackgroundMaker is applied to each off observation fitting a piece-wise norm spectral model to the data. For this analysis, the background models produced by the rotation-method are used as they contain more statistics than the ones produced by the binning-method. The fit procedure is visualized in Figure 14.4 for an exemplary observation. In this case, the background counts of the initial background model are above the counts of the observation for a large energy range. As a result, the fitted norm parameters are below one. The reason for the low number of counts is presumably caused by the low transmission of the atmosphere during this observation, but the influence of the transmission has to be validated. Since the H.E.S.S. telescope measurements showed a large Zd: 17.08 °, transmission: 0.74, −6DC1: 0.81·10 A 3 10 2 10 1 10 0 10 −1 10 Counts Initial background counts −2 10 Fitted background counts Norm parameters −3 10 −2 −1 0 1 10 10 10 10 Ereco / TeV Figure 14.4: Counts vs. reconstructed energy 𝐸reco for the application of the FoVBackgroundMaker to a dataset of an exemplary observation. The background counts predicted by the initial background model of the rotation-method are lower than the counts for a large energy range. The fitted norm parameters as well as the counts pre- dicted by the fitted background model are represented. For comparison, a grey dashed line presents a value of one. For this observation, most of the norm parameters are below this reference. influence of the zenith distance on the background rate (Mohrmann et al. 2019), this work studies the dependency for the MAGIC telescopes in the following. To avoid strong influences from 112 14.3 Background Rate Dependencies 0othAer 2p.a2raAmeters concerning the conditions of t9hkemobs0e.8rva1t.0ions, only observations, which weretaken under g5ood atmospheric (transmission at : – ) and the absence of the moon (DC1:µ – µ ) arme iunsed. As a further limitation, the observation duration of each observation hasto be at least . The normaliza𝑍ti𝑑on parameters of the observations passing these criteria arestudied for each energy bin. For two exemplary energy bins, the normalization parameter 𝜙0depending on the zenith distance are presented in Figure 14.6. In both energy bins, a linear correlation is evident, which can be de𝜙scr=ib𝑚ed⋅b𝑍y𝑑a+li𝑏near regression:0 = 𝑚 ⋅ (𝑍𝑑 − 𝑍𝑑 ) . (14.4)0 (14.5) For all energy bins, the resulting gradient 𝑚 and the zero 𝑍𝑑0 of the linear regressions are visualized in Figure 14.5. Additionally, the Pearson correlation coefficient 𝜌 between the normalization parameter and the zenith𝑚distanc𝑍e𝑑 is given to quantify the linearcoefficient is too low in an energy bin0 , no line0a.2r correlation between 𝑍 co𝑑rrelation. If the Pearsonand 𝜙0 is assumed. In the following, the parameters and are only discussed for≈an0.1enTeerVgy range where𝑚the amountof the Pearson correlation coefficient passes . As a result, energy bins at very low and at veryhigh energies are rejected. From the lowest energies up to , the gradient is negative. 0.5 0.0 −0.5 0.0 −0.2 50 0 −2 −1 0 1 10 10 10 10 Ereco / TeV Figure 𝐸14.5: Upper plot: Pearson correlation coeparameter and the zenith distance of observatioenergy reco. Medium𝐸and lower plot: Gradient 𝑚 fficient 𝜌 between the normalization ns in multiple bins of reconstructed and the zero 𝑍𝑑0 as result of linear regressions from normalization parameter to the zenith distance in multiple bins of reconstructed energy reco. Above an energy of ≈ 0.1 TeV, 𝑚 becomes positive and then increases only slightly with increasing 113 m ρ Zd0 14 Creation of Background Models ρ = -0.64 (0.03TeV–0.037TeV) Baseline 60 Linear fit Observations 50 40 30 20 10 0 0 5 10 15 20 25 30 35 40 Zenith distance / ° ρ = 0.65 (1.801TeV–2.236TeV) Baseline 2.5 Linear fit Observations 2.0 1.5 1.0 0.5 0.0 0 5 10 15 20 25 30 35 40 Zenith distance / ° Figure 14.6: Normalization parameter of two exemplary energy bins resulted by the fit of the FoVBackgroundMaker from the initial𝜌rotation-method background models tothe dataset of single observations vs. the zenith distance of each observation. In additionto the data, the Pearson correlation coefficient and the results of a linear fit are shown. 114 Normalization parameter Normalization parameter 14.3 Background Rate Dependencies energy. Below this threshold, the parameter 𝑍𝑑0 has a physical meaning, describing the zenith distance where the energy bin corresponds with the energy threshold. Observations with higher zenith distance values do≈n0o.1tTcoeVntain events with energies in this e0n.0e3rgyvery well by the upper plot of Figure 14.6 for the energy bin from TeVbin.to 0T.h03is7iTsevVisualized. Abovethe en1e.8r0g1yTtheVresho2l.d23o6fTeV , observations at all zenith distances contain events. Here, thehigher the zenith distance the higher the background rate. as visualized for an exemplary binfrom to in the lower plot of Figure 14.6. At very low and very high energies, the background rate is so low, that for a stand0a.0r3dTobservation time of ≈ 20min, less than a singlebackground count is predicted. Thus, the backgrouenVd rate10d.e1p68enTdeeVncy on the zenith distance canonly be described in an energy range from to and the further background models are defined only in this energy range. Using the information obtained by the linear regressions, specific background models based on the azimu5th° a2n0°gl3e5a°nd the zenith distance are calculated for each observation. In Figure 14.7,the spectral shape of background models produced for an azimuth angle of 0° and multiple zenithdistances of , , are visualized. The shape of the integrated background rates and their dependency on the zenith distance can be explained by the effective area 𝐴eff, which is described in detail in section 12.3 (see Figure 12.6). To study further dependencies of the background rate, again Zd: 5 ° −1 10 Zd: 20 ° Zd: 35 ° −2 10 −3 10 −4 10 −5 10 −1 0 1 10 10 10 Ereco / TeV Figure 14.7: Integrated background rate dependent on the reconstructed energy 𝐸reco for the background models created by the rotation-method with applied zenith dis0t°ancecorrection. The models are created for a pointing position of an azimuth angle of and multiple zenith distances. the FoVBackgroundMaker is applied to each off observation fitting a piece-wise norm spectral model in each energy bin. This time, background models created by the rotation-method with applied zenith distance corrections are used. Figure 14.8 shows the counts of the initial background, the 115 Integrated background rate / (s−1TeV−1) 14 Creation of Background Models observation data and the fitted background counts as in Figure 14.4, now with initial background models containing zenith distance corrections. It is visible that the shape of the initial background counts and the counts of the dataset match very well, so that the norm parameters are more constant over the whole energy range in comparison to the results in Figure 14.4 without the zenith distance correction. To investigate the dependencies on the transmission at 9 km, the NSB, and on the galactic latitude, the average of t|𝑏h|e normalization parameters of the energy bins is calculated for each observation.In Figure 14.9, the dependencies of the average of the normalization parameters on the transmission,on DC1 and on are visualized. As expected, there is a correlation between transmission values and averaged normalization parameters. This has also been observed for the H.E.S.S. telescopes (Mohrmann et al. 2019), and can easily be explained by the fact that a less-transparent atmosphere 0ab.8so1r.b0s Cherenkov photons and therefore leads to a decreased background rate. For the study onthe DC1 value, only observations taken under good atmospheric conditions (transmission at 9 km:– ) are used. Her|e𝑏|a decreasing average with higher DC1 is observed. This effect was alsoexpected since fewer events are trigger|𝑏e|dd 5n°ormalizationparameters of galactic observations ( ) and extragalactic observations ( ) was found. As explained in section 12.4, a higher background rate would have been expected for galactic observations. Zd: 17.08 °, transmission: 0.74, DC1: 0.81 10−6· A 3 10 2 10 1 10 0 10 −1 10 Counts Initial background counts −2 10 Fitted background counts Norm parameters −3 10 −2 −1 0 1 10 10 10 10 Ereco / TeV Figure 14.8: Counts vs. reconstructed energy 𝐸reco for the application of the FoVBackgroundMaker to a dataset of an exemplary observation. The initial background counts are predicted by a background model of the rotation-methodwith applied zenith distance corrections. 116 14.3 Background Rate Dependencies ρ = 0.39 2.5 Baseline Linear fit 2.0 Observations 1.5 1.0 0.5 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00 Transmission @ 9 km ρ = -0.19 2.5 Baseline Linear fit 2.0 Observations 1.5 1.0 0.5 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 2.2 DC1 / (10−6A) 2.5 Baseline |b| < 5 ° 2.0 |b| > 5 ° 1.5 1.0 0.5 0.0 0.5 1.0 1.5 2.0 2.5 Averaged normalization parameters Figure 14.9𝜌: Averaged normalization parameters dependent on the transmission at 9 km(upper plot) and on the DC1 (mean plot). In addition to the data, the Pearson correlationcoeffi|c𝑏i|eow5°n. In the lower plot, the normalizeddistribution of the averaged normalization parameter is shown for galactic observationswith and extragalactic sources with . 117 Normalized number of obervations Averaged normalization parameters Averaged normalization parameters 14 Creation of Background Models 14.4 Final Background Models In addition to the initial background models of the binning-method and the rotation-method introduced in section 14.1, the zenith-distance-dependent corrections described in section 14.3 are used to create background models. With this, background models of four different methods can be created: binning-method background models are created as described in section 14.1 in twelve bins of the averaged azimuth angle from 0° to 360°. For further usage, a background model is assigned to each observation based on the azimuth of its averaged pointing position. binning-method-zd-corrected background models are based on the background models of the binning-method. Additionally, energy-dependent corrections as described in section 14.3 based on the zenith distance of the pointing position of each observation are applied. rotation-method background models are created as described in section 14.1 dependent on the averaged azimuth angle of the pointing position of each observation. rotation-method-zd-corrected backgroundmodels are based on the rotation-method, but also contain energy-dependent corrections as described in section 14.3. A background model depends on the averaged azimuth and the zenith distance of the pointing position of an observation. All background models are computed in 152s7patial bins from −2.5° to 2.5° for FOV_ALTFOV_ALTAZ_LAT as the initial background model as explained in section 14.1. The energadapted and the5fi°nal3m5°odels are created in logarithmic bins from 0.03 TeV to 10.168 ATZ_eVLON andy binning is. With these methods, it is possible to create background models for observations taken under low zenith distances from to . In the next chapter, the models are validated by applying them to Crab Nebula observations. 118 Validation 15 To validate background models created with the methods presented in section 14.4, 3D analyses of Crab Nebula observations are performed. For this purpose, observations from the analysis period ST.03.07 taken under low zenith distances are used. The used DL3 dataset contains multi-offset full-enclosure I≤RF3s0and was produced with AutoMAGIC using the configuration file provided insection B.4. Only observations taken under good weather conditions (transmission at 9 km ≥ 0.8or cloudiness ) are used. With this, around 30 h of Crab Nebula data is available. The 3D high-level analysis is performed with Gammapy v1.1, as introduced in section 4.3. In this chapter, binned datasets – so-called map datasets – are created using the different background methods presented in section 14.4. Based on these map datasets, 3D fits are performed and the resulting Crab Nebula spectra as well as spectral and spatial residuals are investigated. Furthermore, significance maps are produced and systematic uncertainties are calculated. 15.1 Creation of Map Datasets For the creation of a map dataset containing binned data of all observations, the geometry of the map dataset has to be defined. The geometry is defined in equatorial coordinates, the International 4C°elestial Reference System (ICRS), with axes of right ascension and declination. In this case,t0h.0e3gTeeoVmetr1y0 iTsecVentered around the position of the Crab Nebula and h3as a width and height of. Furthermore, the geometry has an axis of reconstructed energy in 0 logarithmic bins fromto . The resulting geometry is visualized in Figure 15.1 in two spatial dimensions. Additionally, an exclusion mask, indicate0d.5b°y black regions, is visualized. The exclusion maskcontains circular regions with a radius of around 4FGL sources in the defined geometry. Figure 15.1: 2D geometry of the map dataset centered around the position of the Crab Nebula. The geometry ◦ 23 has a width and height of 4°. Additionally, an exclusion mask, containing circular regions with a radius of 0.5° ◦ 22 around 4FGL sources, is indicated by black regions in the sky. The mask in the center contains the Crab Neb- ◦ ula, while the mask in the upper right contains 4FGL 21 J0526.3+2246. ◦ 20 h m m m m 5 40 36 32 28 Right ascension 119 Declination 15 Validation For the creation of a dataset for each observation, the data of this obs1e.5r°vation is binned consider-ing the defined geometry. During this step, only data up to an offset of are used, as the previous study presented in section 14.2 shows that the background at higher offset angles shows higher uncertainties. Technically, this is performed with the SafeMaskMaker implemented in Gammapy. Furthermore, the background model of each observation is fitted to the data with the fit method of Gammapy’s FoVBackgroundMaker using a norm spectral model with one norm parameter over the whole energy range. For this, only data outside the exclusion region, shown in Figure 15.1, is used. Finally, the map datasets of all observations are stacked into one overall map dataset. This procedure is performed with DL3 data containing background models created with the binning- method, the rotation-method, the binning-method-zd-corrected, and the rotation-method- zd-corrected. In Figure 15.2, an overview of one stacked map dataset of the observations is presented. 500 Counts 500 Excess counts 400 400 ◦ ◦ 23 23 300 ◦ 300 ◦ 22 22 200 ◦ 200 ◦ 21 21 100 ◦ 100 ◦ 20 20 h m m m m h m m m m 5 40 36 32 28 5 40 36 32 28 0 0 Right ascension Right ascension 11 ×10 Exposure Background 5 40 ◦ 4 ◦ 23 23 30 ◦ 3 ◦ 22 22 20 ◦ 2 ◦ 21 21 10 ◦ 1 ◦ 20 20 h m m m m h m m m m 5 40 36 32 28 5 40 36 32 28 0 0 Right ascension Right ascension Figure 15.2: Overview of a stacked map dataset of all low zenith distance observations of the Crab Nebula dataset. The map dataset contains binned information about the detected count, the excess counts, the exposure and the background. In this case, the background was estimated using the background models created with the rotation- method-zd-corrected method. 120 Declination Declination 1/(m2 s) Declination Declination 15.2 Spectral and Spatial Analysis 15.2 Spectral and Spatial Analysis For a 3D fit on the created map datasets, a 3D model containing 2D spatial and 1D spectral information has to be defined. In this case, the overall 3D model is composed of two components: • (Ts𝑙h𝑜e source model describing the emission of the Crab Nebula, which contains a log-parabolape𝑛c0=t,r𝑙𝑎a2𝑡l20m).01o3d3e°l (4.12) and a point spatial model (4.18). In the latter, the source coordinatesare fixed to the well-known position of the Crab Nebula: RA = 83.6333° andDEC . • The background model. The log-parabola parameters 𝛼, 𝛽 and 𝜙0 of the spectral model and the norm parameter of the background model are fitted. The 3D fit is performed on all created map datasets using background models created with different methods. The resulting log-parabola spectra are visualized in Figure 15.3 for each background method. Comparing the resulting log-parabola spectra, visualized in Figure 15.3, with the reference (2.1) of former observations (Aleksić et al. 2015), it is noticeable 3D fit 3D fit −10 10 Reference −10 10 Reference −11 −11 10 10 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (a) binning-method. (b) rotation-method. 3D fit −10 10 Reference −10 10 −11 −11 3D fit 10 10 Reference −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (c) binning-method-zd-corrected. (d) rotation-method-zd-corrected. Figure 15.3: Log-parabola spectral models resulting from 3D fits on the created map datasets 1us𝜎ing background models created with different methods. For comparison, areference (2.1) of former observations (Aleksić et al. 2015) is shown. The grey bandsindicate - uncertainty regions. 121 E2dN/dE/(erg cm−2s−1) E2dN/dE/(erg cm−2s−1) E2dN/dE/(erg cm−2s−1) E2dN/dE/(erg cm−2s−1) 15 Validation that1th𝜎e spectrum obtained using the rotation-method is compatible with the reference withinthe - uncertainty region. The result using the rotation-method-zd-correctedmethod is closer to the reference at lower energies, but a bit further away for high energies. Actually, the spectrum obtained using the binning-method is not in agreement with the reference, as the curvature is very low. With the binning-method-zd-corrected method, the curvature is stronger and the results match at higher energies; but at low energies, the spectrum is not in agreement with the reference. To validate how well the overall model is describing the data, the residuals are inspected. The spectral residuals are calculated by 𝑁 − 𝑁 Residuals = exc√es𝑁s model (15.1)model with the number 𝑁excess of observed excess counts and the number 𝑁model of the predicted signal counts. The resulting spectral residuals are visualized in Figure 15.4 depending on the energy. The results are consistent with the comparison of the gained spectra with the reference. 200 200 100 100 0 0 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (a) binning-method. (b) rotation-method. 200 200 100 100 0 0 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (c) binning-method-zd-corrected. (d) rotation-method-zd-corrected. Figure 15.4: Spectral residuals of 3D fits on map datasets depending on the energy created by using background models obtained with different methods. The residuals are calculated by (15.1). 122 Residuals Residuals Residuals Residuals 15.2 Spectral and Spatial Analysis Furthermore, the spatial residuals Residuals = 𝑁excess − 𝑁model (15.2) are presented in Figure 15.5. It is remarkable, that for each background method, a pattern is formed around the source position showing negative and positive regions. This is an indication that it is not sufficient to store the PSF in radially symmetric bins, as described in subsection 4.1.2. 4 4 ◦ ◦ 23 23 2 2 ◦ ◦ 22 0 22 0 ◦ −2 ◦ −2 21 21 −4 −4 ◦ ◦ 20 20 h m m m m h m m m m 5 40 36 32 28 5 40 36 32 28 Right ascension Right ascension (a) binning-method. (b) rotation-method. 4 4 ◦ ◦ 23 23 2 2 ◦ ◦ 22 0 22 0 ◦ −2 ◦ −2 21 21 −4 −4 ◦ ◦ 20 20 h m m m m h m m m m 5 40 36 32 28 5 40 36 32 28 Right ascension Right ascension (c) binning-method-zd-corrected. (d) rotation-method-zd-corrected. Figure 15.5: Smoothed spatial residuals of 3D fits on map datasets created by using background models obtained with different methods for the overall energy range. The residuals are calculated by (15.2). 123 Declination Declination Declination Declination 15 Validation 15.3 Creation of Significance Maps A further possibility for the v0.a1l°idation of background models is the creation of significance maps.Using a correlation radius of the ExcessMapEstimator implemented in Gammapy can compute correlated excess, significance and error maps from a map dataset. The ExcessMapEstimator is app0l.i0e3dTto the map datasets created as described in section 15.1 using different backgroundmethods. TehVe res1u0ltTinegVsignificance maps are presented in Figure 15.6 for the full energy rangefrom to . In all plots, a black circle indicates the on region, which is defined as a circle arou𝜎nd the position of the Crab Nebula with an offset of 0.5°. All bins outside this on regionare defined as off bins. From the significance values of all off bins, a mean 𝜇 and the standarddeviation a𝜎re ca=lc1ulated. With a𝜎pe=rf1ect background model, the me𝜎a𝜎n has the value 𝜇 = 0 and thestandard deviation has the value . In this perfect scenario, the only contains the statisticaluncertainty stat and does not include a systematic uncertainty sys. The actual distributions of the significance values are presented in Figure 15.7. In addition to the histograms representing the significance values of the off bins, histograms representing the significance values of all bins are shown. It is visible that bins from the on region reach high significance values. Gaussian distributions visualize the mean and the s𝜎ta>nd𝜎1ard deviation of the significance values of the offregion. Actually, the standard deviation is for all background methods. This means that thebackground includes a systematic uncertainty sys. Assuming that both uncertainties 𝜎stat and 𝜎sys are normally distributed, the relationship𝜎 2 = 𝜎 2 + 𝜎 2stat sys (15.3) holds, and the systematic uncertainty o𝜎f th=e background can be calculated tosys = √√((𝜎𝜎 22 −−1𝜎)2s.tat) (15.4)(15.5) With this, the syste𝜎mat=ic1u.n21certainties of the background models created by different models are:binning-method: s rotation-method: 𝜎yssys = 1.12 binning-method-zd-corrected: 𝜎sys = 1.10 rotation-method-zd-corrected: 𝜎sys = 1.05. It is important to note that the calculation of the systematic uncertainties of the background models depends on the event selection criteria, e.g. the hadronness cut, the energy range and the position in the sky region. 124 15.3 Creation of Significance Maps ◦ ◦ 24 2 24 2 10 10 1 1 10 10 ◦ ◦ 23 23 0 0 10 10 ◦ ◦ 22 0 22 0 0 0 −10 −10 ◦ ◦ 21 1 21 1 −10 −10 2 2 −10 −10 h m m m m h m m m m 5 40 36 32 28 5 40 36 32 28 Right ascension Right ascension (a) binning-method. (b) rotation-method. ◦ ◦ 24 2 24 2 10 10 1 1 10 10 ◦ ◦ 23 23 0 0 10 10 ◦ ◦ 22 0 22 0 0 0 −10 −10 ◦ ◦ 21 1 21 1 −10 −10 2 2 −10 −10 h m m m m h m m m m 5 40 36 32 28 5 40 36 32 28 Right ascension Right ascension (c) binning-method-zd-corrected. (d) rotation-method-zd-corrected. Figure 15.6: Significance maps resulting from the application of the ExcessMapEstimato0r.03iTmepVleme1n0tTeedV in Gammapy to map datasets created withbackground models obtained by different methods. The results are0.s5h°own for the fullenergy range from to . The black circle indicates the on region, definedas a circle around the position of the Crab Nebula with an offset of . 125 Declination Declination Significance Significance Declination Declination Significance Significance 15 Validation Gaussian: µ = −0.08, σ = 1.57 Gaussian: µ = −0.10, σ = 1.49 All bins All bins Off bins Off bins −2 −2 10 10 −4 −4 10 10 0 10 20 30 40 0 10 20 30 40 Significance Significance (a) binning-method. (b) rotation-method. Gaussian: µ = −0.03, σ = 1.50 Gaussian: µ = −0.06, σ = 1.45 All bins All bins Off bins Off bins −2 10 −210 −4 −4 10 10 0 10 20 30 40 0 10 20 30 40 Significance Significance (c) binning-method-zd-corrected. (d) rotation-method-zd-corrected. Figure 15.7: Significance value histograms corresponding to the significance maps in Figure 15.6. The distribution of significance values is presented by two histograms, one containing all bins (grey) and one containing only the bins outside the on region (blue). For each background method, the mean value and the standard deviation of the significance values of the off bins are given in the titles and are also visualized by Gaussian distributions. 126 Normalized number of bins Normalized number of bins Normalized number of bins Normalized number of bins Conclusions and Future Prospects 16 In the following, the main conclusions obtained in the course of Part III of this thesis are summa- rized. Furthermore, future prospects building on the results are presented. Conclusions • For the characterization of the gamma-like background detected by the MAGIC telescopes 1441 observations taken under good observational conditions were processed up to DL3 in a reproducible and automated way using AutoMAGIC. It was shown that the rotation of the shape of the background depending on the azimuth is mainly caused by the overlapping part of the two view cones of MAGIC-I and MAGIC-II. Furthermore, an additional rotation caused by the geomagnetic field was identified, whose strength depends on the energy and the azimuth and zenith distance of the pointing position of the telescopes. For the first time, the background rate detected by the MAGIC telescopes was studied depending on the zenith distance, the transmission of the atmosphere, and the night sky background. • Based on the background characterization, a new method was presented creating back- ground models depending on the azimuth and zenith distance of the pointing position of an observation taken under low zenith distances. This method enables the use of NSOD taken under other observational conditions than the observation itself. Thus, the created background models contain more statistics. Background models were created with the new and also with more conventional methods for Crab Nebula observations taken under low zenith distance observations. Based on this data, a 3D fit with Gammapy was presented for MAGIC observations for the first time. Future Prospects • For the creation of map datasets, as described in section 15.1, the initial background model stored in the DL3 data is fitted to the dedicated observation. In this work, the background was fitted using a norm parameter over the overall energy range from 0.03 TeV to 10 TeV. Further investigations are needed to optimize the energy range of the fit and the application of a piece-wise norm spectral model should be tested. • The systematic uncertainties of the background methods obtained in chapter 15 depend on the event selection criteria, the energy range and the position in the sky region. It is of interest to quantify these dependencies. 127 16 Conclusions and Future Prospects • For the creation of the background map of an observation, Gammapy transforms the infor- mation of the background model from FoV to sky coordinates. Currently, the transformation uses the pointing position in the middle of the observation and the total time of the ob- servation. It would be more accurate to perform the procedure in multiple time intervals between the start and the stop of the observation, which would handle the rotation of the FoV (see https://github.com/gammapy/gammapy/issues/4860). Once the improvement is implemented, it should be verified whether this reduces the systematic uncertainties of the background models. • Some adjustments of the GADF should be considered: On the one hand, there are strong hints, that it is not sufficient to store the PSF in bins of the offset angle from the source position (see Figure 15.5). On the other hand, it may be meaningful not only to store information about the background but also about its systematic uncertainties. • Before the presented background methods can be used for the analysis of new data, further validation steps are necessary. This includes the analysis of deep observations of an empty field and the analysis of Crab Nebula data taken with different wobble offsets. Furthermore, it needs to be investigated if it is accurate to use NSOD from the analysis periods ST.03.07 and ST.03.09 for the creation of background models for observations taken in other analysis periods. Also, it should be analyzed, if the temperature (summer vs. winter) is influencing the background detected by the MAGIC telescopes. • For the creation of background models for observations taken under medium and high zenith distances, further investigations about the background dependencies on the inter- telescope distance and the geomagnetic field are required. At higher zenith distances, these parameters have strong dependencies on the azimuth angle. Thus, it remains a challenge to investigate and parameterize these dependencies. • To make the new rotation-method-zd-corrected method available for all analyzers, the method has to be implemented in pybkgmodel (Strzys et al. 2023). This is an open-source Python package, which is currently developed for the background model generation for IACTs. • The creation of background models needs to be implemented in AutoMAGIC to enable the automated and reproducible creation of DL3 data containing full-enclose multi-offset IRFs including background models. This will enable the realization of the MAGIC legacy, a project to preserve data for a future generation of scientists, free the full potential of AutoMAGIC and MAGIC data, open possibilities of new and more complex analysis of long-term VHE data. 128 Part IV Appendix A AutoMAGIC and magicDL3 Configuration Files 131 B Validation of the Off Data Analysis Pipeline with Crab Nebula Data 145 C Rotation Angle Visualization 159 Bibliography 171 Acknowledgements 182 129 AutoMAGIC and magicDL3 Configuration Files A A.1 magicDL3 configuration file: Crab Nebula, ST.03.08 # I/O dl3.melibeaObsDir: /data/magic/scratch/smender/phd-thesis-crab-ST0308/ melibea_output_crab_st0307 dl3.melibeaMcDir: /nfs/pic.es/user/s/smender/phd-thesis-crab-ST0308/melibea_mc dl3.outDir: /nfs/pic.es/user/s/smender/phd-thesis-crab-ST0308/dl3_output_crab_st0307 # irf components configuration dl3.singleOffset: true dl3.pointLike: true # dead time per event (for effective time calculation) dl3.deadTimePerEvent: 26.e-6 # Zd range and Az bins dl3.nBinsAz: 1 dl3.minZd: 35. dl3.maxZd: 50. # cuts applied on the MC events for the IRF computation dl3.minSize: 50. dl3.hadCut: 0. dl3.theta2Cut: 0. # probabilities corresponding to the quantiles of the hadronness and theta2 MC # distributions used to determine the cuts # if not specified or set to 0., will use the fixed cuts specified above dl3.probHad: 0.9 dl3.nBinsHad: 100 dl3.hadCutRange: 0.15, 0.95 dl3.probTheta2: 0.9 flute.nBinsTheta2: 50 flute.maxTheta2: 0.4 dl3.theta2CutRange: 0.01, 0.08 # energy binning for IRF computation dl3.nBinsEnergyEst: 30 dl3.minEnergyEst: 10. dl3.maxEnergyEst: 30000. dl3.estTrueFactor: 0.8 # rad2 binning, optional # will be used only in case of a full-enclosure IRF to compute the PSF dl3.nBinsRad2 : 40 131 A AutoMAGIC and magicDL3 Configuration Files dl3.rad2Max : 0.4 # offset binning, in case of multi-offset IRFs dl3.nBinsOffset: 6 dl3.minOffset: 0 dl3.maxOffset: # assumed spectrum for IRFs computation dl3.AssumedSpectrum: pow(x/300.,-2.31-0.26*log10(x/300.)) # add optional columns GAMMANESS, DETX, DETY in the event list for technical studies dl3.optionalColumns: true # This option switches off a default check of M1 vs M2 time stamp consistency. # It should be set to `true` if the time stamp is known to be unreliable (e.g. overwritten by DRS clock information) dl3.skipM1M2TimeCheck: false A.2 AutoMAGIC configuration file: Crab Nebula, ST.03.16 mars_version = 'Mars-V2-20-2' # be sure this version is installed! [target] source_name = "CrabNebula" start_date = 2020-10-19 # use - as separator, not _ ! stop_date = 2021-09-29 [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 35 zd_max = 50 dc_min = 0 dc_max = 10000 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! [star] cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off 132 A.3 AutoMAGIC configuration file: TXS 0149+710, ST.03.08 store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = false [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "ringwobble" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = true # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] use_lidar_correction = true forced_coach_job_ids = [1691, 1693, 1695, 1697] [magicDL3] dl3_converter_version = "v0.1.9" irf_type = "point-like" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = true # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) [flute] binning = "run-wise" # "run-wise" or "night-wise" lightcurve binning, only relevant for flute jobs run_fold = true # run fold after flute to fit an SED function and run flute again with the fitted spectrum (recommended!) hadronness_cut_from_efficiency = true # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = false # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) A.3 AutoMAGIC configuration file: TXS 0149+710, ST.03.08 mars_version = 'Mars_V2-19-14' # be sure this version is installed! 133 A AutoMAGIC and magicDL3 Configuration Files [target] source_name = "TXS0149+710" start_date = 2017-08-29 # use - as separator, not _ ! stop_date = 2017-09-15 [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 5 zd_max = 62 dc_min = 0 dc_max = 10000 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! [star] cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = false # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = false [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "ringwobble" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = true # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] 134 A.4 AutoMAGIC configuration file: TXS 0149+710, ST.03.16 use_lidar_correction = true forced_coach_job_ids = false # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) [magicDL3] dl3_converter_version = "v0.1.9" irf_type = "point-like" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = true # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) [flute] binning = "run-wise" # "run-wise" or "night-wise" lightcurve binning, only relevant for flute jobs run_fold = true # run fold after flute to fit an SED function and run flute again with the fitted spectrum (recommended!) hadronness_cut_from_efficiency = true # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = false # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) A.4 AutoMAGIC configuration file: TXS 0149+710, ST.03.16 mars_version = 'Mars-V2-20-2' # be sure this version is installed! [target] source_name = "TXS0149+710" start_date = 2020-12-01 # use - as separator, not _ ! stop_date = 2021-09-03 [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 5 zd_max = 62 dc_min = 0 dc_max = 10000 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! 135 A AutoMAGIC and magicDL3 Configuration Files [star] cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = false [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "ringwobble" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = true # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] use_lidar_correction = true forced_coach_job_ids = false # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) [magicDL3] dl3_converter_version = "v0.1.9" irf_type = "point-like" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = true # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) [flute] binning = "run-wise" # "run-wise" or "night-wise" lightcurve binning, only relevant for flute jobs run_fold = true # run fold after flute to fit an SED function and run flute again with the fitted spectrum (recommended!) hadronness_cut_from_efficiency = true # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = false # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false 136 A.5 AutoMAGIC configuration file: Crab Nebula, ST.03.16, standard ring-wobble MCs quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) A.5 AutoMAGIC configuration file: Crab Nebula, ST.03.16, standard ring-wobble MCs mars_version = 'Mars-V3-0-1' # be sure this version is installed! [target] source_name = "CrabNebula" start_date = 2019-09-16 # use - as separator, not _ ! stop_date = 2020-02-22 source_pos = [83.633212, 22.01446] # Sky coordinates of source / deg wobble_offset_tol = 0.03 # degree [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 0 zd_max = 50 dc_min = 0 dc_max = 2200 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! [star] cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = true [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version 137 A AutoMAGIC and magicDL3 Configuration Files energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "ringwobble" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = true # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] use_lidar_correction = true forced_coach_job_ids = [2544, 2548] # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) selectmc2_rmin = [0.0,0.3,0.48,0.61] # In degree. Min edges of the diffuse MCs for off-axis point-like analysis (offset from source_pos to pointing is not 0.4 deg within wobble_offset_tol) selectmc2_rmax = [0.30,0.48,0.58,0.71] # In degree. Max edges of the diffuse MCs for off-axis point-like analysis (offset from source_pos to pointing is not 0.4 deg within wobble_offset_tol) force_diffuse_mcs = false # If true: Force to use diffuse MCs for off-axis point-like analysis (also if the offset from source_pos to pointing is 0.4 deg within wobble_offset_tol), use if for Crab X-Check. Default: false (highly recommended!) [magicDL3] dl3_converter_version = "v0.1.11" irf_type = "point-like" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = true # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) A.6 AutoMAGIC configuration file: Crab Nebula, ST.03.16, diffuse MCs mars_version = 'Mars-V3-0-1' # be sure this version is installed! [target] source_name = "CrabNebula" start_date = 2019-09-16 # use - as separator, not _ ! stop_date = 2020-02-22 source_pos = [83.633212, 22.01446] # Sky coordinates of source / deg wobble_offset_tol = 0.03 # degree [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 0 zd_max = 50 dc_min = 0 dc_max = 2200 138 A.6 AutoMAGIC configuration file: Crab Nebula, ST.03.16, diffuse MCs hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! [star] cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = true [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "ringwobble" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = true # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] use_lidar_correction = true forced_coach_job_ids = [2546, 2550] # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) selectmc2_rmin = [0.0,0.3,0.48,0.61] # In degree. Min edges of the diffuse MCs for off-axis point-like analysis (offset from source_pos to pointing is not 0.4 deg within wobble_offset_tol) selectmc2_rmax = [0.30,0.48,0.58,0.71] # In degree. Max edges of the diffuse MCs for off-axis point-like analysis (offset from source_pos to pointing is not 0.4 deg within wobble_offset_tol) force_diffuse_mcs = true # If true: Force to use diffuse MCs for off-axis point-like analysis (also if the offset from source_pos to pointing is 0.4 deg within wobble_offset_tol), use if for Crab X-Check. Default: false (highly recommended!) [magicDL3] dl3_converter_version = "v0.1.11" irf_type = "point-like" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = true # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false 139 A AutoMAGIC and magicDL3 Configuration Files quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) A.7 AutoMAGIC configuration file: 4C +39.12, ST.03.12 mars_version = 'Mars-V3-0-1' # be sure this versioin is installed! [target] source_name = "4C+39.12" start_date = 2019-10-28 # use - as separator, not _ ! stop_date = 2020-01-03 source_pos = [53.576786, 39.356836] # Sky coordinates of source / deg wobble_offset_tol = 0.03 # degree [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 0 zd_max = 50 dc_min = 0 dc_max = 1000 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! [star] cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = true [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea 140 A.8 AutoMAGIC configuration file: off data, ST.03.07 [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "ringwobble" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = true # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] use_lidar_correction = true forced_coach_job_ids = false # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) selectmc2_rmin = [0.0,0.3,0.48,0.61] # In degree. Min edges of the diffuse MCs for off-axis point-like analysis (offset from source_pos to pointing is not 0.4 deg within wobble_offset_tol) selectmc2_rmax = [0.30,0.48,0.58,0.71] # In degree. Max edges of the diffuse MCs for off-axis point-like analysis (offset from source_pos to pointing is not 0.4 deg within wobble_offset_tol) force_diffuse_mcs = false # If true: Force to use diffuse MCs for off-axis point-like analysis (also if the offset from source_pos to pointing is 0.4 deg within wobble_offset_tol), use if for Crab X-Check. Default: false (highly recommended!) [magicDL3] dl3_converter_version = "v0.1.11" irf_type = "point-like" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = true # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) A.8 AutoMAGIC configuration file: off data, ST.03.07 mars_version = 'Mars-V3-0-1' # be sure this version is installed! [target] source_list_file = "/nfs/pic.es/user/s/smender/automagic_configs/source_list.txt" start_date = 2016-04-29 # use - as separator, not _ ! stop_date = 2017-11-02 [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 5 zd_max = 62 dc_min = 0 dc_max = 2200 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 141 A AutoMAGIC and magicDL3 Configuration Files use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! [star] cleaning_method = "sum" cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = true [RF] cleaning_survival_rate = 0.5 force_rf = true only_one_RF = false max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "diffuse2.5" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = false # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] use_lidar_correction = true forced_coach_job_ids = false # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) force_diffuse_mcs = false # If true: Force to use diffuse MCs for off-axis point-like analysis (also if the offset from source_pos to pointing is 0.4 deg within wobble_offset_tol), use if for Crab X-Check. Default: false (highly recommended!) [magicDL3] dl3_converter_version = "v0.1.11" irf_type = "full-enclosure" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = false # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) 142 A.9 AutoMAGIC configuration file: off data, ST.03.09 A.9 AutoMAGIC configuration file: off data, ST.03.09 mars_version = 'Mars-V3-0-1' # be sure this version is installed! [target] source_list_file = "/nfs/pic.es/user/s/smender/automagic_configs/source_list.txt" start_date = 2017-11-10 # use - as separator, not _ ! stop_date = 2018-06-29 [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 5 zd_max = 62 dc_min = 0 dc_max = 2200 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! [star] cleaning_method = "sum" cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = true [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" 143 A AutoMAGIC and magicDL3 Configuration Files view_cone = "diffuse2.5" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = false # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] use_lidar_correction = true forced_coach_job_ids = false # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) force_diffuse_mcs = false # If true: Force to use diffuse MCs for off-axis point-like analysis (also if the offset from source_pos to pointing is 0.4 deg within wobble_offset_tol), use if for Crab X-Check. Default: false (highly recommended!) [magicDL3] dl3_converter_version = "v0.1.11" irf_type = "full-enclosure" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = false # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) 144 Validation of the Off Data Analysis Pipeline with Crab Nebula Data B The datasets, presented in section 13.2, contain 1441 off data observations from the analysis periods ST.03.07 and ST.03.09. In both periods, data from the low, medium and high zenith distance ranges was analyzed. As some of the analyzed off observations were also used for training of the models performing the gamma/hadron separation, two models each were trained using two different source sets of off data. This ensures, that the gamma/hadron separation applied to an observation is always performed with a model trained with events from other observations. As both analysis periods use the MC simulations from ST.03.07, only six different analyses, listed in Table B.1, were used for the creation of DL3 files of the 1441 off data observations. To validate those analyses, Crab Nebula observations taken under the same observational conditions are analyzed. Although, the analysis periods ST.03.07 and ST.03.09 use the same MC simulations, the validation is performed for each analysis period separately. This ensures, that the analysis works for both analysis periods. For the validation, DL3 data of Crab Nebula observations containing full-enclose multi-offset IRFs are processed with AutoMAGICV0.4 using the configuration files provided in section B.4 to section B.7. The data is tra0n.2s°formed into a 1D dataset containing information about a circular on regionwith a radius of centered around the source position of the Crab Nebula. The off counts are obtained with the reflected regions method. The results of the 1D spectral analysis are presented in the following sections. The results only validates the analyses for a wobble offset of 0.4°, but in this MC periods Crab Nebula observations with other wobble offsets are not available. Table B.1: Overview of all separate analyses, which are performed to analyze the 1441 off data observations. Analysis period Moon condition Zenith distance range MC set Source set ST.03.07 moon0 low diffuse 1 ST.03.07 moon0 low diffuse 2 ST.03.07 moon0 medium diffuse 1 ST.03.07 moon0 medium diffuse 2 ST.03.07 moon0 high diffuse 1 ST.03.07 moon0 high diffuse 2 145 B Validation of the Off Data Analysis Pipeline with Crab Nebula Data B.1 Detection Plots Non = 32363 Non = 32363 20000 N = 6602 20000off Noff = 6602 σLi&Ma = 136.23 σLi&Ma = 136.23 tobs = 29.63 h tobs = 29.63 h 10000 10000 On On Off Off 0 0 0.00 0.05 0.10 0.15 0.20 0.00 0.05 0.10 0.15 0.20 θ2 / deg2 θ2 / deg2 (a) Low zenith, source set 1. (b) Low zenith, source set 2. 6000 Non = 9373 6000 Non = 9373 Noff = 2166 Noff = 2166 σLi&Ma = 69.66 σLi&Ma = 69.664000 4000 tobs = 9.12 h tobs = 9.12 h 2000 2000 On On Off Off 0 0 0.00 0.05 0.10 0.15 0.20 0.00 0.05 0.10 0.15 0.20 θ2 / deg2 θ2 / deg2 (c) Medium zenith, source set 1. (d)Medium zenith, source set 2. Non = 4217 Non = 4217 2000 Noff = 1127 2000 Noff = 1127 σLi&Ma = 43.62 σLi&Ma = 43.62 tobs = 4.4 h tobs = 4.4 h 1000 1000 On On Off Off 0 0 0.00 0.05 0.10 0.15 0.20 0.00 0.05 0.10 0.15 0.20 θ2 / deg2 θ2 / deg2 (e) High𝜃z2enith, source set 1. (f) High zenith, source set 2.F0.i1gTuerVe B.310:TeVdistributions of the on an𝑁d off e𝑁vents in the energy range ofto 𝜃for=ob0s.2e°rvations of the Crab Nebula in the analysis period ST.03.07 andmoon range moon_0. The displayed values of on and off are on and off counts, whichsurvive the cut of 2 . Additionally, the resulting Li&Ma significance, calculated by (4.9), and the total selected observation time are shown. Each plot presents the results for dedicated analysis conditions. 146 Counts Counts Counts Counts Counts Counts B.1 Detection Plots Non = 15219 Non = 1516810000 10000 Noff = 3135 Noff = 3080 7500 σLi&Ma = 93.07 7500 σLi&Ma = 93.43 tobs = 14.22 h tobs = 14.22 h 5000 5000 On On 2500 2500 Off Off 0 0 0.00 0.05 0.10 0.15 0.20 0.00 0.05 0.10 0.15 0.20 θ2 / deg2 θ2 / deg2 (a) Low zenith, source set 1. (b) Low zenith, source set 2. 4000 4000 Non = 5737 Non = 5625 3000 Noff = 1320 3000 Noff = 1284 σLi&Ma = 54.6 σLi&Ma = 54.25 tobs = 5.78 h 2000 tobs = 5.78 h2000 1000 On 1000 On Off Off 0 0 0.00 0.05 0.10 0.15 0.20 0.00 0.05 0.10 0.15 0.20 θ2 / deg2 θ2 / deg2 (c)Medium zenith, source set 1. (d)Medium zenith, source set 2. Non = 660 Non = 634 300 Noff = 198 300 Noff = 177 σLi&Ma = 16.2 σLi&Ma = 16.53 200 tobs = 1.15 h 200 tobs = 1.15 h 100 On 100 On Off Off 0 0 0.00 0.05 0.10 0.15 0.20 0.00 0.05 0.10 0.15 0.20 θ2 / deg2 θ2 / deg2 (e) High𝜃z2enith, source set 1. (f) High zenith, source set 2.F0.i1gTuerVe B.320:TeVdistributions of the on and off events in the energy range ofto 𝜃for=ob0s.2e°rvations of the Crab Nebula in the analysis period ST.03.09 andmoon range moon_0survive the cut of 2. The displayed values of 𝑁on and 𝑁off are on and off counts, which. Additionally, the resulting Li&Ma significance, calculated by (4.9), and the total selected observation time are shown. Each plot presents the results for dedicated analysis conditions. 147 Counts Counts Counts Counts Counts Counts B Validation of the Off Data Analysis Pipeline with Crab Nebula Data B.2 Lightcurves 10−10 10−10× × 1.5 1.5 1.0 1.0 0.5 Reference 0 5 Reference. Run-wise binning Run-wise binning 01 01 01 01 01 01 01 01 01 01 01 01 0− 1− 2− 1− 2− − − − − − − −1 1 1 0 0 03 10 11 12 01 02 03 6− 6− 6− 7− 7− 7− 6− 6− 6− 7− 7− − 01 01 01 01 01 01 01 01 01 01 01 01 7 2 2 2 2 2 2 2 2 2 2 2 2 Date Date (a) Low zenith, source set 1, ST.03.07. (b) Low zenith, source set 2, ST.03.07. 10−10 10−10× × 1.5 1.5 1.0 1.0 0 5 Reference Reference. 0.5 Run-wise binning Run-wise binning 15 01 15 01 15 01 15 01 15 15 01 15 01 15 01 15 01 15 1− 2− 2− 1− 1− 2− 2− 3− 3− − − − − − − − − −1 1 1 0 0 0 0 0 0 11 12 12 01 01 02 02 03 03 7− 7− 7− 8− 8− 8− 8− 8− 8− 7− 7− 7− 8− 8− 8− 8− 8− 8− 20 1 01 01 01 01 01 01 01 01 01 01 01 01 01 1 1 1 12 2 2 2 2 2 2 2 2 2 2 2 2 20 20 20 20 Date Date (c) Low zenith, source set 1, ST.03.09. (d) Low zenith, source set 2, ST.03.09. Figure B.3: Each plot presents the run-wise lightcurve of the Crab Nebula above 300GeV for dedicated analysis conditions. The fluxes are stable and in good agreement with the reference of former observations (Aleksić et al. 2015), which is indicated by a grey dashed line. 148 Flux −1 −2 −1 −2E>300GeV/ (s cm ) FluxE>300GeV/ (s cm ) Flux / (s−1 cm−2) Flux / (s−1 cm−2E>300GeV E>300GeV ) B.2 Lightcurves ×10−10 ×10−10 1.5 1.5 1.0 1.0 0 5 Reference. 0.5 Reference Run-wise binning Run-wise binning 01 01 01 01 01 01 01 01 01 01 01 01 0−1 11 − 2− 1− 2− 3− 0− 1− 2− 1−1 0 0 0 1 1 1 0 02 − 3−0 6− 6− 6− 7− 7− 7− 6− 6− 6− 7− 7− 7− 20 1 01 01 01 01 01 1 1 1 1 1 12 2 2 2 2 20 20 20 20 20 20 Date Date (a)Medium zenith, source set 1, ST.03.07. (b)Medium zenith, source set 2, ST.03.07. ×10−10 −10×10 Reference Reference 1.5 1.5 Run-wise binning Run-wise binning 1.0 1.0 0.5 0.5 15 01 15 01 15 01 15 01 15 15 01 15 01 15 01 15 01 15 1− 2−1 1 12 − − 01 01 − − − − − 02 02 03 03 11 − 2− 2− 1−1 1 0 01 − 02 − 02 − − − 03 03 7− 7− 7− 8− 8− 8− 8− 8− 8− 7− − − − − − − − − 01 01 01 01 01 01 01 1 1 1 1 7 17 18 18 18 18 18 8 2 2 2 2 2 2 2 20 20 20 20 20 20 20 20 20 20 20 1 Date Date (c) Medium zenith, source set 1, ST.03.09. (d)Medium zenith, source set 2, ST.03.09. Figure B.4: Each plot presents the run-wise lightcurve of the Crab Nebula above 300GeV for dedicated analysis conditions. The fluxes are stable and in good agreement with the reference of former observations (Aleksić et al. 2015), which is indicated by a grey dashed line. 149 Flux −1 −2E>300GeV/ (s cm ) Flux / (s−1E>300GeV cm −2) Flux −1 −2E>300GeV/ (s cm ) Flux −1 −2E>300GeV/ (s cm ) B Validation of the Off Data Analysis Pipeline with Crab Nebula Data −10 −10 ×10 ×10 Reference Reference 1.5 1.5 Run-wise binning Run-wise binning 1.0 1.0 0.5 0.5 01 01 01 01 01 01 01 01 01 01 01 01 0− − − − − − − − − − − −1 11 12 01 02 03 10 11 12 01 02 03 6− 6− 6− 7− 7− 7− 6− 6− 6− 7− 7− 7− 01 01 01 01 01 012 2 2 2 2 2 20 1 01 01 01 01 12 2 2 2 20 Date Date (a) High zenith, source set 1, ST.03.07. (b) High zenith, source set 2, ST.03.07. −10 −10 ×10 ×10 Reference Reference 1.5 1.5 Run-wise binning Run-wise binning 1.0 1.0 0.5 0.5 01 15 01 15 01 15 01 15 01 01 15 01 15 01 15 01 15 01 2− 2− − −1 1 01 01 02 − 2− 3− 3− 4− 2− 2− 1− 1− − − − − −0 0 0 0 1 1 0 0 02 02 03 03 04 7− 7− −1 1 18 18 − − − − − − − − − − − − − − − 0 0 0 0 01 8 180 01 8 01 8 18 17 17 18 18 18 18 18 18 18 2 2 2 2 2 2 2 2 20 20 20 20 20 20 20 20 20 20 Date Date (c) High zenith, source set 1, ST.03.09. (d) High zenith, source set 2, ST.03.09. Figure B.5: Each plot presents the run-wise lightcurve of the Crab Nebula above 300GeV for dedicated analysis conditions. The fluxes are stable and in good agreement with the reference of former observations (Aleksić et al. 2015), which is indicated by a grey dashed line. 150 FluxE>300GeV/ (s −1 cm−2) Flux −1 −2E>300GeV/ (s cm ) Flux −1 −2E>300GeV/ (s cm ) FluxE>300GeV/ (s −1 cm−2) B.3 Spectral Energy Distributions B.3 Spectral Energy Distributions −10 −10 10 10 −11 −11 10 10 Reference Reference Gammapy fit Gammapy fit Gammapy flux points Gammapy flux points −12 −12 10 10 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (a) Low zenith, source set 1. (b) Low zenith, source set 2. −10 −10 10 10 −11 −11 10 10 Reference Reference Gammapy fit Gammapy fit Gammapy flux points Gammapy flux points −12 −12 10 10 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (c)Medium zenith, source set 1. (d)Medium zenith, source set 2. −10 −10 10 10 −11 −11 10 10 Reference Reference Gammapy fit Gammapy fit Gammapy flux points Gammapy flux points −12 −12 10 10 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (e) High zenith, source set 1. (f) High zenith, source set 2. Figure B.6: SEDs of1th𝜎e Crab Nebula for dedicated analysis conditions in ST.03.07. Theresults are compatible with a reference of former observations (Aleksić et al. 2015). Thegrey bands indicate - uncertainty regions. 151 E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) B Validation of the Off Data Analysis Pipeline with Crab Nebula Data −10 −10 10 10 −11 −11 10 10 Reference Reference Gammapy fit Gammapy fit Gammapy flux points Gammapy flux points −12 −12 10 10 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (a) Low zenith, source set 1. (b) Low zenith, source set 2. −10 −10 10 10 −11 −11 10 10 Reference Reference Gammapy fit Gammapy fit Gammapy flux points Gammapy flux points −12 −12 10 10 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (c) Medium zenith, source set 1. (d)Medium zenith, source set 2. −10 −10 10 10 −11 −11 10 10 Reference Reference Gammapy fit Gammapy fit Gammapy flux points Gammapy flux points −12 −12 10 10 −1 0 1 −1 0 1 10 10 10 10 10 10 Energy / TeV Energy / TeV (e) High zenith, source set 1. (f) High zenith, source set 2. Figure B.7: SEDs of1th𝜎e Crab Nebula for dedicated analysis conditions in ST.03.09. Theresults are compatible with a reference of former observations (Aleksić et al. 2015). Thegrey bands indicate - uncertainty regions. 152 E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) E2dF/dE/(erg cm−2s−1) B.4 AutoMAGIC configuration file: Crab Nebula, ST.03.07, source set 1 B.4 AutoMAGIC configuration file: Crab Nebula, ST.03.07, source set 1 mars_version = 'Mars-V3-0-1' # be sure this version is installed! [target] source_name = "CrabNebula" start_date = 2016-04-29 # use - as separator, not _ ! stop_date = 2017-08-02 [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 0 zd_max = 62 dc_min = 0 dc_max = 2200 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! [star] cleaning_method = "sum" cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = true [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] 153 B Validation of the Off Data Analysis Pipeline with Crab Nebula Data corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "diffuse2.5" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = false # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] use_lidar_correction = true forced_coach_job_ids = false # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) force_diffuse_mcs = false # If true: Force to use diffuse MCs for off-axis point-like analysis (also if the offset from source_pos to pointing is 0.4 deg within wobble_offset_tol), use if for Crab X-Check. Default: false (highly recommended!) [magicDL3] dl3_converter_version = "v0.1.11" irf_type = "full-enclosure" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = false # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) B.5 AutoMAGIC configuration file: Crab Nebula, ST.03.07, source set 2 mars_version = 'Mars-V3-0-1' # be sure this version is installed! [target] source_name = "CrabNebula" start_date = 2016-04-29 # use - as separator, not _ ! stop_date = 2017-08-02 [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 0 zd_max = 62 dc_min = 0 dc_max = 2200 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! 154 B.6 AutoMAGIC configuration file: Crab Nebula, ST.03.09, source set 1 [star] cleaning_method = "sum" cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = true [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "diffuse2.5" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = false # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] use_lidar_correction = true forced_coach_job_ids = [2595, 2597, 2599] # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) force_diffuse_mcs = false # If true: Force to use diffuse MCs for off-axis point-like analysis (also if the offset from source_pos to pointing is 0.4 deg within wobble_offset_tol), use if for Crab X-Check. Default: false (highly recommended!) [magicDL3] dl3_converter_version = "v0.1.11" irf_type = "full-enclosure" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = false # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) B.6 AutoMAGIC configuration file: Crab Nebula, ST.03.09, source set 1 mars_version = 'Mars-V3-0-1' # be sure this version is installed! 155 B Validation of the Off Data Analysis Pipeline with Crab Nebula Data [target] source_name = "CrabNebula" start_date = 2017-11-10 # use - as separator, not _ ! stop_date = 2018-06-29 [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 0 zd_max = 62 dc_min = 0 dc_max = 2200 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! [star] cleaning_method = "sum" cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = true [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "diffuse2.5" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = false # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" 156 B.7 AutoMAGIC configuration file: Crab Nebula, ST.03.09, source set 2 [melibea] use_lidar_correction = true forced_coach_job_ids = false # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) force_diffuse_mcs = false # If true: Force to use diffuse MCs for off-axis point-like analysis (also if the offset from source_pos to pointing is 0.4 deg within wobble_offset_tol), use if for Crab X-Check. Default: false (highly recommended!) [magicDL3] dl3_converter_version = "v0.1.11" irf_type = "full-enclosure" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = false # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) B.7 AutoMAGIC configuration file: Crab Nebula, ST.03.09, source set 2 mars_version = 'Mars-V3-0-1' # be sure this version is installed! [target] source_name = "CrabNebula" start_date = 2017-11-10 # use - as separator, not _ ! stop_date = 2018-06-29 [data_selection] L1Table = "" L3Table = "" transmission_9km_min_off = 0.8 transmission_9km_min = 0.55 transmission_9km_max = 1.2 zd_min = 0 zd_max = 62 dc_min = 0 dc_max = 2200 hv_setting = "NominalHV" mola_threshold = 1 cloudiness_max_off = 20 cloudiness_max_on = 45 use_broken_lidar_data = true calibrated_version_M1 = "current" # use "current" for current version (highly recommended!) or specify version like "v1" calibrated_version_M2 = "current" # If a special version is required, make sure the version number is available at the chosen start_date! [star] cleaning_method = "sum" cl_lv1 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) cl_lv2 = false # User defined cleaning level 1. Taken from moon condition if not defined (highly recommended!) noise_lv_mean = false # User defined noise mean. Taken from moon condition if not defined (highly recommended!) 157 B Validation of the Off Data Analysis Pipeline with Crab Nebula Data noise_lv_rms = false # User defined noise rms. Taken from moon condition if not defined (highly recommended!) switch_off_starguider = true # If true: Ignore Starguider error and re-run star with Starguider calibration switched off store_star_output = false # If true: Move star output files to /pnfs [superstar] ignore_mars_version_of_superstar_file = true [RF] cleaning_survival_rate = 0.5 force_rf = true max_underpopulated_bins_RF_check = 25 check_off_data_for_current_calibrated_version = true # Check if RF is trained with the latest calibrated version energy_estimation_method = "RFenStereo" # "LUTs" or "RFenStereo" decides if Look Up Tables or Random Forest is used for energy estimation in Melibea [mc_parameters] corsika_versions = ["mmcs699", "mmcs6500"] # "mmcs699", "mmcs6500", "std20130415", "std20140317", "std20141222", "std20150302" view_cone = "diffuse2.5" # "ringwobble", "diffuse1.5", "diffuse2.5", diffuse4.0" dont_care_view_cone = false # allow use of other MC with other view cones, if selected view_cone is not available mc_trigger_type = "standard" [melibea] use_lidar_correction = true forced_coach_job_ids = [2595, 2597, 2599] # If false: use/create matching coach job (recommendend!), if [1691, 1693]: use corresponding coach jobs (e.g. for Crab Check) force_diffuse_mcs = false # If true: Force to use diffuse MCs for off-axis point-like analysis (also if the offset from source_pos to pointing is 0.4 deg within wobble_offset_tol), use if for Crab X-Check. Default: false (highly recommended!) [magicDL3] dl3_converter_version = "v0.1.11" irf_type = "full-enclosure" # "point-like", "full-enclosure" az_bins = 1 hadronness_cut_from_efficiency = false # optimize hadronness cut energy bin-wise as quantile of surviving MC events, default: true theta2_cut_from_efficiency = true # theta2 cut energy bin-wise as quantile of MC events, default: false (Gammapy does currently not work with bin-wise cuts!) hadronness_cut = 0.3 # events with hadronness < cut will be selected as gamma events; used if hadronness_cut_from_efficiency = false theta2_cut = 0.02 # MC events with theta2 < cut will be selected for computing the IRFs; used if theta2_cut_from_efficiency = false quantile_hadronness_cut = 0.9 # quantile of MC events to survive the hadronness_cut (applied energy bin-wise) quantile_theta2_cut = 0.9 # quantile of MC events to survive the theta2 cut (applied energy bin-wise) 158 Rotation Angle Visualization C 2 MAGIC-I–MAGIC-II axis 300 First principal component Second principal component 250 1 200 γ 0 150 100 −1 50 −2 0 −2 −1 0 1 2 (FOV_ALTAZ_LON / °0Figure C.1: Histogram of the FOV_ALTAZ_LON, FOV_ze.1n4itThedVistan0.c3e7eTveeVnts in the azimuth range from 69°ALT9A9Z°_LAT) coordinates of all lowto and the energy range fromto . The blue and green lines represent the first and second principal components resulting from the PCA. Also, the MAGIC-I–MAGIC–II axis projected to the sky is visualized by an orange line. The rotation angle 𝛾 is defined as the angle between the first principal component and the horizontal. 159 FOV_ALTAZ_LAT / ° Number of events C Rotation Angle Visualization 2 MAGIC-I–MAGIC-II axis 100 First principal component Second principal component 1 80 γ 60 0 40 −1 20 −2 0 −2 −1 0 1 2 FOV_ALTAZ_LON / ° 0Figure C.2: Histogram of the (FOV_ALTAZ_LON, FOV_ALTze.3n7itThedVistan1.c0eTeevVents in the azimuth range from 69° to 9A9Z°_LAT) coordinates of all lowand the energy range fromto . The blue and green lines represent the first and second principal components resulting from the PCA. Also, the MAGIC-I–MAGIC–II axis projected to the sky is visualized by an orange line. The rotation angle 𝛾 is defined as the angle between the first principal component and the horizontal. 160 FOV_ALTAZ_LAT / ° Number of events 2 MAGIC-I–MAGIC-II axis 25 First principal component Second principal component 1 20 γ 15 0 10 −1 5 −2 0 −2 −1 0 1 2 FOV_ALTAZ_LON / ° 1F.i0gTuerVe C.32:.7H1iTsteoVgram of the (FOV_ALTAZ_LON, FOV_ALTAZ_LAT) coordinates of all lowzenith distance events in the azimuth range from 69° to 99° and the energy range fromto . The blue and green lines represen𝛾t the first and second principalcomponents resulting from the PCA. Also, the MAGIC-I–MAGIC–II axis projected to thesky is visualized by an orange line. The rotation angle is defined as the angle between the first principal component and the horizontal. 161 FOV_ALTAZ_LAT / ° Number of events C Rotation Angle Visualization 9 2 MAGIC-I–MAGIC-II axis 8 First principal component Second principal component 7 1 6 5 γ 0 4 3 −1 2 1 −2 0 −2 −1 0 1 2 (FOV_ALTAZ_LON / °2Figure C.4: Histogram of the FOV_ALTAZ_LON, FOV_ALTAze.7n1itThedVistan7.c3e7eTveeVnts in the azimuth range from 69° to 99Z°_LAT) coordinates of all lowand the energy range fromto . The blue and green lines represent the first and second principal components resulting from the PCA. Also, the MAGIC-I–MAGIC–II axis projected to the sky is visualized by an orange line. The rotation angle 𝛾 is defined as the angle between the first principal component and the horizontal. 162 FOV_ALTAZ_LAT / ° Number of events 4.0 2 MAGIC-I–MAGIC-II axis First principal component 3.5 Second principal component 3.0 1 2.5 γ 0 2.0 1.5 −1 1.0 0.5 −2 0.0 −2 −1 0 1 2 FOV_ALTAZ_LON / ° 7F.i3g7uTreeVC.5:2H0 iTsetoVgram of the (FOV_ALTAZ_LON, FO6V9_°ALT9A9Z°_LAT) coordinates of all lowzenith distance events in the azimuth range from to and the energy range fromto . The blue and green lines represent the first and second principal components resulting from the PCA. Also, the MAGIC-I–MAGIC–II axis projected to the sky is visualized by an orange line. The rotation angle 𝛾 is defined as the angle between the first principal component and the horizontal. 163 FOV_ALTAZ_LAT / ° Number of events C Rotation Angle Visualization Geomagnetic system N E S W 90 20 60 7.4 30 2.7 0 1 −30 0.37 −60 0.14 γtheory −90 0.05 0 60 120 180 240 300 Az / ° Figure C.6: Rotation a𝛾ngle 𝛾(r𝐴e𝑧su) lting from a PCA performe𝐴d 𝑧on medium Zenith distanceevents in multiple energy bins dependent on the Azimuth . For comparison, also thetheoretic expectation theory (13.2) motivated by the two overlapping view cones is presented. 164 γ / ° Ereco / TeV 0.05TeV – 0.14TeV 90 0 80 80 10 60 40 70 20 20 60 30 0 −20 50 40 −40 40 50 −60 −80 30 60 0 60 120 180 240 300 360 Azimuth / ° (Figure C.7: Rotation angle 𝛾 ′ resulting from a PCA performed onFOV_ALTAZ_LON_ROT, FOV𝛾_ALTA(𝐴Z_𝑧L)A0T.0_5ROTTe)V eve0n.1t4 TcoeoVrdinates in azimuth and al-𝛾titu=de0°bins for the energy bin from to . In case of an agreement withth′e theoretic expectation theory (13.2) motivated by the two overlapping view cones,is valid. 165 Altitude / ° Zenith distance / ° ′ γ / ° C Rotation Angle Visualization 0.14TeV – 0.37TeV 90 0 80 80 10 60 40 70 20 20 60 30 0 −20 50 40 −40 40 50 −60 −80 30 60 0 60 120 180 240 300 360 Azimuth / ° (Figure C.8: Rotation angle 𝛾 ′ resulting from a PCA performed onFOV_ALTAZ_LON_ROT, FOV𝛾_ALTA(𝐴Z_𝑧L)A0T.1_4ROTTe)V event𝛾itu=de0°bins for the energy bin from to 0.3 t7 TcoeoVrdinates in azimuth and al-. In case of an agreement with th′e theoretic expectation theory (13.2) motivated by the two overlapping view cones,is valid. 166 Altitude / ° Zenith distance / ° ′ γ / ° 0.37TeV – 1.0TeV 90 0 80 80 10 60 40 70 20 20 60 30 0 −20 50 40 −40 40 50 −60 −80 30 60 0 60 120 180 240 300 360 Azimuth / ° (Figure C.9: Rotation angle 𝛾 ′ resulting from a PCA performed onFOV_ALTAZ_LON_ROT, F𝛾OV_AL(𝐴TA𝑧Z)_L0A.3T7_RTOeTV) ev1e.0nTt eVcoordinates in azimuth and al-𝛾titu=de0°bins for the energy bin from to . In case of an agreement with theth′eoretic expectation theory (13.2) motivated by the two overlapping view cones,is valid. 167 Altitude / ° Zenith distance / ° ′ γ / ° C Rotation Angle Visualization 1.0TeV – 2.71TeV 90 0 80 80 10 60 40 70 20 20 60 30 0 −20 50 40 −40 40 50 −60 −80 30 60 0 60 120 180 240 300 360 Azimuth / ° (Figure C.10: Rotation angle 𝛾 ′ resulting from a PCA performed onFOV_ALTAZ_LON_ROT, F𝛾OV_AL(𝐴TA𝑧Z)_L1A.0T_TReOVT) e2vet𝛾itu=de0°bins for the energy bin from to .71 nTt eVcoordinates in azimuth and al-. In case of an agreement with the th′eoretic expectation theory (13.2) motivated by the two overlapping view cones,is valid. 168 Altitude / ° Zenith distance / ° ′ γ / ° 2.71TeV – 7.37TeV 90 0 80 80 10 60 40 70 20 20 60 30 0 −20 50 40 −40 40 50 −60 −80 30 60 0 60 120 180 240 300 360 Azimuth / ° (Figure C.11: Rotation angle 𝛾 ′ resulting from a PCA performed onFOV_ALTAZ_LON_ROT, FOV𝛾_ALTA(𝐴Z_𝑧L)A2T.7_1ROTTe)V eve7n.3t7 TcoeoVrdinates in azimuth and al-t𝛾itu=de0°bins for the energy bin from to . In case of an agreement withth′e theoretic expectation theory (13.2) motivated by the two overlapping view cones,is valid. 169 Altitude / ° Zenith distance / ° ′ γ / ° C Rotation Angle Visualization 7.37TeV – 20.0TeV 90 0 80 80 10 60 40 70 20 20 60 30 0 −20 50 40 −40 40 50 −60 −80 30 60 0 60 120 180 240 300 360 Azimuth / ° (Figure C.12: Rotation angle 𝛾 ′ resulting from a PCA performed onFOV_ALTAZ_LON_ROT, F𝛾OV_AL(𝐴TA𝑧Z)_L7A.T37_RTOeTV) ev2et𝛾itu=de0°bins for the energy bin from to 0 nTteVcoordinates in azimuth and al-. In case of an agreement with the th′eoretic expectation theory (13.2) motivated by the two overlapping view cones,is valid. 170 Altitude / ° Zenith distance / ° ′ γ / ° Bibliography Abbott, B. P. et al. (LIGO Scientific Collaboration and Virgo Collaboration Collaboration). “Observation of Gravitational Waves from a Binary Black Hole Merger”. Phys. Rev. Lett. 116, 6 2016, page 061102. doi: 10.1103/PhysRevLett.116.061102 Abbott, B. P. et al. “Multi-messenger Observations of a Binary Neutron Star Merger*”. The Astrophysical Journal Letters 848:2, 2017, page L12. doi: 10.3847/2041-8213/aa91c9 Abdollahi, S. et al. “Fermi Large Area Telescope Fourth Source Catalog”. The Astrophysical Journal Supplement Series 247:1, 2020, page 33. doi: 10.3847/1538-4365/ab6bcb Abe, H. et al. “Observations of the Crab Nebula and Pulsar with the Large-sized Telescope Prototype of the Cherenkov Telescope Array”. The Astrophysical Journal 956:2, 2023, page 80. doi: 10.3847/1538-4357/ace89d Acciari, V. et al. “Teraelectronvolt emission from the 𝛾-ray burst GRB 190114C”. Nature 575, 2019, pages 455–458. doi: 10.1038/s41586-019-1750-x Acciari, V. A. et al. “Study of the GeV to TeV morphology of the γ Cygni SNR (G 78.2+2.1) with MAGIC and Fermi-LAT”. Astronomy & Astrophysics 670, 2023, A8. doi: 10.1051/0004-6361/202038748 Acciari, V. et al. “Combined searches for dark matter in dwarf spheroidal galaxies observed with the MAGIC telescopes, including new data from Coma Berenices and Draco”. Physics of the Dark Universe 35, 2022, page 100912. issn: 2212-6864. doi: https://doi.org/10.1016/j.dark.2021.100912 Acero, F. et al. “Fermi Large Area Telescope Third Source Catalog”. The Astrophysical Journal Supplement Series 218:2, 23, 2015, page 23. doi: 10.1088/0067-0049/218/2/23 Aguasca-Cabot, A. et al. Gammapy: Python toolbox for gamma-ray astronomy. Version v1.1. 2023. doi: 10.5281/zenodo.8033275 Aharonian, F. et al. “Is the giant radio galaxy M 87 a TeV gamma-ray emitter?” Astronomy & Astrophysics 403:1, 2003. doi: 10.1051/0004-6361:20030372 Aharonian, F. et al. “Discovery of very high energy 𝛾-ray emission from Centaurus A with H.E.S.S.” The Astrophysical Journal Letters 695, 2009. doi: 10.1088/0004-637X/695/1/L40 171 Bibliography Ahnen, M. et al. “Performance of the MAGIC telescopes under moonlight”. Astroparticle Physics 94, 2017, pages 29–41. issn: 0927-6505. doi: https://doi.org/10.1016/j.astropartphys.2017.08.001 Ahnen, M. et al. “Indirect dark matter searches in the dwarf satellite galaxy Ursa Major II with the MAGIC telescopes”. Journal of Cosmology and Astroparticle Physics 2018:03, 2018, page 009. doi: 10.1088/1475-7516/2018/03/009 Ajello, M. et al. “3FHL: The Third Catalog of Hard Fermi-LAT Sources”. The Astrophysical Journal Supplement Series 232:2, 2017, page 18. doi: 10.3847/1538-4365/aa8221 Aleksić, J. et al. “Detection of very high energy 𝛾-ray emission from the Perseus cluster head-tail galaxy IC 310 by the MAGIC telescopes”. The Astrophysical Journal Letters 723:2, 2010. doi: 10.1088/2041-8205/723/2/L207 Aleksić, J. et al. “Detection of very-high energy 𝛾-ray emission from NGC 1275 by the MAGIC telescopes”. Astronomy & Astrophysics 539, 2012. doi: 10.1051/0004-6361/201118668 Aleksić, J. et al. “Measurement of the Crab Nebula spectrum over three decades in energy with the MAGIC telescopes”. Journal of High Energy Astrophysics 5-6, 2015, pages 30–38. issn: 2214-4048. doi: https://doi.org/10.1016/j.jheap.2015.01.002 Aleksić, J. et al. “The major upgrade of the MAGIC telescopes, Part I: The hardware improvements and the commissioning of the system”. Astroparticle Physics 72, 2016, pages 61–75. doi: 10.1016/j.astropartphys.2015.04.004 Aleksić, J. et al. “The major upgrade of the MAGIC telescopes, Part II: A performance study using observations of the Crab Nebula”. Astroparticle Physics 72, 2016, pages 76–94. doi: 10.1016/j.astropartphys.2015.02.005 Alken, P. et al. “International Geomagnetic Reference Field: the thirteenth generation”. Earth Planets Space, 2021. doi: https://doi.org/10.1186/s40623-020-01288-x Angioni, R. “Revisiting the TeV detection prospects for radio galaxies”. Astroparticle Physics 116, 2020, page 102393. doi: 10.1016/j.astropartphys.2019.102393 Antonucci, R. “Unified Models for Active Galactic Nuclei and Quasars”. Annual Review of Astronomy and Astrophysics 31:1, 1993, pages 473–521. doi: 10.1146/annurev.aa.31.090193.002353 Archer, A. et al. “VERITAS Discovery of VHE Emission from the Radio Galaxy 3C 264: A Multiwavelength Study”. The Astrophysical Journal 896:1, 2020, page 41. doi: 10.3847/1538-4357/ab910e Astropy Collaboration et al. “Astropy: A community Python package for astronomy”. Astronomy & Astrophysics 558, A33, 2013, A33. doi: 10.1051/0004-6361/201322068 172 Bibliography Astropy Collaboration et al. “The Astropy Project: Building an Open-science Project and Status of the v2.0 Core Package”. Astronomical Journal 156:3, 123, 2018, page 123. doi: 10.3847/1538-3881/aabc4f Astropy Collaboration et al. “The Astropy Project: Sustaining and Growing a Community- oriented Open-source Project and the Latest Major Release (v5.0) of the Core Package”. The Astrophysical Journal 935:2, 167, 2022, page 167. doi: 10.3847/1538-4357/ac7c74 Atwood, W. B. et al. “THE LARGE AREA TELESCOPE ON THE FERMI GAMMA-RAY SPACE TELESCOPE MISSION”. The Astrophysical Journal 697:2, 2009, page 1071. doi: 10.1088/0004-637X/697/2/1071 Beckmann, V. and C. Shrader. Active Galactic Nuclei. 2012. Chap. 4. doi: 10.1002/9783527666829 Biederbeck, N. “Unfolding the Spectrum of the Blazar Markarian 421 using Data from the First Large-Sized Telescope of the Cherenkov Telescope Array”. PhD thesis. TU Dortmund University, 2023. doi: 10.17877/DE290R-24039 Cherenkov, P. A. “Visible Radiation Produced by Electrons Moving in a Medium with Velocities Exceeding that of Light”. Phys. Rev. 52, 4 1937, pages 378–379. doi: 10.1103/PhysRev.52.378 Cocconi, G. “Influence of the Earth’s Magnetic Field on the Extensive Air Showers”. Phys. Rev. 93, 3 1954, pages 646–647. doi: 10.1103/PhysRev.93.646.2 Commichau, S. et al. “Monte Carlo studies of geomagnetic field effects on the imaging air Cherenkov technique for the MAGIC telescope site”. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equip- ment 595:3, 2008, pages 572–586. doi: https://doi.org/10.1016/j.nima.2008.07.144 Contreras et al. “Data model issues in the cherenkov telescope array project”. In: vol. 30- July-2015. Proceedings of Science (PoS), 2015. arxiv: 1508.07584 [astro-ph.IM] de La Calle, I. and VERITAS Collaboration. “Search for TeV Gamma Ray emission from 4C39.12 with the Whipple 10 m Cherenkov Telescope”. In: International Cosmic Ray Conference. Vol. 7. International Cosmic Ray Conference. 2001, page 2646. https://ui.adsabs.harvard.edu/abs/2001ICRC....7.2646D Deil, C. et al. “Gammapy - A prototype for the CTA science tools”. PoS ICRC2017, 2017, page 766. doi: 10.22323/1.301.0766 Dembinski, H. P. resample: use the bootstrap and jackknife from Python. 2020. doi: 10.5281/zenodo.4147328 Dermer, C. D. and B. Giebels. “Active galactic nuclei at gamma-ray energies / Noyaux actifs de galaxie dans le domaine des rayons gamma”. Comptes Rendus Physique 17, 2016, pages 594–616. doi: 10.1016/j.crhy.2016.04.004 173 Bibliography Domıńguez, A. et al. “Extragalactic background light inferred fromAEGIS galaxy-SED-type fractions”.Monthly Notices of the Royal Astronomical Society 410, 2011, pages 2556–2578. doi: 10.1111/j.1365-2966.2010.17631.x Donath, Axel et al. “Gammapy: A Python package for gamma-ray astronomy”. A&A 678, 2023, A157. doi: 10.1051/0004-6361/202346488 Dubner, G. et al. “Morphological Properties of the CrabNebula: ADetailedMultiwavelength Study Based on New VLA, HST, Chandra, and XMM-Newton Images”. The Astrophysical Journal 840:2, 2017, page 82. doi: 10.3847/1538-4357/aa6983 Dyrda, M. et al. “Discovery of VHE gamma-rays from the radio galaxy PKS 0625-354 with H.E.S.S.” The Astrophysical Journal Letters 695, 2009. doi: 10.1088/0004-637X/695/1/L40 Fanaroff, B. L. and J.M. Riley. “The morphology of extragalactic radio sources of high and low luminosity”. Monthly Notices of the Royal Astronomical Society 167, 1974, 31P–36P. doi: 10.1093/mnras/167.1.31P Fermi, E. “Galactic Magnetic Fields and the Origin of Cosmic Radiation.” The Astrophysical Journal 119, 1954, page 1. doi: 10.1086/145789 Fomin, V. et al. “New methods of atmospheric Cherenkov imaging for gamma-ray astron- omy. I. The false source method”. Astroparticle Physics 2:2, 1994, pages 137–150. issn: 0927-6505. doi: https://doi.org/10.1016/0927-6505(94)90036-1 Fruck, C. et al. A novel LIDAR-based Atmospheric Calibration Method for Improving the Data Analysis of MAGIC. 2014. arxiv: 1403.3591 [astro-ph.IM] Gaug, M. et al. Atmospheric Monitoring for the MAGIC Telescopes. 2014. arxiv: 1403.5083 [astro-ph.IM] Ghisellini, G. Radiative Processes in High Energy Astrophysics. Lecture Notes in Physics. Springer International Publishing, 2013. doi: 10.1007/978-3-319-00612-3 Giovannini, G. et al. “VLBI Observations of a Complete Sample of Radio Galaxies: 10 Years Later”. The Astrophysical Journal 552:2, 2001, page 508. doi: 10.1086/320581 Harris, C. R. et al. “Array programming with NumPy”. Nature 585:7825, 2020, pages 357– 362. doi: 10.1038/s41586-020-2649-2 Hastie, T. et al. The elements of statistical learning: data mining, inference and prediction. 2nd ed. Springer, 2009. http://www-stat.stanford.edu/~tibs/ElemStatLearn/ Heck, D. et al. CORSIKA: a Monte Carlo code to simulate extensive air showers. 1998 Heckman, T.M. and P. N. Best. “The Coevolution of Galaxies and Supermassive Black Holes: Insights from Surveys of the Contemporary Universe”. Annual Review of Astronomy and 174 Bibliography Astrophysics 52:1, 2014, pages 589–660. doi: 10.1146/annurev-astro-081913-035722 Heitler, W. The quantum theory of radiation. Vol. 5. International Series of Monographs on Physics. Oxford University Press, Oxford, 1936 Hess, V. F. “Über Beobachtungen der durchdringenden Strahlung bei sieben Freiballon- fahrten”. Phys. Z. 13, 1912, pages 1084–1091 Hillas, A.M. “Cerenkov Light Images of EAS Produced by Primary Gamma Rays and by Nuclei”. In: 19th International Cosmic Ray Conference (ICRC19), Volume 3. Vol. 3. International Cosmic Ray Conference. 1985, page 445 Hinton, J. “The status of the HESS project”.New Astronomy Reviews 48:5-6, 2004, pages 331– 337. doi: 10.1016/j.newar.2003.12.004 IceCube Collaboration. “Multimessenger observations of a flaring blazar coincident with high-energy neutrino IceCube-170922A”. Science 361:6398, eaat1378, 2018, eaat1378. doi: 10.1126/science.aat1378 IceCube Collaboration. “Neutrino emission from the direction of the blazar TXS 0506+056 prior to the IceCube-170922A alert”. Science 361:6398, 2018, pages 147–151. doi: 10.1126/science.aat2890 IceCube Collaboration. “Evidence for neutrino emission from the nearby active galaxy NGC 1068”. Science 378:6619, 2022, pages 538–543. doi: 10.1126/science.abg3395 IceCube Collaboration. “Observation of high-energy neutrinos from the Galactic plane”. Science 380:6652, 2023, pages 1338–1343. doi: 10.1126/science.adc9818 Kulcsár, F., D. Teherani, and H. Altmann. “Study of the spectrum of cherenkov light”. Journal of radioanalytical chemistry, 1982. doi: https://doi.org/10.1007/BF02517618 Lara, L. et al. “A new sample of large angular size radio galaxies. I. The radio data”. Astronomy & Astrophysics 370, 2001, pages 409–425. doi: 10.1051/0004-6361:20010254 Lessard, R. et al. “A new analysis method for reconstructing the arrival direction of TeV gamma rays using a single imaging atmospheric Cherenkov telescope”. Astroparticle Physics 15:1, 2001, pages 1–18. doi: https://doi.org/10.1016/S0927-6505(00)00133-X Li, T.-P. and Y.-Q. Ma. “Analysis methods for results in gamma-ray astronomy”. Astrophys- ical Journal 272, 1983, pages 317–324. doi: 10.1086/161295 Linhoff, L.M. “Multiwavelength analysis of the TeV-radio galaxy 3C 84/NGC 1275”. PhD thesis. TU Dortmund University, 2021. https://eldorado.tu-dortmund.de/bitstream/2003/40538/1/Dissertation.pdf Lister, M. L. et al. “MOJAVE. XV. VLBA 15 GHz Total Intensity and Polarization Maps of 437 Parsec-scale AGN Jets from 1996 to 2017”. The Astrophysical Journal Supplement 234:1, 12, 2018, page 12. doi: 10.3847/1538-4365/aa9c44 175 Bibliography Lister, M. L. et al. “Monitoring Of Jets in Active Galactic Nuclei with VLBA Experiments. XVIII. Kinematics and Inner Jet Evolution of Bright Radio-loud Active Galaxies”. The Astrophysical Journal 923:1, 2021, page 30. doi: 10.3847/1538-4357/ac230f MAGIC Source Simulator (2020). 2020. https://magic.mpp.mpg.de/fileadmin/user_upload/mss.py visited on 2021-12-21 Marchã, M. J. M. et al. “Optical spectroscopy and polarization of a new sample of optically bright flat radio spectrum sources”. Monthly Notices of the Royal Astronomical Society 281:2, 1996, pages 425–448. doi: 10.1093/mnras/281.2.425 Mender, S. “Source Type Classification of Active Galactic Nuclei with Unsupervised Ma- chine Learning”. master thesis. TU Dortmund University, 2019 Mender, S. et al. “Computing sky maps using the open-source package Gammapy and MAGIC data in a standardized format”. PoS Gamma2022, 2023, page 215. doi: 10.22323/1.417.0215 Mickaelian, A.M. “AGN Zoo and Classifications of Active Galaxies”. Iranian Journal of Astronomy and Astrophysics 2:1, 2015, pages 1–38. issn: 2322-4924. doi: 10.22128/ijaa.2015.15 Mirzoyan, R. et al. “Extending the observation limits of Imaging Air Cherenkov Telescopes toward horizon”. Nuclear Instruments and Methods in Physics Research Section A: Acceler- ators, Spectrometers, Detectors and Associated Equipment 952, 2020, page 161587. doi: https://doi.org/10.1016/j.nima.2018.11.046 Mohrmann, L. et al. “Validation of open-source science tools and background model construction in γ-ray astronomy”. Astronomy & Astrophysics 632, 2019, A72. doi: 10.1051/0004-6361/201936452 Mohrmann, L. et al. “Revisiting HESS J1809–193 — a very-high-energy gamma-ray source in a fascinating environment”. PoS Gamma2022, 2023, page 030. doi: 10.22323/1.417;.0030Neronov, A. and D. Semikoz. “Galactic diffuse gamma-ray emission at TeV energy”. As-tronomy & Astrophysics 633, 2020, A94. doi: 10.1051/0004-6361/201936368 Nigro, C. “Establishing the MAGIC data legacy: adopting standardised data formats and open-source analysis tools”. PoS Gamma2022, 2023, page 122. doi: 10.22323/1.417.0122 Nigro, C., T. Hassan, and L. Olivera-Nieto. “Evolution of Data Formats in Very-High-Energy Gamma-Ray Astronomy”. Universe 7:10, 2021. issn: 2218-1997. doi: 10.3390/universe7100374 Nöthe, M. et al. “Prototype Open Event Reconstruction Pipeline for the Cherenkov Tele- scope Array”. In: Proceedings, 37th International Cosmic Ray Conference. Vol. 395. 744. Berlin, Germany, 2021. doi: 10.22323/1.395.0744 Padovani, P. et al. “Active galactic nuclei: what’s in a name?” The Astronomy and Astro- physics Review 25:1, 2017, page 2. doi: 10.1007/s00159-017-0102-9 176 Bibliography Padovani, P. “On the Two Main Classes of Active Galactic Nuclei”. Nature Astronomy 1:8, 2017, page 0194. doi: 10.1038/s41550-017-0194 Padovani, P. “A multi-wavelength View of Active Galactic Nuclei with an Emphasis on Gamma Rays”. PoS Gamma2022, 2023, page 001. doi: 10.22323/1.417.0001 Pedregosa, F. et al. “Scikit-learn: Machine Learning in Python”. Journal of Machine Learning Research 12, 2011, pages 2825–2830 Perkins, J. S., G. Maier, and T. V. Collaboration. VERITAS Telescope 1 Relocation: Details and Improvements. 2009. arxiv: 0912.3841 [astro-ph.IM] Prandini, E. et al. “Study of hadron and gamma-ray acceptance of the MAGIC telescopes: towards an improved background estimation”. In: 2016, page 721. doi: 10.22323/1.236.0721 Rulten, C. “Radio Galaxies at TeV Energies”. Galaxies 10:3, 2022. issn: 2075-4434. doi: 10.3390/galaxies10030061 Saxton, B. and NRAO/AUI/NSF. NRAO’s Baseline Episode 3: Viewing Active Galaxies. 2019. https://public.nrao.edu/news/key-feature-powerful-radio-galaxies/ visited on 2023-05-16 Schmidt, M. “3C 273 : A Star-Like Object with Large Red-Shift”. Nature 197:4872, 1963, pages 1040–1040. doi: 10.1038/1971040a0 Science with the Cherenkov Telescope Array (2018). WORLD SCIENTIFIC, 2018. doi: 10.1142/10986 Strzys, M. C. et al. (CTA-LST project, CTA consortium Collaboration). “Pybkgmodel - a background modelling toolbox for the CTA”. PoS ICRC2023, 2023, page 894. doi: 10.22323/1.444.0894 The Event Horizon Telescope Collaboration et al. “First M87 Event Horizon Telescope Results. I. The Shadow of the Supermassive Black Hole”. The Astrophysical Journal Letters 875:1, 2019, page L1. doi: 10.3847/2041-8213/ab0ec7 Urry, C.M. and P. Padovani. “UNIFIED SCHEMES FOR RADIO-LOUD ACTIVE GALACTIC NUCLEI”. Publications of the Astronomical Society of the Pacific 107:715, 1995, page 803. doi: 10.1086/133630 van Velzen, S. et al. “Radio galaxies of the local universe. All-sky catalog, luminosity functions, and clustering”. Astronomy & Astrophysics 544, 2012, 19pp. doi: 10.1051/0004-6361/201219389 Venters, T.M., V. Pavlidou, and L. C. Reyes. “THE EXTRAGALACTIC BACKGROUND LIGHT ABSORPTION FEATURE IN THE BLAZAR COMPONENT OF THE EXTRA- GALACTIC GAMMA-RAY BACKGROUND”. The Astrophysical Journal 703:2, 2009, pages 1939–1946. doi: 10.1088/0004-637x/703/2/1939 Virtanen, P. et al. “SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python”. Nature Methods 17, 2020, pages 261–272. doi: 10.1038/s41592-019-0686-2 177 Bibliography Vovk, I., Strzys, M., and Fruck, C. “Spatial likelihood analysis for MAGIC telescope data - From instrument response modelling to spectral extraction”. A&A 619, 2018, A7. doi: 10.1051/0004-6361/201833139 Wakely, S. P. and D. Horan. “TeVCat: An online catalog for Very High Energy Gamma-Ray Astronomy”. In: International Cosmic Ray Conference. Vol. 3. International Cosmic Ray Conference. 2008, pages 1341–1344 Weekes, T. C. et al. “Observation of TeV Gamma Rays from the Crab Nebula Using the Atmospheric Cerenkov Imaging Technique”. Astrophysical Journal 342, 1989, page 379. doi: 10.1086/167599 Weisskopf, M. C. et al. “An Overview of the Performance and Scientific Results from the Chandra X‐Ray Observatory”. Publications of the Astronomical Society of the Pacific 114:791, 2002, page 1. doi: 10.1086/338108 Zanin, R. “MARS, the MAGIC analysis and reconstruction software”. In: Proceedings, 33rd International Cosmic Ray Conference (ICRC2013): Rio de Janeiro, Brazil, July 2-9, 2013. 2013, page 0773. http://inspirehep.net/record/1412925/files/icrc2013-0773.pdf 178 Glossary 3FHL Third Catalog of Hard Fermi-𝛾LAT Sources. 37, 39–41, 50, 53, 64, 664FGL Fourth Fermi-LAT catalog of -ray sources. 39, 53, 66, 67, 119 AGN Active Galactic Nucleus. 4–9, 12, 35, 67 AMC Active Mirror Control. 14 Corsika COsmic Ray SImulations for KAscade. 16 CTA Cherenkov Telescope Array. 11, 21, 67 DAQ Data Acquisition. 21 DC Dark Current. 18 DL Data Level. 4, 21–23, 25, 26, 28, 31, 35, 43, 46, 50, 58, 61, 64, 71, 74, 85, 87, 88, 90–92, 96, 97, 103, 119, 120, 127, 128, 145, 182 EAS Extended Air Shower. 4, 11, 12, 23, 80–82, 96 EBL Extragalactic Background Light. 11–13, 28, 39–41, 50, 52, 53, 64–66 EM electromagnetic. 11, 12 FoV field-of-view. 14, 16, 17, 23–25, 31, 71, 73, 74, 77, 82, 87, 88, 91, 107, 110, 128 FR Fanaroff-Riley. 9, 67 FSRQ flat-spectrum radio quasar. 7–9 GADF Data formats for gamma-ray astronomy. 21, 23–25, 73, 88, 107, 128 H.E.S.S. High Energy Stereoscopic System. 11, 14, 82, 112, 116 HPBW Half Power Beam Width. 38 HV High Voltage. 18 IACT Imaging Air Cherenkov Telescope. 3, 4, 11–13, 16, 21, 23, 24, 26, 67, 82, 128 ICRS International Celestial Reference System. 119 IGRF International Geomagnetic Reference Field. 80, 81 IR infra red. 3–7, 12 179 Glossary IRF Instrument Response Function. 21, 23–26, 29, 31, 35, 43, 58, 59, 71, 87, 119, 128, 145 Kaskade Karlsruhe Shower Core and Array Detector. 16 LAT Large Area Telescope. 3, 29, 39, 43, 50 LIDAR Light Detection And Ranging. 19, 43 LST Large Size Telescope. 11, 77, 78 MAGIC Major Atmospheric Gamma Imaging Cherenkov. v, 4, 5, 10, 11, 13–16, 18, 19, 21, 22, 25, 28, 29, 35, 37, 39–41, 43–45, 50, 53, 55, 57, 64, 66, 67, 71–73, 77–82, 91, 93, 96, 97, 100, 103, 104, 107, 112, 127, 128, 159–163, 182 MARS MAGIC Analysis and Reconstruction Software. 25, 46, 73, 88, 100 MC Monte Carlo. 16, 18, 22–25, 44, 56, 58, 59, 61–63, 71, 81, 87–91, 96–99, 101, 102, 145 Mmcs MAGIC Monte Carlo Software. 16 MOJAVE Monitoring Of Jets in Active galactic nuclei with VLBA Experiments. 37 MWL multi-wavelength. 3, 4, 9, 35 NED NASA Extragalactic Database. 37, 39, 53, 66 NN Next Neighbors. 14 NSB Night Sky Background. v, 14, 16, 18, 24, 71, 72, 83, 112, 116 NSOD non-simultaneous off data. 71, 73, 74, 107, 127, 128 ORM Observatorio del Roque de los Muchachos. 13, 14, 80 PCA Principal Component Analyis. 85, 86, 93–99, 101–103, 105, 159–170 PL power-law. 28, 31, 39–41, 50, 52, 53, 64–66, 90 PMT Photomultiplier Tube. 14, 15, 18 PSF Point Spread Function. 14, 16, 18, 24, 59, 123, 128 PWN Pulsar Wind Nebula. 5 SED Spectral Energy Distribution. 7, 8, 43, 46, 49, 53, 61, 63, 66, 151, 152 SNR Supernova Remnant. 5 TeVCat TeV Gamma-Ray Source Catalog. 5 UL upper limits. 30, 50, 52, 53, 64, 66 VERITAS Very Energetic Radiation Imaging Telescope Array System. 11, 14, 67 180 Glossary VHE Very-High-Energy. 3–5, 8, 12–14, 23, 24, 39, 87, 91, 128 VLA Very Large Array. 37, 38 VLBA Very-Long-Baseline Array. 37, 38 VLBI Very-Long-Baseline Interferometry. 9 Zd Zenith distance. 16, 18, 24, 25 181 Acknowledgements Danke an Prof. Dr. Dr. Wolfgang Rhode und PD Dr. Dominik Elsässer, dass ihr mir ermöglicht habt in der Astroteilchenphysik Gruppe in Dortmund zu arbeiten und viele Erfahrungen zu sammeln. Danke für eure unermüdliche Unterstützung! Danke an Dr. Chris Malena Delitzsch für die Begutachtung meiner Arbeit. Danke, Andrea dafür, dass du immer ein offenes Ohr hast. Danke an die gesamte Arbeitsgruppe der Astroteilchenphysik in Dortmund. Ohne euren Wissens- schatz, den Zusammenhalt der Gruppe und den unverwechselbaren Physikhumor wäre es mir nicht möglich geswesen, diese Arbeit zu schreiben. Danke an alle Menschen, die in den letzten Jahren das Büro mit mir geteilt haben: Lena, Alicia, Jan Lukas, Stefan und Tristan. Danke für eine tolle Atmosphäre, alle (fachlichen) Diskussionen, eure moralische Unterstützung und das Teilen von Thrill. Ganz besonders möchte ich mich bei Lena bedanken. Ohne dich würde es weder das AutoMAGIC Projekt noch diese Arbeit in dieser Form geben. Danke für die tolle gemeinsame Zeit und deinen stetigen Zuspruch, insbesondere in mäßigen Zeiten. Danke, Jan Lukas, es war eine Freude AutoMAGICmit dir zumaintainen - auchmit nicht erreichbarem scratch, kaputter Datenbank und unerreichbarem Server. Danke, Max, für das Teilen deines enormen Wissens über alles was mit Physik und Computern zu tun hat. Danke für all dein Feedback und danke, dass du das LATEX-template deiner Doktorarbeit öffentlich zur Verfügung stellst. Danke, Lukas, für alle Gespräche, bei denen wir uns gemeinsam den Kopf über Background-Modelle zerbrochen haben, sowie für alle verlängerten Mittagspausen am TUrnpunkt. Thanks to the whole MAGIC collaboration; I am very grateful to had the honor of being a part of the MAGIC family. Thanks to the MAGIC EGAL working group for supporting the “Hunting for TeV Radio Galaxies” proposal. A special thanks go to Lea and Marina, for cross-checking the analyses. Thanks to the complete MAGIC DL3 working group. Thank you, Cosimo, for all your support with AutoMAGIC and the magicDL3 converter. Also, I want to thank Tarek, Elisa, Marcel and David for sharing your enthusiasm and your ideas about background models. Furthermore, I would like to thank shift crews P202, P229 and P242 - it was a great time with you! Thanks to the whole Gammapy community for all the discussions and help in the Gammapy Slack group. Danke, Lukas, Alicia, Lena, Karolin, Jan Lukas, Stefan und Alexander für das Korrekturlesen meiner Arbeit. 182 Danke, Maik, Lars, Kevin L., Robin, Vukan, Quentin und vielen anderen für die gemeinsame Studienzeit und entstandene Freundschaften. Danke an Janina, Jan Lukas und Cyrus für unser gemeinsames Auspowern beim Unisport – es war Freude und Qual zugleich. Danke an Evita und Kathi für mehr als eine Dekade schönste Freundschaft. Danke, Kate, für das gemeinsame Abnerden über alle Themen außerhalb der Physik-Bubble. Ein herzliches Dankeschön geht an meine Familie, insbesondere an meine Eltern. Eure moralische und finanzielle Unterstützung haben mir das Physikstudium erst ermöglicht. Funding Acknowledgements This work has been supported by the DFG, Collaborative Research Center SFB 876 under the project C3 (https://sfb876.tu-dortmund.de) and the SFB 1491 (https://www.sfb1491.ruhr-uni-bochum.de). This research has made use of the NASA/IPAC Extragalactic Database (NED), which is funded by the National Aeronautics and Space Administration and operated by the California Institute of Technology. 183