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 37 and Version 38 of HowToAddSample


Ignore:
Timestamp:
Jan 6, 2017, 1:56:23 PM (8 years ago)
Author:
Clarence Wret
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowToAddSample

    v37 v38  
    120120The `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.
    121121
    122 [=!point_signal]
     122[=#point_signal]
    123123We see that the `src/T2K` directory contains `T2K_SignalDef.cxx`. This extends the `SignalDef` namespace which holds many of the signal definitions for the classes. If you're implementing multiple distributions for the same measurement (e.g. dSig/dp,,mu,, and dSig/dcosmu) we recommend adding the signal definition to the namespace rather than directly in the `isSignal(FitEvent *event)` function in the class implementation. We'll talk about implementing a signal definition [#point_signaldef later].
    124124
     125
     126'''What to do:'''
    125127Our header file now looks like:
    126128
     
    178180 * `TMatrixDSym *fFullCovar`: The covariance matrix
    179181 * `TMatrixDSym *covar`: The inverted covariance matrix (bad naming, sorry!)
    180  * `double fScaleFactor`: The scaling factor we need to go from a event rate
     182 * `double fScaleFactor`: The scaling factor we need to go from a event rate to a cross-section (N,,evt,,(p,,mu,,) -> dSig(p,,mu,,))
    181183
    182184
     
    188190 * `Measurement1D::SetupDefaultHist`: sets all the generator histograms and their auxillary histograms (e.g. mode-by-mode generator histograms)
    189191
    190 or similar functions (e.g. `Measurement1D::SetDataFromFile` instead of `Measurement1D::SetDataValues`).
    191 
    192 
     192or similar functions, e.g. calling `Measurement1D::SetDataFromFile` instead of `Measurement1D::SetDataValues`. '''Feel free to add reasonable setter functions to the base classes if you can't find a suitable one!'''
     193
     194Current NUISANCE (v1r0) behaviour requires `fName`, `fPlotTitls`, `EnuMin`, `EnuMax` and `fScaleFactor` to be set by user in the implementation file. These are the only variables that need to be supplied by the user in the constructor, granted above helper functions are used.
     195
     196'''For non-expert use''', it's sufficient to just copy the `fScaleFactor` variable as `(fEventHist->Integral("width")*1E-38)/double(fNEvents)/TotalIntegratedFlux("width");`. This number is applied to the event rate histogram to take us to a cross-section histogram in `Measurement1D::ScaleEvents`.
     197
     198{{{
     199#!div class=important
     200If the cross-section is not in cm^2^/nucleon but instead cm^2^/CH (or any other molecule) you will have to scale the `fScaleFactor` by the number of available target nucleons. For CCQE, nu,,mu,, interactions only occur off neutrons, which we have 6 of in CH. But the total number of nucleons in CH is 13. So if an experiment reports cross-section in cm^2^/CH we need to do `fScaleFactor*=13./6.`.
     201}}}
     202
     203It's possible that these will be automated in the future, so please look at [[https://nuisance.hepforge.org/trac/browser/src recently implemented samples]] for up-to-date references.
    193204
    194205{{{