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 22 and Version 23 of HowToAddSample


Ignore:
Timestamp:
Jan 5, 2017, 4:39:05 PM (8 years ago)
Author:
Clarence Wret
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowToAddSample

    v22 v23  
    3838
    3939
    40 == Implementing a sample ==
     40== Preparing structure for a sample ==
    4141
    4242NUISANCE is designed to easily allow adding new samples.
     
    101101
    102102
     103== Coding up a sample ==
     104
     105Now that we have the rough structure set-up, we can finally start writing some code! :)
     106
     107
    103108=== Setting up the inheritance ===
    104109
    105 Now that we have the rough structure set-up, we can finally start writing some code! :)
    106 
    107 In 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].
    108 
    109 We will also require a `constructor` and `destructor` for the class, and we'll need to overload `MeasurementBase` methods which define the dependent variable(s) (p,,mu,, in our case) and what our signal is (CC interaction with one muon and one positive pion with no other pions or mesons and any number of nucleons in our case).
    110 
    111 The `MeasurementBase` functions which we need to overload are `isSignal(FitEvent *event)` and `FillEventVariables(FitEvent *event)`. The `FitEvent` class is an object which contains information about one single event: all the particles, their kinematics and their status after the interaction, the interaction channel which produced the final state, possible secondary interactions, the interaction target, and so on.
    112 
    113 The `FitEvent` class is implemented in `src/FitBase/FitEvent.cxx` and essentially the native format which NUISANCE uses.
    114 
    115 The signal is defined in the
     110In 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`.
     111
     112
     113We will also require a `constructor` and `destructor` for the class, and we'll need to overload `MeasurementBase` methods which define the dependent variable(s) (p,,mu,, in our case) and what our signal is (CC interaction with one muon and one positive pion with no other pions or mesons and any number of nucleons in our case). The `MeasurementBase` functions which we need to overload are `isSignal(FitEvent *event)` and `FillEventVariables(FitEvent *event)`.
     114
     115The `FitEvent` class is an object which contains information about one single event: all the particles, their kinematics and their status after the interaction, the interaction channel which produced the final state, possible secondary interactions, the interaction target, and so on.  The `FitEvent` class is implemented in `src/FitBase/FitEvent.cxx` and essentially the generator-independent common event format which NUISANCE uses for the generator events.
     116
     117Our header file then looks something like:
    116118
    117119{{{
     
    135137#endif
    136138}}}
    137 
    138 The `Measurement1D` class is implemented in `src/FitBase/Measurement1D.cxx`.
    139139
    140140=== Making the constructor ===