Changes between Version 1 and Version 2 of IngredientsSpectrum


Ignore:
Timestamp:
06/01/18 10:07:01 (6 years ago)
Author:
Daniela Dorner
Comment:

continued tutorial

Legend:

Unmodified
Added
Removed
Modified
  • IngredientsSpectrum

    v1 v2  
    22However please keep in mind that this is far from being complete, might contain information that is valid only now and that it has not been checked for mistakes.
    33
    4 == Ingredients ==
     4remark: this tutorial is referring to Mars from June 2018 (rev 19018)
     5
     6= Ingredients =
    57
    68* energy-estimator
     
    911* macro to calculate spectrum
    1012
    11 == Basic Steps and Rules ==
     13= Basic Steps and Rules =
    1214
    13151. Prepare ingredients
     
    20221. run ganymed for data and MC
    21231. run macro for spectrum
     24
     25= Energy Estimator =
     26
     27To 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
     29Once you have an energy estimator, you implement it in ganymed e.g. like this:
     30https://trac.fact-project.org/browser/trunk/Mars/fact/analysis/mc/ganymed.C?rev=17733#L169
     31
     32== Get Energy Parametrization ==
     33
     34To 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
     36The macro in the svn contains a very basic example using only the image parameter Size in the parametrization.
     37
     38Start with this and then add more image parameters.
     39
     40== more image parameters ==
     41
     42To 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
     44For example you can plot the image parameters like this: http://www.astro.uni-wuerzburg.de/wikineu/index.php/How_to_plot_image_parameters
     45
     46To 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
     48Parameters relevant for the energy estimation: Size, Zd, Leakage, Dist and maybe some others.
     49
     50An example for plots and energy parametrization here: https://www.fact-project.org/logbook/showthread.php?tid=4695
     51
     52== optimenergy.C ==
     53
     54As input you need a MC ganymed file.
     55
     56The parametrization is defined in
     57{{{
     58#!cpp
     59char *r = "[0]*M[0]"; 
     60}}}
     61
     62With
     63{{{
     64#!cpp
     65opt.AddParameter("MHillas.fSize");
     66}}}
     67further image parameters are added.
     68
     69You can also change the slope and add cuts.
     70
     71More examples can be found at ISDC in /home/isdc/dorner/e_est/optimenergy.C
     72
     73== Spectrum ==
     74
     75A macro to get a spectrum can be found at /home/isdc/dorner/get_spectrum/spectrum.C
     76
     77remark: so far it does not yet calculate errors.
     78
     79Input: ganymed files from data and MC
     80
     81== Consistent Processing of MC and data ==
     82
     83[tbc]