diff --git a/data/T2K/CCinc/nue_2019/FHC_nue_unfold_with_neut.txt b/data/T2K/CCinc/nue_2019/FHC_nue_unfold_with_neut.txt new file mode 100644 index 0000000..61d7536 --- /dev/null +++ b/data/T2K/CCinc/nue_2019/FHC_nue_unfold_with_neut.txt @@ -0,0 +1,4 @@ +0.3 3.10407E-39 0.793005E-39 +1.6 2.41606E-39 0.759596E-39 +3.2 1.09267E-39 0.510421E-39 +30.0 0.00 0.00 diff --git a/data/T2K/CCinc/nue_2019/RHC_nue_unfold_with_neut.txt b/data/T2K/CCinc/nue_2019/RHC_nue_unfold_with_neut.txt new file mode 100644 index 0000000..34d8b89 --- /dev/null +++ b/data/T2K/CCinc/nue_2019/RHC_nue_unfold_with_neut.txt @@ -0,0 +1,4 @@ +0.3 3.97726E-39 1.88965E-39 +1.6 10.5856E-39 3.08965E-39 +30.0 0.00 0.00 + diff --git a/data/T2K/CCinc/nue_2019/RHC_nuebar_unfold_with_neut.txt b/data/T2K/CCinc/nue_2019/RHC_nuebar_unfold_with_neut.txt new file mode 100644 index 0000000..fa4ba4e --- /dev/null +++ b/data/T2K/CCinc/nue_2019/RHC_nuebar_unfold_with_neut.txt @@ -0,0 +1,3 @@ +0.3 1.01288E-39 0.551926E-39 +1.6 1.99471E-39 0.768926E-39 +30.0 0.00 0.00 diff --git a/data/T2K/CCinc/nue_2019/fract_covar_unfold_with_neut.txt b/data/T2K/CCinc/nue_2019/fract_covar_unfold_with_neut.txt new file mode 100644 index 0000000..e90f33a --- /dev/null +++ b/data/T2K/CCinc/nue_2019/fract_covar_unfold_with_neut.txt @@ -0,0 +1,11 @@ +0.0716895 0.0166114 0.065507 0.0232243 0.0315353 0.0398808 0.0347689 +0.0166114 0.0935784 0.0262206 0.0337246 0.0293716 0.0431473 0.0384238 +0.065507 0.0262206 0.230568 0.0585712 0.0650908 0.0850014 0.0798983 +0.0232243 0.0337246 0.0585712 0.242144 0.00368026 0.0536218 0.0440962 +0.0315353 0.0293716 0.0650908 0.00368026 0.0832293 0.0450185 0.0400094 +0.0398808 0.0431473 0.0850014 0.0536218 0.0450185 0.292844 0.0440944 +0.0347689 0.0384238 0.0798983 0.0440962 0.0400094 0.0440944 0.151416 + + + + diff --git a/src/T2K/T2K_nueCCinc_XSec_1Dpe.cxx b/src/T2K/T2K_nueCCinc_XSec_1Dpe.cxx new file mode 100644 index 0000000..18bb0f6 --- /dev/null +++ b/src/T2K/T2K_nueCCinc_XSec_1Dpe.cxx @@ -0,0 +1,85 @@ +#include "T2K_nueCCinc_XSec_1Dpe.h" +#include "T2K_SignalDef.h" + +//******************************************************************** +T2K_nueCCinc_XSec_1Dpe::T2K_nueCCinc_XSec_1Dpe(nuiskey samplekey) { +//******************************************************************** + + fSettings = LoadSampleSettings(samplekey); + std::string name = fSettings.GetS("name"); + std::string descrip = ""; + // This has to deal with nue FHC, and nue/nuebar RHC + if (!name.compare("T2K_nueCCinc_XSec_1Dpe_FHC")){ + descrip = name +". \n" + "Target: CH \n" + "Flux: T2K FHC nue \n" + "Signal: CC-inclusive \n"; + + fSettings.SetTitle("T2K FHC #nu_{e}-CC-inclusive p_{e}"); + fSettings.DefineAllowedSpecies("nue"); + fSettings.SetDataInput(FitPar::GetDataBase() + "/T2K/CCinc/nue_2019/FHC_nue_unfold_with_neut.txt"); + nuPDG = 12; + lepPDG = 11; + } else if (!name.compare("T2K_nueCCinc_XSec_1Dpe_RHC")){ + descrip = name +". \n" + "Target: CH \n" + "Flux: T2K RHC nue \n" + "Signal: CC-inclusive \n"; + + fSettings.SetTitle("T2K RHC #nu_{e}-CC-inclusive p_{e}"); + fSettings.DefineAllowedSpecies("nue"); + fSettings.SetDataInput(FitPar::GetDataBase() + "/T2K/CCinc/nue_2019/RHC_nue_unfold_with_neut.txt"); + nuPDG = 12; + lepPDG = 11; + } else if (!name.compare("T2K_nuebarCCinc_XSec_1Dpe_RHC")){ + descrip = name +". \n" + "Target: CH \n" + "Flux: T2K RHC nuebar \n" + "Signal: CC-inclusive \n"; + + fSettings.SetTitle("T2K RHC #bar{#nu}_{e}-CC-inclusive p_{e}"); + fSettings.DefineAllowedSpecies("nueb"); + fSettings.SetDataInput(FitPar::GetDataBase() + "/T2K/CCinc/nue_2019/RHC_nuebar_unfold_with_neut.txt"); + nuPDG = -12; + lepPDG = -11; + } + + // Setup common settings + fSettings.SetDescription(descrip); + fSettings.SetXTitle("p_{e} (GeV)"); + fSettings.SetYTitle("#frac{d#sigma}{dp_{e}} (cm^{2}/nucleon)"); + fSettings.SetEnuRange(0.0, 30.0); + fSettings.DefineAllowedTargets("C,H"); + FinaliseSampleSettings(); + + SetDataFromTextFile( fSettings.GetDataInput() ); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") * 1E-38 / fNEvents / + TotalIntegratedFlux(); + + // Don't scale by width + fIsNoWidth = true; + + FinaliseMeasurement(); +}; + +// Signal is simply a CC inclusive without any angular/momentum cuts +bool T2K_nueCCinc_XSec_1Dpe::isSignal(FitEvent *event) { + if (!SignalDef::isCCINC(event, nuPDG, EnuMin, EnuMax)) return false; + + // Phase space restriction + TLorentzVector Pnu = event->GetHMISParticle(nuPDG)->fP; + TLorentzVector Pe = event->GetHMFSParticle(lepPDG)->fP; + static double max_angle = 45*TMath::Pi()/180.; + if (FitUtils::th(Pnu, Pe) > max_angle) return false; + return true; +}; + +void T2K_nueCCinc_XSec_1Dpe::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(lepPDG) == 0) return; + TLorentzVector Pe = event->GetHMFSParticle(lepPDG)->fP; + fXVar = Pe.Vect().Mag() / 1000.; +}; diff --git a/src/T2K/T2K_nueCCinc_XSec_1Dpe.h b/src/T2K/T2K_nueCCinc_XSec_1Dpe.h new file mode 100644 index 0000000..e76736b --- /dev/null +++ b/src/T2K/T2K_nueCCinc_XSec_1Dpe.h @@ -0,0 +1,22 @@ +#ifndef T2K_NUECCINC_XSEC_1DPE_H_SEEN +#define T2K_NUECCINC_XSEC_1DPE_H_SEEN + +#include "Measurement1D.h" + +class T2K_nueCCinc_XSec_1Dpe : public Measurement1D { +public: + + T2K_nueCCinc_XSec_1Dpe(nuiskey samplekey); + + ~T2K_nueCCinc_XSec_1Dpe() {}; + + bool isSignal(FitEvent *event); + + void FillEventVariables(FitEvent* event); + + private: + int nuPDG; + int lepPDG; +}; + +#endif