| 24 | |
| 25 | = Energy Estimator = |
| 26 | |
| 27 | To estimate the energy there are different methods. E.g. you can use neutral nets or random forrest. Here I will refer to the very basic approach of an energy parametrization. |
| 28 | |
| 29 | Once you have an energy estimator, you implement it in ganymed e.g. like this: |
| 30 | https://trac.fact-project.org/browser/trunk/Mars/fact/analysis/mc/ganymed.C?rev=17733#L169 |
| 31 | |
| 32 | == Get Energy Parametrization == |
| 33 | |
| 34 | To get an energy parametrization, you may plot image parameters vs MC-energy and use https://trac.fact-project.org/browser/trunk/Mars/macros/optim/optimenergy.C to optimize the coefficients. |
| 35 | |
| 36 | The macro in the svn contains a very basic example using only the image parameter Size in the parametrization. |
| 37 | |
| 38 | Start with this and then add more image parameters. |
| 39 | |
| 40 | == more image parameters == |
| 41 | |
| 42 | To find out which other parameters to use and which formula to use, plot the residual (Emc - Eest) versus an image parameter of your choice. |
| 43 | |
| 44 | For example you can plot the image parameters like this: http://www.astro.uni-wuerzburg.de/wikineu/index.php/How_to_plot_image_parameters |
| 45 | |
| 46 | To get an idea which other image parameters are available, you may look at the classes MHillas.cc MHillasExt MHillasSrc MImagePar MNewImagePar MNewImagePar2 in https://trac.fact-project.org/browser/trunk/Mars/mimage Not all of them might be relevant for FACT, but for most of them you can find a description in the class. |
| 47 | |
| 48 | Parameters relevant for the energy estimation: Size, Zd, Leakage, Dist and maybe some others. |
| 49 | |
| 50 | An example for plots and energy parametrization here: https://www.fact-project.org/logbook/showthread.php?tid=4695 |
| 51 | |
| 52 | == optimenergy.C == |
| 53 | |
| 54 | As input you need a MC ganymed file. |
| 55 | |
| 56 | The parametrization is defined in |
| 57 | {{{ |
| 58 | #!cpp |
| 59 | char *r = "[0]*M[0]"; |
| 60 | }}} |
| 61 | |
| 62 | With |
| 63 | {{{ |
| 64 | #!cpp |
| 65 | opt.AddParameter("MHillas.fSize"); |
| 66 | }}} |
| 67 | further image parameters are added. |
| 68 | |
| 69 | You can also change the slope and add cuts. |
| 70 | |
| 71 | More examples can be found at ISDC in /home/isdc/dorner/e_est/optimenergy.C |
| 72 | |
| 73 | == Spectrum == |
| 74 | |
| 75 | A macro to get a spectrum can be found at /home/isdc/dorner/get_spectrum/spectrum.C |
| 76 | |
| 77 | remark: so far it does not yet calculate errors. |
| 78 | |
| 79 | Input: ganymed files from data and MC |
| 80 | |
| 81 | == Consistent Processing of MC and data == |
| 82 | |
| 83 | [tbc] |