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 47 and Version 48 of HowToAddSample


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

--

Legend:

Unmodified
Added
Removed
Modified
  • HowToAddSample

    v47 v48  
    215215The data and covariance matrix are available in a ROOT file for the sample, so I used `Measurement1D::SetDataFromFile` to set up the data and `Measurement1D::SetCovarFromDataFile` to set up the covariances.
    216216
     217`fName` and the other `std::string`s were set to reasonable names and `fScaleFactor` was
     218
    217219The `constructor` for the class now looks like:
    218220
     
    229231  fPlotTitles = "; p_{#mu} (GeV/c); d#sigma/dp_{#mu} (cm^{2}/(GeV/c)/nucleon)";
    230232  EnuMin = 0.;
    231   EnuMax = 10.;
     233  EnuMax = 100.;
    232234  Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
    233235
     
    325327}}}
    326328
    327 We should now write a helper function in the `FitUtils` namespace to get `E^rec^,,nu,,` from the muon, pion and neutrino `TLorentzVector`s. [arxiv 1605.07964v2.pdf The paper] specifies the exact form in equation 1. The `FitUtils` implementation lives in `src/Utils/FitUtils.cxx`.
     329We should now write a helper function in the `FitUtils` namespace to get `E^rec^,,nu,,` from the muon, pion and neutrino `TLorentzVector`s. [https://arxiv.org/pdf/1605.07964v2.pdf The paper] specifies the exact form in equation 1. The `FitUtils` implementation lives in `src/Utils/FitUtils.cxx`.
    328330
    329331{{{
     
    373375The base class function `MeasurementBase::Reconfigure()` specifies `isSignal(FitEvent *)` which is what we will implement in our class. Since we plan on re-using the signal definition for multiple distributions, we should include it in the `src/T2K/T2K_SignalDef.cxx` implementation, as mentioned [#point_signal earlier].
    374376
    375 Reading the [arxiv 1605.07964v2.pdf paper], we see the requirement:
     377Reading the [https://arxiv.org/pdf/1605.07964v2.pdf paper], we see the requirement:
    376378
    377379 "The analysis presented restricts the kinematic phase-space to the region defined by p,,µ,, > 200 MeV/c, p,,π,,^+^ > 200 MeV/c, cos(θ,,µ,,) > 0.3 and cos(θ,,π+,, ) > 0.3."
    378380
    379 
     381so our signal definition needs to extract these quantities from the `FitEvent` object.
     382
     383We prefer a clear unambiguous naming scheme, so let's name the namespace function `isCC1pip_T2K_H2O`. The function will need to take the `FitEvent` object along with the `EnuMin` and `EnuMax` defined in the experiment signal definition.
     384
     385In the signal definition we can use already declared functions of the namespace `SignalDef`. These live in `src/Utils/SignalDef.cxx`. We can see a `SignalDef::isCC1pi(FitEvent *, int nuPDG, int piPDG, double EnuMin, double EnuMax)`. This helper function searches for:
     386
     387 * 1 single lepton of type `nuPDG-1`
     388 * 1 single pion of type `piPDG`
     389 * makes sure the neutrino energy is between `EnuMin` and `EnuMax`
     390
     391We can then add our kinematic requirements on the muon and pion in our `SignalDef::isCC1pip_T2K_H2O(FitEvent *event, double EnuMin, double EnuMax` implementation in `src/T2K/T2K_SignalDef.cxx`.
     392
     393In summary, we get for `src/T2K/T2K_SignalDef.cxx`:
     394
     395{{{
     396namespace SignalDef {
     397
     398  // T2K H2O signal definition
     399  bool isCC1pip_T2K_H2O(FitEvent *event, double EnuMin,
     400                                 double EnuMax) {
     401
     402    if (!isCC1pi(event, 14, 211, EnuMin, EnuMax)) return false;
     403
     404    TLorentzVector Pnu = event->GetHMISParticle(14)->fP; // Can also use FitEvent::GetNeutrinoIn()
     405    TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
     406    TLorentzVector Ppip = event->GetHMFSParticle(211)->fP;
     407
     408    double p_mu = FitUtils::p(Pmu) * 1000;
     409    double p_pi = FitUtils::p(Ppip) * 1000;
     410    double cos_th_mu = cos(FitUtils::th(Pnu, Pmu));
     411    double cos_th_pi = cos(FitUtils::th(Pnu, Ppip));
     412
     413    if (p_mu <= 200 || p_pi <= 200 || cos_th_mu <= 0.3 || cos_th_pi <= 0.3) {     
     414      return false;
     415    }
     416
     417    return true;
     418  };
     419
     420}
     421
     422}}}
     423
     424Then back in `src/T2K/T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx` we simply do:
     425
     426{{{
     427//********************************************************************
     428// Beware: The H2O analysis has different signal definition to the CH analysis!
     429bool T2K_CC1pip_H2O_XSec_1Dpmu_nu::isSignal(FitEvent *event) {
     430//********************************************************************
     431  return SignalDef::isCC1pip_T2K_H2O(event, EnuMin, EnuMax);
     432}
     433}}}
     434
     435making sure our [#point_header header file] has `#include "T2K_SignalDef.h"`.
    380436
    381437
    382438= The final implementation =
     439
     440Here's a summary of the implementation for reference:
     441
    383442`T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx`:
    384443
     
    460519}}}
    461520
     521
     522
    462523= Make NUISANCE aware of the sample =
    463524FCN/SampleList