|
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.
- Timestamp:
-
Jan 5, 2017, 4:40:08 PM (8 years ago)
- Author:
-
Clarence Wret
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v23
|
v24
|
|
15 | 15 | |
16 | 16 | |
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 == |
21 | 21 | |
22 | 22 | The 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). |
… |
… |
|
29 | 29 | |
30 | 30 | |
31 | | === Choosing a cross-section distribution === |
| 31 | == Choosing a cross-section distribution == |
32 | 32 | |
33 | 33 | The 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. |
… |
… |
|
38 | 38 | |
39 | 39 | |
40 | | == Preparing structure for a sample == |
| 40 | = Preparing structure for a sample = |
41 | 41 | |
42 | 42 | NUISANCE is designed to easily allow adding new samples. |
… |
… |
|
50 | 50 | |
51 | 51 | |
52 | | === Naming the sample === |
| 52 | == Naming the sample == |
53 | 53 | |
54 | 54 | Some 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'''. |
… |
… |
|
72 | 72 | |
73 | 73 | |
74 | | === Placing the sample in a directory === |
| 74 | == Placing the sample in a directory == |
75 | 75 | |
76 | 76 | As 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. |
… |
… |
|
85 | 85 | Make 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. |
86 | 86 | |
87 | | === Placing the data in a directory === |
| 87 | == Placing the data in a directory == |
88 | 88 | |
89 | 89 | The data for the measurement goes into the `data` directory. |
… |
… |
|
101 | 101 | |
102 | 102 | |
103 | | == Coding up a sample == |
| 103 | = Coding up a sample = |
104 | 104 | |
105 | 105 | Now that we have the rough structure set-up, we can finally start writing some code! :) |
106 | 106 | |
107 | 107 | |
108 | | === Setting up the inheritance === |
| 108 | == Setting up the inheritance == |
109 | 109 | |
110 | 110 | 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]. The `Measurement1D` class is implemented in `src/FitBase/Measurement1D.cxx`. |
… |
… |
|
138 | 138 | }}} |
139 | 139 | |
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 = |
148 | 148 | `T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx`: |
149 | 149 | |
|