diff --git a/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx b/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx index 77777d0..998d7e6 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx @@ -1,77 +1,85 @@ #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 +// 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) { //******************************************************************** +T2K_CC1pip_H2O_XSec_1DEnuDelta_nu::T2K_CC1pip_H2O_XSec_1DEnuDelta_nu( + nuiskey samplekey) { + //******************************************************************** // Sample overview --------------------------------------------------- - std::string descrip = "T2K_CC1pip_H2O_XSec_nu sample. \n" - "Target: H20 \n" - "Flux: T2K FHC numu \n" - "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" - ", costheta_mu > 0.3, costheta_pi > 0.3\n" - "https://doi.org/10.1103/PhysRevD.97.012001"; - + std::string descrip = + "T2K_CC1pip_H2O_XSec_nu sample. \n" + "Target: H20 \n" + "Flux: T2K FHC numu \n" + "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" + ", costheta_mu > 0.3, costheta_pi > 0.3\n" + "https://journals.aps.org/prd/pdf/10.1103/PhysRevD.95.012010"; // 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"); + 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); + fScaleFactor = + (GetEventHistogram()->Integral("width") * 1E-38) / double(fNEvents); // Plot Setup ------------------------------------------------------- - SetDataFromRootFile( fSettings.GetDataInput() ); - SetCovarFromRootFile( fSettings.GetCovarInput() ); + 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; + if (event->NumFSParticle(13) == 0) + return; // Get the incoming neutrino TLorentzVector Pnu = event->GetNeutrinoIn()->fP; // Get the muon - TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + 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_PRD97_012001(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 0338dce..a6415b7 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuMB_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuMB_nu.cxx @@ -1,82 +1,91 @@ #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! +// 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) { //******************************************************************** +T2K_CC1pip_H2O_XSec_1DEnuMB_nu::T2K_CC1pip_H2O_XSec_1DEnuMB_nu( + nuiskey samplekey) { + //******************************************************************** // Sample overview --------------------------------------------------- - std::string descrip = "T2K_CC1pip_H2O_XSec_nu sample. \n" - "Target: H20 \n" - "Flux: T2K FHC numu \n" - "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" - ", costheta_mu > 0.3, costheta_pi > 0.3\n" - "https://doi.org/10.1103/PhysRevD.97.012001"; - + std::string descrip = + "T2K_CC1pip_H2O_XSec_nu sample. \n" + "Target: H20 \n" + "Flux: T2K FHC numu \n" + "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" + ", costheta_mu > 0.3, costheta_pi > 0.3\n" + "https://journals.aps.org/prd/pdf/10.1103/PhysRevD.95.012010"; // 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"); + 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); + fScaleFactor = + (GetEventHistogram()->Integral("width") * 1E-38) / double(fNEvents); // Plot Setup ------------------------------------------------------- - SetDataFromRootFile( fSettings.GetDataInput() ); - SetCovarFromRootFile( fSettings.GetCovarInput() ); + 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 +// 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; + if (event->NumFSParticle(13) == 0) + return; // Need to make sure there's a pion - if (event->NumFSParticle(211) == 0) return; + 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_PRD97_012001(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 d8828c9..44ef26d 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmu_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmu_nu.cxx @@ -1,76 +1,82 @@ #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) { //******************************************************************** +T2K_CC1pip_H2O_XSec_1Dcosmu_nu::T2K_CC1pip_H2O_XSec_1Dcosmu_nu( + nuiskey samplekey) { + //******************************************************************** // Sample overview --------------------------------------------------- - std::string descrip = "T2K_CC1pip_H2O_XSec_nu sample. \n" - "Target: H20 \n" - "Flux: T2K FHC numu \n" - "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" - ", costheta_mu > 0.3, costheta_pi > 0.3\n" - "https://doi.org/10.1103/PhysRevD.97.012001"; - + std::string descrip = + "T2K_CC1pip_H2O_XSec_nu sample. \n" + "Target: H20 \n" + "Flux: T2K FHC numu \n" + "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" + ", costheta_mu > 0.3, costheta_pi > 0.3\n" + "https://journals.aps.org/prd/pdf/10.1103/PhysRevD.95.012010"; // 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"); + 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"); + fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38) / + double(fNEvents) / TotalIntegratedFlux("width"); // Plot Setup ------------------------------------------------------- - SetDataFromRootFile( fSettings.GetDataInput() ); - SetCovarFromRootFile( fSettings.GetCovarInput() ); + 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; + if (event->NumFSParticle(13) == 0) + return; // Get the incoming neutrino TLorentzVector Pnu = event->GetNeutrinoIn()->fP; // Get the muon - TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + 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_PRD97_012001(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 1760f7a..c15a0e3 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.cxx @@ -1,74 +1,82 @@ #include "T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.h" - -//******************************************************************** -T2K_CC1pip_H2O_XSec_1Dcosmupi_nu::T2K_CC1pip_H2O_XSec_1Dcosmupi_nu(nuiskey samplekey) { //******************************************************************** +T2K_CC1pip_H2O_XSec_1Dcosmupi_nu::T2K_CC1pip_H2O_XSec_1Dcosmupi_nu( + nuiskey samplekey) { + //******************************************************************** // Sample overview --------------------------------------------------- - std::string descrip = "T2K_CC1pip_H2O_XSec_nu sample. \n" - "Target: H20 \n" - "Flux: T2K FHC numu \n" - "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" - ", costheta_mu > 0.3, costheta_pi > 0.3\n" - "https://doi.org/10.1103/PhysRevD.97.012001"; - + std::string descrip = + "T2K_CC1pip_H2O_XSec_nu sample. \n" + "Target: H20 \n" + "Flux: T2K FHC numu \n" + "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" + ", costheta_mu > 0.3, costheta_pi > 0.3\n" + "https://journals.aps.org/prd/pdf/10.1103/PhysRevD.95.012010"; // 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"); + 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"); + fScaleFactor = GetEventHistogram()->Integral("width") * 1E-38 / + double(fNEvents) / TotalIntegratedFlux("width"); // Plot Setup ------------------------------------------------------- - SetDataFromRootFile( fSettings.GetDataInput() ); - SetCovarFromRootFile( fSettings.GetCovarInput() ); + 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; + if (event->NumFSParticle(13) == 0) + return; // Need to make sure there's a pion - if (event->NumFSParticle(211) == 0) return; + if (event->NumFSParticle(211) == 0) + return; // Get the muon - TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; // Get the pion - TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + 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_PRD97_012001(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 de63d80..65f7e2a 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcospi_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcospi_nu.cxx @@ -1,71 +1,79 @@ #include "T2K_CC1pip_H2O_XSec_1Dcospi_nu.h" //******************************************************************** -T2K_CC1pip_H2O_XSec_1Dcospi_nu::T2K_CC1pip_H2O_XSec_1Dcospi_nu(nuiskey samplekey) { -//******************************************************************** +T2K_CC1pip_H2O_XSec_1Dcospi_nu::T2K_CC1pip_H2O_XSec_1Dcospi_nu( + nuiskey samplekey) { + //******************************************************************** // Sample overview --------------------------------------------------- - std::string descrip = "T2K_CC1pip_H2O_XSec_nu sample. \n" - "Target: H20 \n" - "Flux: T2K FHC numu \n" - "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" - ", costheta_mu > 0.3, costheta_pi > 0.3\n" - "https://doi.org/10.1103/PhysRevD.97.012001"; - + std::string descrip = + "T2K_CC1pip_H2O_XSec_nu sample. \n" + "Target: H20 \n" + "Flux: T2K FHC numu \n" + "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" + ", costheta_mu > 0.3, costheta_pi > 0.3\n" + "https://journals.aps.org/prd/pdf/10.1103/PhysRevD.95.012010"; // 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"); + 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"); + fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38) / + double(fNEvents) / TotalIntegratedFlux("width"); // Plot Setup ------------------------------------------------------- - SetDataFromRootFile( fSettings.GetDataInput() ); - SetCovarFromRootFile( fSettings.GetCovarInput() ); + 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; + if (event->NumFSParticle(211) == 0) + return; // Get the incoming neutrino TLorentzVector Pnu = event->GetNeutrinoIn()->fP; // Get the pion - TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + 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_PRD97_012001(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 48ff5ee..f67d115 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx @@ -1,73 +1,78 @@ #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_nu sample. \n" - "Target: H20 \n" - "Flux: T2K FHC numu \n" - "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" - ", costheta_mu > 0.3, costheta_pi > 0.3\n" - "https://doi.org/10.1103/PhysRevD.97.012001"; - + std::string descrip = + "T2K_CC1pip_H2O_XSec_nu sample. \n" + "Target: H20 \n" + "Flux: T2K FHC numu \n" + "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" + ", costheta_mu > 0.3, costheta_pi > 0.3\n" + "https://journals.aps.org/prd/pdf/10.1103/PhysRevD.95.012010"; // 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"); + 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"); + fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38) / + double(fNEvents) / TotalIntegratedFlux("width"); // Plot Setup ------------------------------------------------------- - SetDataFromRootFile( fSettings.GetDataInput() ); - SetCovarFromRootFile( fSettings.GetCovarInput() ); + 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; + if (event->NumFSParticle(13) == 0) + return; // Get the muon - TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + 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_PRD97_012001(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 246c0ca..52402e1 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dppi_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dppi_nu.cxx @@ -1,78 +1,79 @@ #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_nu sample. \n" - "Target: H20 \n" - "Flux: T2K FHC numu \n" - "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" - ", costheta_mu > 0.3, costheta_pi > 0.3\n" - "https://doi.org/10.1103/PhysRevD.97.012001"; + std::string descrip = + "T2K_CC1pip_H2O_XSec_nu sample. \n" + "Target: H20 \n" + "Flux: T2K FHC numu \n" + "Signal: CC1pi+, p_mu > 200 MeV, p_pi > 200 MeV\n" + ", costheta_mu > 0.3, costheta_pi > 0.3\n" + "https://journals.aps.org/prd/pdf/10.1103/PhysRevD.95.012010"; // 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_PRD97_012001(event, EnuMin, EnuMax); }