diff --git a/src/MINERvA/MINERvA_CC1pi0_XSec_1DEnu_antinu.cxx b/src/MINERvA/MINERvA_CC1pi0_XSec_1DEnu_antinu.cxx
index cbee9ae..f5a2fa7 100644
--- a/src/MINERvA/MINERvA_CC1pi0_XSec_1DEnu_antinu.cxx
+++ b/src/MINERvA/MINERvA_CC1pi0_XSec_1DEnu_antinu.cxx
@@ -1,108 +1,109 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MINERvA_SignalDef.h"
#include "MINERvA_CC1pi0_XSec_1DEnu_antinu.h"
//********************************************************************
MINERvA_CC1pi0_XSec_1DEnu_antinu::MINERvA_CC1pi0_XSec_1DEnu_antinu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MINERvA_CC1pi0_XSec_1DEnu_antinu sample. \n" \
"Target: CH \n" \
"Flux: MINERvA Forward Horn Current numubar \n" \
"Signal: Any event with 1 muon, 1 pion, no other tracks \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("E_{#nu} (GeV)");
fSettings.SetYTitle("#sigma(E_{#nu} (cm^{2}/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(1.5, 10.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("MINERvA_CC1pi0_XSec_1DEnu_antinu");
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents);
// Plot Setup -------------------------------------------------------
SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CC1pi0/2016/anu-cc1pi0-xsec-enu.csv");
for (int i = 0; i < fDataHist->GetNbinsX()+1; i++) {
fDataHist->SetBinError(i+1, fDataHist->GetBinContent(i+1)*fDataHist->GetBinError(i+1)/100.);
}
SetCorrelationFromTextFile(GeneralUtils::GetTopLevelDir()+"/data/MINERvA/CC1pi0/2016/anu-cc1pi0-correlation-enu.csv");
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MINERvA_CC1pi0_XSec_1DEnu_antinu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(-13) == 0) return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(-13)->fP;
double hadMass = FitUtils::Wrec(Pnu, Pmu);
double Enu = -999;
if (hadMass < 1800)
Enu = Pnu.E()/1000.;
fXVar = Enu;
return;
};
// **************************************
// MINERvA CC1pi0 in anti-neutrino mode
// Unfortunately there's no information on the neutrino component which is
// subtracted off
//
// 2014 analysis:
// Exactly one positive muon
// Exactly one observed pi0
// No pi+/pi allowed
// No information on what is done with mesons, oops?
// No information on what is done with nucleons, oops?
//
// 2016 analysis:
// Exactly one positive muon
// Exactly one observed pi0
// No other mesons
// No other charged tracks (means no protons)
//
//********************************************************************
bool MINERvA_CC1pi0_XSec_1DEnu_antinu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi0_MINERvA_2016(event, EnuMin, EnuMax);
}
diff --git a/src/MINERvA/MINERvA_CC1pi0_XSec_1DQ2_antinu.cxx b/src/MINERvA/MINERvA_CC1pi0_XSec_1DQ2_antinu.cxx
index 8b3eb7b..f5fc03a 100644
--- a/src/MINERvA/MINERvA_CC1pi0_XSec_1DQ2_antinu.cxx
+++ b/src/MINERvA/MINERvA_CC1pi0_XSec_1DQ2_antinu.cxx
@@ -1,91 +1,92 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MINERvA_SignalDef.h"
#include "MINERvA_CC1pi0_XSec_1DQ2_antinu.h"
//********************************************************************
MINERvA_CC1pi0_XSec_1DQ2_antinu::MINERvA_CC1pi0_XSec_1DQ2_antinu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MINERvA_CC1pi0_XSec_1DQ2_antinu sample. \n" \
"Target: CH \n" \
"Flux: MINERvA Forward Horn Current numubar \n" \
"Signal: Any event with 1 muon, 1 pion, no other tracks \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("Q^{2} (GeV^{2})");
fSettings.SetYTitle("d#sigma/dQ^{2} (cm^{2}/(GeV^{2})/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(1.5, 10.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("MINERvA_CC1pi0_XSec_1DQ2_antinu");
fSettings.DefineAllowedSpecies("numu");
// fFluxCorrected = fSettings.Found("name", "fluxcorr");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CC1pi0/2016/anu-cc1pi0-xsec-q2.csv");
for (int i = 0; i < fDataHist->GetNbinsX()+1; i++) {
fDataHist->SetBinError(i+1, fDataHist->GetBinContent(i+1)*fDataHist->GetBinError(i+1)/100.);
}
SetCorrelationFromTextFile(GeneralUtils::GetTopLevelDir()+"/data/MINERvA/CC1pi0/2016/anu-cc1pi0-correlation-q2.csv");
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MINERvA_CC1pi0_XSec_1DQ2_antinu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(-13) == 0) return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(-13)->fP;
double hadMass = FitUtils::Wrec(Pnu, Pmu);
double Q2 = -999;
if (hadMass < 1800) {
Q2 = -1*(Pnu-Pmu).Mag2()/1.E6;
}
fXVar = Q2;
return;
};
//********************************************************************
bool MINERvA_CC1pi0_XSec_1DQ2_antinu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi0_MINERvA_2016(event, EnuMin, EnuMax);
}
diff --git a/src/MINERvA/MINERvA_CC1pi0_XSec_1DTpi0_antinu.cxx b/src/MINERvA/MINERvA_CC1pi0_XSec_1DTpi0_antinu.cxx
index 67d9729..cfab2c3 100644
--- a/src/MINERvA/MINERvA_CC1pi0_XSec_1DTpi0_antinu.cxx
+++ b/src/MINERvA/MINERvA_CC1pi0_XSec_1DTpi0_antinu.cxx
@@ -1,97 +1,98 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MINERvA_SignalDef.h"
#include "MINERvA_CC1pi0_XSec_1DTpi0_antinu.h"
// The 2016 MINERvA measurement is in Tpi
// The 2016 MINERvA measurement is in ppi
//********************************************************************
MINERvA_CC1pi0_XSec_1DTpi0_antinu::MINERvA_CC1pi0_XSec_1DTpi0_antinu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MINERvA_CC1pi0_XSec_1DTpi0_antinu sample. \n" \
"Target: CH \n" \
"Flux: MINERvA Forward Horn Current numubar \n" \
"Signal: Any event with 1 muon, 1 pion, no other tracks \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("T_{#pi} (GeV)");
fSettings.SetYTitle("d#sigma/dT_{#pi} (cm^{2}/GeV/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(1.5, 10.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("MINERvA_CC1pi0_XSec_1DTpi0_antinu");
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width") * double(1E-38) / double(fNEvents) / TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CC1pi0/2016/anu-cc1pi0-xsec-pion-kinetic-energy.csv");
for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) {
fDataHist->SetBinError(i + 1, fDataHist->GetBinContent(i + 1)*fDataHist->GetBinError(i + 1) / 100.);
}
SetCorrelationFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CC1pi0/2016/anu-cc1pi0-correlation-pion-kinetic-energy.csv");
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MINERvA_CC1pi0_XSec_1DTpi0_antinu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(111) == 0 ||
event->NumFSParticle(-13) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(-13)->fP;
double hadMass = FitUtils::Wrec(Pnu, Pmu);
double Tpi0 = -999;
if (hadMass < 1800)
Tpi0 = FitUtils::T(Ppi0);
fXVar = Tpi0;
};
//********************************************************************
bool MINERvA_CC1pi0_XSec_1DTpi0_antinu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi0_MINERvA_2016(event, EnuMin, EnuMax);
}
diff --git a/src/MINERvA/MINERvA_CC1pi0_XSec_1Dpmu_antinu.cxx b/src/MINERvA/MINERvA_CC1pi0_XSec_1Dpmu_antinu.cxx
index 71ac265..19dfe99 100644
--- a/src/MINERvA/MINERvA_CC1pi0_XSec_1Dpmu_antinu.cxx
+++ b/src/MINERvA/MINERvA_CC1pi0_XSec_1Dpmu_antinu.cxx
@@ -1,89 +1,90 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MINERvA_SignalDef.h"
#include "MINERvA_CC1pi0_XSec_1Dpmu_antinu.h"
//********************************************************************
MINERvA_CC1pi0_XSec_1Dpmu_antinu::MINERvA_CC1pi0_XSec_1Dpmu_antinu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MINERvA_CC1pi0_XSec_1Dpmu_antinu sample. \n" \
"Target: CH \n" \
"Flux: MINERvA Forward Horn Current numubarr \n" \
"Signal: Any event with 1 muon, 1 pion, no other tracks \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("p_{#mu} (GeV)");
fSettings.SetYTitle("d#sigma/dp_{#mu} (cm^{2}/GeV/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(1.5, 10.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("MINERvA_CC1pi0_XSec_1Dpmu_antinu");
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CC1pi0/2016/anu-cc1pi0-xsec-muon-momentum.csv");
for (int i = 0; i < fDataHist->GetNbinsX()+1; i++) {
fDataHist->SetBinError(i+1, fDataHist->GetBinContent(i+1)*fDataHist->GetBinError(i+1)/100.);
}
SetCorrelationFromTextFile(GeneralUtils::GetTopLevelDir()+"/data/MINERvA/CC1pi0/2016/anu-cc1pi0-correlation-muon-momentum.csv");
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MINERvA_CC1pi0_XSec_1Dpmu_antinu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(-13) == 0) return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(-13)->fP;
double hadMass = FitUtils::Wrec(Pnu, Pmu);
double pmu = -999;
if (hadMass < 1800)
pmu = FitUtils::p(Pmu);
fXVar = pmu;
return;
};
//********************************************************************
bool MINERvA_CC1pi0_XSec_1Dpmu_antinu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi0_MINERvA_2016(event, EnuMin, EnuMax);
}
diff --git a/src/MINERvA/MINERvA_CC1pi0_XSec_1Dth_antinu.cxx b/src/MINERvA/MINERvA_CC1pi0_XSec_1Dth_antinu.cxx
index d8a8313..5d56b9d 100644
--- a/src/MINERvA/MINERvA_CC1pi0_XSec_1Dth_antinu.cxx
+++ b/src/MINERvA/MINERvA_CC1pi0_XSec_1Dth_antinu.cxx
@@ -1,131 +1,132 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MINERvA_SignalDef.h"
#include "MINERvA_CC1pi0_XSec_1Dth_antinu.h"
//********************************************************************
MINERvA_CC1pi0_XSec_1Dth_antinu::MINERvA_CC1pi0_XSec_1Dth_antinu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MINERvA_CC1pi0_XSec_1Dth_antinu sample. \n" \
"Target: CH \n" \
"Flux: MINERvA Forward Horn Current numubar \n" \
"Signal: Any event with 1 muon, 1 pion, no other tracks \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("#theta_{#pi} (degrees)");
fSettings.SetYTitle("d#sigma/d#theta_{#pi}) (cm^{2}/nucleon/degree)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(1.5, 10.0);
fSettings.DefineAllowedTargets("C,H");
fUpdatedData = !fSettings.Found("name", "2015");
fFluxCorrection = fSettings.Found("name","fluxcorr");
// CCQELike plot information
fSettings.SetTitle("MINERvA_CC1pi0_XSec_1Dth_antinu");
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width") * double(1E-38) / double(fNEvents) / TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
if (fUpdatedData) {
hadMassCut = 1800;
fIsDiag = false;
SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CC1pi0/2016/anu-cc1pi0-xsec-pion-angle.csv");
// Error is given as percentage of cross-section
// Need to scale the bin error properly before we do correlation -> covariance conversion
for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) {
fDataHist->SetBinError(i + 1, fDataHist->GetBinContent(i + 1)*fDataHist->GetBinError(i + 1) / 100.);
}
SetCorrelationFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CC1pi0/2016/anu-cc1pi0-correlation-pion-angle.csv");
+ SetShapeCovar();
} else {
// Although the covariance is given for MINERvA CC1pi0 nubar from 2015, it doesn't Cholesky decompose, hinting at something bad
// I've tried adding small numbers to the diagonal but it still didn't work and the chi2s are crazy
fIsDiag = true;
fNormError = 0.15;
// No hadronic mass cut on old publication
hadMassCut = 99999;
SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CC1pi0/2015/ccpi0_th.csv");
SetCovarFromDiagonal();
} // end special treatment depending on release year
if (fFluxCorrection) {
for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) {
fDataHist->SetBinContent(i + 1, fDataHist->GetBinContent(i + 1) * 1.11);
}
}
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MINERvA_CC1pi0_XSec_1Dth_antinu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(111) == 0 ||
event->NumFSParticle(-13) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(-13)->fP;
double hadMass = FitUtils::Wrec(Pnu, Pmu);
double th = -999;
if (hadMass < hadMassCut)
th = (180. / M_PI) * FitUtils::th(Pnu, Ppi0);
fXVar = th;
return;
};
//********************************************************************
bool MINERvA_CC1pi0_XSec_1Dth_antinu::isSignal(FitEvent *event) {
//********************************************************************
if (fUpdatedData) {
return SignalDef::isCC1pi0_MINERvA_2016(event, EnuMin, EnuMax);
} else {
return SignalDef::isCC1pi0_MINERvA_2015(event, EnuMin, EnuMax);
}
}
diff --git a/src/MINERvA/MINERvA_CC1pi0_XSec_1Dthmu_antinu.cxx b/src/MINERvA/MINERvA_CC1pi0_XSec_1Dthmu_antinu.cxx
index cfde6e4..e5d212d 100644
--- a/src/MINERvA/MINERvA_CC1pi0_XSec_1Dthmu_antinu.cxx
+++ b/src/MINERvA/MINERvA_CC1pi0_XSec_1Dthmu_antinu.cxx
@@ -1,90 +1,91 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MINERvA_SignalDef.h"
#include "MINERvA_CC1pi0_XSec_1Dthmu_antinu.h"
//********************************************************************
MINERvA_CC1pi0_XSec_1Dthmu_antinu::MINERvA_CC1pi0_XSec_1Dthmu_antinu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MINERvA_CC1pi0_XSec_1Dthmu_antinu sample. \n" \
"Target: CH \n" \
"Flux: MINERvA Forward Horn Current numubar \n" \
"Signal: Any event with 1 muon, 1 pion, no other tracks \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("#theta_{#mu}");
fSettings.SetYTitle("d#sigma/d#theta_{#mu} (cm^{2}/degrees/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(1.5, 10.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("MINERvA_CC1pi0_XSec_1Dthmu_antinu");
fSettings.DefineAllowedSpecies("numu");
fFluxCorrected = fSettings.Found("name", "fluxcorr");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CC1pi0/2016/anu-cc1pi0-xsec-muon-angle.csv");
for (int i = 0; i < fDataHist->GetNbinsX()+1; i++) {
fDataHist->SetBinError(i+1, fDataHist->GetBinContent(i+1)*fDataHist->GetBinError(i+1)/100.);
}
SetCorrelationFromTextFile(GeneralUtils::GetTopLevelDir()+"/data/MINERvA/CC1pi0/2016/anu-cc1pi0-correlation-muon-angle.csv");
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MINERvA_CC1pi0_XSec_1Dthmu_antinu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(-13) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(-13)->fP;
double hadMass = FitUtils::Wrec(Pnu, Pmu);
double thmu = -999;
if (hadMass < 1800)
thmu = (180./M_PI)*FitUtils::th(Pnu, Pmu);
fXVar = thmu;
return;
};
//********************************************************************
bool MINERvA_CC1pi0_XSec_1Dthmu_antinu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi0_MINERvA_2016(event, EnuMin, EnuMax);
}
diff --git a/src/MINERvA/MINERvA_CC1pip_XSec_1D_2017Update.cxx b/src/MINERvA/MINERvA_CC1pip_XSec_1D_2017Update.cxx
index ed7ca53..aad2bd9 100644
--- a/src/MINERvA/MINERvA_CC1pip_XSec_1D_2017Update.cxx
+++ b/src/MINERvA/MINERvA_CC1pip_XSec_1D_2017Update.cxx
@@ -1,169 +1,170 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MINERvA_SignalDef.h"
#include "MINERvA_CC1pip_XSec_1D_2017Update.h"
//********************************************************************
void MINERvA_CC1pip_XSec_1D_2017Update::SetupDataSettings(){
//********************************************************************
// Set Distribution
std::string name = fSettings.GetS("name");
if (!name.compare("MINERvA_CC1pip_XSec_1DTpi_nu_2017")) fDist = kTpi;
else if (!name.compare("MINERvA_CC1pip_XSec_1Dth_nu_2017")) fDist= kth;
else if (!name.compare("MINERvA_CC1pip_XSec_1Dpmu_nu_2017")) fDist= kpmu;
else if (!name.compare("MINERvA_CC1pip_XSec_1Dthmu_nu_2017")) fDist= kthmu;
else if (!name.compare("MINERvA_CC1pip_XSec_1DQ2_nu_2017")) fDist= kQ2;
else if (!name.compare("MINERvA_CC1pip_XSec_1DEnu_nu_2017")) fDist= kEnu;
// Define what files to use from the dist
std::string datafile = "";
std::string covarfile = "";
std::string titles = "";
std::string distdescript = "";
switch(fDist){
case (kTpi):
datafile = "cc1pip_updated_1DTpi";
covarfile = "cc1pip_updated_1DTpi";
titles = "CC1#pi Updated;T_{#pi} (MeV);d#sigma/dT_{#pi} (cm^{2}/nucleon/MeV)";
break;
case (kth):
datafile = "cc1pip_updated_1Dth";
covarfile = "cc1pip_updated_1Dth";
titles = "CC1#pi Updated;#theta_{#pi};d#sigma/d#theta_{#pi} (cm^{2}/nucleon)";
break;
case (kpmu):
datafile = "cc1pip_updated_1Dpmu";
covarfile = "cc1pip_updated_1Dpmu";
titles = "CC1#pi Updated;p_{#mu} (GeV);d#sigma/dp_{#mu} (cm^{2}/nucleon/GeV)";
break;
case (kthmu):
datafile = "cc1pip_updated_1Dthmu";
covarfile = "cc1pip_updated_1Dthmu";
titles ="CC1#pi Updated;#theta_{#mu};d#sigma/d#theta_{#mu} (cm^{2}/nucleon)";
break;
case (kQ2):
datafile = "cc1pip_updated_1DQ2";
covarfile = "cc1pip_updated_1DQ2";
titles ="CC1#pi Updated;Q^{2} (GeV^{2});d#sigma/dQ^{2} (cm^{2}/nucleon/GeV^{2})";
break;
case (kEnu):
datafile = "cc1pip_updated_1DEnu";
covarfile = "cc1pip_updated_1DEnu";
titles ="CC1#pi Updated;E_{#nu} (GeV);#sigma(E_#nu) (cm^{2}/nucleon)";
break;
default:
THROW("Unknown Analysis Distribution : " << fDist);
}
// Choose shape or rate covariance
fIsShape = fSettings.Found("type","SHAPE");
std::string covid = fIsShape ? "_shapecov.txt" : "_ratecov.txt";
// Now setup each data distribution and description.
std::string descrip = distdescript + \
"Target: CH \n" \
"Flux: MINERvA Forward Horn Current numu ONLY \n" \
"Signal: Any event with 1 muon, and 1pi+ or 1pi- in FS. W < 1.4";
fSettings.SetDescription(descrip);
fSettings.SetDataInput( GeneralUtils::GetTopLevelDir()+"/data/MINERvA/CC1pip/070717/" + datafile + "_data.txt" );
fSettings.SetCovarInput( GeneralUtils::GetTopLevelDir()+"/data/MINERvA/CC1pip/070717/" + covarfile + covid );
fSettings.SetTitle( GeneralUtils::ParseToStr(titles,";")[0] );
fSettings.SetXTitle( GeneralUtils::ParseToStr(titles,";")[1] );
fSettings.SetYTitle( GeneralUtils::ParseToStr(titles,";")[2] );
return;
}
//********************************************************************
MINERvA_CC1pip_XSec_1D_2017Update::MINERvA_CC1pip_XSec_1D_2017Update(nuiskey samplekey) {
//********************************************************************
// Define Sample Settings common to all data distributions
fSettings = LoadSampleSettings(samplekey);
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(1.5, 10.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.DefineAllowedSpecies("numu");
SetupDataSettings();
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// If Enu setup scale factor for Enu Unfolded, otherwise use differential
if (fDist == kEnu) fScaleFactor = GetEventHistogram()->Integral("width") * double(1E-38) / double(fNEvents);
else fScaleFactor = GetEventHistogram()->Integral("width") * double(1E-38) / double(fNEvents) / TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetCorrelationFromTextFile( fSettings.GetCovarInput() );
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
//********************************************************************
void MINERvA_CC1pip_XSec_1D_2017Update::FillEventVariables(FitEvent *event) {
//********************************************************************
fXVar = -999.9;
if (event->NumFSParticle(PhysConst::pdg_charged_pions) == 0 ||
event->NumFSParticle(13) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Ppip = event->GetHMFSParticle(PhysConst::pdg_charged_pions)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double Tpi = Ppip.E() - Ppip.Mag();
double th = (180./M_PI)*FitUtils::th(Pnu, Ppip);
double pmu = Pmu.Vect().Mag()/1.E3; // GeV
double thmu = (180.0/M_PI)*FitUtils::th(Pnu, Pmu);
double Q2 = fabs((Pmu - Pnu).Mag2()) / 1.E6; // Using true here?
double Enu = Pnu.E() / 1.E3;
switch(fDist){
case kTpi: fXVar = Tpi; break;
case kth: fXVar = th; break;
case kpmu: fXVar = pmu; break;
case kthmu: fXVar = thmu; break;
case kQ2: fXVar = Q2; break;
case kEnu: fXVar = Enu; break;
default:
THROW("DIST NOT FOUND : " << fDist);
}
return;
};
//********************************************************************
bool MINERvA_CC1pip_XSec_1D_2017Update::isSignal(FitEvent *event) {
//********************************************************************
// Only seem to release full phase space
return SignalDef::isCC1pip_MINERvA_2017(event, EnuMin, EnuMax);
}
diff --git a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DEnu_nu.cxx b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DEnu_nu.cxx
index dfdd241..5c61d66 100644
--- a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DEnu_nu.cxx
+++ b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DEnu_nu.cxx
@@ -1,94 +1,95 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MiniBooNE_CC1pi0_XSec_1DEnu_nu.h"
//********************************************************************
MiniBooNE_CC1pi0_XSec_1DEnu_nu::MiniBooNE_CC1pi0_XSec_1DEnu_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MiniBooNE_CC1pi0_XSec_1DEnu_nu sample. \n" \
"Target: CH \n" \
"Flux: MiniBooNE Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 muon, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("E_{#nu} (GeV)");
fSettings.SetYTitle("#sigma(E_{#nu}) (cm^{2}/CH_{2})");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/FULL,DIAG/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.5, 2.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("MiniBooNE_CC1pi0_XSec_1DEnu_nu");
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/CC1pi0/totalxsec_edit.txt" );
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/CC1pi0/totalxsec_covar.txt" );
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(14.08);
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetCorrelationFromTextFile( fSettings.GetCovarInput() );
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MiniBooNE_CC1pi0_XSec_1DEnu_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(111) == 0 ||
event->NumFSParticle(13) == 0)
return;
TLorentzVector Pnu =event->GetNeutrinoIn()->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double Enu = FitUtils::EnuCC1pi0rec(Pnu, Pmu, Ppi0);
fXVar = Enu;
return;
};
// **************************************************
// MiniBooNE CC1pi0 signal definition
//
// The signal definition is:
// Exactly one negative muon
// Exactly one pi0
// No additional mesons
// Any number of nucleons
//
// Does a few clever cuts on the likelihood to reduce CCQE contamination by
// looking at "fuzziness" of the ring; CCQE events are sharp, CC1pi0 are fuzzy
// (because of the pi0->2 gamma collinearity)
bool MiniBooNE_CC1pi0_XSec_1DEnu_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi(event, 14, 111, EnuMin, EnuMax);
}
diff --git a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DQ2_nu.cxx b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DQ2_nu.cxx
index 3c15ca2..4316e32 100644
--- a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DQ2_nu.cxx
+++ b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DQ2_nu.cxx
@@ -1,81 +1,82 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MiniBooNE_CC1pi0_XSec_1DQ2_nu.h"
//********************************************************************
MiniBooNE_CC1pi0_XSec_1DQ2_nu::MiniBooNE_CC1pi0_XSec_1DQ2_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MiniBooNE_CC1pi0_XSec_1DQ2_nu sample. \n" \
"Target: CH \n" \
"Flux: MiniBooNE Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 muon, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("Q^{2}_{CC#pi} (GeV^{2})");
fSettings.SetYTitle("d#sigma/dQ_{CC#pi}^{2} (cm^{2}/GeV^{2})");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/FULL,DIAG/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.5, 2.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("MiniBooNE_CC1pi0_XSec_1DQ2_nu");
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/CC1pi0/dxsecdq2_edit.txt" );
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/CC1pi0/dxsecdq2_covar.txt" );
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(14.08)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetCorrelationFromTextFile( fSettings.GetCovarInput() );
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MiniBooNE_CC1pi0_XSec_1DQ2_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(13) == 0) return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double q2 = -1*(Pnu-Pmu).Mag2()/(1.E6);
fXVar = q2;
return;
};
//********************************************************************
bool MiniBooNE_CC1pi0_XSec_1DQ2_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi(event, 14, 111, EnuMin, EnuMax);
}
diff --git a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DTu_nu.cxx b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DTu_nu.cxx
index 3245928..07df183 100644
--- a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DTu_nu.cxx
+++ b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1DTu_nu.cxx
@@ -1,83 +1,84 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MiniBooNE_CC1pi0_XSec_1DTu_nu.h"
//********************************************************************
MiniBooNE_CC1pi0_XSec_1DTu_nu::MiniBooNE_CC1pi0_XSec_1DTu_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MiniBooNE_CC1pi0_XSec_1DTu_nu sample. \n" \
"Target: CH \n" \
"Flux: MiniBooNE Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 muon, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("T_{#mu} (GeV)");
fSettings.SetYTitle("d#sigma/dE_{#mu} (cm^{2}/GeV^{2}/CH_{2})");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/FULL,DIAG/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.5, 2.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("MiniBooNE_CC1pi0_XSec_1DTu_nu");
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/CC1pi0/dxsecdemu_edit.txt" );
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/CC1pi0/dxsecdemu_covar.txt" );
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(14.08)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetCorrelationFromTextFile( fSettings.GetCovarInput() );
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MiniBooNE_CC1pi0_XSec_1DTu_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(111) == 0 ||
event->NumFSParticle(13) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double TuCCpi0 = FitUtils::T(Pmu);
fXVar = TuCCpi0;
return;
};
//********************************************************************
bool MiniBooNE_CC1pi0_XSec_1DTu_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi(event, 14, 111, EnuMin, EnuMax);
}
diff --git a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dcosmu_nu.cxx b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dcosmu_nu.cxx
index 7ed184e..757046a 100644
--- a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dcosmu_nu.cxx
+++ b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dcosmu_nu.cxx
@@ -1,85 +1,86 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MiniBooNE_CC1pi0_XSec_1Dcosmu_nu.h"
//********************************************************************
MiniBooNE_CC1pi0_XSec_1Dcosmu_nu::MiniBooNE_CC1pi0_XSec_1Dcosmu_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MiniBooNE_CC1pi0_XSec_1Dcosmu_nu sample. \n" \
"Target: CH \n" \
"Flux: MiniBooNE Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 muon, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("cos#theta_{#mu}");
fSettings.SetYTitle("d#sigma/dcos#theta_{#mu} (cm^{2}/CH_{2})");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/FULL,DIAG/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.5, 2.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("MiniBooNE_CC1pi0_XSec_1Dcosmu_nu");
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/CC1pi0/dxsecdcosmu_edit.txt" );
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/CC1pi0/dxsecdcosmu_covar.txt" );
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(14.08)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetCorrelationFromTextFile( fSettings.GetCovarInput() );
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MiniBooNE_CC1pi0_XSec_1Dcosmu_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(111) == 0 ||
event->NumFSParticle(13) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
// No W cut on MiniBooNE CC1pi+
double CosMu = cos(FitUtils::th(Pnu, Pmu));
fXVar = CosMu;
return;
};
//********************************************************************
bool MiniBooNE_CC1pi0_XSec_1Dcosmu_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi(event, 14, 111, EnuMin, EnuMax);
}
diff --git a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dcospi0_nu.cxx b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dcospi0_nu.cxx
index 0758791..a0ad302 100644
--- a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dcospi0_nu.cxx
+++ b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dcospi0_nu.cxx
@@ -1,84 +1,85 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MiniBooNE_CC1pi0_XSec_1Dcospi0_nu.h"
//********************************************************************
MiniBooNE_CC1pi0_XSec_1Dcospi0_nu::MiniBooNE_CC1pi0_XSec_1Dcospi0_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MiniBooNE_CC1pi0_XSec_1Dcospi0_nu sample. \n" \
"Target: CH \n" \
"Flux: MiniBooNE Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 muon, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("cos#theta_{#pi^{0}}");
fSettings.SetYTitle("d#sigma/dcos#theta_{#pi^{0}} (cm^{2}/CH_{2})");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/FULL,DIAG/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.5, 2.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("MiniBooNE_CC1pi0_XSec_1Dcospi0_nu");
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/CC1pi0/dxsecdcospi_edit.txt" );
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/CC1pi0/dxsecdcospi_covar.txt" );
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(14.08)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetCorrelationFromTextFile( fSettings.GetCovarInput() );
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MiniBooNE_CC1pi0_XSec_1Dcospi0_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(111) == 0 ||
event->NumFSParticle(13) == 0)
return;
TLorentzVector Pnu =event->GetNeutrinoIn()->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double CosPi0 = cos(FitUtils::th(Pnu, Ppi0));
fXVar = CosPi0;
return;
};
//********************************************************************
bool MiniBooNE_CC1pi0_XSec_1Dcospi0_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi(event, 14, 111, EnuMin, EnuMax);
}
diff --git a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dppi0_nu.cxx b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dppi0_nu.cxx
index 0b258df..09919a9 100644
--- a/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dppi0_nu.cxx
+++ b/src/MiniBooNE/MiniBooNE_CC1pi0_XSec_1Dppi0_nu.cxx
@@ -1,90 +1,91 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MiniBooNE_CC1pi0_XSec_1Dppi0_nu.h"
MiniBooNE_CC1pi0_XSec_1Dppi0_nu::MiniBooNE_CC1pi0_XSec_1Dppi0_nu(nuiskey confkey) {
// 1. Initalise sample Settings (all overrideable in cardfile) --------------
fSettings = LoadSampleSettings(confkey); // Must go first
fSettings.SetDescription("");
fSettings.SetXTitle("p_{#pi^{0}} (GeV/c)");
fSettings.SetYTitle("d#sigma/dp_{#pi^{0}} (cm^{2}/GeV/CH_{2})");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.5, 2.0);
fSettings.SetSuggestedFlux( FitPar::GetDataBase() + "/MiniBooNE/ccqe/mb_fhc_flux.root");
fSettings.SetTitle("MiniBooNE #nu_#mu CC1#pi^{0} on CH");
fSettings.SetDataInput( FitPar::GetDataBase() + "/MiniBooNE/CC1pi0/dxsecdppi_edit.txt" );
fSettings.SetCovarInput( FitPar::GetDataBase() + "/MiniBooNE/CC1pi0/dxsecdppi_covar.txt" );
fSettings.DefineAllowedSpecies("numu");
fSettings.DefineAllowedTargets("C,H");
FinaliseSampleSettings(); // Must go after all settings
// 2. Set Scale Factor -------------------------------------------------------
fScaleFactor = GetEventHistogram()->Integral("width")
* double(1E-38) / double(fNEvents)
* (14.08) / TotalIntegratedFlux("width");
// 3. Plot Setup -------------------------------------------------------
SetDataValues( fSettings.GetDataInput() );
SetCovarMatrixFromCorrText( fSettings.GetCovarInput(), fDataHist->GetNbinsX() );
+ SetShapeCovar();
// Create a Target Species Stack copying data
fTargetStack = new TargetTypeStack( fSettings.Name() + "_TGT",
"Target Contributions" + fSettings.PlotTitles(),
fDataHist);
SetAutoProcessTH1(fTargetStack);
// Final MC Setup
// Must go last
FinaliseMeasurement();
};
void MiniBooNE_CC1pi0_XSec_1Dppi0_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(111) == 0 ||
event->NumFSParticle(13) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double p_pi0 = FitUtils::p(Ppi0);
fXVar = p_pi0;
fTargetPDG = event->fTargetPDG;
return;
};
//********************************************************************
bool MiniBooNE_CC1pi0_XSec_1Dppi0_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi(event, 14, 111, EnuMin, EnuMax);
}
//********************************************************************
void MiniBooNE_CC1pi0_XSec_1Dppi0_nu::FillExtraHistograms(MeasurementVariableBox* box, double weight){
//********************************************************************
if (!Signal) return;
fTargetStack->Fill( fTargetPDG, fXVar, weight );
}
diff --git a/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu.cxx b/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu.cxx
index 5013411..48a3f35 100644
--- a/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu.cxx
+++ b/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu.cxx
@@ -1,102 +1,103 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu.h"
//********************************************************************
MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu::MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu sample. \n" \
"Target: CH \n" \
"Flux: MiniBooNE Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 muon, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("cos#theta_{#pi^{0}}");
fSettings.SetYTitle("d#sigma/dcos#theta_{#pi^{0}} (cm^{2}/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/FULL,DIAG/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.0, 5.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu");
nunubar_mode = fSettings.Found("name", "combined");
if (!nunubar_mode) {
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/nubarcosthetapi0xsec_edit.txt" );
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/nubarcosthetapi0xsecerrormatrix.txt" );
fSettings.DefineAllowedSpecies("numub");
} else {
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/combinedsignnumodecosthetapi0xsec_edit.txt");
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/combinedsignnumodecosthetapi0xsecerrormatrix.txt");
fSettings.DefineAllowedSpecies("numu,numub");
}
-
+
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38) / double(fNEvents) / TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetCovarFromTextFile( fSettings.GetCovarInput() );
ScaleCovar(1.E-5);
StatUtils::SetDataErrorFromCov(fDataHist, fFullCovar, 1E-38);
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu::FillEventVariables(FitEvent *event) {
// (CP) require pi0 in final state (this makes some assumptions about how the
// generator treats the pi0 after it is produced in the nucleus.
// MB required 2 photons to make a pion signal, so check for those later
if (event->NumFSParticle(111) == 0 ) {
return;
}
if (abs(event->NumFSParticle(13)) == 1 || abs(event->NumFSParticle(11)) == 1 || abs(event->NumFSParticle(15)) == 1 || abs(event->NumFSParticle(17)) == 1) return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
double CosPi0 = cos(FitUtils::th(Pnu, Ppi0));
fXVar = CosPi0;
return;
};
//********************************************************************
bool MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu::isSignal(FitEvent *event) {
//********************************************************************
if (nunubar_mode) {
return (SignalDef::isNC1pi(event, 14, 111, EnuMin, EnuMax) ||
SignalDef::isNC1pi(event, -14, 111, EnuMin, EnuMax));
} else {
return SignalDef::isNC1pi(event, -14, 111, EnuMin, EnuMax);
}
}
diff --git a/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dcospi0_nu.cxx b/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dcospi0_nu.cxx
index e413b2c..fcc28a0 100644
--- a/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dcospi0_nu.cxx
+++ b/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dcospi0_nu.cxx
@@ -1,104 +1,105 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MiniBooNE_NC1pi0_XSec_1Dcospi0_nu.h"
//********************************************************************
MiniBooNE_NC1pi0_XSec_1Dcospi0_nu::MiniBooNE_NC1pi0_XSec_1Dcospi0_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MiniBooNE_NC1pi0_XSec_1Dcospi0_nu sample. \n" \
"Target: CH \n" \
"Flux: MiniBooNE Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 muon, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("cos#theta_{#pi^{0}}");
fSettings.SetYTitle("d#sigma/dcos#theta_{#pi^{0}} (cm^{2}/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/FULL,DIAG/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.0, 5.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("MiniBooNE_NC1pi0_XSec_1Dcospi0_nu");
nunubarmode = fSettings.Found("name", "combined");
if (!nunubarmode) {
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/nucosthetapi0xsec_edit.txt" );
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/nucosthetapi0xsecerrormatrix.txt" );
fSettings.DefineAllowedSpecies("numu");
} else {
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/combinedsignnubarmodecosthetapi0xsec_edit.txt");
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/combinedsignnubarmodecosthetapi0xsecerrormatrix.txt");
fSettings.DefineAllowedSpecies("numu,numub");
}
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38) / double(fNEvents) / TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetCovarFromTextFile( fSettings.GetCovarInput() );
ScaleCovar(1.E-5);
StatUtils::SetDataErrorFromCov(fDataHist, fFullCovar, 1E-38);
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MiniBooNE_NC1pi0_XSec_1Dcospi0_nu::FillEventVariables(FitEvent *event) {
// (CP) require pi0 in final state (this makes some assumptions about how the
// generator treats the pi0 after it is produced in the nucleus.
// MB required 2 photons to make a pion signal, so check for those later
if (event->NumFSParticle(111) == 0 ) {
return;
}
if (abs(event->NumFSParticle(13)) == 1 || abs(event->NumFSParticle(11)) == 1 || abs(event->NumFSParticle(15)) == 1 || abs(event->NumFSParticle(17)) == 1) return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
double CosPi0 = cos(FitUtils::th(Pnu, Ppi0));
fXVar = CosPi0;
return;
};
//********************************************************************
bool MiniBooNE_NC1pi0_XSec_1Dcospi0_nu::isSignal(FitEvent *event) {
//********************************************************************
if (nunubarmode){
return (SignalDef::isNC1pi(event, 14, 111, EnuMin, EnuMax) ||
SignalDef::isNC1pi(event, -14, 111, EnuMin, EnuMax));
} else {
return SignalDef::isNC1pi(event, 14, 111, EnuMin, EnuMax);
}
}
diff --git a/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dppi0_antinu.cxx b/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dppi0_antinu.cxx
index de94f25..3f13396 100644
--- a/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dppi0_antinu.cxx
+++ b/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dppi0_antinu.cxx
@@ -1,103 +1,104 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MiniBooNE_NC1pi0_XSec_1Dppi0_antinu.h"
//********************************************************************
MiniBooNE_NC1pi0_XSec_1Dppi0_antinu::MiniBooNE_NC1pi0_XSec_1Dppi0_antinu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MiniBooNE_NC1pi0_XSec_1Dppi0_antinu sample. \n" \
"Target: CH \n" \
"Flux: MiniBooNE Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 muon, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("p_{#pi^{0}} (GeV/c)");
fSettings.SetYTitle("d#sigma/dp_{#pi^{0}} (cm^{2}/(GeV/c)/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/FULL,DIAG/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.0, 5.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("MiniBooNE_NC1pi0_XSec_1Dppi0_antinu");
nunubarmode = fSettings.Found("name", "combined");
if (!nunubarmode) {
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/nubarppi0xsec_edit.txt" );
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/nubarppi0xsecerrormatrix.txt" );
fSettings.DefineAllowedSpecies("numu");
} else {
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/combinedsignnumodeppi0xsec_edit.txt");
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/combinedsignnumodeppi0xsecerrormatrix.txt");
fSettings.DefineAllowedSpecies("numu,numub");
}
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38) / double(fNEvents) / TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetCovarFromTextFile( fSettings.GetCovarInput() );
ScaleCovar(1.E-5);
StatUtils::SetDataErrorFromCov(fDataHist, fFullCovar, 1E-38);
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MiniBooNE_NC1pi0_XSec_1Dppi0_antinu::FillEventVariables(FitEvent *event) {
// (CP) require pi0 in final state (this makes some assumptions about how the
// generator treats the pi0 after it is produced in the nucleus.
// MB required 2 photons to make a pion signal, so check for those later
if (event->NumFSParticle(111) == 0) {
return;
}
if (abs(event->NumFSParticle(13)) == 1 || abs(event->NumFSParticle(11)) == 1 || abs(event->NumFSParticle(15)) == 1 || abs(event->NumFSParticle(17)) == 1) return;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
double p_pi0 = FitUtils::p(Ppi0);
fXVar = p_pi0;
return;
};
//********************************************************************
bool MiniBooNE_NC1pi0_XSec_1Dppi0_antinu::isSignal(FitEvent *event) {
//********************************************************************
if (nunubarmode){
return (SignalDef::isNC1pi(event, -14, 111, EnuMin, EnuMax) ||
SignalDef::isNC1pi(event, 14, 111, EnuMin, EnuMax) );
} else {
return SignalDef::isNC1pi(event, -14, 111, EnuMin, EnuMax);
}
}
diff --git a/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dppi0_nu.cxx b/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dppi0_nu.cxx
index 1dc1119..ea0fea1 100644
--- a/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dppi0_nu.cxx
+++ b/src/MiniBooNE/MiniBooNE_NC1pi0_XSec_1Dppi0_nu.cxx
@@ -1,103 +1,104 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "MiniBooNE_NC1pi0_XSec_1Dppi0_nu.h"
//********************************************************************
MiniBooNE_NC1pi0_XSec_1Dppi0_nu::MiniBooNE_NC1pi0_XSec_1Dppi0_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "MiniBooNE_NC1pi0_XSec_1Dppi0_nu sample. \n" \
"Target: CH \n" \
"Flux: MiniBooNE Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 muon, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("p_{#pi^{0}} (GeV/c)");
fSettings.SetYTitle("d#sigma/dp_{#pi^{0}} (cm^{2}/(GeV/c)/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/FULL,DIAG/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.0, 5.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("MiniBooNE_NC1pi0_XSec_1Dppi0_nu");
nunubar_mode_nu = fSettings.Found("name", "combined");
if (!nunubar_mode_nu) {
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/nuppi0xsec_edit.txt" );
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/nuppi0xsecerrormatrix.txt" );
fSettings.DefineAllowedSpecies("numu");
} else {
fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/combinedsignnubarmodeppi0xsec_edit.txt");
fSettings.SetCovarInput( FitPar::GetDataBase() + "MiniBooNE/NC1pi0/combinedsignnubarmodeppi0xsecerrormatrix.txt");
fSettings.DefineAllowedSpecies("numu,numub");
}
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38) / double(fNEvents) / TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetCovarFromTextFile( fSettings.GetCovarInput() );
ScaleCovar(1.E-5);
StatUtils::SetDataErrorFromCov(fDataHist, fFullCovar, 1E-38);
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void MiniBooNE_NC1pi0_XSec_1Dppi0_nu::FillEventVariables(FitEvent *event) {
// (CP) require pi0 in final state (this makes some assumptions about how the
// generator treats the pi0 after it is produced in the nucleus.
// MB required 2 photons to make a pion signal, so check for those later
if (event->NumFSParticle(111) == 0) {
return;
}
if (abs(event->NumFSParticle(13)) == 1 || abs(event->NumFSParticle(11)) == 1 || abs(event->NumFSParticle(15)) == 1 || abs(event->NumFSParticle(17)) == 1) return;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
double p_pi0 = FitUtils::p(Ppi0);
fXVar = p_pi0;
return;
};
//********************************************************************
bool MiniBooNE_NC1pi0_XSec_1Dppi0_nu::isSignal(FitEvent *event) {
//********************************************************************
if (nunubar_mode_nu){
return (SignalDef::isNC1pi(event, 14, 111, EnuMin, EnuMax) ||
SignalDef::isNC1pi(event, -14, 111, EnuMin, EnuMax));
} else {
return SignalDef::isNC1pi(event, 14, 111, EnuMin, EnuMax);
}
}
diff --git a/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx b/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx
index 6e04801..45c4bf1 100644
--- a/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx
+++ b/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx
@@ -1,74 +1,75 @@
#include "T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.h"
// The derived neutrino energy assuming a Delta resonance and a nucleon at rest; so only requires the outgoing muon to derive (and information on the angle between the muon and the neutrino)
// Please beware that this is NOT THE "TRUE" NEUTRINO ENERGY; IT'S A PROXY FOR THE TRUE NEUTRINO ENERGY
// Also, this is flux-integrated cross-section, not flux averaged
//********************************************************************
T2K_CC1pip_H2O_XSec_1DEnuDelta_nu::T2K_CC1pip_H2O_XSec_1DEnuDelta_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC1pip_H2O_XSec_1DEnuDelta_nu sample. \n" \
"Target: CH \n" \
"Flux: T2k Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 electron, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetTitle("T2K_CC1pip_H2O_XSec_1DEnuDelta_nu");
fSettings.SetDescription(descrip);
fSettings.SetXTitle("E_{#nu} (GeV)");
fSettings.SetYTitle("#sigma(E_{#nu}) (cm^{2}/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(0.0, 100.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.DefineAllowedSpecies("numu");
fSettings.SetDataInput(GeneralUtils::GetTopLevelDir() + "/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;EnuRec_Delta/hResultTot");
fSettings.SetCovarInput(GeneralUtils::GetTopLevelDir() + "/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;EnuRec_Delta/TotalCovariance");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38) / double(fNEvents);
// Plot Setup -------------------------------------------------------
SetDataFromRootFile( fSettings.GetDataInput() );
SetCovarFromRootFile( fSettings.GetCovarInput() );
ScaleCovar(1E76);
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
//********************************************************************
// Find the muon whows kinematics we use to derive the "neutrino energy"
void T2K_CC1pip_H2O_XSec_1DEnuDelta_nu::FillEventVariables(FitEvent *event) {
//********************************************************************
// Need to make sure there's a muon
if (event->NumFSParticle(13) == 0) return;
// Get the incoming neutrino
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
// Get the muon
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double Enu = FitUtils::EnuCC1piprecDelta(Pnu, Pmu);
fXVar = Enu;
return;
};
//********************************************************************
// Beware: The H2O analysis has different signal definition to the CH analysis!
bool T2K_CC1pip_H2O_XSec_1DEnuDelta_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pip_T2K_H2O(event, EnuMin, EnuMax);
}
diff --git a/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuMB_nu.cxx b/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuMB_nu.cxx
index 6779ad4..1f1e902 100644
--- a/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuMB_nu.cxx
+++ b/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuMB_nu.cxx
@@ -1,80 +1,80 @@
#include "T2K_CC1pip_H2O_XSec_1DEnuMB_nu.h"
// The derived neutrino energy using the "MiniBooNE formula" (see paper)
// Essentially this is a proxy for the neutrino energy, using the outgoing pion and muon to get the reconstructed neutrino energy, assuming the struck nucleon was at rest
// Again, THIS IS NOT A "TRUE" NEUTRINO ENERGY!
//********************************************************************
T2K_CC1pip_H2O_XSec_1DEnuMB_nu::T2K_CC1pip_H2O_XSec_1DEnuMB_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC1pip_H2O_XSec_1DEnuMB_nu sample. \n" \
"Target: CH \n" \
"Flux: T2k Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 electron, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetTitle("T2K_CC1pip_H2O_XSec_1DEnuMB_nu");
fSettings.SetDescription(descrip);
fSettings.SetXTitle("E_{#nu} (GeV)");
fSettings.SetYTitle("#sigma(E_{#nu}) (cm^{2}/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(0.0, 100.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.DefineAllowedSpecies("numu");
fSettings.SetDataInput(GeneralUtils::GetTopLevelDir() + "/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;EnuRec_MB/hResultTot");
fSettings.SetCovarInput(GeneralUtils::GetTopLevelDir() + "/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;EnuRec_MB/TotalCovariance");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38) / double(fNEvents);
// Plot Setup -------------------------------------------------------
SetDataFromRootFile( fSettings.GetDataInput() );
SetCovarFromRootFile( fSettings.GetCovarInput() );
ScaleCovar(1E76);
-
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
//********************************************************************
// Find the derived neutrino energy using the "MiniBooNE formula" (see paper)
// Essentially uses the pion and muon kinematics to derive a pseudo-neutrino energy, assuming the struck nucleon is at rest
// We also need the incoming neutrino to get the muon/neutrino and pion/neutrino angles
void T2K_CC1pip_H2O_XSec_1DEnuMB_nu::FillEventVariables(FitEvent *event) {
//********************************************************************
// Need to make sure there's a muon
if (event->NumFSParticle(13) == 0) return;
// Need to make sure there's a pion
if (event->NumFSParticle(211) == 0) return;
// Get the incoming neutrino
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
// Get the muon
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
// Get the pion
TLorentzVector Ppip = event->GetHMFSParticle(211)->fP;
double Enu = FitUtils::EnuCC1piprec(Pnu, Pmu, Ppip);
fXVar = Enu;
return;
};
//********************************************************************
// Beware: The H2O analysis has different signal definition to the CH analysis!
bool T2K_CC1pip_H2O_XSec_1DEnuMB_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pip_T2K_H2O(event, EnuMin, EnuMax);
}
diff --git a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmu_nu.cxx b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmu_nu.cxx
index a92a430..8abe3e3 100644
--- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmu_nu.cxx
+++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmu_nu.cxx
@@ -1,73 +1,74 @@
#include "T2K_CC1pip_H2O_XSec_1Dcosmu_nu.h"
// The cos of the angle between the neutrino and the muon
//********************************************************************
T2K_CC1pip_H2O_XSec_1Dcosmu_nu::T2K_CC1pip_H2O_XSec_1Dcosmu_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC1pip_H2O_XSec_1Dcosmu_nu sample. \n" \
"Target: CH \n" \
"Flux: T2k Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 electron, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetTitle("T2K_CC1pip_H2O_XSec_1Dcosmu_nu");
fSettings.SetDescription(descrip);
fSettings.SetXTitle("cos#theta_{#pi,#mu}");
fSettings.SetYTitle("d#sigma/dcos#theta_{#pi#mu} (cm^{2}/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(0.0, 100.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.DefineAllowedSpecies("numu");
fSettings.SetDataInput(GeneralUtils::GetTopLevelDir()+"/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;MuCos/hResultTot");
fSettings.SetCovarInput(GeneralUtils::GetTopLevelDir()+"/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;MuCos/TotalCovariance");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/double(fNEvents)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromRootFile( fSettings.GetDataInput() );
SetCovarFromRootFile( fSettings.GetCovarInput() );
ScaleCovar(1E76);
+ SetShapeCovar();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
//********************************************************************
// Find the cos theta of the angle between muon and neutrino
void T2K_CC1pip_H2O_XSec_1Dcosmu_nu::FillEventVariables(FitEvent *event) {
//********************************************************************
// Need to make sure there's a muon
if (event->NumFSParticle(13) == 0) return;
// Get the incoming neutrino
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
// Get the muon
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
// Do the cos of the angle between the two
double cos_th = cos(FitUtils::th(Pnu, Pmu));
fXVar = cos_th;
return;
};
//********************************************************************
// Beware: The H2O analysis has different signal definition to the CH analysis!
bool T2K_CC1pip_H2O_XSec_1Dcosmu_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pip_T2K_H2O(event, EnuMin, EnuMax);
}
diff --git a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.cxx b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.cxx
index a56f805..1a50ac3 100644
--- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.cxx
+++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.cxx
@@ -1,71 +1,72 @@
#include "T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.h"
//********************************************************************
T2K_CC1pip_H2O_XSec_1Dcosmupi_nu::T2K_CC1pip_H2O_XSec_1Dcosmupi_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC1pip_H2O_XSec_1Dcosmupi_nu sample. \n" \
"Target: CH \n" \
"Flux: T2k Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 electron, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetTitle("T2K_CC1pip_H2O_XSec_1Dcosmupi_nu");
fSettings.SetDescription(descrip);
fSettings.SetXTitle("cos#theta_{#pi,#mu}");
fSettings.SetYTitle("d#sigma/dcos#theta_{#pi#mu} (cm^{2}/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(0.0, 100.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.DefineAllowedSpecies("numu");
fSettings.SetDataInput(GeneralUtils::GetTopLevelDir()+"/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;MuPiCos/hResultTot");
fSettings.SetCovarInput(GeneralUtils::GetTopLevelDir()+"/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;MuPiCos/TotalCovariance");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width")*1E-38/double(fNEvents)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromRootFile( fSettings.GetDataInput() );
SetCovarFromRootFile( fSettings.GetCovarInput() );
ScaleCovar(1E76);
-
+ SetShapeCovar();
+
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
//********************************************************************
// Find the cos theta of the angle between muon and pion
void T2K_CC1pip_H2O_XSec_1Dcosmupi_nu::FillEventVariables(FitEvent *event) {
//********************************************************************
// Need to make sure there's a muon
if (event->NumFSParticle(13) == 0) return;
// Need to make sure there's a pion
if (event->NumFSParticle(211) == 0) return;
// Get the muon
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
// Get the pion
TLorentzVector Ppip = event->GetHMFSParticle(211)->fP;
double cos_th = cos(FitUtils::th(Pmu, Ppip));
fXVar = cos_th;
return;
};
//********************************************************************
// Beware: The H2O analysis has different signal definition to the CH analysis!
bool T2K_CC1pip_H2O_XSec_1Dcosmupi_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pip_T2K_H2O(event, EnuMin, EnuMax);
}
diff --git a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcospi_nu.cxx b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcospi_nu.cxx
index 3ba843d..fd022ff 100644
--- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcospi_nu.cxx
+++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcospi_nu.cxx
@@ -1,68 +1,69 @@
#include "T2K_CC1pip_H2O_XSec_1Dcospi_nu.h"
//********************************************************************
T2K_CC1pip_H2O_XSec_1Dcospi_nu::T2K_CC1pip_H2O_XSec_1Dcospi_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC1pip_H2O_XSec_1Dcospi_nu sample. \n" \
"Target: CH \n" \
"Flux: T2k Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 electron, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetTitle("T2K_CC1pip_H2O_XSec_1Dcospi_nu");
fSettings.SetDescription(descrip);
fSettings.SetXTitle("cos#theta_{#pi}");
fSettings.SetYTitle("d#sigma/dcos#theta_{#pi} (cm^{2}/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(0.0, 100.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.DefineAllowedSpecies("numu");
fSettings.SetDataInput(GeneralUtils::GetTopLevelDir()+"/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;PosPionCos/hResultTot");
fSettings.SetCovarInput(GeneralUtils::GetTopLevelDir()+"/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;PosPionCos/TotalCovariance");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/double(fNEvents)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromRootFile( fSettings.GetDataInput() );
SetCovarFromRootFile( fSettings.GetCovarInput() );
ScaleCovar(1E76);
-
+ SetShapeCovar();
+
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
//********************************************************************
// Find the cos theta of the angle between pion and neutrino
void T2K_CC1pip_H2O_XSec_1Dcospi_nu::FillEventVariables(FitEvent *event) {
//********************************************************************
// Need to make sure there's a pion
if (event->NumFSParticle(211) == 0) return;
// Get the incoming neutrino
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
// Get the pion
TLorentzVector Ppip = event->GetHMFSParticle(211)->fP;
double cos_th = cos(FitUtils::th(Pnu, Ppip));
fXVar = cos_th;
return;
};
//********************************************************************
// Beware: The H2O analysis has different signal definition to the CH analysis!
bool T2K_CC1pip_H2O_XSec_1Dcospi_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pip_T2K_H2O(event, EnuMin, EnuMax);
}
diff --git a/src/T2K/T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx b/src/T2K/T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx
index 5f482f0..9d6d983 100644
--- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx
+++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx
@@ -1,70 +1,71 @@
#include "T2K_CC1pip_H2O_XSec_1Dpmu_nu.h"
// The muon momentum
//********************************************************************
T2K_CC1pip_H2O_XSec_1Dpmu_nu::T2K_CC1pip_H2O_XSec_1Dpmu_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC1pip_H2O_XSec_1Dpmu_nu sample. \n" \
"Target: CH \n" \
"Flux: T2k Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 electron, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetTitle("T2K_CC1pip_H2O_XSec_1Dpmu_nu");
fSettings.SetDescription(descrip);
fSettings.SetXTitle("E_{#nu} (GeV)");
fSettings.SetYTitle("#sigma(E_{#nu}) (cm^{2}/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(0.0, 100.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.DefineAllowedSpecies("numu");
fSettings.SetDataInput(GeneralUtils::GetTopLevelDir() + "/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;MuMom/hResultTot");
fSettings.SetCovarInput(GeneralUtils::GetTopLevelDir() + "/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;MuMom/TotalCovariance");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/double(fNEvents)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromRootFile( fSettings.GetDataInput() );
SetCovarFromRootFile( fSettings.GetCovarInput() );
ScaleCovar(1E76);
-
+ SetShapeCovar();
+
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
//********************************************************************
// Find the momentum of the muon
void T2K_CC1pip_H2O_XSec_1Dpmu_nu::FillEventVariables(FitEvent *event) {
//********************************************************************
// Need to make sure there's a muon
if (event->NumFSParticle(13) == 0) return;
// Get the muon
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double p_mu = FitUtils::p(Pmu);
fXVar = p_mu;
return;
};
//********************************************************************
// Beware: The H2O analysis has different signal definition to the CH analysis!
bool T2K_CC1pip_H2O_XSec_1Dpmu_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pip_T2K_H2O(event, EnuMin, EnuMax);
}
diff --git a/src/T2K/T2K_CC1pip_H2O_XSec_1Dppi_nu.cxx b/src/T2K/T2K_CC1pip_H2O_XSec_1Dppi_nu.cxx
index 594c1be..7b33785 100644
--- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dppi_nu.cxx
+++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dppi_nu.cxx
@@ -1,69 +1,70 @@
#include "T2K_CC1pip_H2O_XSec_1Dppi_nu.h"
// The momentum of the (positive) pion
//********************************************************************
T2K_CC1pip_H2O_XSec_1Dppi_nu::T2K_CC1pip_H2O_XSec_1Dppi_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC1pip_H2O_XSec_1Dppi_nu sample. \n" \
"Target: CH \n" \
"Flux: T2k Forward Horn Current nue + nuebar \n" \
"Signal: Any event with 1 electron, any nucleons, and no other FS particles \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetTitle("T2K_CC1pip_H2O_XSec_1Dppi_nu");
fSettings.SetDescription(descrip);
fSettings.SetXTitle("p_{#pi^{+}} (GeV/c)");
fSettings.SetYTitle("d#sigma/dp_{#pi^{+}} (cm^{2}/(GeV/c)/nucleon)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/FULL");
fSettings.SetEnuRange(0.0, 100.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.DefineAllowedSpecies("numu");
fSettings.SetDataInput(GeneralUtils::GetTopLevelDir() + "/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;PosPionMom/hResultTot");
fSettings.SetCovarInput(GeneralUtils::GetTopLevelDir() + "/data/T2K/CC1pip/H2O/nd280data-numu-cc1pi-xs-on-h2o-2015.root;PosPionMom/TotalCovariance");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/double(fNEvents)/TotalIntegratedFlux("width");
// Plot Setup -------------------------------------------------------
SetDataFromRootFile( fSettings.GetDataInput() );
SetCovarFromRootFile( fSettings.GetCovarInput() );
ScaleCovar(1E76);
-
+ SetShapeCovar();
+
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
//********************************************************************
// Find the momentum of the (positively charged) pion
void T2K_CC1pip_H2O_XSec_1Dppi_nu::FillEventVariables(FitEvent *event) {
//********************************************************************
// Need to make sure there's a muon
if (event->NumFSParticle(211) == 0) return;
// Get the pion
TLorentzVector Ppip = event->GetHMFSParticle(211)->fP;
double p_pi = FitUtils::p(Ppip);
fXVar = p_pi;
return;
};
//********************************************************************
// Beware: The H2O analysis has different signal definition to the CH analysis!
bool T2K_CC1pip_H2O_XSec_1Dppi_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pip_T2K_H2O(event, EnuMin, EnuMax);
}