nuisance is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" ("(default)" is not readable or not a Git repository.). Look in the Trac log for more information.

Changes between Version 23 and Version 24 of HowToAddSample


Ignore:
Timestamp:
Jan 5, 2017, 4:40:08 PM (7 years ago)
Author:
Clarence Wret
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowToAddSample

    v23 v24  
    1515
    1616
    17 == Examining the data and choosing distributions ==
    18 
    19 
    20 === Finding the neutrino flux and generating events ===
     17= Examining the data and choosing distributions =
     18
     19
     20== Finding the neutrino flux and generating events ==
    2121
    2222The first issue at hand is to find the flux for the experiment. If we don't have this, we cant make a generator prediction---unless the measurement is a total cross-section without any phase space cuts (in which case you should probably cast a suspicious eye).
     
    2929
    3030
    31 === Choosing a cross-section distribution ===
     31== Choosing a cross-section distribution ==
    3232
    3333The T2K CC1pi+ H,,2,,O data release contains various distributions in FIG 4. In this tutorial I'll look at adding one kinematic distribution and one derived distribution: p,,mu,, and E^rec^,,nu,, shown below.
     
    3838
    3939
    40 == Preparing structure for a sample ==
     40= Preparing structure for a sample =
    4141
    4242NUISANCE is designed to easily allow adding new samples.
     
    5050
    5151
    52 === Naming the sample ===
     52== Naming the sample ==
    5353
    5454Some automatic processing is done on loading up the samples to set up generator scaling factors, chi2 calculations and so on. These are simple string comparisons done in the base class constructors, but do '''place responsibility on the user'''.
     
    7272
    7373
    74 === Placing the sample in a directory ===
     74== Placing the sample in a directory ==
    7575
    7676As with many packages, NUISANCE has source code in the `src` directory. We then have a directory for each experiment inside `src`, e.g. `src/T2K`, `src/MINERvA`, and so on.
     
    8585Make the new files `src/T2K/T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx` and `src/T2K/T2K_CC1pip_H2O_1Dpmu_nu.h`. These are the implementation and header files for the new measurement.
    8686
    87 === Placing the data in a directory ===
     87== Placing the data in a directory ==
    8888
    8989The data for the measurement goes into the `data` directory.
     
    101101
    102102
    103 == Coding up a sample ==
     103= Coding up a sample =
    104104
    105105Now that we have the rough structure set-up, we can finally start writing some code! :)
    106106
    107107
    108 === Setting up the inheritance ===
     108== Setting up the inheritance ==
    109109
    110110In the case of our T2K CC1pi+ H,,2,,O data, we're dealing with 1D distributions. They should therefore inherit from the `Measurement1D` class, as mentioned  [#point_base earlier]. The `Measurement1D` class is implemented in `src/FitBase/Measurement1D.cxx`.
     
    138138}}}
    139139
    140 === Making the constructor ===
    141 
    142 === Specifying the event-level dependent variable(s) ===
    143 
    144 === Specifying a signal definition ===
    145 
    146 
    147 == The final implementation ==
     140== Making the constructor ==
     141
     142== Specifying the event-level dependent variable(s) ==
     143
     144== Specifying a signal definition ==
     145
     146
     147= The final implementation =
    148148`T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx`:
    149149