diff --git a/parameters/config.xml b/parameters/config.xml index 7dc9fb0..723236d 100644 --- a/parameters/config.xml +++ b/parameters/config.xml @@ -1,176 +1,176 @@ <nuisance> <!-- # ###################################################### --> <!-- # NUISANCE CONFIGURATION OPTIONS --> <!-- # This file is read in by default at runtime --> <!-- # If you want to override on a case by case bases use -q at runtime --> <!-- # ###################################################### --> <!-- # MAIN Configs --> <!-- # ###################################################### --> <!-- # Logger goes from --> <!-- # 1 Quiet --> <!-- # 2 Fitter --> <!-- # 3 Samples --> <!-- # 4 Reconfigure Loops --> <!-- # 5 Every Event print out (SHOUT) --> <!-- # -1 DEBUGGING --> <config verbosity='5'/> <config VERBOSITY='5'/> <!-- # ERROR goes from --> <!-- # 0 NONE --> <!-- # 1 FATAL --> <!-- # 2 WARN --> <config ERROR='2'/> -<config TRACE='1'/> +<config TRACE='0'/> <config cores='2' /> <config spline_test_throws='50' /> <config spline_cores='6' /> <config spline_chunks='10' /> <config spline_procchunk='-1' /> <config Electron_NThetaBins='4' /> <config Electron_NEnergyBins='4' /> <config Electron_ThetaWidth='2.0' /> <config Electron_EnergyWidth='0.10' /> <config RemoveFSIParticles='0' /> <config RemoveUndefParticles='0' /> <config RemoveNuclearParticles='0'/> <config logging.JointFCN.cxx='4'/> <!-- # Input Configs --> <!-- # ###################################################### --> <!-- # Default Requirements file for the externalDataFitter Package --> <!-- # MAX Events : -1 is no cut. Events will be scaled automatically to give good xsec predictions. --> <config input.maxevents='-1'/> <config MAXEVENTS='-1'/> <config input.MAXEVENTS='-1'/> <config includeemptystackhists='0'/> <!-- # Turn on/off event manager --> <!-- # EventManager enables us to only loop number of events once for multiple projections of the same measurements --> <!-- # e.g. MiniBooNE CC1pi+ Q2 and MiniBooNE CC1pi+ Tmu would ordinarily require 2 reconfigures, but with this enabled it requires only one --> <config input.eventmanager='1'/> <config EventManager='1'/> <!-- # Event Directories --> <!-- # Can setup default directories and use @EVENT_DIR/path to link to it --> <config EVENT_DIR='/data2/stowell/NIWG/'/> <config NEUT_EVENT_DIR='/data2/stowell/NIWG/neut/fit_samples_neut5.3.3/'/> <config GENIE_EVENT_DIR='/data2/stowell/NIWG/genie/fit_samples_R.2.10.0/'/> <config NUWRO_EVENT_DIR='/data2/stowell/NIWG/nuwro/fit_samples/'/> <config GIBUU_EVENT_DIR='/data/GIBUU/DIR/'/> <config SaveNuWroExtra='0' /> <!-- # In PrepareGENIE the reconstructed splines can be saved into the file --> <config save_genie_splines='1'/> <!-- # In InputHandler the option to regenerate NuWro flux/xsec plots is available --> <!-- # Going to move this to its own app soon --> <config input.regen_nuwro_plots='0'/> <!-- # DEVEL CONFIG OPTION, don't touch! --> <config CacheSize='0'/> <!-- # ReWeighting Configuration Options --> <!-- # ###################################################### --> <!-- # Set absolute twkdial for parameters --> <config params.setabstwk='0'/> <!-- # Convert Dials in output statements using dial conversion card --> <config convert_dials='0'/> <!-- # Make RW Calculations be quiet --> <config params.silentweighting='0'/> <!-- # Vetos can be used to specify RW dials NOT to be loaded in --> <!-- # Useful if one specific one has an issue --> <config FitWeight.fNIWGRW_veto=''/> <config FitWeight.fNuwroRW_veto=''/> <config FitWeight.fNeutRW_veto=''/> <config FitWeight.fGenieRW_veto=''/> <!-- # Output Options --> <!-- # ###################################################### --> <!-- # Save Nominal prediction with all rw engines at default --> <config savenominal='0'/> <!-- # Save prefit with values at starting values --> <config saveprefit='0'/> <!-- # Here's the full list of drawing options --> <!-- # See src/FitBase/Measurement1D::Write for more info --> <!-- #config drawopts DATA/MC/EVT/FINE/RATIO/MODES/SHAPE/RESIDUAL/MATRIX/FLUX/MASK/MAP --> <!-- #config drawopts DATA/MC --> <config drawopts='DATA/MC/EVT/FINE/RATIO/MODES/SHAPE/FLUX/XSEC/MASK/COV/INCOV/DECOMP/CANVPDG/CANVMC'/> <!-- # Save the shape scaling applied with option SHAPE into the main MC hist --> <config saveshapescaling='0'/> <config CorrectGENIEMECNorm='1'/> <!-- # Set style of 1D output histograms --> <config linecolour='1'/> <config linestyle='1'/> <config linewidth='1'/> <!-- # For GenericFlux --> <config isLiteMode='0'/> <!-- # Statistical Options --> <!-- # ###################################################### --> <!-- # Add MC Statistical error to likelihoods --> <config statutils.addmcerror='0'/> <!-- # NUISMIN Configurations --> <!-- # ###################################################### --> <config minimizer.maxcalls='1000000'/> <config minimizer.maxiterations='1000000'/> <config minimizer.tolerance='0.001'/> <!-- # Number of events required in low stats routines --> <config minimizer.lowstatevents='25000'/> <!-- # Error band generator configs --> <!-- # ###################################################### --> <!-- # For -f ErrorBands creates error bands for given measurements --> <!-- # How many throws do we want (The higher the better precision) --> <config error_throws='250'/> <!-- # Are we throwing uniform or according to Gaussian? --> <!-- # Only use uniform if wanting to study the limits of a dial. --> <config error_uniform='0'/> <config WriteSeperateStacks='1'/> <!-- # Other Individual Case Configs --> <!-- # ###################################################### --> <!-- # Covariance throw options for fake data studies with MiniBooNE data. --> <config thrown_covariance='FULL'/> <config throw_mc_stat='0.0'/> <config throw_diag_syst='0'/> <config throw_corr_syst='0'/> <config throw_mc_stat='0'/> <!-- # Apply a shift to the muon momentum before calculation of Q2 --> <config muon_momentum_shift='0.0'/> <config muon_momentum_throw='0'/> <!-- # MINERvA Specific Configs --> <config MINERvA_XSec_CCinc_2DEavq3_nu.hadron_cut='0'/> <config MINERvA_CCinc_XSec_2DEavq3_nu.useq3true='0'/> <config Modes.split_PN_NN='0'/> <config SignalReconfigures='0'/> </nuisance> diff --git a/src/ANL/ANL_CC1npip_Evt_1Dppi_nu.cxx b/src/ANL/ANL_CC1npip_Evt_1Dppi_nu.cxx index 785bcfe..cb561db 100644 --- a/src/ANL/ANL_CC1npip_Evt_1Dppi_nu.cxx +++ b/src/ANL/ANL_CC1npip_Evt_1Dppi_nu.cxx @@ -1,86 +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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "ANL_CC1npip_Evt_1Dppi_nu.h" //******************************************************************** ANL_CC1npip_Evt_1Dppi_nu::ANL_CC1npip_Evt_1Dppi_nu(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "ANL_CC1npip_Evt_1Dppi_nu sample. \n" \ "Dist : Pion Momentum : p_{#pi} \n" \ "Signal : numuCC1pi+1p : #nu_{#mu}-CC-1#pi^{+}-1p \n" \ "Target : Deuterium : D2 \n" \ "Flux : ANL FHC numu \n"; // Setup common settings fSettings = LoadSampleSettings(samplekey); - // fSettings.SetDescription(descrip); - // fSettings.SetTitle("ANL #nu_mu CC1n#pi^{+}"); - // fSettings.SetPlotTitles("p_{#pi} (MeV); Number of events"); - // fSettings.SetAllowedTypes("EVT/SHAPE/DIAG"); - // fSettings.SetDefaultTypes("EVT/SHAPE/DIAG"); - // fSettings.SetAllowedTargets("D,H"); - // fSettings.SetAllowedSpecies("numu"); - // fSettings.SetEnergyRange(0.0, 1.5); + fSettings.SetTitle("ANL #nu_mu CC1p#pi^{+}"); + fSettings.SetXTitle("p_{#pi} (MeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 1.5); FinaliseSampleSettings(); // Scaling Setup --------------------------------------------------- // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; // Plot Setup ------------------------------------------------------- SetDataFromTextFile( FitPar::GetDataBase() + "/ANL/CC1pip_on_n/ANL_ppi_CC1npip.csv" ); SetPoissonErrors(); SetCovarFromDiagonal(); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; void ANL_CC1npip_Evt_1Dppi_nu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(2112) == 0 || event->NumFSParticle(211) == 0 || event->NumFSParticle(13) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Pn = event->GetHMFSParticle(2112)->fP; TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; double hadMass = FitUtils::MpPi(Pn, Ppip); double ppip; // This measurement has a 1.4 GeV M(Npi) constraint if (hadMass < 1400) ppip = FitUtils::p(Ppip) * 1000.; else ppip = -1.0; fXVar = ppip; return; } bool ANL_CC1npip_Evt_1Dppi_nu::isSignal(FitEvent *event) { return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); } diff --git a/src/ANL/ANL_CC1ppip_Evt_1Dppi_nu.cxx b/src/ANL/ANL_CC1ppip_Evt_1Dppi_nu.cxx index 1ce30b5..044b181 100644 --- a/src/ANL/ANL_CC1ppip_Evt_1Dppi_nu.cxx +++ b/src/ANL/ANL_CC1ppip_Evt_1Dppi_nu.cxx @@ -1,94 +1,96 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ /** * Derrick et al. Phys Rev D, Vol 23, Number 3, 1 Feb 1981, p 569-575 */ #include "ANL_CC1ppip_Evt_1Dppi_nu.h" //******************************************************************** ANL_CC1ppip_Evt_1Dppi_nu::ANL_CC1ppip_Evt_1Dppi_nu(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "ANL CC1npip Event Rate 1DcosmuStar nu sample. \n" \ "Target: D2 \n" \ "Flux: \n" \ "Signal: \n"; // Setup common settings fSettings = LoadSampleSettings(samplekey); fSettings.SetDescription(descrip); + + fSettings.SetTitle("ANL #nu_mu CC1p#pi^{+}"); fSettings.SetXTitle("p_{#pi} (MeV)"); fSettings.SetYTitle("Number of events"); - fSettings.SetAllowedTypes("EVT/SHAPE/DIAG", "EVT/SHAPE/DIAG"); - fSettings.SetEnuRange(0.0, 6.0); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 1.5); - // CCQELike plot information - fSettings.SetTitle("ANL #nu_mu CC1n#pi^{+}"); fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC1pip_on_p/ANL_CC1pip_on_p_noEvents_ppi.csv" ); - fSettings.DefineAllowedSpecies("numu"); FinaliseSampleSettings(); // Scaling Setup --------------------------------------------------- // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; // Plot Setup ------------------------------------------------------- SetDataFromTextFile( fSettings.GetDataInput() ); SetPoissonErrors(); SetCovarFromDiagonal(); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; void ANL_CC1ppip_Evt_1Dppi_nu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(211) == 0 || event->NumFSParticle(13) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + // std::cout << "MASS NU P PIP MU = " << Pnu.Mag() << " " << Pp.Mag() << " " << Ppip.Mag() << " " << Pmu.Mag() << std::endl; + double hadMass = FitUtils::MpPi(Pp, Ppip); double ppip = -1.0; // This has a hadMass constraint of 1.4 GeV if (hadMass < 1400) ppip = FitUtils::p(Ppip) * 1000.; fXVar = ppip; return; }; bool ANL_CC1ppip_Evt_1Dppi_nu::isSignal(FitEvent *event) { return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); } diff --git a/src/ANL/ANL_CC2pi_1pim1pip_Evt_1Dppim_nu.cxx b/src/ANL/ANL_CC2pi_1pim1pip_Evt_1Dppim_nu.cxx index 5f54d3f..78b7e6d 100644 --- a/src/ANL/ANL_CC2pi_1pim1pip_Evt_1Dppim_nu.cxx +++ b/src/ANL/ANL_CC2pi_1pim1pip_Evt_1Dppim_nu.cxx @@ -1,87 +1,87 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ /** * D.Day et al, "Study of \nud charged-current two-pion production in the threshold region", Physical Review D, Volume 28, Number 11, 1 December 1983 \n * Derrick, Musgrave, Ammar, Day, Kafka and Mann, "Two- and three-pion productin by \nu\mud recations nears threshold: The implication for nucleon-decay experiments", Physical Review D, Vol 30, Number 7, 1 October 1984 */ #include "ANL_CC2pi_1pim1pip_Evt_1Dppim_nu.h" //******************************************************************** ANL_CC2pi_1pim1pip_Evt_1Dppim_nu::ANL_CC2pi_1pim1pip_Evt_1Dppim_nu(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "ANL_CC2pi_1pim1pip_Evt_1Dppim_nu sample. \n" \ "Target: D2 \n" \ "Flux: \n" \ "Signal: \n"; // Setup common settings fSettings = LoadSampleSettings(samplekey); fSettings.SetDescription(descrip); fSettings.SetXTitle("p_{#pi-} (GeV)"); fSettings.SetYTitle("Number of events (area norm.)"); fSettings.SetAllowedTypes("EVT/SHAPE/DIAG", "EVT/SHAPE/DIAG"); - fSettings.SetEnuRange(0.0, 1.5); + fSettings.SetEnuRange(0.0, 6.0); fSettings.DefineAllowedTargets("D,H"); // CCQELike plot information fSettings.SetTitle("ANL #nu_mu CC1n#pi^{+}"); fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/CC2pi/1pim1pip/CC2pi_1pim1pip_ppim_weight.csv" ); fSettings.DefineAllowedSpecies("numu"); FinaliseSampleSettings(); // Scaling Setup --------------------------------------------------- // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(2./1.); // Plot Setup ------------------------------------------------------- SetDataFromTextFile( fSettings.GetDataInput() ); SetPoissonErrors(); SetCovarFromDiagonal(); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; void ANL_CC2pi_1pim1pip_Evt_1Dppim_nu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(-211) == 0) return; TLorentzVector Ppim = event->GetHMFSParticle(-211)->fP; double ppim = FitUtils::p(Ppim); this->fXVar = ppim; return; } // Signal asks for 1pi-, 1pi+, 1mu-, 1p bool ANL_CC2pi_1pim1pip_Evt_1Dppim_nu::isSignal(FitEvent *event) { int pdgs[] = {13, 211, -211, 2212}; return SignalDef::isCCWithFS(event, 14, pdgs, EnuMin, EnuMax); } diff --git a/src/ANL/ANL_NC1npip_Evt_1Dppi_nu.cxx b/src/ANL/ANL_NC1npip_Evt_1Dppi_nu.cxx index 6cbc403..568b693 100644 --- a/src/ANL/ANL_NC1npip_Evt_1Dppi_nu.cxx +++ b/src/ANL/ANL_NC1npip_Evt_1Dppi_nu.cxx @@ -1,86 +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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "ANL_NC1npip_Evt_1Dppi_nu.h" /** * M. Derrick et al., "Study of single-pion production by weak neutral currents in low-energy \nu d interactions", Physical Review D, Volume 23, Number 3, 569, 1 February 1981 */ //******************************************************************** ANL_NC1npip_Evt_1Dppi_nu::ANL_NC1npip_Evt_1Dppi_nu(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "ANL_NC1npip_Evt_1Dppi_nu sample. \n" \ "Target: D2 \n" \ "Flux: \n" \ "Signal: \n"; // Setup common settings fSettings = LoadSampleSettings(samplekey); fSettings.SetDescription(descrip); fSettings.SetXTitle("p_{#pi} (MeV)"); fSettings.SetYTitle("Number of events"); fSettings.SetAllowedTypes("EVT/SHAPE/DIAG", "EVT/SHAPE/DIAG"); - fSettings.SetEnuRange(0.0, 6.0); + fSettings.SetEnuRange(0.0, 100.0); // No Enu Range given in v1r0p1 fSettings.DefineAllowedTargets("D,H"); // CCQELike plot information fSettings.SetTitle("ANL #nu_mu NC1n#pi^{+}"); fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/NC1npip/ANL_ppi_NC1npip_weight.csv" ); fSettings.DefineAllowedSpecies("numu"); FinaliseSampleSettings(); // Scaling Setup --------------------------------------------------- // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon - fScaleFactor = GetEventHistogram()->Integral("width")/((fNEvents+0.)*GetFluxHistogram()->Integral("width"))*(2./1.); + this->fScaleFactor = GetEventHistogram()->Integral("width")/((fNEvents+0.)*GetFluxHistogram()->Integral("width"))*(16./8.); // Plot Setup ------------------------------------------------------- SetDataFromTextFile( fSettings.GetDataInput() ); SetPoissonErrors(); SetCovarFromDiagonal(); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; void ANL_NC1npip_Evt_1Dppi_nu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(2112) == 0 || event->NumFSParticle(211) == 0) return; TLorentzVector Pn = event->GetHMFSParticle(2112)->fP;; TLorentzVector Ppip = event->GetHMFSParticle(211)->fP;; double hadMass = FitUtils::MpPi(Pn, Ppip); double ppip = -1.0; // ANL has a M(pi, p) < 1.4 GeV cut imposed if (hadMass < 1400) ppip = FitUtils::p(Ppip)*1000.; fXVar = ppip; return; }; bool ANL_NC1npip_Evt_1Dppi_nu::isSignal(FitEvent *event) { return SignalDef::isNC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); } diff --git a/src/ANL/ANL_NC1ppim_XSec_1DEnu_nu.cxx b/src/ANL/ANL_NC1ppim_XSec_1DEnu_nu.cxx index 7ef5ab6..f33f5b9 100644 --- a/src/ANL/ANL_NC1ppim_XSec_1DEnu_nu.cxx +++ b/src/ANL/ANL_NC1ppim_XSec_1DEnu_nu.cxx @@ -1,76 +1,76 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "ANL_NC1ppim_XSec_1DEnu_nu.h" /** * M. Derrick et al., "Study of the reaction \nu n \rightarrow \nu p \pi^-", Physics Letters, Volume 92B, Number 3,4, 363, 19 May 1980 */ //******************************************************************** ANL_NC1ppim_XSec_1DEnu_nu::ANL_NC1ppim_XSec_1DEnu_nu(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "ANL_NC1ppim_XSec_1DEnu_nu sample. \n" \ "Target: D2 \n" \ "Flux: \n" \ "Signal: \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", "FIX/DIAG"); fSettings.SetEnuRange(0.3, 1.5); fSettings.DefineAllowedTargets("D,H"); // CCQELike plot information fSettings.SetTitle("ANL #nu_mu NC1n#pi^{+}"); fSettings.SetDataInput( FitPar::GetDataBase() + "/ANL/NC1ppim/ANL_NC1ppim_Enu_xsec.csv" ); fSettings.DefineAllowedSpecies("numu"); FinaliseSampleSettings(); // Scaling Setup --------------------------------------------------- // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon - fScaleFactor = GetEventHistogram()->Integral("width")/((fNEvents+0.)*GetFluxHistogram()->Integral("width"))*(2./1.); + fScaleFactor = GetEventHistogram()->Integral("width") * 1E-38 /(fNEvents+0)*(16./8.); // Plot Setup ------------------------------------------------------- SetDataFromTextFile( fSettings.GetDataInput() ); SetCovarFromDiagonal(); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; void ANL_NC1ppim_XSec_1DEnu_nu::FillEventVariables(FitEvent *event) { // Very simple here! double Enu = event->GetNeutrinoIn()->fP.E()/1000.; this->fXVar = Enu; return; }; bool ANL_NC1ppim_XSec_1DEnu_nu::isSignal(FitEvent *event) { return SignalDef::isNC1pi3Prong(event, 14, -211, 2212, EnuMin, EnuMax); } diff --git a/src/BNL/BNL_CC1npip_Evt_1DQ2_nu.cxx b/src/BNL/BNL_CC1npip_Evt_1DQ2_nu.cxx index 6c7c65a..68957bb 100644 --- a/src/BNL/BNL_CC1npip_Evt_1DQ2_nu.cxx +++ b/src/BNL/BNL_CC1npip_Evt_1DQ2_nu.cxx @@ -1,83 +1,83 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "BNL_CC1npip_Evt_1DQ2_nu.h" //******************************************************************** BNL_CC1npip_Evt_1DQ2_nu::BNL_CC1npip_Evt_1DQ2_nu(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "BNL_CC1npip_Evt_1DQ2_nu sample. \n" \ "Target: D2 \n" \ "Flux: \n" \ "Signal: \n"; // Setup common settings fSettings = LoadSampleSettings(samplekey); fSettings.SetDescription(descrip); fSettings.SetXTitle("Q^{2}_{CC#pi} (GeV^{2})"); fSettings.SetYTitle("Number of events"); fSettings.SetAllowedTypes("EVT/SHAPE/DIAG", "EVT/SHAPE/DIAG"); - fSettings.SetEnuRange(0.5, 6.0); + fSettings.SetEnuRange(0.0, 3.0); fSettings.DefineAllowedTargets("D,H"); // CCQELike plot information fSettings.SetTitle("BNL_CC1npip_Evt_1DQ2_nu"); fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_n/BNL_CC1pip_on_n_noEvents_q2_noWcut_HighQ2Gone.txt" ); fSettings.DefineAllowedSpecies("numu"); FinaliseSampleSettings(); // Scaling Setup --------------------------------------------------- // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon fScaleFactor =GetEventHistogram()->Integral("width")/(fNEvents+0.)*2./1.; // Plot Setup ------------------------------------------------------- SetDataFromTextFile( fSettings.GetDataInput() ); SetPoissonErrors(); SetCovarFromDiagonal(); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; void BNL_CC1npip_Evt_1DQ2_nu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(13) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; // No hadronic mass constraint in BNL CC1n1pi+ // This Q2 is Q2 true double q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6; fXVar = q2CCpip; return; }; bool BNL_CC1npip_Evt_1DQ2_nu::isSignal(FitEvent *event) { return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); } diff --git a/src/FitBase/Measurement1D.cxx b/src/FitBase/Measurement1D.cxx index 67923a2..1579746 100644 --- a/src/FitBase/Measurement1D.cxx +++ b/src/FitBase/Measurement1D.cxx @@ -1,1780 +1,1781 @@ // Copyright 2016 L. Pickering, P caltowell, R. Terri, C. Wilkinson, C. Wret /******************************************************************************* * This ile 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "Measurement1D.h" //******************************************************************** Measurement1D::Measurement1D(void) { //******************************************************************** // XSec Scalings fScaleFactor = -1.0; fCurrentNorm = 1.0; // Histograms fDataHist = NULL; fDataTrue = NULL; fMCHist = NULL; fMCFine = NULL; fMCWeighted = NULL; fMaskHist = NULL; // Covar covar = NULL; fFullCovar = NULL; fCovar = NULL; fInvert = NULL; fDecomp = NULL; // Fake Data fFakeDataInput = ""; fFakeDataFile = NULL; // Options fDefaultTypes = "FIX/FULL/CHI2"; fAllowedTypes = "FIX,FREE,SHAPE/FULL,DIAG/CHI2/NORM/ENUCORR/Q2CORR/ENU1D/MASK"; fIsFix = false; fIsShape = false; fIsFree = false; fIsDiag = false; fIsFull = false; fAddNormPen = false; fIsMask = false; fIsChi2SVD = false; fIsRawEvents = false; fIsDifXSec = false; fIsEnu1D = false; // Inputs fInput = NULL; fRW = NULL; // Extra Histograms fMCHist_Modes = NULL; } //******************************************************************** Measurement1D::~Measurement1D(void) { //******************************************************************** if (fDataHist) delete fDataHist; if (fDataTrue) delete fDataTrue; if (fMCHist) delete fMCHist; if (fMCFine) delete fMCFine; if (fMCWeighted) delete fMCWeighted; if (fMaskHist) delete fMaskHist; if (covar) delete covar; if (fFullCovar) delete fFullCovar; if (fCovar) delete fCovar; if (fInvert) delete fInvert; if (fDecomp) delete fDecomp; } //******************************************************************** void Measurement1D::FinaliseSampleSettings() { //******************************************************************** MeasurementBase::FinaliseSampleSettings(); // Setup naming + renaming fName = fSettings.GetName(); fSettings.SetS("originalname", fName); if (fSettings.Has("rename")) { fName = fSettings.GetS("rename"); fSettings.SetS("name", fName); } // Setup all other options LOG(SAM) << "Finalising Sample Settings: " << fName << std::endl; if ((fSettings.GetS("originalname").find("Evt") != std::string::npos)) { fIsRawEvents = true; LOG(SAM) << "Found event rate measurement but using poisson likelihoods." << std::endl; } if (fSettings.GetS("originalname").find("XSec_1DEnu") != std::string::npos) { fIsEnu1D = true; LOG(SAM) << "::" << fName << "::" << std::endl; LOG(SAM) << "Found XSec Enu measurement, applying flux integrated scaling, " << "not flux averaged!" << std::endl; } if (fIsEnu1D && fIsRawEvents) { LOG(SAM) << "Found 1D Enu XSec distribution AND fIsRawEvents, is this " "really correct?!" << std::endl; LOG(SAM) << "Check experiment constructor for " << fName << " and correct this!" << std::endl; LOG(SAM) << "I live in " << __FILE__ << ":" << __LINE__ << std::endl; exit(-1); } if (!fRW) fRW = FitBase::GetRW(); if (!fInput and !fIsJoint) SetupInputs(fSettings.GetS("input")); // Setup options SetFitOptions(fDefaultTypes); // defaults SetFitOptions(fSettings.GetS("type")); // user specified EnuMin = GeneralUtils::StrToDbl(fSettings.GetS("enu_min")); EnuMax = GeneralUtils::StrToDbl(fSettings.GetS("enu_max")); if (fAddNormPen) { if (fNormError <= 0.0) { ERR(WRN) << "Norm error for class " << fName << " is 0.0!" << std::endl; ERR(WRN) << "If you want to use it please add fNormError=VAL" << std::endl; throw; } } } //******************************************************************** void Measurement1D::CreateDataHistogram(int dimx, double* binx) { //******************************************************************** if (fDataHist) delete fDataHist; fDataHist = new TH1D( (fSettings.GetName() + "_data").c_str(), (fSettings.GetFullTitles()).c_str(), dimx, binx) ; } //******************************************************************** void Measurement1D::SetDataFromTextFile(std::string datafile) { //******************************************************************** LOG(SAM) << "Reading data from text file: " << datafile << std::endl; fDataHist = PlotUtils::GetTH1DFromFile(datafile, fSettings.GetName() + "_data", fSettings.GetFullTitles()); } //******************************************************************** void Measurement1D::SetDataFromRootFile(std::string datafile, std::string histname) { //******************************************************************** LOG(SAM) << "Reading data from root file: " << datafile << ";" << histname << std::endl; fDataHist = PlotUtils::GetTH1DFromRootFile(datafile, histname); fDataHist->SetNameTitle((fSettings.GetName() + "_data").c_str(), (fSettings.GetFullTitles()).c_str()); return; }; //******************************************************************** void Measurement1D::SetEmptyData(){ //******************************************************************** fDataHist = new TH1D("EMPTY_DATA","EMPTY_DATA",1,0.0,1.0); } //******************************************************************** void Measurement1D::SetPoissonErrors() { //******************************************************************** if (!fDataHist) { ERR(FTL) << "Need a data hist to setup possion errors! " << std::endl; ERR(FTL) << "Setup Data First!" << std::endl; throw; } for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) { fDataHist->SetBinError(i + 1, sqrt(fDataHist->GetBinContent(i + 1))); } } //******************************************************************** void Measurement1D::SetCovarFromDiagonal(TH1D* data) { //******************************************************************** if (!data and fDataHist) { data = fDataHist; } if (data) { LOG(SAM) << "Setting diagonal covariance for: " << data->GetName() << std::endl; fFullCovar = StatUtils::MakeDiagonalCovarMatrix(data); covar = StatUtils::GetInvert(fFullCovar); fDecomp = StatUtils::GetDecomp(fFullCovar); } else { ERR(FTL) << "No data input provided to set diagonal covar from!" << std::endl; } // if (!fIsDiag) { // ERR(FTL) << "SetCovarMatrixFromDiag called for measurement " // << "that is not set as diagonal." << std::endl; // throw; // } } //******************************************************************** void Measurement1D::SetCovarFromTextFile(std::string covfile, int dim) { //******************************************************************** if (dim == -1) { dim = fDataHist->GetNbinsX(); } LOG(SAM) << "Reading covariance from text file: " << covfile << std::endl; fFullCovar = StatUtils::GetCovarFromTextFile(covfile, dim); covar = StatUtils::GetInvert(fFullCovar); fDecomp = StatUtils::GetDecomp(fFullCovar); } //******************************************************************** void Measurement1D::SetCovarFromRootFile(std::string covfile, std::string histname) { //******************************************************************** LOG(SAM) << "Reading covariance from text file: " << covfile << ";" << histname << std::endl; fFullCovar = StatUtils::GetCovarFromRootFile(covfile, histname); covar = StatUtils::GetInvert(fFullCovar); fDecomp = StatUtils::GetDecomp(fFullCovar); } //******************************************************************** void Measurement1D::SetCovarInvertFromTextFile(std::string covfile, int dim) { //******************************************************************** if (dim == -1) { dim = fDataHist->GetNbinsX(); } LOG(SAM) << "Reading inverted covariance from text file: " << covfile << std::endl; covar = StatUtils::GetCovarFromTextFile(covfile, dim); fFullCovar = StatUtils::GetInvert(covar); fDecomp = StatUtils::GetDecomp(fFullCovar); } //******************************************************************** void Measurement1D::SetCovarInvertFromRootFile(std::string covfile, std::string histname) { //******************************************************************** LOG(SAM) << "Reading inverted covariance from text file: " << covfile << ";" << histname << std::endl; covar = StatUtils::GetCovarFromRootFile(covfile, histname); fFullCovar = StatUtils::GetInvert(covar); fDecomp = StatUtils::GetDecomp(fFullCovar); } //******************************************************************** void Measurement1D::SetCorrelationFromTextFile(std::string covfile, int dim) { //******************************************************************** if (dim == -1) dim = fDataHist->GetNbinsX(); LOG(SAM) << "Reading data correlations from text file: " << covfile << ";" << dim << std::endl; TMatrixDSym* correlation = StatUtils::GetCovarFromTextFile(covfile, dim); if (!fDataHist) { ERR(FTL) << "Trying to set correlations from text file but there is no data to build it from. \n" << "In constructor make sure data is set before SetCorrelationFromTextFile is called. \n" << std::endl; throw; } // Fill covar from data errors and correlations fFullCovar = new TMatrixDSym(dim); for (int i = 0; i < fDataHist->GetNbinsX(); i++) { for (int j = 0; j < fDataHist->GetNbinsX(); j++) { (*fFullCovar)(i, j) = (*correlation)(i, j) * fDataHist->GetBinError(i + 1) * fDataHist->GetBinError(j + 1) * 1.E76; } } // Fill other covars. covar = StatUtils::GetInvert(fFullCovar); fDecomp = StatUtils::GetDecomp(fFullCovar); delete correlation; } //******************************************************************** void Measurement1D::SetCorrelationFromRootFile(std::string covfile, std::string histname) { //******************************************************************** LOG(SAM) << "Reading data correlations from text file: " << covfile << ";" << histname << std::endl; TMatrixDSym* correlation = StatUtils::GetCovarFromRootFile(covfile, histname); if (!fDataHist) { ERR(FTL) << "Trying to set correlations from text file but there is no data to build it from. \n" << "In constructor make sure data is set before SetCorrelationFromTextFile is called. \n" << std::endl; throw; } // Fill covar from data errors and correlations fFullCovar = new TMatrixDSym(fDataHist->GetNbinsX()); for (int i = 0; i < fDataHist->GetNbinsX(); i++) { for (int j = 0; j < fDataHist->GetNbinsX(); j++) { (*fFullCovar)(i, j) = (*correlation)(i, j) * fDataHist->GetBinError(i + 1) * fDataHist->GetBinError(j + 1) * 1.E76; } } // Fill other covars. covar = StatUtils::GetInvert(fFullCovar); fDecomp = StatUtils::GetDecomp(fFullCovar); delete correlation; } //******************************************************************** void Measurement1D::SetCholDecompFromTextFile(std::string covfile, int dim) { //******************************************************************** if (dim == -1) { dim = fDataHist->GetNbinsX(); } LOG(SAM) << "Reading cholesky from text file: " << covfile << std::endl; TMatrixD* temp = StatUtils::GetMatrixFromTextFile(covfile, dim, dim); TMatrixD* trans = (TMatrixD*)temp->Clone(); trans->T(); (*trans) *= (*temp); fFullCovar = new TMatrixDSym(dim, trans->GetMatrixArray(), ""); covar = StatUtils::GetInvert(fFullCovar); fDecomp = StatUtils::GetDecomp(fFullCovar); delete temp; delete trans; } //******************************************************************** void Measurement1D::SetCholDecompFromRootFile(std::string covfile, std::string histname) { //******************************************************************** LOG(SAM) << "Reading cholesky decomp from root file: " << covfile << ";" << histname << std::endl; TMatrixD* temp = StatUtils::GetMatrixFromRootFile(covfile, histname); TMatrixD* trans = (TMatrixD*)temp->Clone(); trans->T(); (*trans) *= (*temp); fFullCovar = new TMatrixDSym(temp->GetNrows(), trans->GetMatrixArray(), ""); covar = StatUtils::GetInvert(fFullCovar); fDecomp = StatUtils::GetDecomp(fFullCovar); delete temp; delete trans; } //******************************************************************** void Measurement1D::ScaleData(double scale) { //******************************************************************** fDataHist->Scale(scale); } //******************************************************************** void Measurement1D::ScaleDataErrors(double scale) { //******************************************************************** for (int i = 0; i < fDataHist->GetNbinsX(); i++) { fDataHist->SetBinError(i + 1, fDataHist->GetBinError(i + 1) * scale); } } //******************************************************************** void Measurement1D::ScaleCovar(double scale) { //******************************************************************** (*fFullCovar) *= scale; (*covar) *= 1.0 / scale; (*fDecomp) *= sqrt(scale); } //******************************************************************** void Measurement1D::SetBinMask(std::string maskfile) { //******************************************************************** if (!fIsMask) return; LOG(SAM) << "Reading bin mask from file: " << maskfile << std::endl; // Create a mask histogram with dim of data int nbins = fDataHist->GetNbinsX(); fMaskHist = new TH1I((fSettings.GetName() + "_BINMASK").c_str(), (fSettings.GetName() + "_BINMASK; Bin; Mask?").c_str(), nbins, 0, nbins); std::string line; std::ifstream mask(maskfile.c_str(), ifstream::in); if (!mask.is_open()) { LOG(FTL) << " Cannot find mask file." << std::endl; throw; } while (std::getline(mask >> std::ws, line, '\n')) { std::vector<int> entries = GeneralUtils::ParseToInt(line, " "); // Skip lines with poorly formatted lines if (entries.size() < 2) { LOG(WRN) << "Measurement1D::SetBinMask(), couldn't parse line: " << line << std::endl; continue; } // The first index should be the bin number, the second should be the mask // value. int val = 0; if (entries[1] > 0) val = 1; fMaskHist->SetBinContent(entries[0], val); } // Apply masking by setting masked data bins to zero PlotUtils::MaskBins(fDataHist, fMaskHist); return; } //******************************************************************** void Measurement1D::FinaliseMeasurement() { //******************************************************************** LOG(SAM) << "Finalising Measurement: " << fName << std::endl; // Make sure data is setup if (!fDataHist) { ERR(FTL) << "No data has been setup inside " << fName << " constructor!" << std::endl; throw; } // Make sure covariances are setup if (!fFullCovar) { SetCovarFromDiagonal(fDataHist); } if (!covar) { covar = StatUtils::GetInvert(fFullCovar); } if (!fDecomp) { fDecomp = StatUtils::GetDecomp(fFullCovar); } // Setup fMCHist from data fMCHist = (TH1D*)fDataHist->Clone(); fMCHist->SetNameTitle((fSettings.GetName() + "_MC").c_str(), (fSettings.GetFullTitles()).c_str()); fMCHist->Reset(); // Setup fMCFine fMCFine = new TH1D("mcfine", "mcfine", fDataHist->GetNbinsX(), fMCHist->GetBinLowEdge(1), fMCHist->GetBinLowEdge(fDataHist->GetNbinsX() + 1)); fMCFine->SetNameTitle((fSettings.GetName() + "_MC_FINE").c_str(), (fSettings.GetFullTitles()).c_str()); fMCFine->Reset(); // Setup MC Stat fMCStat = (TH1D*)fMCHist->Clone(); fMCStat->Reset(); // Search drawopts for possible types to include by default std::string drawopts = FitPar::Config().GetParS("drawopts"); if (drawopts.find("MODES") != std::string::npos) { fMCHist_Modes = new TrueModeStack( (fSettings.GetName() + "_MODES").c_str(), ("True Channels"), fMCHist); SetAutoProcessTH1(fMCHist_Modes, kCMD_Reset, kCMD_Norm, kCMD_Write); } // Setup bin masks using sample name if (fIsMask) { std::string curname = fName; std::string origname = fSettings.GetS("originalname"); // Check rename.mask std::string maskloc = FitPar::Config().GetParDIR(curname + ".mask"); // Check origname.mask if (maskloc.empty()) maskloc = FitPar::Config().GetParDIR(origname + ".mask"); // Check database if (maskloc.empty()) { maskloc = FitPar::GetDataBase() + "/masks/" + origname + ".mask"; } // Setup Bin Mask SetBinMask(maskloc); } if (fScaleFactor < 0) { ERR(FTL) << "I found a negative fScaleFactor in " << __FILE__ << ":" << __LINE__ << std::endl; ERR(FTL) << "fScaleFactor = " << fScaleFactor << std::endl; ERR(FTL) << "EXITING" << std::endl; throw; } // Create and fill Weighted Histogram if (!fMCWeighted) { fMCWeighted = (TH1D*)fMCHist->Clone(); fMCWeighted->SetNameTitle((fName + "_MCWGHTS").c_str(), (fName + "_MCWGHTS" + fPlotTitles).c_str()); fMCWeighted->GetYaxis()->SetTitle("Weighted Events"); } } //******************************************************************** void Measurement1D::SetFitOptions(std::string opt) { //******************************************************************** // Do nothing if default given if (opt == "DEFAULT") return; // CHECK Conflicting Fit Options std::vector<std::string> fit_option_allow = GeneralUtils::ParseToStr(fAllowedTypes, "/"); for (UInt_t i = 0; i < fit_option_allow.size(); i++) { std::vector<std::string> fit_option_section = GeneralUtils::ParseToStr(fit_option_allow.at(i), ","); bool found_option = false; for (UInt_t j = 0; j < fit_option_section.size(); j++) { std::string av_opt = fit_option_section.at(j); if (!found_option and opt.find(av_opt) != std::string::npos) { found_option = true; } else if (found_option and opt.find(av_opt) != std::string::npos) { ERR(FTL) << "ERROR: Conflicting fit options provided: " << opt << std::endl << "Conflicting group = " << fit_option_section.at(i) << std::endl << "You should only supply one of these options in card file." << std::endl; throw; } } } // Check all options are allowed std::vector<std::string> fit_options_input = GeneralUtils::ParseToStr(opt, "/"); for (UInt_t i = 0; i < fit_options_input.size(); i++) { if (fAllowedTypes.find(fit_options_input.at(i)) == std::string::npos) { ERR(FTL) << "ERROR: Fit Option '" << fit_options_input.at(i) << "' Provided is not allowed for this measurement." << std::endl; ERR(FTL) << "Fit Options should be provided as a '/' seperated list " "(e.g. FREE/DIAG/NORM)" << std::endl; ERR(FTL) << "Available options for " << fName << " are '" << fAllowedTypes << "'" << std::endl; throw; } } // Set TYPE fFitType = opt; // FIX,SHAPE,FREE if (opt.find("FIX") != std::string::npos) { fIsFree = fIsShape = false; fIsFix = true; } else if (opt.find("SHAPE") != std::string::npos) { fIsFree = fIsFix = false; fIsShape = true; } else if (opt.find("FREE") != std::string::npos) { fIsFix = fIsShape = false; fIsFree = true; } // DIAG,FULL (or default to full) if (opt.find("DIAG") != std::string::npos) { fIsDiag = true; fIsFull = false; } else if (opt.find("FULL") != std::string::npos) { fIsDiag = false; fIsFull = true; } // CHI2/LL (OTHERS?) if (opt.find("LOG") != std::string::npos) { fIsChi2 = false; ERR(FTL) << "No other LIKELIHOODS properly supported!" << std::endl; ERR(FTL) << "Try to use a chi2!" << std::endl; throw; } else { fIsChi2 = true; } // EXTRAS if (opt.find("RAW") != std::string::npos) fIsRawEvents = true; if (opt.find("DIF") != std::string::npos) fIsDifXSec = true; if (opt.find("ENU1D") != std::string::npos) fIsEnu1D = true; if (opt.find("NORM") != std::string::npos) fAddNormPen = true; if (opt.find("MASK") != std::string::npos) fIsMask = true; return; }; //******************************************************************** void Measurement1D::SetSmearingMatrix(std::string smearfile, int truedim, int recodim) { //******************************************************************** // The smearing matrix describes the migration from true bins (rows) to reco // bins (columns) // Counter over the true bins! int row = 0; std::string line; std::ifstream smear(smearfile.c_str(), ifstream::in); // Note that the smearing matrix may be rectangular. fSmearMatrix = new TMatrixD(truedim, recodim); if (smear.is_open()) LOG(SAM) << "Reading smearing matrix from file: " << smearfile << std::endl; else ERR(FTL) << "Smearing matrix provided is incorrect: " << smearfile << std::endl; while (std::getline(smear >> std::ws, line, '\n')) { int column = 0; std::vector<double> entries = GeneralUtils::ParseToDbl(line, " "); for (std::vector<double>::iterator iter = entries.begin(); iter != entries.end(); iter++) { (*fSmearMatrix)(row, column) = (*iter) / 100.; // Convert to fraction from // percentage (this may not be // general enough) column++; } row++; } return; } //******************************************************************** void Measurement1D::ApplySmearingMatrix() { //******************************************************************** if (!fSmearMatrix) { ERR(WRN) << fName << ": attempted to apply smearing matrix, but none was set" << std::endl; return; } TH1D* unsmeared = (TH1D*)fMCHist->Clone(); TH1D* smeared = (TH1D*)fMCHist->Clone(); smeared->Reset(); // Loop over reconstructed bins // true = row; reco = column for (int rbin = 0; rbin < fSmearMatrix->GetNcols(); ++rbin) { // Sum up the constributions from all true bins double rBinVal = 0; // Loop over true bins for (int tbin = 0; tbin < fSmearMatrix->GetNrows(); ++tbin) { rBinVal += (*fSmearMatrix)(tbin, rbin) * unsmeared->GetBinContent(tbin + 1); } smeared->SetBinContent(rbin + 1, rBinVal); } fMCHist = (TH1D*)smeared->Clone(); return; } /* Reconfigure LOOP */ //******************************************************************** void Measurement1D::ResetAll() { //******************************************************************** fMCHist->Reset(); fMCFine->Reset(); fMCStat->Reset(); return; }; //******************************************************************** void Measurement1D::FillHistograms() { //******************************************************************** if (Signal) { fMCHist->Fill(fXVar, Weight); fMCFine->Fill(fXVar, Weight); fMCStat->Fill(fXVar, 1.0); if (fMCHist_Modes) fMCHist_Modes->Fill(Mode, fXVar, Weight); } return; }; //******************************************************************** void Measurement1D::ScaleEvents() { //******************************************************************** // Fill MCWeighted; // for (int i = 0; i < fMCHist->GetNbinsX(); i++) { // fMCWeighted->SetBinContent(i + 1, fMCHist->GetBinContent(i + 1)); // fMCWeighted->SetBinError(i + 1, fMCHist->GetBinError(i + 1)); // } // Setup Stat ratios for MC and MC Fine double* statratio = new double[fMCHist->GetNbinsX()]; for (int i = 0; i < fMCHist->GetNbinsX(); i++) { if (fMCHist->GetBinContent(i + 1) != 0) { statratio[i] = fMCHist->GetBinError(i + 1) / fMCHist->GetBinContent(i + 1); } else { statratio[i] = 0.0; } } double* statratiofine = new double[fMCFine->GetNbinsX()]; for (int i = 0; i < fMCFine->GetNbinsX(); i++) { if (fMCFine->GetBinContent(i + 1) != 0) { statratiofine[i] = fMCFine->GetBinError(i + 1) / fMCFine->GetBinContent(i + 1); } else { statratiofine[i] = 0.0; } } // Scaling for raw event rates if (fIsRawEvents) { double datamcratio = fDataHist->Integral() / fMCHist->Integral(); fMCHist->Scale(datamcratio); fMCFine->Scale(datamcratio); if (fMCHist_Modes) fMCHist_Modes->Scale(datamcratio); // Scaling for XSec as function of Enu } else if (fIsEnu1D) { PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram(), GetEventHistogram(), fScaleFactor, fNEvents); PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram(), GetEventHistogram(), fScaleFactor, fNEvents); // if (fMCHist_Modes) { // PlotUtils::FluxUnfoldedScaling(fMCHist_Modes, GetFluxHistogram(), // GetEventHistogram(), fScaleFactor, // fNEvents); // } // Any other differential scaling } else { fMCHist->Scale(fScaleFactor, "width"); fMCFine->Scale(fScaleFactor, "width"); if (fMCHist_Modes) fMCHist_Modes->Scale(fScaleFactor, "width"); } // Proper error scaling - ROOT Freaks out with xsec weights sometimes for (int i = 0; i < fMCStat->GetNbinsX(); i++) { fMCHist->SetBinError(i + 1, fMCHist->GetBinContent(i + 1) * statratio[i]); } for (int i = 0; i < fMCFine->GetNbinsX(); i++) { fMCFine->SetBinError(i + 1, fMCFine->GetBinContent(i + 1) * statratiofine[i]); } // Clean up delete statratio; delete statratiofine; return; }; //******************************************************************** void Measurement1D::ApplyNormScale(double norm) { //******************************************************************** fCurrentNorm = norm; fMCHist->Scale(1.0 / norm); fMCFine->Scale(1.0 / norm); return; }; /* Statistic Functions - Outsources to StatUtils */ //******************************************************************** int Measurement1D::GetNDOF() { //******************************************************************** int ndof = fDataHist->GetNbinsX(); if (fMaskHist) ndof -= fMaskHist->Integral(); return ndof; } //******************************************************************** double Measurement1D::GetLikelihood() { //******************************************************************** // If this is for a ratio, there is no data histogram to compare to! if (fNoData || !fDataHist) return 0.; // Apply Masking to MC if Required. if (fIsMask and fMaskHist) { PlotUtils::MaskBins(fMCHist, fMaskHist); } // Sort Shape Scaling double scaleF = 0.0; + // TODO Include !fIsRawEvents if (fIsShape) { if (fMCHist->Integral(1, fMCHist->GetNbinsX(), "width")) { scaleF = fDataHist->Integral(1, fDataHist->GetNbinsX(), "width") / - fMCHist->Integral(1, fMCHist->GetNbinsX(), "width"); + fMCHist->Integral(1, fMCHist->GetNbinsX(), "width"); fMCHist->Scale(scaleF); fMCFine->Scale(scaleF); } } // Likelihood Calculation double stat = 0.; if (fIsChi2) { if (fIsRawEvents) { stat = StatUtils::GetChi2FromEventRate(fDataHist, fMCHist, fMaskHist); } else if (fIsDiag) { stat = StatUtils::GetChi2FromDiag(fDataHist, fMCHist, fMaskHist); } else if (!fIsDiag and !fIsRawEvents) { std::cout << "Getting likelihood from covariance " << std::endl; stat = StatUtils::GetChi2FromCov(fDataHist, fMCHist, covar, fMaskHist); } } // Sort Penalty Terms if (fAddNormPen) { double penalty = (1. - fCurrentNorm) * (1. - fCurrentNorm) / (fNormError * fNormError); stat += penalty; } // Return to normal scaling - if (fIsShape and !FitPar::Config().GetParB("saveshapescaling")) { + if (fIsShape) { // and !FitPar::Config().GetParB("saveshapescaling")) { fMCHist->Scale(1. / scaleF); fMCFine->Scale(1. / scaleF); } return stat; } /* Fake Data Functions */ //******************************************************************** void Measurement1D::SetFakeDataValues(std::string fakeOption) { //******************************************************************** // Setup original/datatrue TH1D* tempdata = (TH1D*) fDataHist->Clone(); if (!fIsFakeData) { fIsFakeData = true; // Make a copy of the original data histogram. if (!fDataOrig) fDataOrig = (TH1D*)fDataHist->Clone((fName + "_data_original").c_str()); } else { ResetFakeData(); } // Setup Inputs fFakeDataInput = fakeOption; LOG(SAM) << "Setting fake data from : " << fFakeDataInput << std::endl; // From MC if (fFakeDataInput.compare("MC") == 0) { fDataHist = (TH1D*)fMCHist->Clone((fName + "_MC").c_str()); // Fake File } else { if (!fFakeDataFile) fFakeDataFile = new TFile(fFakeDataInput.c_str(), "READ"); fDataHist = (TH1D*)fFakeDataFile->Get((fName + "_MC").c_str()); } // Setup Data Hist fDataHist->SetNameTitle((fName + "_FAKE").c_str(), (fName + fPlotTitles).c_str()); // Replace Data True if (fDataTrue) delete fDataTrue; fDataTrue = (TH1D*)fDataHist->Clone(); fDataTrue->SetNameTitle((fName + "_FAKE_TRUE").c_str(), (fName + fPlotTitles).c_str()); // Make a new covariance for fake data hist. int nbins = fDataHist->GetNbinsX(); double alpha_i = 0.0; double alpha_j = 0.0; for (int i = 0; i < nbins; i++) { for (int j = 0; j < nbins; j++) { alpha_i = fDataHist->GetBinContent(i + 1) / tempdata->GetBinContent(i + 1); alpha_j = fDataHist->GetBinContent(j + 1) / tempdata->GetBinContent(j + 1); (*fFullCovar)(i, j) = alpha_i * alpha_j * (*fFullCovar)(i, j); } } // Setup Covariances if (covar) delete covar; covar = StatUtils::GetInvert(fFullCovar); if (fDecomp) delete fDecomp; fDecomp = StatUtils::GetInvert(fFullCovar); delete tempdata; return; }; //******************************************************************** void Measurement1D::ResetFakeData() { //******************************************************************** if (fIsFakeData) { if (fDataHist) delete fDataHist; fDataHist = (TH1D*)fDataTrue->Clone((fSettings.GetName() + "_FKDAT").c_str()); } } //******************************************************************** void Measurement1D::ResetData() { //******************************************************************** if (fIsFakeData) { if (fDataHist) delete fDataHist; fDataHist = (TH1D*)fDataOrig->Clone((fSettings.GetName() + "_data").c_str()); } fIsFakeData = false; } //******************************************************************** void Measurement1D::ThrowCovariance() { //******************************************************************** // Take a fDecomposition and use it to throw the current dataset. // Requires fDataTrue also be set incase used repeatedly. if (fDataHist) delete fDataHist; fDataHist = StatUtils::ThrowHistogram(fDataTrue, fFullCovar); return; }; /* Access Functions */ //******************************************************************** TH1D* Measurement1D::GetMCHistogram() { //******************************************************************** if (!fMCHist) return fMCHist; std::ostringstream chi2; chi2 << std::setprecision(5) << this->GetLikelihood(); int linecolor = kRed; int linestyle = 1; int linewidth = 1; int fillcolor = 0; int fillstyle = 1001; // if (fSettings.Has("linecolor")) linecolor = fSettings.GetI("linecolor"); // if (fSettings.Has("linestyle")) linestyle = fSettings.GetI("linestyle"); // if (fSettings.Has("linewidth")) linewidth = fSettings.GetI("linewidth"); // if (fSettings.Has("fillcolor")) fillcolor = fSettings.GetI("fillcolor"); // if (fSettings.Has("fillstyle")) fillstyle = fSettings.GetI("fillstyle"); fMCHist->SetTitle(chi2.str().c_str()); fMCHist->SetLineColor(linecolor); fMCHist->SetLineStyle(linestyle); fMCHist->SetLineWidth(linewidth); fMCHist->SetFillColor(fillcolor); fMCHist->SetFillStyle(fillstyle); return fMCHist; }; //******************************************************************** TH1D* Measurement1D::GetDataHistogram() { //******************************************************************** if (!fDataHist) return fDataHist; int datacolor = kBlack; int datastyle = 1; int datawidth = 1; // if (fSettings.Has("datacolor")) datacolor = fSettings.GetI("datacolor"); // if (fSettings.Has("datastyle")) datastyle = fSettings.GetI("datastyle"); // if (fSettings.Has("datawidth")) datawidth = fSettings.GetI("datawidth"); fDataHist->SetLineColor(datacolor); fDataHist->SetLineWidth(datawidth); fDataHist->SetMarkerStyle(datastyle); return fDataHist; }; /* Write Functions */ // Save all the histograms at once //******************************************************************** void Measurement1D::Write(std::string drawOpt) { //******************************************************************** // Get Draw Options drawOpt = FitPar::Config().GetParS("drawopts"); // Write Data/MC GetDataList().at(0)->Write(); GetMCList().at(0)->Write(); // Write Fine Histogram if (drawOpt.find("FINE") != std::string::npos) GetFineList().at(0)->Write(); // Write Weighted Histogram if (drawOpt.find("WEIGHTS") != std::string::npos && fMCWeighted) fMCWeighted->Write(); // Save Flux/Evt if no event manager if (!FitPar::Config().GetParB("EventManager")) { if (drawOpt.find("FLUX") != std::string::npos && GetFluxHistogram()) GetFluxHistogram()->Write(); if (drawOpt.find("EVT") != std::string::npos && GetEventHistogram()) GetEventHistogram()->Write(); if (drawOpt.find("XSEC") != std::string::npos && GetEventHistogram()) GetEventHistogram()->Write(); } // Write Mask if (fIsMask && (drawOpt.find("MASK") != std::string::npos)) { fMaskHist->Write(); } // Write Covariances if (drawOpt.find("COV") != std::string::npos && fFullCovar) { PlotUtils::GetFullCovarPlot(fFullCovar, fSettings.GetName()); } if (drawOpt.find("INVCOV") != std::string::npos && covar) { PlotUtils::GetInvCovarPlot(covar, fSettings.GetName()); } if (drawOpt.find("DECOMP") != std::string::npos && fDecomp) { PlotUtils::GetDecompCovarPlot(fDecomp, fSettings.GetName()); } // // Likelihood residual plots // if (drawOpt.find("RESIDUAL") != std::string::npos) { // WriteResidualPlots(); // } // Ratio and Shape Plots if (drawOpt.find("RATIO") != std::string::npos) { WriteRatioPlot(); } if (drawOpt.find("SHAPE") != std::string::npos) { WriteShapePlot(); if (drawOpt.find("RATIO") != std::string::npos) WriteShapeRatioPlot(); } // // RATIO // if (drawOpt.find("CANVMC") != std::string::npos) { // TCanvas* c1 = WriteMCCanvas(fDataHist, fMCHist); // c1->Write(); // delete c1; // } // // PDG // if (drawOpt.find("CANVPDG") != std::string::npos && fMCHist_Modes) { // TCanvas* c2 = WritePDGCanvas(fDataHist, fMCHist, fMCHist_Modes); // c2->Write(); // delete c2; // } // Write Extra Histograms AutoWriteExtraTH1(); WriteExtraHistograms(); // Returning LOG(SAM) << "Written Histograms: " << fName << std::endl; return; } //******************************************************************** void Measurement1D::WriteRatioPlot() { //******************************************************************** // Setup mc data ratios TH1D* dataRatio = (TH1D*)fDataHist->Clone((fName + "_data_RATIO").c_str()); TH1D* mcRatio = (TH1D*)fMCHist->Clone((fName + "_MC_RATIO").c_str()); // Extra MC Data Ratios for (int i = 0; i < mcRatio->GetNbinsX(); i++) { dataRatio->SetBinContent(i + 1, fDataHist->GetBinContent(i + 1) / fMCHist->GetBinContent(i + 1)); dataRatio->SetBinError(i + 1, fDataHist->GetBinError(i + 1) / fMCHist->GetBinContent(i + 1)); mcRatio->SetBinContent(i + 1, fMCHist->GetBinContent(i + 1) / fMCHist->GetBinContent(i + 1)); mcRatio->SetBinError(i + 1, fMCHist->GetBinError(i + 1) / fMCHist->GetBinContent(i + 1)); } // Write ratios mcRatio->Write(); dataRatio->Write(); delete mcRatio; delete dataRatio; } //******************************************************************** void Measurement1D::WriteShapePlot() { //******************************************************************** TH1D* mcShape = (TH1D*)fMCHist->Clone((fName + "_MC_SHAPE").c_str()); double shapeScale = 1.0; if (fIsRawEvents) { shapeScale = fDataHist->Integral() / fMCHist->Integral(); } else { shapeScale = fDataHist->Integral("width") / fMCHist->Integral("width"); } mcShape->Scale(shapeScale); std::stringstream ss; ss << shapeScale; mcShape->SetTitle(ss.str().c_str()); mcShape->SetLineWidth(3); mcShape->SetLineStyle(7); mcShape->Write(); delete mcShape; } //******************************************************************** void Measurement1D::WriteShapeRatioPlot() { //******************************************************************** // Get a mcshape histogram TH1D* mcShape = (TH1D*)fMCHist->Clone((fName + "_MC_SHAPE").c_str()); double shapeScale = 1.0; if (fIsRawEvents) { shapeScale = fDataHist->Integral() / fMCHist->Integral(); } else { shapeScale = fDataHist->Integral("width") / fMCHist->Integral("width"); } mcShape->Scale(shapeScale); // Create shape ratio histograms TH1D* mcShapeRatio = (TH1D*)mcShape->Clone((fName + "_MC_SHAPE_RATIO").c_str()); TH1D* dataShapeRatio = (TH1D*)fDataHist->Clone((fName + "_data_SHAPE_RATIO").c_str()); // Divide the histograms mcShapeRatio->Divide(mcShape); dataShapeRatio->Divide(mcShape); // Colour the shape ratio plots mcShapeRatio->SetLineWidth(3); mcShapeRatio->SetLineStyle(7); mcShapeRatio->Write(); dataShapeRatio->Write(); delete mcShapeRatio; delete dataShapeRatio; } //// CRAP TO BE REMOVED //******************************************************************** void Measurement1D::SetupMeasurement(std::string inputfile, std::string type, FitWeight * rw, std::string fkdt) { //******************************************************************** //nuiskey samplekey = Config::CreateKey("sample"); // samplekey.AddS("name", fName); // samplekey.AddS("type",type); // samplekey.AddS("input",inputfile); // fSettings = LoadSampleSettings(samplekey); // Reset everything to NULL // Init(); // Check if name contains Evt, indicating that it is a raw number of events // measurements and should thus be treated as once fIsRawEvents = false; if ((fName.find("Evt") != std::string::npos) && fIsRawEvents == false) { fIsRawEvents = true; LOG(SAM) << "Found event rate measurement but fIsRawEvents == false!" << std::endl; LOG(SAM) << "Overriding this and setting fIsRawEvents == true!" << std::endl; } fIsEnu1D = false; if (fName.find("XSec_1DEnu") != std::string::npos) { fIsEnu1D = true; LOG(SAM) << "::" << fName << "::" << std::endl; LOG(SAM) << "Found XSec Enu measurement, applying flux integrated scaling, " "not flux averaged!" << std::endl; } if (fIsEnu1D && fIsRawEvents) { LOG(SAM) << "Found 1D Enu XSec distribution AND fIsRawEvents, is this " "really correct?!" << std::endl; LOG(SAM) << "Check experiment constructor for " << fName << " and correct this!" << std::endl; LOG(SAM) << "I live in " << __FILE__ << ":" << __LINE__ << std::endl; exit(-1); } fRW = rw; if (!fInput and !fIsJoint) SetupInputs(inputfile); // Set Default Options SetFitOptions(fDefaultTypes); // Set Passed Options SetFitOptions(type); // Still adding support for flat flux inputs // // Set Enu Flux Scaling // if (isFlatFluxFolding) this->Input()->ApplyFluxFolding( // this->defaultFluxHist ); // FinaliseMeasurement(); } //******************************************************************** void Measurement1D::SetupDefaultHist() { //******************************************************************** // Setup fMCHist fMCHist = (TH1D*)fDataHist->Clone(); fMCHist->SetNameTitle((fName + "_MC").c_str(), (fName + "_MC" + fPlotTitles).c_str()); // Setup fMCFine Int_t nBins = fMCHist->GetNbinsX(); fMCFine = new TH1D( (fName + "_MC_FINE").c_str(), (fName + "_MC_FINE" + fPlotTitles).c_str(), nBins * 6, fMCHist->GetBinLowEdge(1), fMCHist->GetBinLowEdge(nBins + 1)); fMCStat = (TH1D*)fMCHist->Clone(); fMCStat->Reset(); fMCHist->Reset(); fMCFine->Reset(); // Setup the NEUT Mode Array PlotUtils::CreateNeutModeArray((TH1D*)fMCHist, (TH1**)fMCHist_PDG); PlotUtils::ResetNeutModeArray((TH1**)fMCHist_PDG); // Setup bin masks using sample name if (fIsMask) { std::string maskloc = FitPar::Config().GetParDIR(fName + ".mask"); if (maskloc.empty()) { maskloc = FitPar::GetDataBase() + "/masks/" + fName + ".mask"; } SetBinMask(maskloc); } fMCHist_Modes = new TrueModeStack( (fName + "_MODES").c_str(), ("True Channels"), fMCHist); SetAutoProcessTH1(fMCHist_Modes, kCMD_Reset, kCMD_Norm, kCMD_Write); return; } //******************************************************************** void Measurement1D::SetDataValues(std::string dataFile) { //******************************************************************** // Override this function if the input file isn't in a suitable format LOG(SAM) << "Reading data from: " << dataFile.c_str() << std::endl; fDataHist = PlotUtils::GetTH1DFromFile(dataFile, (fName + "_data"), fPlotTitles); fDataTrue = (TH1D*)fDataHist->Clone(); // Number of data points is number of bins fNDataPointsX = fDataHist->GetXaxis()->GetNbins(); return; }; //******************************************************************** void Measurement1D::SetDataFromDatabase(std::string inhistfile, std::string histname) { //******************************************************************** LOG(SAM) << "Filling histogram from " << inhistfile << "->" << histname << std::endl; fDataHist = PlotUtils::GetTH1DFromRootFile( (GeneralUtils::GetTopLevelDir() + "/data/" + inhistfile), histname); fDataHist->SetNameTitle((fName + "_data").c_str(), (fName + "_data").c_str()); return; }; //******************************************************************** void Measurement1D::SetDataFromFile(std::string inhistfile, std::string histname) { //******************************************************************** LOG(SAM) << "Filling histogram from " << inhistfile << "->" << histname << std::endl; fDataHist = PlotUtils::GetTH1DFromRootFile((inhistfile), histname); fDataHist->SetNameTitle((fName + "_data").c_str(), (fName + "_data").c_str()); return; }; //******************************************************************** void Measurement1D::SetCovarMatrix(std::string covarFile) { //******************************************************************** // Covariance function, only really used when reading in the MB Covariances. TFile* tempFile = new TFile(covarFile.c_str(), "READ"); TH2D* covarPlot = new TH2D(); // TH2D* decmpPlot = new TH2D(); TH2D* covarInvPlot = new TH2D(); TH2D* fFullCovarPlot = new TH2D(); std::string covName = ""; std::string covOption = FitPar::Config().GetParS("thrown_covariance"); if (fIsShape || fIsFree) covName = "shp_"; if (fIsDiag) covName += "diag"; else covName += "full"; covarPlot = (TH2D*)tempFile->Get((covName + "cov").c_str()); covarInvPlot = (TH2D*)tempFile->Get((covName + "covinv").c_str()); if (!covOption.compare("SUB")) fFullCovarPlot = (TH2D*)tempFile->Get((covName + "cov").c_str()); else if (!covOption.compare("FULL")) fFullCovarPlot = (TH2D*)tempFile->Get("fullcov"); else ERR(WRN) << "Incorrect thrown_covariance option in parameters." << std::endl; int dim = int(fDataHist->GetNbinsX()); //-this->masked->Integral()); int covdim = int(fDataHist->GetNbinsX()); this->covar = new TMatrixDSym(dim); fFullCovar = new TMatrixDSym(dim); fDecomp = new TMatrixDSym(dim); int row, column = 0; row = 0; column = 0; for (Int_t i = 0; i < covdim; i++) { // if (this->masked->GetBinContent(i+1) > 0) continue; for (Int_t j = 0; j < covdim; j++) { // if (this->masked->GetBinContent(j+1) > 0) continue; (*this->covar)(row, column) = covarPlot->GetBinContent(i + 1, j + 1); (*fFullCovar)(row, column) = fFullCovarPlot->GetBinContent(i + 1, j + 1); column++; } column = 0; row++; } // Set bin errors on data if (!fIsDiag) { StatUtils::SetDataErrorFromCov(fDataHist, fFullCovar); } // Get Deteriminant and inverse matrix // fCovDet = this->covar->Determinant(); TDecompSVD LU = TDecompSVD(*this->covar); this->covar = new TMatrixDSym(dim, LU.Invert().GetMatrixArray(), ""); return; }; //******************************************************************** // Sets the covariance matrix from a provided file in a text format // scale is a multiplicative pre-factor to apply in the case where the // covariance is given in some unit (e.g. 1E-38) void Measurement1D::SetCovarMatrixFromText(std::string covarFile, int dim, double scale) { //******************************************************************** // Make a counter to track the line number int row = 0; std::string line; std::ifstream covarread(covarFile.c_str(), ifstream::in); this->covar = new TMatrixDSym(dim); fFullCovar = new TMatrixDSym(dim); if (covarread.is_open()) LOG(SAM) << "Reading covariance matrix from file: " << covarFile << std::endl; else ERR(FTL) << "Covariance matrix provided is incorrect: " << covarFile << std::endl; // Loop over the lines in the file while (std::getline(covarread >> std::ws, line, '\n')) { int column = 0; // Loop over entries and insert them into matrix std::vector<double> entries = GeneralUtils::ParseToDbl(line, " "); if (entries.size() <= 1) { ERR(WRN) << "SetCovarMatrixFromText -> Covariance matrix only has <= 1 " "entries on this line: " << row << std::endl; } for (std::vector<double>::iterator iter = entries.begin(); iter != entries.end(); iter++) { (*covar)(row, column) = *iter; (*fFullCovar)(row, column) = *iter; column++; } row++; } covarread.close(); // Scale the actualy covariance matrix by some multiplicative factor (*fFullCovar) *= scale; // Robust matrix inversion method TDecompSVD LU = TDecompSVD(*this->covar); // THIS IS ACTUALLY THE INVERSE COVARIANCE MATRIXA AAAAARGH delete this->covar; this->covar = new TMatrixDSym(dim, LU.Invert().GetMatrixArray(), ""); // Now need to multiply by the scaling factor // If the covariance (*this->covar) *= 1. / (scale); return; }; //******************************************************************** void Measurement1D::SetCovarMatrixFromCorrText(std::string corrFile, int dim) { //******************************************************************** // Make a counter to track the line number int row = 0; std::string line; std::ifstream corr(corrFile.c_str(), ifstream::in); this->covar = new TMatrixDSym(dim); this->fFullCovar = new TMatrixDSym(dim); if (corr.is_open()) LOG(SAM) << "Reading and converting correlation matrix from file: " << corrFile << std::endl; else { ERR(FTL) << "Correlation matrix provided is incorrect: " << corrFile << std::endl; exit(-1); } while (std::getline(corr >> std::ws, line, '\n')) { int column = 0; // Loop over entries and insert them into matrix // Multiply by the errors to get the covariance, rather than the correlation // matrix std::vector<double> entries = GeneralUtils::ParseToDbl(line, " "); for (std::vector<double>::iterator iter = entries.begin(); iter != entries.end(); iter++) { double val = (*iter) * this->fDataHist->GetBinError(row + 1) * 1E38 * this->fDataHist->GetBinError(column + 1) * 1E38; if (val == 0) { ERR(FTL) << "Found a zero value in the covariance matrix, assuming " "this is an error!" << std::endl; exit(-1); } (*this->covar)(row, column) = val; (*this->fFullCovar)(row, column) = val; column++; } row++; } // Robust matrix inversion method TDecompSVD LU = TDecompSVD(*this->covar); delete this->covar; this->covar = new TMatrixDSym(dim, LU.Invert().GetMatrixArray(), ""); return; }; //******************************************************************** // FullUnits refers to if we have "real" unscaled units in the covariance matrix, e.g. 1E-76. // If this is the case we need to scale it so that the chi2 contribution is correct // NUISANCE internally assumes the covariance matrix has units of 1E76 void Measurement1D::SetCovarFromDataFile(std::string covarFile, std::string covName, bool FullUnits) { //******************************************************************** LOG(SAM) << "Getting covariance from " << covarFile << "->" << covName << std::endl; TFile* tempFile = new TFile(covarFile.c_str(), "READ"); TH2D* covPlot = (TH2D*)tempFile->Get(covName.c_str()); covPlot->SetDirectory(0); // Scale the covariance matrix if it comes in normal units if (FullUnits) { covPlot->Scale(1.E76); } int dim = covPlot->GetNbinsX(); fFullCovar = new TMatrixDSym(dim); for (int i = 0; i < dim; i++) { for (int j = 0; j < dim; j++) { (*fFullCovar)(i, j) = covPlot->GetBinContent(i + 1, j + 1); } } this->covar = (TMatrixDSym*)fFullCovar->Clone(); fDecomp = (TMatrixDSym*)fFullCovar->Clone(); TDecompSVD LU = TDecompSVD(*this->covar); this->covar = new TMatrixDSym(dim, LU.Invert().GetMatrixArray(), ""); TDecompChol LUChol = TDecompChol(*fDecomp); LUChol.Decompose(); fDecomp = new TMatrixDSym(dim, LU.GetU().GetMatrixArray(), ""); return; }; // //******************************************************************** // void Measurement1D::SetBinMask(std::string maskFile) { // //******************************************************************** // // Create a mask histogram. // int nbins = fDataHist->GetNbinsX(); // fMaskHist = // new TH1I((fName + "_fMaskHist").c_str(), // (fName + "_fMaskHist; Bin; Mask?").c_str(), nbins, 0, nbins); // std::string line; // std::ifstream mask(maskFile.c_str(), ifstream::in); // if (mask.is_open()) // LOG(SAM) << "Reading bin mask from file: " << maskFile << std::endl; // else // LOG(FTL) << " Cannot find mask file." << std::endl; // while (std::getline(mask >> std::ws, line, '\n')) { // std::vector<int> entries = GeneralUtils::ParseToInt(line, " "); // // Skip lines with poorly formatted lines // if (entries.size() < 2) { // LOG(WRN) << "Measurement1D::SetBinMask(), couldn't parse line: " << line // << std::endl; // continue; // } // // The first index should be the bin number, the second should be the mask // // value. // fMaskHist->SetBinContent(entries[0], entries[1]); // } // // Set masked data bins to zero // PlotUtils::MaskBins(fDataHist, fMaskHist); // return; // } // //******************************************************************** // void Measurement1D::GetBinContents(std::vector<double>& cont, // std::vector<double>& err) { // //******************************************************************** // // Return a vector of the main bin contents // for (int i = 0; i < fMCHist->GetNbinsX(); i++) { // cont.push_back(fMCHist->GetBinContent(i + 1)); // err.push_back(fMCHist->GetBinError(i + 1)); // } // return; // }; /* XSec Functions */ // //******************************************************************** // void Measurement1D::SetFluxHistogram(std::string fluxFile, int minE, int // maxE, // double fluxNorm) { // //******************************************************************** // // Note this expects the flux bins to be given in terms of MeV // LOG(SAM) << "Reading flux from file: " << fluxFile << std::endl; // TGraph f(fluxFile.c_str(), "%lg %lg"); // fFluxHist = // new TH1D((fName + "_flux").c_str(), (fName + "; E_{#nu} (GeV)").c_str(), // f.GetN() - 1, minE, maxE); // Double_t* yVal = f.GetY(); // for (int i = 0; i < fFluxHist->GetNbinsX(); ++i) // fFluxHist->SetBinContent(i + 1, yVal[i] * fluxNorm); // }; // //******************************************************************** // double Measurement1D::TotalIntegratedFlux(std::string intOpt, double low, // double high) { // //******************************************************************** // if (fInput->GetType() == kGiBUU) { // return 1.0; // } // // The default case of low = -9999.9 and high = -9999.9 // if (low == -9999.9) low = this->EnuMin; // if (high == -9999.9) high = this->EnuMax; // int minBin = fFluxHist->GetXaxis()->FindBin(low); // int maxBin = fFluxHist->GetXaxis()->FindBin(high); // // Get integral over custom range // double integral = fFluxHist->Integral(minBin, maxBin + 1, intOpt.c_str()); // return integral; // }; diff --git a/src/InputHandler/BaseFitEvt.cxx b/src/InputHandler/BaseFitEvt.cxx index 9814c63..07073ce 100644 --- a/src/InputHandler/BaseFitEvt.cxx +++ b/src/InputHandler/BaseFitEvt.cxx @@ -1,180 +1,180 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "BaseFitEvt.h" BaseFitEvt::BaseFitEvt() { Mode = 0; E = 0.0; Weight = 1.0; InputWeight = 1.0; RWWeight = 1.0; CustomWeight = 1.0; SavedRWWeight = 1.0; fSplineCoeff = NULL; fSplineRead = NULL; fGenInfo = NULL; fType = 9999; #ifdef __NEUT_ENABLED__ fNeutVect = NULL; #endif #ifdef __NUWRO_ENABLED__ fNuwroEvent = NULL; #endif #ifdef __GENIE_ENABLED__ genie_event = NULL; genie_record = NULL; #endif #ifdef __NUANCE_ENABLED__ nuance_event = NULL; #endif #ifdef __GiBUU_ENABLED__ GiRead = NULL; #endif }; BaseFitEvt::~BaseFitEvt(){ #ifdef __NEUT_ENABLED__ if (fNeutVect) delete fNeutVect; #endif #ifdef __NUWRO_ENABLED__ if (fNuwroEvent) delete fNuwroEvent; #endif #ifdef __GENIE_ENABLED__ if (genie_event) delete genie_event; #endif #ifdef __NUANCE_ENABLED__ if (nuance_event) delete nuance_event; #endif #ifdef __GiBUU_ENABLED__ if (GiRead) delete GiRead; #endif }; BaseFitEvt::BaseFitEvt(const BaseFitEvt *obj) { this->Mode = obj->Mode; this->E = obj->E; this->Weight = obj->Weight; this->InputWeight = obj->InputWeight; this->RWWeight = obj->RWWeight; this->CustomWeight = obj->CustomWeight; this->SavedRWWeight = obj->SavedRWWeight; this->fSplineCoeff = obj->fSplineCoeff; this->fSplineRead = obj->fSplineRead; this->fGenInfo = obj->fGenInfo; this->fType = obj->fType; #ifdef __NEUT_ENABLED__ fNeutVect = obj->fNeutVect; #endif #ifdef __NUWRO_ENABLED__ fNuwroEvent = obj->fNuwroEvent; #endif #ifdef __GENIE_ENABLED__ genie_event = obj->genie_event; #endif #ifdef __NUANCE_ENABLED__ nuance_event = obj->nuance_event; #endif #ifdef __GiBUU_ENABLED__ GiRead = obj->GiRead; #endif }; void BaseFitEvt::ResetWeight(){ InputWeight = 1.0; } double BaseFitEvt::GetWeight(){ return InputWeight * RWWeight * CustomWeight; }; #ifdef __NEUT_ENABLED__ void BaseFitEvt::SetNeutVect(NeutVect* v){ fType = kNEUT; fNeutVect = v; } #endif #ifdef __NUWRO_ENABLED__ void BaseFitEvt::SetNuwroEvent(event* e){ fType = kNUWRO; fNuwroEvent = e; } #endif #ifdef __GENIE_ENABLED__ void BaseFitEvt::SetGenieEvent(NtpMCEventRecord* ntpl){ fType = kGENIE; - genie_event = ntpl; + this->genie_event = ntpl; } #endif #ifdef __NUANCE_ENABLED__ void BaseFitEvt::SetNuanceEvent(NuanceEvent* e){ fType = kNUANCE; nuance_event = e; } #endif #ifdef __GiBUU_ENABLED__ void BaseFitEvt::SetGiBUUReader(GiBUUStdHepReader* g){ fType = kGiBUU; GiRead = g; } #endif void BaseFitEvt::SetInputFitEvent(){ fType = kINPUTFITEVENT; } void BaseFitEvt::SetInputFitSpline(){ fType = kNEWSPLINE; } void BaseFitEvt::SetInputHepMC(){ fType = kHEPMC; } diff --git a/src/InputHandler/FitEvent.cxx b/src/InputHandler/FitEvent.cxx index ddc376d..d0a9994 100644 --- a/src/InputHandler/FitEvent.cxx +++ b/src/InputHandler/FitEvent.cxx @@ -1,433 +1,445 @@ // Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret /******************************************************************************* * This file is pddrt 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "FitEvent.h" #include <iostream> #include "TObjArray.h" FitEvent::FitEvent() { fGenInfo = NULL; kRemoveFSIParticles = true; kRemoveUndefParticles = true; AllocateParticleStack(400); }; void FitEvent::AddGeneratorInfo(GeneratorInfoBase* gen) { fGenInfo = gen; gen->AllocateParticleStack(kMaxParticles); } void FitEvent::AllocateParticleStack(int stacksize) { LOG(DEB) << "Allocating particle stack of size: " << stacksize << std::endl; kMaxParticles = stacksize; fParticleList = new FitParticle*[kMaxParticles]; fParticleMom = new double*[kMaxParticles]; fParticleState = new UInt_t[kMaxParticles]; fParticlePDG = new int[kMaxParticles]; fOrigParticleMom = new double*[kMaxParticles]; fOrigParticleState = new UInt_t[kMaxParticles]; fOrigParticlePDG = new int[kMaxParticles]; for (size_t i = 0; i < kMaxParticles; i++) { fParticleList[i] = NULL; fParticleMom[i] = new double[4]; fOrigParticleMom[i] = new double[4]; } if (fGenInfo) fGenInfo->AllocateParticleStack(kMaxParticles); } void FitEvent::ExpandParticleStack(int stacksize) { DeallocateParticleStack(); AllocateParticleStack(stacksize); } void FitEvent::DeallocateParticleStack() { for (size_t i = 0; i < kMaxParticles; i++) { if (fParticleList[i]) delete fParticleList[i]; delete fParticleMom[i]; delete fOrigParticleMom[i]; } delete fParticleMom; delete fOrigParticleMom; delete fParticleList; delete fParticleState; delete fParticlePDG; delete fOrigParticleState; delete fOrigParticlePDG; if (fGenInfo) fGenInfo -> DeallocateParticleStack(); kMaxParticles = 0; } void FitEvent::ClearFitParticles() { for (size_t i = 0; i < kMaxParticles; i++) { fParticleList[i] = NULL; } } void FitEvent::FreeFitParticles() { for (size_t i = 0; i < kMaxParticles; i++) { FitParticle* fp = fParticleList[i]; if (fp) delete fp; fParticleList[i] = NULL; } } void FitEvent::ResetParticleList() { for (unsigned int i = 0; i < kMaxParticles; i++) { FitParticle* fp = fParticleList[i]; if (fp) delete fp; fParticleList[i] = NULL; } } void FitEvent::HardReset() { for (unsigned int i = 0; i < kMaxParticles; i++) { fParticleList[i] = NULL; } } void FitEvent::ResetEvent() { fMode = 9999; Mode = 9999; fEventNo = -1; fTotCrs = -1.0; fTargetA = -1; fTargetZ = -1; fTargetH = -1; fBound = false; fNParticles = 0; if (fGenInfo) fGenInfo->Reset(); for (unsigned int i = 0; i < kMaxParticles; i++) { if (fParticleList[i]) delete fParticleList[i]; fParticleList[i] = NULL; continue; fParticlePDG[i] = 0; fParticleState[i] = kUndefinedState; fParticleMom[i][0] = 0.0; fParticleMom[i][1] = 0.0; fParticleMom[i][2] = 0.0; fParticleMom[i][3] = 0.0; fOrigParticlePDG[i] = 0; fOrigParticleState[i] = kUndefinedState; fOrigParticleMom[i][0] = 0.0; fOrigParticleMom[i][1] = 0.0; fOrigParticleMom[i][2] = 0.0; fOrigParticleMom[i][3] = 0.0; } } void FitEvent::OrderStack() { // Copy current stack int npart = fNParticles; for (int i = 0; i < npart; i++) { fOrigParticlePDG[i] = fParticlePDG[i]; fOrigParticleState[i] = fParticleState[i]; fOrigParticleMom[i][0] = fParticleMom[i][0]; fOrigParticleMom[i][1] = fParticleMom[i][1]; fOrigParticleMom[i][2] = fParticleMom[i][2]; fOrigParticleMom[i][3] = fParticleMom[i][3]; } // Now run loops for each particle fNParticles = 0; int stateorder[6] = {kInitialState, kFinalState, kFSIState, kNuclearInitial, kNuclearRemnant, kUndefinedState }; for (int s = 0; s < 6; s++) { for (int i = 0; i < npart; i++) { if ((UInt_t)fOrigParticleState[i] != (UInt_t)stateorder[s]) continue; fParticlePDG[fNParticles] = fOrigParticlePDG[i]; fParticleState[fNParticles] = fOrigParticleState[i]; fParticleMom[fNParticles][0] = fOrigParticleMom[i][0]; fParticleMom[fNParticles][1] = fOrigParticleMom[i][1]; fParticleMom[fNParticles][2] = fOrigParticleMom[i][2]; fParticleMom[fNParticles][3] = fOrigParticleMom[i][3]; fNParticles++; } } if (LOG_LEVEL(DEB)) { LOG(DEB) << "Ordered stack" << std::endl; for (int i = 0; i < fNParticles; i++) { LOG(DEB) << "Particle " << i << ". " << fParticlePDG[i] << " " << fParticleMom[i][0] << " " << fParticleMom[i][1] << " " << fParticleMom[i][2] << " " << fParticleMom[i][3] << " " << fParticleState[i] << std::endl; } } if (fNParticles != npart) { ERR(FTL) << "Dropped some particles when ordering the stack!" << std::endl; } return; } void FitEvent::Print() { if (LOG_LEVEL(EVT)) { LOG(EVT) << "EVTEvent print" << std::endl; LOG(EVT) << "Mode: " << fMode << std::endl; LOG(EVT) << "Particles: " << fNParticles << std::endl; LOG(EVT) << " -> Particle Stack " << std::endl; for (int i = 0; i < fNParticles; i++) { LOG(EVT) << " -> -> " << i << ". " << fParticlePDG[i] << " " << fParticleState[i] << " " << " Mom(" << fParticleMom[i][0] << ", " << fParticleMom[i][1] << ", " << fParticleMom[i][2] << ", " << fParticleMom[i][3] << ")." << std::endl; } } return; } /* Read/Write own event class */ void FitEvent::SetBranchAddress(TChain* tn) { tn->SetBranchAddress("Mode", &fMode); tn->SetBranchAddress("Mode", &Mode); tn->SetBranchAddress("EventNo", &fEventNo); tn->SetBranchAddress("TotCrs", &fTotCrs); tn->SetBranchAddress("TargetA", &fTargetA); tn->SetBranchAddress("TargetH", &fTargetH); tn->SetBranchAddress("Bound", &fBound); tn->SetBranchAddress("RWWeight", &SavedRWWeight); tn->SetBranchAddress("InputWeight", &InputWeight); tn->SetBranchAddress("NParticles", &fNParticles); tn->SetBranchAddress("ParticleState", fParticleState); tn->SetBranchAddress("ParticlePDG", fParticlePDG); tn->SetBranchAddress("ParticleMom", fParticleMom); } void FitEvent::AddBranchesToTree(TTree* tn) { tn->Branch("Mode", &Mode, "Mode/I"); tn->Branch("EventNo", &fEventNo, "EventNo/i"); tn->Branch("TotCrs", &fTotCrs, "TotCrs/D"); tn->Branch("TargetA", &fTargetA, "TargetA/I"); tn->Branch("TargetH", &fTargetH, "TargetH/I"); tn->Branch("Bound", &fBound, "Bound/O"); tn->Branch("RWWeight", &RWWeight, "RWWeight/D"); tn->Branch("InputWeight", &InputWeight, "InputWeight/D"); tn->Branch("NParticles", &fNParticles, "NParticles/I"); tn->Branch("ParticleState", fOrigParticleState, "ParticleState[NParticles]/i"); tn->Branch("ParticlePDG", fOrigParticlePDG, "ParticlePDG[NParticles]/I"); tn->Branch("ParticleMom", fOrigParticleMom, "ParticleMom[NParticles][4]/D"); } // ------- EVENT ACCESS FUNCTION --------- // TLorentzVector FitEvent::GetParticleP4 (int index) const { if (index == -1 or index >= fNParticles) return TLorentzVector(); return TLorentzVector( fParticleMom[index][0], fParticleMom[index][1], fParticleMom[index][2], fParticleMom[index][3] ); } TVector3 FitEvent::GetParticleP3 (int index) const { if (index == -1 or index >= fNParticles) return TVector3(); return TVector3( fParticleMom[index][0], fParticleMom[index][1], fParticleMom[index][2] ); } double FitEvent::GetParticleMom (int index) const { if (index == -1 or index >= fNParticles) return 0.0; return sqrt(fParticleMom[index][0] * fParticleMom[index][0] + fParticleMom[index][1] * fParticleMom[index][1] + fParticleMom[index][2] * fParticleMom[index][2]); } double FitEvent::GetParticleMom2 (int index) const { if (index == -1 or index >= fNParticles) return 0.0; return fabs((fParticleMom[index][0] * fParticleMom[index][0] + fParticleMom[index][1] * fParticleMom[index][1] + fParticleMom[index][2] * fParticleMom[index][2])); } double FitEvent::GetParticleE (int index) const { if (index == -1 or index >= fNParticles) return 0.0; return fParticleMom[index][3]; } int FitEvent::GetParticleState (int index) const { if (index == -1 or index >= fNParticles) return kUndefinedState; return (fParticleState[index]); } int FitEvent::GetParticlePDG (int index) const { if (index == -1 or index >= fNParticles) return 0; return (fParticlePDG[index]); } FitParticle* FitEvent::GetParticle (int const i) { // Check Valid Index if (i == -1){ return NULL; } // Check Valid if (i > (UInt_t)fNParticles) { ERR(FTL) << "Requesting particle beyond stack!" << std::endl << "i = " << i << " N = " << fNParticles << std::endl << "Mode = " << fMode << std::endl; throw; } if (!fParticleList[i]) { fParticleList[i] = new FitParticle(fParticleMom[i][0], fParticleMom[i][1], fParticleMom[i][2], fParticleMom[i][3], fParticlePDG[i], fParticleState[i]); } else { fParticleList[i]->SetValues(fParticleMom[i][0], fParticleMom[i][1], fParticleMom[i][2], fParticleMom[i][3], fParticlePDG[i], fParticleState[i]); } return fParticleList[i]; } bool FitEvent::HasParticle(int const pdg, int const state) const { bool found = false; for (int i = 0; i < fNParticles; i++) { if (state != -1 && fParticleState[i] != (uint)state) continue; if (fParticlePDG[i] == pdg) found = true; } return found; } int FitEvent::NumParticle(int const pdg, int const state) const { int nfound = 0; for (int i = 0; i < fNParticles; i++) { if (state != -1 and fParticleState[i] != (uint)state) continue; if (pdg == 0 or fParticlePDG[i] == pdg) nfound += 1; } return nfound; } std::vector<int> FitEvent::GetAllParticleIndices (int const pdg, int const state) const { std::vector<int> indexlist; for (int i = 0; i < fNParticles; i++) { if (state != -1 and fParticleState[i] != (uint)state) continue; if (pdg == 0 or fParticlePDG[i] == pdg) { indexlist.push_back(i); } } return indexlist; } std::vector<FitParticle*> FitEvent::GetAllParticle(int const pdg, int const state) { std::vector<int> indexlist = GetAllParticleIndices(pdg, state); std::vector<FitParticle*> plist; for (std::vector<int>::iterator iter = indexlist.begin(); iter != indexlist.end(); iter++) { plist.push_back( GetParticle((*iter)) ); } return plist; } int FitEvent::GetHMParticleIndex (int const pdg, int const state) const { double maxmom2 = -9999999.9; int maxind = -1; for (int i = 0; i < fNParticles; i++) { if (state != -1 and fParticleState[i] != (uint)state) continue; if (pdg == 0 or fParticlePDG[i] == pdg) { double newmom2 = GetParticleMom2(i); if (newmom2 > maxmom2) { maxind = i; maxmom2 = newmom2; } } } return maxind; } int FitEvent::GetBeamNeutrinoIndex (void) const { for (int i = 0; i < fNParticles; i++){ if (fParticleState[i] != kInitialState) continue; int pdg = abs(fParticlePDG[i]); if (pdg == 12 or pdg == 14 or pdg == 16){ return i; } } return 0; } int FitEvent::GetBeamElectronIndex (void) const { return GetHMISParticleIndex( 11 ); } int FitEvent::GetBeamPionIndex (void) const { return GetHMISParticleIndex( PhysConst::pdg_pions ); } int FitEvent::NumFSMesons() { int nMesons = 0; for (int i = 0; i < fNParticles; i++) { if (fParticleState[i] != kFinalState) continue; if (abs(fParticlePDG[i]) >= 111 && abs(fParticlePDG[i]) <= 557) nMesons += 1; } return nMesons; } +int FitEvent::NumFSLeptons(void) const{ + int nLeptons = 0; + + for (int i = 0; i < fNParticles; i++) { + if (fParticleState[i] != kFinalState) continue; + if (abs(fParticlePDG[i]) == 11 || abs(fParticlePDG[i]) == 13 || + abs(fParticlePDG[i]) == 15) + nLeptons += 1; + } + + return nLeptons; +} \ No newline at end of file diff --git a/src/InputHandler/FitEvent.h b/src/InputHandler/FitEvent.h index 7e7f14d..3812af9 100644 --- a/src/InputHandler/FitEvent.h +++ b/src/InputHandler/FitEvent.h @@ -1,603 +1,603 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #ifndef FITEVENT2_H_SEEN #define FITEVENT2_H_SEEN /*! * \addtogroup InputHandler * @{ */ #include <algorithm> #include <iterator> #include <vector> #include "FitParticle.h" #include "TLorentzVector.h" #include "TSpline.h" #include "FitParameters.h" #include "BaseFitEvt.h" #include "FitLogger.h" #include "TArrayD.h" #include "TTree.h" #include "TChain.h" /// Common container for event particles class FitEvent : public BaseFitEvt { public: FitEvent(); ~FitEvent() {}; void FreeFitParticles(); void ClearFitParticles(); void ResetEvent(void); void ResetParticleList(void); void HardReset(); void OrderStack(); void SetBranchAddress(TChain* tn); void AddBranchesToTree(TTree* tn); void Print(); void PrintChris(); void DeallocateParticleStack(); void AllocateParticleStack(int stacksize); void ExpandParticleStack(int stacksize); void AddGeneratorInfo(GeneratorInfoBase* gen); // ---- HELPER/ACCESS FUNCTIONS ---- // /// Return True Interaction ID inline int GetMode (void) const { return fMode; }; /// Return Target Atomic Number inline int GetTargetA (void) const { return fTargetA; }; /// Return Target Nuclear Charge inline int GetTargetZ (void) const { return fTargetZ; }; /// Get Event Total Cross-section inline int GetTotCrs (void) const { return fTotCrs; }; /// Is Event Charged Current? inline bool IsCC() const { return (abs(fMode) <= 30); }; /// Is Event Neutral Current? inline bool IsNC() const { return (abs(fMode) > 30); }; /// Return Particle 4-momentum for given index in particle stack TLorentzVector GetParticleP4 (int index) const; /// Return Particle 3-momentum for given index in particle stack TVector3 GetParticleP3 (int index) const; /// Return Particle absolute momentum for given index in particle stack double GetParticleMom (int index) const; /// Return Particle absolute momentum-squared for given index in particle stack double GetParticleMom2 (int index) const; /// Return Particle energy for given index in particle stack double GetParticleE (int index) const; /// Return Particle State for given index in particle stack int GetParticleState (int index) const; /// Return Particle PDG for given index in particle stack int GetParticlePDG (int index) const; /// Return Particle for given index in particle stack FitParticle* GetParticle(int const index); /// Get Total Number of Particles in stack inline uint NParticles (void) const { return fNParticles; }; /// Check if event contains a particle given a pdg and state. /// If no state is passed all states are considered. bool HasParticle (int const pdg = 0, int const state = -1) const ; template <size_t N> inline bool HasParticle(int const (&pdgs)[N], int const state = -1) const { for (size_t i = 0; i < N; i++) { if (HasParticle( pdgs[i], state )) { return false; } } return false; } /// Get total number of particles given a pdg and state. /// If no state is passed all states are considered. int NumParticle (int const pdg = 0, int const state = -1) const; template <size_t N> inline int NumParticle(int const (&pdgs)[N], int const state = -1) const { int ncount = 0; for (size_t i = 0; i < N; i++) { ncount += NumParticle( pdgs[i], state ); } return ncount; } /// Return a vector of particle indices that can be used with 'GetParticle' /// functions given a particle pdg and state. /// If no state is passed all states are considered. std::vector<int> GetAllParticleIndices (int const pdg = -1, int const state = -1) const; template <size_t N> inline std::vector<int> GetAllParticleIndices(int const (&pdgs)[N], const int state = -1) const { std::vector<int> plist; for (size_t i = 0; i < N; i++) { std::vector<int> plisttemp = GetAllParticleIndices(pdgs[i], state); plist.insert( plist.end(), plisttemp.begin(), plisttemp.end() ); } return plist; } /// Return a vector of FitParticles given a particle pdg and state. /// This is memory intensive and slow than GetAllParticleIndices, /// but is slightly easier to use. std::vector<FitParticle*> GetAllParticle (int const pdg = -1, int const state = -1); template <size_t N> inline std::vector<FitParticle*> GetAllParticle(int const (&pdgs)[N], int const state = -1) { std::vector<FitParticle*> plist; for (size_t i = 0; i < N; i++) { std::vector<FitParticle*> plisttemp = GetAllParticle(pdgs[i], state); plist.insert( plist.end(), plisttemp.begin(), plisttemp.end() ); } return plist; } inline std::vector<int> GetAllNuElectronIndices (void) { return GetAllParticleIndices(12); }; inline std::vector<int> GetAllNuMuonIndices (void) { return GetAllParticleIndices(14); }; inline std::vector<int> GetAllNuTauIndices (void) { return GetAllParticleIndices(16); }; inline std::vector<int> GetAllElectronIndices (void) { return GetAllParticleIndices(11); }; inline std::vector<int> GetAllMuonIndices (void) { return GetAllParticleIndices(13); }; inline std::vector<int> GetAllTauIndices (void) { return GetAllParticleIndices(15); }; inline std::vector<int> GetAllProtonIndices (void) { return GetAllParticleIndices(2212); }; inline std::vector<int> GetAllNeutronIndices (void) { return GetAllParticleIndices(2112); }; inline std::vector<int> GetAllPiZeroIndices (void) { return GetAllParticleIndices(111); }; inline std::vector<int> GetAllPiPlusIndices (void) { return GetAllParticleIndices(211); }; inline std::vector<int> GetAllPiMinusIndices (void) { return GetAllParticleIndices(-211); }; inline std::vector<int> GetAllPhotonIndices (void) { return GetAllParticleIndices(22); }; inline std::vector<FitParticle*> GetAllNuElectron (void) { return GetAllParticle(12); }; inline std::vector<FitParticle*> GetAllNuMuon (void) { return GetAllParticle(14); }; inline std::vector<FitParticle*> GetAllNuTau (void) { return GetAllParticle(16); }; inline std::vector<FitParticle*> GetAllElectron (void) { return GetAllParticle(11); }; inline std::vector<FitParticle*> GetAllMuon (void) { return GetAllParticle(13); }; inline std::vector<FitParticle*> GetAllTau (void) { return GetAllParticle(15); }; inline std::vector<FitParticle*> GetAllProton (void) { return GetAllParticle(2212); }; inline std::vector<FitParticle*> GetAllNeutron (void) { return GetAllParticle(2112); }; inline std::vector<FitParticle*> GetAllPiZero (void) { return GetAllParticle(111); }; inline std::vector<FitParticle*> GetAllPiPlus (void) { return GetAllParticle(211); }; inline std::vector<FitParticle*> GetAllPiMinus (void) { return GetAllParticle(-211); }; inline std::vector<FitParticle*> GetAllPhoton (void) { return GetAllParticle(22); }; // --- Highest Momentum Search Functions --- // /// Returns the Index of the highest momentum particle given a pdg and state. /// If no state is given all states are considered, but that will just return the /// momentum of the beam in most cases so is not advised. int GetHMParticleIndex (int const pdg = 0, int const state = -1) const; template <size_t N> inline int GetHMParticleIndex (int const (&pdgs)[N], int const state = -1) const { double mom = 0.0; int rtnindex = -1; for (size_t i = 0; i < N; ++i) { // Use ParticleMom as doesn't require Particle Mem alloc int pindex = GetHMParticleIndex(pdgs[i], state); double momnew = GetParticleMom2(pindex); if (momnew > 0.0 && (momnew > mom)) { rtnindex = pindex; mom = momnew; } } return rtnindex; }; /// Returns the highest momentum particle given a pdg and state. /// If no state is given all states are considered, but that will just return the /// momentum of the beam in most cases so is not advised. inline FitParticle* GetHMParticle(int const pdg = 0, int const state = -1) { return GetParticle( GetHMParticleIndex(pdg, state) ); } template <size_t N> inline FitParticle* GetHMParticle(int const (&pdgs)[N], int const state) { return GetParticle(GetHMParticleIndex(pdgs, state)); }; // ---- Initial State Helpers --- // /// Checks the event has a particle of a given pdg in the initial state. inline bool HasISParticle(int const pdg) const { return HasParticle(pdg, kInitialState); }; template <size_t N> inline bool HasISParticle(int const (&pdgs)[N]) const { return HasParticle(pdgs, kInitialState); }; /// Returns the number of particles with a given pdg in the initial state. inline int NumISParticle(int const pdg = 0) const { return NumParticle(pdg, kInitialState); }; template <size_t N> inline int NumISParticle(int const (&pdgs)[N]) const { return NumParticle(pdgs, kInitialState); }; /// Returns a list of indices for all particles with a given pdg /// in the initial state. These can be used with the 'GetParticle' functions. inline std::vector<int> GetAllISParticleIndices(int const pdg = -1) const { return GetAllParticleIndices(pdg, kInitialState); }; template <size_t N> inline std::vector<int> GetAllISParticleIndices(int const (&pdgs)[N]) const { return GetAllParticleIndices(pdgs, kInitialState); }; /// Returns a list of particles with a given pdg in the initial state. /// This function is more memory intensive and slower than the Indices function. inline std::vector<FitParticle*> GetAllISParticle(int const pdg = -1) { return GetAllParticle(pdg, kInitialState); }; template <size_t N> inline std::vector<FitParticle*> GetAllISParticle(int const (&pdgs)[N]) { return GetAllParticle(pdgs, kInitialState); }; /// Returns the highest momentum particle with a given pdg in the initial state. inline FitParticle* GetHMISParticle(int const pdg) { return GetHMParticle(pdg, kInitialState); }; template <size_t N> inline FitParticle* GetHMISParticle(int const (&pdgs)[N]) { return GetHMParticle(pdgs, kInitialState); }; /// Returns the highest momentum particle index with a given pdg in the initial state. inline int GetHMISParticleIndex(int const pdg) const { return GetHMParticleIndex(pdg, kInitialState); }; template <size_t N> inline int GetHMISParticleIndex(int const (&pdgs)[N]) const { return GetHMParticleIndex(pdgs, kInitialState); }; inline bool HasISNuElectron (void) const { return HasISParticle(12); }; inline bool HasISNuMuon (void) const { return HasISParticle(14); }; inline bool HasISNuTau (void) const { return HasISParticle(16); }; inline bool HasISElectron (void) const { return HasISParticle(11); }; inline bool HasISMuon (void) const { return HasISParticle(13); }; inline bool HasISTau (void) const { return HasISParticle(15); }; inline bool HasISProton (void) const { return HasISParticle(2212); }; inline bool HasISNeutron (void) const { return HasISParticle(2112); }; inline bool HasISPiZero (void) const { return HasISParticle(111); }; inline bool HasISPiPlus (void) const { return HasISParticle(211); }; inline bool HasISPiMinus (void) const { return HasISParticle(-211); }; inline bool HasISPhoton (void) const { return HasISParticle(22); }; inline bool HasISLeptons (void) const { return HasISParticle(PhysConst::pdg_leptons); }; inline bool HasISPions (void) const { return HasISParticle(PhysConst::pdg_pions); }; inline bool HasISChargePions (void) const { return HasISParticle(PhysConst::pdg_charged_pions); }; inline int NumISNuElectron (void) const { return NumISParticle(12); }; inline int NumISNuMuon (void) const { return NumISParticle(14); }; inline int NumISNuTau (void) const { return NumISParticle(16); }; inline int NumISElectron (void) const { return NumISParticle(11); }; inline int NumISMuon (void) const { return NumISParticle(13); }; inline int NumISTau (void) const { return NumISParticle(15); }; inline int NumISProton (void) const { return NumISParticle(2212); }; inline int NumISNeutron (void) const { return NumISParticle(2112); }; inline int NumISPiZero (void) const { return NumISParticle(111); }; inline int NumISPiPlus (void) const { return NumISParticle(211); }; inline int NumISPiMinus (void) const { return NumISParticle(-211); }; inline int NumISPhoton (void) const { return NumISParticle(22); }; inline int NumISLeptons (void) const { return NumISParticle(PhysConst::pdg_leptons); }; inline int NumISPions (void) const { return NumISParticle(PhysConst::pdg_pions); }; inline int NumISChargePions (void) const { return NumISParticle(PhysConst::pdg_charged_pions); }; inline std::vector<int> GetAllISNuElectronIndices (void) const { return GetAllISParticleIndices(12); }; inline std::vector<int> GetAllISNuMuonIndices (void) const { return GetAllISParticleIndices(14); }; inline std::vector<int> GetAllISNuTauIndices (void) const { return GetAllISParticleIndices(16); }; inline std::vector<int> GetAllISElectronIndices (void) const { return GetAllISParticleIndices(11); }; inline std::vector<int> GetAllISMuonIndices (void) const { return GetAllISParticleIndices(13); }; inline std::vector<int> GetAllISTauIndices (void) const { return GetAllISParticleIndices(15); }; inline std::vector<int> GetAllISProtonIndices (void) const { return GetAllISParticleIndices(2212); }; inline std::vector<int> GetAllISNeutronIndices (void) const { return GetAllISParticleIndices(2112); }; inline std::vector<int> GetAllISPiZeroIndices (void) const { return GetAllISParticleIndices(111); }; inline std::vector<int> GetAllISPiPlusIndices (void) const { return GetAllISParticleIndices(211); }; inline std::vector<int> GetAllISPiMinusIndices (void) const { return GetAllISParticleIndices(-211); }; inline std::vector<int> GetAllISPhotonIndices (void) const { return GetAllISParticleIndices(22); }; inline std::vector<int> GetAllISLeptonsIndices (void) const { return GetAllISParticleIndices(PhysConst::pdg_leptons); }; inline std::vector<int> GetAllISPionsIndices (void) const { return GetAllISParticleIndices(PhysConst::pdg_pions); }; inline std::vector<int> GetAllISChargePionsIndices(void) const { return GetAllISParticleIndices(PhysConst::pdg_charged_pions); }; inline std::vector<FitParticle*> GetAllISNuElectron (void) { return GetAllISParticle(12); }; inline std::vector<FitParticle*> GetAllISNuMuon (void) { return GetAllISParticle(14); }; inline std::vector<FitParticle*> GetAllISNuTau (void) { return GetAllISParticle(16); }; inline std::vector<FitParticle*> GetAllISElectron (void) { return GetAllISParticle(11); }; inline std::vector<FitParticle*> GetAllISMuon (void) { return GetAllISParticle(13); }; inline std::vector<FitParticle*> GetAllISTau (void) { return GetAllISParticle(15); }; inline std::vector<FitParticle*> GetAllISProton (void) { return GetAllISParticle(2212); }; inline std::vector<FitParticle*> GetAllISNeutron (void) { return GetAllISParticle(2112); }; inline std::vector<FitParticle*> GetAllISPiZero (void) { return GetAllISParticle(111); }; inline std::vector<FitParticle*> GetAllISPiPlus (void) { return GetAllISParticle(211); }; inline std::vector<FitParticle*> GetAllISPiMinus (void) { return GetAllISParticle(-211); }; inline std::vector<FitParticle*> GetAllISPhoton (void) { return GetAllISParticle(22); }; inline std::vector<FitParticle*> GetAllISLeptons (void) { return GetAllISParticle(PhysConst::pdg_leptons); }; inline std::vector<FitParticle*> GetAllISPions (void) { return GetAllISParticle(PhysConst::pdg_pions); }; inline std::vector<FitParticle*> GetAllISChargePions(void) { return GetAllISParticle(PhysConst::pdg_charged_pions); }; inline FitParticle* GetHMISNuElectron (void) { return GetHMISParticle(12); }; inline FitParticle* GetHMISNuMuon (void) { return GetHMISParticle(14); }; inline FitParticle* GetHMISNuTau (void) { return GetHMISParticle(16); }; inline FitParticle* GetHMISElectron (void) { return GetHMISParticle(11); }; inline FitParticle* GetHMISMuon (void) { return GetHMISParticle(13); }; inline FitParticle* GetHMISTau (void) { return GetHMISParticle(15); }; inline FitParticle* GetHMISProton (void) { return GetHMISParticle(2212); }; inline FitParticle* GetHMISNeutron (void) { return GetHMISParticle(2112); }; inline FitParticle* GetHMISPiZero (void) { return GetHMISParticle(111); }; inline FitParticle* GetHMISPiPlus (void) { return GetHMISParticle(211); }; inline FitParticle* GetHMISPiMinus (void) { return GetHMISParticle(-211); }; inline FitParticle* GetHMISPhoton (void) { return GetHMISParticle(22); }; inline FitParticle* GetHMISLeptons (void) { return GetHMISParticle(PhysConst::pdg_leptons); }; inline FitParticle* GetHMISPions (void) { return GetHMISParticle(PhysConst::pdg_pions); }; inline FitParticle* GetHMISChargePions(void) { return GetHMISParticle(PhysConst::pdg_charged_pions); }; inline int GetHMISNuElectronIndex (void) { return GetHMISParticleIndex(12); }; inline int GetHMISNuMuonIndex (void) { return GetHMISParticleIndex(14); }; inline int GetHMISNuTauIndex (void) { return GetHMISParticleIndex(16); }; inline int GetHMISElectronIndex (void) { return GetHMISParticleIndex(11); }; inline int GetHMISMuonIndex (void) { return GetHMISParticleIndex(13); }; inline int GetHMISTauIndex (void) { return GetHMISParticleIndex(15); }; inline int GetHMISProtonIndex (void) { return GetHMISParticleIndex(2212); }; inline int GetHMISNeutronIndex (void) { return GetHMISParticleIndex(2112); }; inline int GetHMISPiZeroIndex (void) { return GetHMISParticleIndex(111); }; inline int GetHMISPiPlusIndex (void) { return GetHMISParticleIndex(211); }; inline int GetHMISPiMinusIndex (void) { return GetHMISParticleIndex(-211); }; inline int GetHMISPhotonIndex (void) { return GetHMISParticleIndex(22); }; inline int GetHMISLeptonsIndex (void) { return GetHMISParticleIndex(PhysConst::pdg_leptons); }; inline int GetHMISPionsIndex (void) { return GetHMISParticleIndex(PhysConst::pdg_pions); }; inline int GetHMISChargePionsIndex(void) { return GetHMISParticleIndex(PhysConst::pdg_charged_pions); }; // ---- Final State Helpers --- // inline bool HasFSParticle(int const pdg) const { return HasParticle(pdg, kFinalState); }; template <size_t N> inline bool HasFSParticle(int const (&pdgs)[N]) const { return HasParticle(pdgs, kFinalState); }; inline int NumFSParticle(int const pdg = 0) const { return NumParticle(pdg, kFinalState); }; template <size_t N> inline int NumFSParticle(int const (&pdgs)[N]) const { return NumParticle(pdgs, kFinalState); }; inline std::vector<int> GetAllFSParticleIndices(int const pdg = -1) const { return GetAllParticleIndices(pdg, kFinalState); }; template <size_t N> inline std::vector<int> GetAllFSParticleIndices(int const (&pdgs)[N]) const { return GetAllParticleIndices(pdgs, kFinalState); }; inline std::vector<FitParticle*> GetAllFSParticle(int const pdg = -1) { return GetAllParticle(pdg, kFinalState); }; template <size_t N> inline std::vector<FitParticle*> GetAllFSParticle(int const (&pdgs)[N]) { return GetAllParticle(pdgs, kFinalState); }; inline FitParticle* GetHMFSParticle(int const pdg) { return GetHMParticle(pdg, kFinalState); }; template <size_t N> inline FitParticle* GetHMFSParticle(int const (&pdgs)[N]) { return GetHMParticle(pdgs, kFinalState); }; inline int GetHMFSParticleIndex(int const pdg) const { return GetHMParticleIndex(pdg, kFinalState); }; template <size_t N> inline int GetHMFSParticleIndex(int const (&pdgs)[N]) const { return GetHMParticleIndex(pdgs, kFinalState); }; inline bool HasFSNuElectron (void) const { return HasFSParticle(12); }; inline bool HasFSNuMuon (void) const { return HasFSParticle(14); }; inline bool HasFSNuTau (void) const { return HasFSParticle(16); }; inline bool HasFSElectron (void) const { return HasFSParticle(11); }; inline bool HasFSMuon (void) const { return HasFSParticle(13); }; inline bool HasFSTau (void) const { return HasFSParticle(15); }; inline bool HasFSProton (void) const { return HasFSParticle(2212); }; inline bool HasFSNeutron (void) const { return HasFSParticle(2112); }; inline bool HasFSPiZero (void) const { return HasFSParticle(111); }; inline bool HasFSPiPlus (void) const { return HasFSParticle(211); }; inline bool HasFSPiMinus (void) const { return HasFSParticle(-211); }; inline bool HasFSPhoton (void) const { return HasFSParticle(22); }; inline bool HasFSLeptons (void) const { return HasFSParticle(PhysConst::pdg_leptons); }; inline bool HasFSPions (void) const { return HasFSParticle(PhysConst::pdg_pions); }; inline bool HasFSChargePions (void) const { return HasFSParticle(PhysConst::pdg_charged_pions); }; inline int NumFSNuElectron (void) const { return NumFSParticle(12); }; inline int NumFSNuMuon (void) const { return NumFSParticle(14); }; inline int NumFSNuTau (void) const { return NumFSParticle(16); }; inline int NumFSElectron (void) const { return NumFSParticle(11); }; inline int NumFSMuon (void) const { return NumFSParticle(13); }; inline int NumFSTau (void) const { return NumFSParticle(15); }; inline int NumFSProton (void) const { return NumFSParticle(2212); }; inline int NumFSNeutron (void) const { return NumFSParticle(2112); }; inline int NumFSPiZero (void) const { return NumFSParticle(111); }; inline int NumFSPiPlus (void) const { return NumFSParticle(211); }; inline int NumFSPiMinus (void) const { return NumFSParticle(-211); }; inline int NumFSPhoton (void) const { return NumFSParticle(22); }; - inline int NumFSLeptons (void) const { return NumFSParticle(PhysConst::pdg_leptons); }; + int NumFSLeptons (void) const; // { return NumFSParticle(PhysConst::pdg_leptons); }; inline int NumFSPions (void) const { return NumFSParticle(PhysConst::pdg_pions); }; inline int NumFSChargePions (void) const { return NumFSParticle(PhysConst::pdg_charged_pions); }; inline std::vector<int> GetAllFSNuElectronIndices (void) const { return GetAllFSParticleIndices(12); }; inline std::vector<int> GetAllFSNuMuonIndices (void) const { return GetAllFSParticleIndices(14); }; inline std::vector<int> GetAllFSNuTauIndices (void) const { return GetAllFSParticleIndices(16); }; inline std::vector<int> GetAllFSElectronIndices (void) const { return GetAllFSParticleIndices(11); }; inline std::vector<int> GetAllFSMuonIndices (void) const { return GetAllFSParticleIndices(13); }; inline std::vector<int> GetAllFSTauIndices (void) const { return GetAllFSParticleIndices(15); }; inline std::vector<int> GetAllFSProtonIndices (void) const { return GetAllFSParticleIndices(2212); }; inline std::vector<int> GetAllFSNeutronIndices (void) const { return GetAllFSParticleIndices(2112); }; inline std::vector<int> GetAllFSPiZeroIndices (void) const { return GetAllFSParticleIndices(111); }; inline std::vector<int> GetAllFSPiPlusIndices (void) const { return GetAllFSParticleIndices(211); }; inline std::vector<int> GetAllFSPiMinusIndices (void) const { return GetAllFSParticleIndices(-211); }; inline std::vector<int> GetAllFSPhotonIndices (void) const { return GetAllFSParticleIndices(22); }; inline std::vector<int> GetAllFSLeptonsIndices (void) const { return GetAllFSParticleIndices(PhysConst::pdg_leptons); }; inline std::vector<int> GetAllFSPionsIndices (void) const { return GetAllFSParticleIndices(PhysConst::pdg_pions); }; inline std::vector<int> GetAllFSChargePionsIndices(void) const { return GetAllFSParticleIndices(PhysConst::pdg_charged_pions); }; inline std::vector<FitParticle*> GetAllFSNuElectron (void) { return GetAllFSParticle(12); }; inline std::vector<FitParticle*> GetAllFSNuMuon (void) { return GetAllFSParticle(14); }; inline std::vector<FitParticle*> GetAllFSNuTau (void) { return GetAllFSParticle(16); }; inline std::vector<FitParticle*> GetAllFSElectron (void) { return GetAllFSParticle(11); }; inline std::vector<FitParticle*> GetAllFSMuon (void) { return GetAllFSParticle(13); }; inline std::vector<FitParticle*> GetAllFSTau (void) { return GetAllFSParticle(15); }; inline std::vector<FitParticle*> GetAllFSProton (void) { return GetAllFSParticle(2212); }; inline std::vector<FitParticle*> GetAllFSNeutron (void) { return GetAllFSParticle(2112); }; inline std::vector<FitParticle*> GetAllFSPiZero (void) { return GetAllFSParticle(111); }; inline std::vector<FitParticle*> GetAllFSPiPlus (void) { return GetAllFSParticle(211); }; inline std::vector<FitParticle*> GetAllFSPiMinus (void) { return GetAllFSParticle(-211); }; inline std::vector<FitParticle*> GetAllFSPhoton (void) { return GetAllFSParticle(22); }; inline std::vector<FitParticle*> GetAllFSLeptons (void) { return GetAllFSParticle(PhysConst::pdg_leptons); }; inline std::vector<FitParticle*> GetAllFSPions (void) { return GetAllFSParticle(PhysConst::pdg_pions); }; inline std::vector<FitParticle*> GetAllFSChargePions (void) { return GetAllFSParticle(PhysConst::pdg_charged_pions); }; inline FitParticle* GetHMFSNuElectron (void) { return GetHMFSParticle(12); }; inline FitParticle* GetHMFSNuMuon (void) { return GetHMFSParticle(14); }; inline FitParticle* GetHMFSNuTau (void) { return GetHMFSParticle(16); }; inline FitParticle* GetHMFSElectron (void) { return GetHMFSParticle(11); }; inline FitParticle* GetHMFSMuon (void) { return GetHMFSParticle(13); }; inline FitParticle* GetHMFSTau (void) { return GetHMFSParticle(15); }; inline FitParticle* GetHMFSProton (void) { return GetHMFSParticle(2212); }; inline FitParticle* GetHMFSNeutron (void) { return GetHMFSParticle(2112); }; inline FitParticle* GetHMFSPiZero (void) { return GetHMFSParticle(111); }; inline FitParticle* GetHMFSPiPlus (void) { return GetHMFSParticle(211); }; inline FitParticle* GetHMFSPiMinus (void) { return GetHMFSParticle(-211); }; inline FitParticle* GetHMFSPhoton (void) { return GetHMFSParticle(22); }; inline FitParticle* GetHMFSLeptons (void) { return GetHMFSParticle(PhysConst::pdg_leptons); }; inline FitParticle* GetHMFSPions (void) { return GetHMFSParticle(PhysConst::pdg_pions); }; inline FitParticle* GetHMFSChargePions(void) { return GetHMFSParticle(PhysConst::pdg_charged_pions); }; inline int GetHMFSNuElectronIndex (void) const { return GetHMFSParticleIndex(12); }; inline int GetHMFSNuMuonIndex (void) const { return GetHMFSParticleIndex(14); }; inline int GetHMFSNuTauIndex (void) const { return GetHMFSParticleIndex(16); }; inline int GetHMFSElectronIndex (void) const { return GetHMFSParticleIndex(11); }; inline int GetHMFSMuonIndex (void) const { return GetHMFSParticleIndex(13); }; inline int GetHMFSTauIndex (void) const { return GetHMFSParticleIndex(15); }; inline int GetHMFSProtonIndex (void) const { return GetHMFSParticleIndex(2212); }; inline int GetHMFSNeutronIndex (void) const { return GetHMFSParticleIndex(2112); }; inline int GetHMFSPiZeroIndex (void) const { return GetHMFSParticleIndex(111); }; inline int GetHMFSPiPlusIndex (void) const { return GetHMFSParticleIndex(211); }; inline int GetHMFSPiMinusIndex (void) const { return GetHMFSParticleIndex(-211); }; inline int GetHMFSPhotonIndex (void) const { return GetHMFSParticleIndex(22); }; inline int GetHMFSLeptonsIndex (void) const { return GetHMFSParticleIndex(PhysConst::pdg_leptons); }; inline int GetHMFSPionsIndex (void) const { return GetHMFSParticleIndex(PhysConst::pdg_pions); }; inline int GetHMFSChargePionsIndex(void) const { return GetHMFSParticleIndex(PhysConst::pdg_charged_pions); }; // ---- NEUTRINO INCOMING Related Functions int GetBeamNeutrinoIndex (void) const; inline TLorentzVector GetBeamNeutrinoP4 (void) const { return GetParticleP4(GetBeamNeutrinoIndex()); }; inline TVector3 GetBeamNeutrinoP3 (void) const { return GetParticleP3(GetBeamNeutrinoIndex()); }; inline double GetBeamNeutrinoMom (void) const { return GetParticleMom(GetBeamNeutrinoIndex()); }; inline double GetBeamNeutrinoMom2 (void) const { return GetParticleMom2(GetBeamNeutrinoIndex()); }; inline double GetBeamNeutrinoE (void) const { return GetParticleE(GetBeamNeutrinoIndex()); }; inline double Enu (void) const { return GetBeamNeutrinoE(); }; inline int GetBeamNeutrinoPDG (void) const { return GetParticlePDG(GetBeamNeutrinoIndex()); }; inline int PDGnu (void) const { return GetBeamNeutrinoPDG(); }; inline int GetNeutrinoInPos (void) const { return GetBeamNeutrinoIndex(); }; inline FitParticle* GetBeamNeutrino (void) { return GetParticle(GetBeamNeutrinoIndex()); }; inline FitParticle* GetNeutrinoIn (void) { return GetParticle(GetBeamNeutrinoIndex()); }; // ---- Electron INCOMING Related Functions int GetBeamElectronIndex (void) const; inline TLorentzVector GetBeamElectronP4 (void) const { return GetParticleP4(GetBeamElectronIndex()); }; inline TVector3 GetBeamElectronP3 (void) const { return GetParticleP3(GetBeamElectronIndex()); }; inline double GetBeamElectronMom (void) const { return GetParticleMom(GetBeamElectronIndex()); }; inline double GetBeamElectronMom2 (void) const { return GetParticleMom2(GetBeamElectronIndex()); }; inline double GetBeamElectronE (void) const { return GetParticleE(GetBeamElectronIndex()); }; inline FitParticle* GetBeamElectron (void) { return GetParticle(GetBeamElectronIndex()); }; // ---- Pion INCOMING Functions int GetBeamPionIndex (void) const; inline TLorentzVector GetBeamPionP4 (void) const { return GetParticleP4(GetBeamPionIndex()); }; inline TVector3 GetBeamPionP3 (void) const { return GetParticleP3(GetBeamPionIndex()); }; inline double GetBeamPionMom (void) const { return GetParticleMom(GetBeamPionIndex()); }; inline double GetBeamPionMom2 (void) const { return GetParticleMom2(GetBeamPionIndex()); }; inline double GetBeamPionE (void) const { return GetParticleE(GetBeamPionIndex()); }; inline FitParticle* GetBeamPion (void) { return GetParticle(GetBeamPionIndex()); }; /// Legacy Functions inline FitParticle* PartInfo(uint i) { return GetParticle(i); }; inline UInt_t Npart (void) const { return NPart(); }; inline UInt_t NPart (void) const { return fNParticles; }; // Other Functions int NumFSMesons(); inline int GetBeamPartPos(void) const { return 0; }; FitParticle* GetBeamPart(void); int GetLeptonOutPos(void) const; FitParticle* GetLeptonOut(void); // Event Information double weight; // need for silly reason int Mode; // Public access needed int fMode; UInt_t fEventNo; double fTotCrs; int fTargetA; int fTargetZ; int fTargetH; bool fBound; int fDistance; int fTargetPDG; // Reduced Particle Stack UInt_t kMaxParticles; int fNParticles; double** fParticleMom; UInt_t* fParticleState; int* fParticlePDG; FitParticle** fParticleList; double** fOrigParticleMom; UInt_t* fOrigParticleState; int* fOrigParticlePDG; double* fNEUT_ParticleStatusCode; double* fNEUT_ParticleAliveCode; GeneratorInfoBase* fGenInfo; // Config Options for this class bool kRemoveFSIParticles; bool kRemoveUndefParticles; }; /*! @} */ #endif diff --git a/src/InputHandler/FitParticle.cxx b/src/InputHandler/FitParticle.cxx index 6e967ce..54b3ffb 100644 --- a/src/InputHandler/FitParticle.cxx +++ b/src/InputHandler/FitParticle.cxx @@ -1,51 +1,53 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "FitParticle.h" FitParticle::FitParticle(double x, double y, double z, double t, int pdg, Int_t state){ fP = TLorentzVector(x, y, z, t); fPID = pdg; fStatus = state; // Set status manually from switch switch(state){ case kInitialState: fIsAlive= 0; fNEUTStatusCode=1; break; // Initial State case kFinalState: fIsAlive= 1; fNEUTStatusCode=0; break; // Final State case kFSIState: fIsAlive= 0; fNEUTStatusCode=2; break; // Intermediate State default: fIsAlive=0; fNEUTStatusCode=999; break; // Other? + // default: fIsAlive=-1; fNEUTStatusCode=3; break; } }; void FitParticle::SetValues(double x, double y, double z, double t, int pdg, Int_t state){ fP = TLorentzVector(x, y, z, t); fPID = pdg; fStatus = state; // Set status manually from switch switch(state){ case kInitialState: fIsAlive= 0; fNEUTStatusCode=1; break; // Initial State case kFinalState: fIsAlive= 1; fNEUTStatusCode=0; break; // Final State case kFSIState: fIsAlive= 0; fNEUTStatusCode=2; break; // Intermediate State default: fIsAlive=0; fNEUTStatusCode=999; break; // Other? + // default: fIsAlive=-1; fNEUTStatusCode=3; break; } }; diff --git a/src/InputHandler/GENIEInputHandler.cxx b/src/InputHandler/GENIEInputHandler.cxx index 112c8f1..7508692 100644 --- a/src/InputHandler/GENIEInputHandler.cxx +++ b/src/InputHandler/GENIEInputHandler.cxx @@ -1,381 +1,382 @@ #include "GENIEInputHandler.h" #ifdef __GENIE_ENABLED__ GENIEGeneratorInfo::~GENIEGeneratorInfo() { DeallocateParticleStack(); } void GENIEGeneratorInfo::AddBranchesToTree(TTree* tn) { tn->Branch("GenieParticlePDGs", &fGenieParticlePDGs, "GenieParticlePDGs/I"); } void GENIEGeneratorInfo::SetBranchesFromTree(TTree* tn) { tn->SetBranchAddress("GenieParticlePDGs", &fGenieParticlePDGs); } void GENIEGeneratorInfo::AllocateParticleStack(int stacksize) { fGenieParticlePDGs = new int[stacksize]; } void GENIEGeneratorInfo::DeallocateParticleStack() { delete fGenieParticlePDGs; } void GENIEGeneratorInfo::FillGeneratorInfo(NtpMCEventRecord* ntpl) { Reset(); // Check for GENIE Event if (!ntpl) return; if (!ntpl->event) return; // Cast Event Record GHepRecord* ghep = static_cast<GHepRecord*>(ntpl->event); if (!ghep) return; // Fill Particle Stack GHepParticle* p = 0; TObjArrayIter iter(ghep); // Loop over all particles int i = 0; while ((p = (dynamic_cast<genie::GHepParticle*>((iter).Next())))) { if (!p) continue; // Get PDG fGenieParticlePDGs[i] = p->Pdg(); i++; } } void GENIEGeneratorInfo::Reset() { for (int i = 0; i < kMaxParticles; i++) { fGenieParticlePDGs[i] = 0; } } GENIEInputHandler::GENIEInputHandler(std::string const& handle, std::string const& rawinputs) { LOG(SAM) << "Creating GENIEInputHandler : " << handle << std::endl; // Run a joint input handling fName = handle; // Setup the TChain fGENIETree = new TChain("gtree"); fSaveExtra = FitPar::Config().GetParB("SaveExtraGenie"); fCacheSize = FitPar::Config().GetParI("CacheSize"); // Loop over all inputs and grab flux, eventhist, and nevents std::vector<std::string> inputs = InputUtils::ParseInputFileList(rawinputs); for (size_t inp_it = 0; inp_it < inputs.size(); ++inp_it) { // Open File for histogram access TFile* inp_file = new TFile(InputUtils::ExpandInputDirectories(inputs[inp_it]).c_str(), "READ"); if (!inp_file or inp_file->IsZombie()) { THROW( "GENIE File IsZombie() at : '" << inputs[inp_it] << "'" << std::endl << "Check that your file paths are correct and the file exists!" << std::endl << "$ ls -lh " << inputs[inp_it] ); } // Get Flux/Event hist TH1D* fluxhist = (TH1D*)inp_file->Get("nuisance_flux"); TH1D* eventhist = (TH1D*)inp_file->Get("nuisance_events"); if (!fluxhist or !eventhist) { ERROR(FTL, "Input File Contents: " << inputs[inp_it] ); inp_file->ls(); THROW( "GENIE FILE doesn't contain flux/xsec info." << std::endl << "Try running the app PrepareGENIE first on :" << inputs[inp_it] << std::endl << "$ PrepareGENIE -h" ); } // Get N Events TTree* genietree = (TTree*)inp_file->Get("gtree"); if (!genietree) { ERROR(FTL, "gtree not located in GENIE file: " << inputs[inp_it]); THROW("Check your inputs, they may need to be completely regenerated!"); throw; } int nevents = genietree->GetEntries(); if (nevents <= 0){ THROW("Trying to a TTree with " << nevents << " to TChain from : " << inputs[inp_it]); } // Register input to form flux/event rate hists RegisterJointInput(inputs[inp_it], nevents, fluxhist, eventhist); // Add To TChain fGENIETree->AddFile( inputs[inp_it].c_str() ); } // Registor all our file inputs SetupJointInputs(); // Assign to tree fEventType = kGENIE; fGenieNtpl = NULL; fGENIETree->SetBranchAddress("gmcrec", &fGenieNtpl); - + fGENIETree->GetEntry(0); + // Create Fit Event fNUISANCEEvent = new FitEvent(); fNUISANCEEvent->SetGenieEvent(fGenieNtpl); if (fSaveExtra) { fGenieInfo = new GENIEGeneratorInfo(); fNUISANCEEvent->AddGeneratorInfo(fGenieInfo); } fNUISANCEEvent->HardReset(); }; GENIEInputHandler::~GENIEInputHandler() { if (fGenieGHep) delete fGenieGHep; if (fGenieNtpl) delete fGenieNtpl; if (fGENIETree) delete fGENIETree; if (fGenieInfo) delete fGenieInfo; } void GENIEInputHandler::CreateCache() { if (fCacheSize > 0) { // fGENIETree->SetCacheEntryRange(0, fNEvents); fGENIETree->AddBranchToCache("*", 1); fGENIETree->SetCacheSize(fCacheSize); } } void GENIEInputHandler::RemoveCache() { // fGENIETree->SetCacheEntryRange(0, fNEvents); fGENIETree->AddBranchToCache("*", 0); fGENIETree->SetCacheSize(0); } FitEvent* GENIEInputHandler::GetNuisanceEvent(const UInt_t entry, const bool lightweight) { if (entry >= (UInt_t)fNEvents) return NULL; // Read Entry from TTree to fill NEUT Vect in BaseFitEvt; fGENIETree->GetEntry(entry); // Setup Input scaling for joint inputs fNUISANCEEvent->InputWeight = GetInputWeight(entry); // Run NUISANCE Vector Filler if (!lightweight) { CalcNUISANCEKinematics(); } return fNUISANCEEvent; } int GENIEInputHandler::GetGENIEParticleStatus(genie::GHepParticle* p, int mode) { /* kIStUndefined = -1, kIStInitialState = 0, / generator-level initial state / kIStStableFinalState = 1, / generator-level final state: particles to be tracked by detector-level MC / kIStIntermediateState = 2, kIStDecayedState = 3, kIStCorrelatedNucleon = 10, kIStNucleonTarget = 11, kIStDISPreFragmHadronicState = 12, kIStPreDecayResonantState = 13, kIStHadronInTheNucleus = 14, / hadrons inside the nucleus: marked for hadron transport modules to act on / kIStFinalStateNuclearRemnant = 15, / low energy nuclear fragments entering the record collectively as a 'hadronic blob' pseudo-particle / kIStNucleonClusterTarget = 16, // for composite nucleons before phase space decay */ int state = kUndefinedState; switch (p->Status()) { case genie::kIStNucleonTarget: case genie::kIStInitialState: case genie::kIStCorrelatedNucleon: case genie::kIStNucleonClusterTarget: state = kInitialState; break; case genie::kIStStableFinalState: state = kFinalState; break; case genie::kIStHadronInTheNucleus: if (abs(mode) == 2) state = kInitialState; else state = kFSIState; break; case genie::kIStPreDecayResonantState: case genie::kIStDISPreFragmHadronicState: case genie::kIStIntermediateState: state = kFSIState; break; case genie::kIStFinalStateNuclearRemnant: case genie::kIStUndefined: case genie::kIStDecayedState: default: break; } // Flag to remove nuclear part in genie if (p->Pdg() > 1000000) { if (state == kInitialState) state = kNuclearInitial; else if (state == kFinalState) state = kNuclearRemnant; } return state; } #endif #ifdef __GENIE_ENABLED__ int GENIEInputHandler::ConvertGENIEReactionCode(GHepRecord* gheprec) { // Electron Scattering if (gheprec->Summary()->ProcInfo().IsEM()) { if (gheprec->Summary()->InitState().ProbePdg() == 11) { if (gheprec->Summary()->ProcInfo().IsQuasiElastic()) return 1; else if (gheprec->Summary()->ProcInfo().IsMEC()) return 2; else if (gheprec->Summary()->ProcInfo().IsResonant()) return 13; else if (gheprec->Summary()->ProcInfo().IsDeepInelastic()) return 26; else { ERROR(WRN, "Unknown GENIE Electron Scattering Mode!" << std::endl << "ScatteringTypeId = " << gheprec->Summary()->ProcInfo().ScatteringTypeId() << " " << "InteractionTypeId = " << gheprec->Summary()->ProcInfo().InteractionTypeId() << std::endl << genie::ScatteringType::AsString(gheprec->Summary()->ProcInfo().ScatteringTypeId()) << " " << genie::InteractionType::AsString(gheprec->Summary()->ProcInfo().InteractionTypeId()) << " " << gheprec->Summary()->ProcInfo().IsMEC()); return 0; } } // Weak CC } else if (gheprec->Summary()->ProcInfo().IsWeakCC()) { // CC MEC if (gheprec->Summary()->ProcInfo().IsMEC()) { if (pdg::IsNeutrino(gheprec->Summary()->InitState().ProbePdg())) return 2; else if (pdg::IsAntiNeutrino(gheprec->Summary()->InitState().ProbePdg())) return -2; // CC OTHER } else { return utils::ghep::NeutReactionCode(gheprec); } // Weak NC } else if (gheprec->Summary()->ProcInfo().IsWeakNC()) { // NC MEC if (gheprec->Summary()->ProcInfo().IsMEC()) { if (pdg::IsNeutrino(gheprec->Summary()->InitState().ProbePdg())) return 32; else if (pdg::IsAntiNeutrino(gheprec->Summary()->InitState().ProbePdg())) return -32; // NC OTHER } else { return utils::ghep::NeutReactionCode(gheprec); } } return 0; } void GENIEInputHandler::CalcNUISANCEKinematics() { // Reset all variables fNUISANCEEvent->ResetEvent(); // Check for GENIE Event if (!fGenieNtpl) return; if (!fGenieNtpl->event) return; // Cast Event Record fGenieGHep = static_cast<GHepRecord*>(fGenieNtpl->event); if (!fGenieGHep) return; // Convert GENIE Reaction Code fNUISANCEEvent->fMode = ConvertGENIEReactionCode(fGenieGHep); // Set Event Info fNUISANCEEvent->Mode = fNUISANCEEvent->fMode; fNUISANCEEvent->fEventNo = 0.0; fNUISANCEEvent->fTotCrs = fGenieGHep->XSec(); fNUISANCEEvent->fTargetA = 0.0; fNUISANCEEvent->fTargetZ = 0.0; fNUISANCEEvent->fTargetH = 0; fNUISANCEEvent->fBound = 0.0; fNUISANCEEvent->InputWeight = 1.0; //(1E+38 / genie::units::cm2) * fGenieGHep->XSec(); // Get N Particle Stack unsigned int npart = fGenieGHep->GetEntries(); unsigned int kmax = fNUISANCEEvent->kMaxParticles; if (npart > kmax) { ERR(WRN) << "GENIE has too many particles, expanding stack." << std::endl; fNUISANCEEvent->ExpandParticleStack(npart); } // Fill Particle Stack GHepParticle* p = 0; TObjArrayIter iter(fGenieGHep); fNUISANCEEvent->fNParticles = 0; // Loop over all particles while ((p = (dynamic_cast<genie::GHepParticle*>((iter).Next())))) { if (!p) continue; // Get Status int state = GetGENIEParticleStatus(p, fNUISANCEEvent->fMode); // Remove Undefined if (kRemoveUndefParticles && state == kUndefinedState) continue; // Remove FSI if (kRemoveFSIParticles && state == kFSIState) continue; if (kRemoveNuclearParticles && (state == kNuclearInitial || state == kNuclearRemnant)) continue; // Fill Vectors int curpart = fNUISANCEEvent->fNParticles; fNUISANCEEvent->fParticleState[curpart] = state; // Mom fNUISANCEEvent->fParticleMom[curpart][0] = p->Px() * 1.E3; fNUISANCEEvent->fParticleMom[curpart][1] = p->Py() * 1.E3; fNUISANCEEvent->fParticleMom[curpart][2] = p->Pz() * 1.E3; fNUISANCEEvent->fParticleMom[curpart][3] = p->E() * 1.E3; // PDG fNUISANCEEvent->fParticlePDG[curpart] = p->Pdg(); // Add to N particle count fNUISANCEEvent->fNParticles++; // Extra Check incase GENIE fails. if ((UInt_t)fNUISANCEEvent->fNParticles == kmax) { ERR(WRN) << "Number of GENIE Particles exceeds maximum!" << std::endl; ERR(WRN) << "Extend kMax, or run without including FSI particles!" << std::endl; break; } } // Fill Extra Stack if (fSaveExtra) fGenieInfo->FillGeneratorInfo(fGenieNtpl); // Run Initial, FSI, Final, Other ordering. fNUISANCEEvent-> OrderStack(); return; } void GENIEInputHandler::Print() { } #endif diff --git a/src/InputHandler/InputHandler.cxx b/src/InputHandler/InputHandler.cxx index c6b0b79..77f43df 100644 --- a/src/InputHandler/InputHandler.cxx +++ b/src/InputHandler/InputHandler.cxx @@ -1,258 +1,260 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "InputHandler.h" InputHandlerBase::InputHandlerBase() { fName = ""; fFluxHist = NULL; fEventHist = NULL; fNEvents = 0; fNUISANCEEvent = NULL; fBaseEvent = NULL; kRemoveUndefParticles = FitPar::Config().GetParB("RemoveUndefParticles"); kRemoveFSIParticles = FitPar::Config().GetParB("RemoveFSIParticles"); kRemoveNuclearParticles = FitPar::Config().GetParB("RemoveNuclearParticles"); fMaxEvents = FitPar::Config().GetParI("MAXEVENTS"); - fTTreePerformance= NULL; + fTTreePerformance = NULL; }; InputHandlerBase::~InputHandlerBase() { - if (fFluxHist) delete fFluxHist; - if (fEventHist) delete fEventHist; - if (fXSecHist) delete fXSecHist; - if (fNUISANCEEvent) delete fNUISANCEEvent; - jointfluxinputs.clear(); - jointeventinputs.clear(); - jointindexlow.clear(); - jointindexhigh.clear(); - jointindexallowed.clear(); - jointindexscale.clear(); - - if (fTTreePerformance){ - fTTreePerformance->SaveAs(("ttreeperfstats_" + fName + ".root").c_str()); - } + if (fFluxHist) delete fFluxHist; + if (fEventHist) delete fEventHist; + if (fXSecHist) delete fXSecHist; + if (fNUISANCEEvent) delete fNUISANCEEvent; + jointfluxinputs.clear(); + jointeventinputs.clear(); + jointindexlow.clear(); + jointindexhigh.clear(); + jointindexallowed.clear(); + jointindexscale.clear(); + + if (fTTreePerformance) { + fTTreePerformance->SaveAs(("ttreeperfstats_" + fName + ".root").c_str()); } +} void InputHandlerBase::Print() { }; TH1D* InputHandlerBase::GetXSecHistogram(void) { fXSecHist = (TH1D*)fFluxHist->Clone(); fXSecHist->Divide(fEventHist); return fXSecHist; }; double InputHandlerBase::PredictedEventRate(double low, double high, std::string intOpt) { int minBin = fFluxHist->GetXaxis()->FindBin(low); int maxBin = fFluxHist->GetXaxis()->FindBin(high); return fEventHist->Integral(minBin, maxBin + 1, intOpt.c_str()); }; double InputHandlerBase::TotalIntegratedFlux(double low, double high, std::string intOpt) { Int_t minBin = fFluxHist->GetXaxis()->FindFixBin(low); Int_t maxBin = fFluxHist->GetXaxis()->FindFixBin(high); if ((fFluxHist->IsBinOverflow(minBin) && (low != -9999.9))) { minBin = 1; } if ((fFluxHist->IsBinOverflow(maxBin) && (high != -9999.9))) { maxBin = fFluxHist->GetXaxis()->GetNbins() + 1; } // If we are within a single bin if (minBin == maxBin) { // Get the contained fraction of the single bin's width return ((high - low) / fFluxHist->GetXaxis()->GetBinWidth(minBin)) * fFluxHist->Integral(minBin, minBin, intOpt.c_str()); } double lowBinUpEdge = fFluxHist->GetXaxis()->GetBinUpEdge(minBin); double highBinLowEdge = fFluxHist->GetXaxis()->GetBinLowEdge(maxBin); double lowBinfracIntegral = ((lowBinUpEdge - low) / fFluxHist->GetXaxis()->GetBinWidth(minBin)) * fFluxHist->Integral(minBin, minBin, intOpt.c_str()); double highBinfracIntegral = ((high - highBinLowEdge) / fFluxHist->GetXaxis()->GetBinWidth(maxBin)) * fFluxHist->Integral(maxBin, maxBin, intOpt.c_str()); // If they are neighbouring bins if ((minBin + 1) == maxBin) { std::cout << "Get lowfrac + highfrac" << std::endl; // Get the contained fraction of the two bin's width return lowBinfracIntegral + highBinfracIntegral; } // If there are filled bins between them return lowBinfracIntegral + highBinfracIntegral + fFluxHist->Integral(minBin + 1, maxBin - 1, intOpt.c_str()); // return fFluxHist->Integral(minBin + 1, maxBin - 1, intOpt.c_str()); } std::vector<TH1*> InputHandlerBase::GetFluxList(void) { return std::vector<TH1*>(1, fFluxHist); }; std::vector<TH1*> InputHandlerBase::GetEventList(void) { return std::vector<TH1*>(1, fEventHist); }; std::vector<TH1*> InputHandlerBase::GetXSecList(void) { return std::vector<TH1*>(1, GetXSecHistogram()); }; FitEvent* InputHandlerBase::FirstNuisanceEvent() { fCurrentIndex = 0; return GetNuisanceEvent(fCurrentIndex); }; FitEvent* InputHandlerBase::NextNuisanceEvent() { fCurrentIndex++; return GetNuisanceEvent(fCurrentIndex); }; BaseFitEvt* InputHandlerBase::FirstBaseEvent() { fCurrentIndex = 0; return GetBaseEvent(fCurrentIndex); }; BaseFitEvt* InputHandlerBase::NextBaseEvent() { fCurrentIndex++; if (jointinput and fMaxEvents != -1) { while ( fCurrentIndex < jointindexlow[jointindexswitch] || fCurrentIndex >= jointindexhigh[jointindexswitch] ) { jointindexswitch++; // Loop Around if (jointindexswitch == jointindexlow.size()) { jointindexswitch = 0; } } if (fCurrentIndex > jointindexlow[jointindexswitch] + jointindexallowed[jointindexswitch]) { fCurrentIndex = jointindexlow[jointindexswitch]; } } return GetBaseEvent(fCurrentIndex); }; void InputHandlerBase::RegisterJointInput(std::string input, int n, TH1D* f, TH1D* e) { - if (jointfluxinputs.size() == 0){ + if (jointfluxinputs.size() == 0) { jointindexswitch = 0; + fNEvents = 0; } // Push into individual input vectors jointfluxinputs.push_back( (TH1D*) f->Clone() ); jointeventinputs.push_back( (TH1D*) e->Clone() ); jointindexlow.push_back(fNEvents); jointindexhigh.push_back(fNEvents + n); fNEvents += n; // Add to the total flux/event hist if (!fFluxHist) fFluxHist = (TH1D*) f->Clone(); else fFluxHist->Add(f); if (!fEventHist) fEventHist = (TH1D*) e->Clone(); else fEventHist->Add(e); } void InputHandlerBase::SetupJointInputs() { - if (jointeventinputs.size() == 1){ - jointinput = false; - } else { - jointinput= true; - } + if (jointeventinputs.size() <= 1) { + jointinput = false; + } else if (jointeventinputs.size() > 1) { + jointinput = true; + jointindexswitch = 0; + } fMaxEvents = FitPar::Config().GetParI("MAXEVENTS"); for (size_t i = 0; i < jointeventinputs.size(); i++) { TH1D* eventhist = (TH1D*) jointeventinputs.at(i)->Clone(); double scale = double(fNEvents) / fEventHist->Integral("width"); scale *= eventhist->Integral("width"); scale /= double(jointindexhigh[i] - jointindexlow[i]); jointindexscale .push_back(scale); } fEventHist->SetNameTitle((fName + "_EVT").c_str(), (fName + "_EVT").c_str()); fFluxHist->SetNameTitle((fName + "_FLUX").c_str(), (fName + "_FLUX").c_str()); // Setup Max Events if (fMaxEvents > 1 && fMaxEvents < fNEvents) { if (LOG_LEVEL(SAM)) { std::cout << "\t\t|-> Read Max Entries : " << fMaxEvents << std::endl; } fNEvents = fMaxEvents; } // Print out Status if (LOG_LEVEL(SAM)) { std::cout << "\t\t|-> Total Entries : " << fNEvents << std::endl << "\t\t|-> Event Integral : " << fEventHist->Integral("width") * 1.E-38 << " events/nucleon" << std::endl << "\t\t|-> Flux Integral : " << fFluxHist->Integral("width") << " /cm2" << std::endl << "\t\t|-> Event/Flux : " << fEventHist->Integral("width") * 1.E-38 / fFluxHist->Integral("width") << " cm2/nucleon" << std::endl; } } BaseFitEvt* InputHandlerBase::GetBaseEvent(const UInt_t entry) { return static_cast<BaseFitEvt*>(GetNuisanceEvent(entry, true)); } double InputHandlerBase::GetInputWeight(int entry) { if (!jointinput) return 1.0; // Find Switch Scale while ( entry < jointindexlow[jointindexswitch] || entry >= jointindexhigh[jointindexswitch] ) { jointindexswitch++; // Loop Around - if (jointindexswitch == jointindexlow.size()) { + if (jointindexswitch >= jointindexlow.size()) { jointindexswitch = 0; } } return jointindexscale[jointindexswitch]; }; diff --git a/src/InputHandler/NEUTInputHandler.cxx b/src/InputHandler/NEUTInputHandler.cxx index f4fea23..fb46488 100644 --- a/src/InputHandler/NEUTInputHandler.cxx +++ b/src/InputHandler/NEUTInputHandler.cxx @@ -1,435 +1,436 @@ #ifdef __NEUT_ENABLED__ #include "NEUTInputHandler.h" NEUTGeneratorInfo::~NEUTGeneratorInfo() { DeallocateParticleStack(); } void NEUTGeneratorInfo::AddBranchesToTree(TTree * tn) { tn->Branch("NEUTParticleN", fNEUTParticleN, "NEUTParticleN/I"); tn->Branch("NEUTParticleStatusCode", fNEUTParticleStatusCode, "NEUTParticleStatusCode[NEUTParticleN]/I"); tn->Branch("NEUTParticleAliveCode", fNEUTParticleAliveCode, "NEUTParticleAliveCode[NEUTParticleN]/I"); } void NEUTGeneratorInfo::SetBranchesFromTree(TTree* tn) { tn->SetBranchAddress("NEUTParticleN", &fNEUTParticleN ); tn->SetBranchAddress("NEUTParticleStatusCode", &fNEUTParticleStatusCode ); tn->SetBranchAddress("NEUTParticleAliveCode", &fNEUTParticleAliveCode ); } void NEUTGeneratorInfo::AllocateParticleStack(int stacksize) { fNEUTParticleN = 0; fNEUTParticleStatusCode = new int[stacksize]; fNEUTParticleStatusCode = new int[stacksize]; } void NEUTGeneratorInfo::DeallocateParticleStack() { delete fNEUTParticleStatusCode; delete fNEUTParticleAliveCode; } void NEUTGeneratorInfo::FillGeneratorInfo(NeutVect* nevent) { Reset(); for (int i = 0; i < nevent->Npart(); i++) { fNEUTParticleStatusCode[i] = nevent->PartInfo(i)->fStatus; fNEUTParticleAliveCode[i] = nevent->PartInfo(i)->fIsAlive; fNEUTParticleN++; } } void NEUTGeneratorInfo::Reset() { for (int i = 0; i < fNEUTParticleN; i++) { fNEUTParticleStatusCode[i] = -1; fNEUTParticleAliveCode[i] = 9; } fNEUTParticleN = 0; } NEUTInputHandler::NEUTInputHandler(std::string const& handle, std::string const& rawinputs) { LOG(SAM) << "Creating NEUTInputHandler : " << handle << std::endl; // Run a joint input handling fName = handle; // Setup the TChain fNEUTTree = new TChain("neuttree"); fSaveExtra = FitPar::Config().GetParB("SaveExtraNEUT"); fCacheSize = FitPar::Config().GetParI("CacheSize"); fMaxEvents = FitPar::Config().GetParI("MAXEVENTS"); // Loop over all inputs and grab flux, eventhist, and nevents std::vector<std::string> inputs = InputUtils::ParseInputFileList(rawinputs); for (size_t inp_it = 0; inp_it < inputs.size(); ++inp_it) { // Open File for histogram access TFile* inp_file = new TFile(inputs[inp_it].c_str(), "READ"); if (!inp_file or inp_file->IsZombie()) { THROW( "NEUT File IsZombie() at : '" << inputs[inp_it] << "'" << std::endl << "Check that your file paths are correct and the file exists!" << std::endl << "$ ls -lh " << inputs[inp_it] ); } // Get Flux/Event hist TH1D* fluxhist = (TH1D*)inp_file->Get( (PlotUtils::GetObjectWithName(inp_file, "flux")).c_str()); TH1D* eventhist = (TH1D*)inp_file->Get( (PlotUtils::GetObjectWithName(inp_file, "evt")).c_str()); if (!fluxhist or !eventhist) { ERROR(FTL, "Input File Contents: " << inputs[inp_it] ); inp_file->ls(); THROW( "NEUT FILE doesn't contain flux/xsec info. You may have to regenerate your MC!" ); } // Get N Events TTree* neuttree = (TTree*)inp_file->Get("neuttree"); if (!neuttree) { ERROR(FTL, "neuttree not located in NEUT file: " << inputs[inp_it]); THROW("Check your inputs, they may need to be completely regenerated!"); throw; } int nevents = neuttree->GetEntries(); if (nevents <= 0) { THROW("Trying to a TTree with " << nevents << " to TChain from : " << inputs[inp_it]); } // Register input to form flux/event rate hists RegisterJointInput(inputs[inp_it], nevents, fluxhist, eventhist); // Add To TChain fNEUTTree->AddFile( inputs[inp_it].c_str() ); } // Registor all our file inputs SetupJointInputs(); // Assign to tree fEventType = kNEUT; fNeutVect = NULL; fNEUTTree->SetBranchAddress("vectorbranch", &fNeutVect); + fNEUTTree->GetEntry(0); // Create Fit Event fNUISANCEEvent = new FitEvent(); fNUISANCEEvent->SetNeutVect(fNeutVect); if (fSaveExtra) { fNeutInfo = new NEUTGeneratorInfo(); fNUISANCEEvent->AddGeneratorInfo(fNeutInfo); } fNUISANCEEvent->HardReset(); }; NEUTInputHandler::~NEUTInputHandler() { if (fNEUTTree) delete fNEUTTree; if (fNeutVect) delete fNeutVect; if (fNeutInfo) delete fNeutInfo; }; void NEUTInputHandler::CreateCache() { if (fCacheSize > 0) { // fNEUTTree->SetCacheEntryRange(0, fNEvents); fNEUTTree->AddBranchToCache("vectorbranch", 1); fNEUTTree->SetCacheSize(fCacheSize); } } void NEUTInputHandler::RemoveCache() { // fNEUTTree->SetCacheEntryRange(0, fNEvents); fNEUTTree->AddBranchToCache("vectorbranch", 0); fNEUTTree->SetCacheSize(0); } FitEvent* NEUTInputHandler::GetNuisanceEvent(const UInt_t entry, const bool lightweight) { // Catch too large entries if (entry >= (UInt_t)fNEvents) return NULL; // Read Entry from TTree to fill NEUT Vect in BaseFitEvt; fNEUTTree->GetEntry(entry); // Setup Input scaling for joint inputs fNUISANCEEvent->InputWeight = GetInputWeight(entry); // Run NUISANCE Vector Filler if (!lightweight) { CalcNUISANCEKinematics(); } // Return event pointer return fNUISANCEEvent; } int NEUTInputHandler::GetNeutParticleStatus(NeutPart * part) { // State int state = kUndefinedState; // fStatus == -1 means initial state if (part->fIsAlive == false && part->fStatus == -1) { state = kInitialState; // NEUT has a bit of a strange convention for fIsAlive and fStatus // combinations // for NC and neutrino particle isAlive true/false and status 2 means // final state particle // for other particles in NC status 2 means it's an FSI particle // for CC it means it was an FSI particle } else if (part->fStatus == 2) { // NC case is a little strange... The outgoing neutrino might be alive or // not alive. Remaining particles with status 2 are FSI particles that // reinteracted if (abs(fNeutVect->Mode) > 30 && (abs(part->fPID) == 14 || abs(part->fPID) == 12)) { state = kFinalState; // The usual CC case } else if (part->fIsAlive == true) { state = kFSIState; } } else if (part->fIsAlive == true && part->fStatus == 2 && (abs(part->fPID) == 14 || abs(part->fPID) == 12)) { state = kFinalState; } else if (part->fIsAlive == true && part->fStatus == 0) { state = kFinalState; } else if (part->fIsAlive == true) { ERR(WRN) << "Undefined NEUT state " << " Alive: " << part->fIsAlive << " Status: " << part->fStatus << " PDG: " << part->fPID << std::endl; throw; } return state; } void NEUTInputHandler::CalcNUISANCEKinematics() { // Reset all variables fNUISANCEEvent->ResetEvent(); // Fill Globals fNUISANCEEvent->fMode = fNeutVect->Mode; fNUISANCEEvent->Mode = fNeutVect->Mode; fNUISANCEEvent->fEventNo = fNeutVect->EventNo; fNUISANCEEvent->fTargetA = fNeutVect->TargetA; fNUISANCEEvent->fTargetZ = fNeutVect->TargetZ; fNUISANCEEvent->fTargetH = fNeutVect->TargetH; fNUISANCEEvent->fBound = bool(fNeutVect->Ibound); if (fNUISANCEEvent->fBound) { fNUISANCEEvent->fTargetPDG = TargetUtils::GetTargetPDGFromZA(fNUISANCEEvent->fTargetZ, fNUISANCEEvent->fTargetA); } else { fNUISANCEEvent->fTargetPDG = 1000010010; } // Check Particle Stack UInt_t npart = fNeutVect->Npart(); UInt_t kmax = fNUISANCEEvent->kMaxParticles; if (npart > kmax) { ERR(FTL) << "NEUT has too many particles. Expanding stack." << std::endl; fNUISANCEEvent->ExpandParticleStack(npart); throw; } // Fill Particle Stack for (size_t i = 0; i < npart; i++) { // Get Current Count int curpart = fNUISANCEEvent->fNParticles; // Get NEUT Particle NeutPart* part = fNeutVect->PartInfo(i); // State int state = GetNeutParticleStatus(part); // Remove Undefined if (kRemoveUndefParticles && state == kUndefinedState) continue; // Remove FSI if (kRemoveFSIParticles && state == kFSIState) continue; // Remove Nuclear if (kRemoveNuclearParticles && (state == kNuclearInitial || state == kNuclearRemnant)) continue; // State fNUISANCEEvent->fParticleState[curpart] = state; // Mom fNUISANCEEvent->fParticleMom[curpart][0] = part->fP.X(); fNUISANCEEvent->fParticleMom[curpart][1] = part->fP.Y(); fNUISANCEEvent->fParticleMom[curpart][2] = part->fP.Z(); fNUISANCEEvent->fParticleMom[curpart][3] = part->fP.T(); // PDG fNUISANCEEvent->fParticlePDG[curpart] = part->fPID; // Add up particle count fNUISANCEEvent->fNParticles++; } // Save Extra Generator Info if (fSaveExtra) { fNeutInfo->FillGeneratorInfo(fNeutVect); } // Run Initial, FSI, Final, Other ordering. fNUISANCEEvent-> OrderStack(); return; } void NEUTUtils::FillNeutCommons(NeutVect* nvect) { // WARNING: This has only been implemented for a neuttree and not GENIE // This should be kept in sync with T2KNIWGUtils::GetNIWGEvent(TTree) //NEUT version info. Can't get it to compile properly with this yet //neutversion_.corev = nvect->COREVer; //neutversion_.nucev = nvect->NUCEVer; //neutversion_.nuccv = nvect->NUCCVer; // Documentation: See nework.h nework_.modene = nvect->Mode; nework_.numne = nvect->Npart(); nemdls_.mdlqeaf = nvect->QEVForm; nemdls_.mdlqe = nvect->QEModel; nemdls_.mdlspi = nvect->SPIModel; nemdls_.mdldis = nvect->DISModel; nemdls_.mdlcoh = nvect->COHModel; neutcoh_.necohepi = nvect->COHModel; nemdls_.xmaqe = nvect->QEMA; nemdls_.xmvqe = nvect->QEMV; nemdls_.kapp = nvect->KAPPA; //nemdls_.sccfv = SCCFVdef; //nemdls_.sccfa = SCCFAdef; //nemdls_.fpqe = FPQEdef; nemdls_.xmaspi = nvect->SPIMA; nemdls_.xmvspi = nvect->SPIMV; nemdls_.xmares = nvect->RESMA; nemdls_.xmvres = nvect->RESMV; neut1pi_.xmanffres = nvect->SPIMA; neut1pi_.xmvnffres = nvect->SPIMV; neut1pi_.xmarsres = nvect->RESMA; neut1pi_.xmvrsres = nvect->RESMV; neut1pi_.neiff = nvect->SPIForm; neut1pi_.nenrtype = nvect->SPINRType; neut1pi_.rneca5i = nvect->SPICA5I; neut1pi_.rnebgscl = nvect->SPIBGScale; nemdls_.xmacoh = nvect->COHMA; nemdls_.rad0nu = nvect->COHR0; //nemdls_.fa1coh = nvect->COHA1err; //nemdls_.fb1coh = nvect->COHb1err; //neutdis_.nepdf = NEPDFdef; //neutdis_.nebodek = NEBODEKdef; neutcard_.nefrmflg = nvect->FrmFlg; neutcard_.nepauflg = nvect->PauFlg; neutcard_.nenefo16 = nvect->NefO16; neutcard_.nemodflg = nvect->ModFlg; //neutcard_.nenefmodl = 1; //neutcard_.nenefmodh = 1; //neutcard_.nenefkinh = 1; //neutpiabs_.neabspiemit = 1; nenupr_.iformlen = nvect->FormLen; neutpiless_.ipilessdcy = nvect->IPilessDcy; neutpiless_.rpilessdcy = nvect->RPilessDcy; neutpiless_.ipilessdcy = nvect->IPilessDcy; neutpiless_.rpilessdcy = nvect->RPilessDcy; neffpr_.fefqe = nvect->NuceffFactorPIQE; neffpr_.fefqeh = nvect->NuceffFactorPIQEH; neffpr_.fefinel = nvect->NuceffFactorPIInel; neffpr_.fefabs = nvect->NuceffFactorPIAbs; neffpr_.fefcx = nvect->NuceffFactorPICX; neffpr_.fefcxh = nvect->NuceffFactorPICXH; neffpr_.fefcoh = nvect->NuceffFactorPICoh; neffpr_.fefqehf = nvect->NuceffFactorPIQEHKin; neffpr_.fefcxhf = nvect->NuceffFactorPICXKin; neffpr_.fefcohf = nvect->NuceffFactorPIQELKin; for ( int i = 0; i < nework_.numne; i++ ) { nework_.ipne[i] = nvect->PartInfo(i)->fPID; nework_.pne[i][0] = (float)nvect->PartInfo(i)->fP.X() / 1000; // VC(NE)WORK in M(G)eV nework_.pne[i][1] = (float)nvect->PartInfo(i)->fP.Y() / 1000; // VC(NE)WORK in M(G)eV nework_.pne[i][2] = (float)nvect->PartInfo(i)->fP.Z() / 1000; // VC(NE)WORK in M(G)eV } // fsihist.h // neutroot fills a dummy object for events with no FSI to prevent memory leak when // reading the TTree, so check for it here if ( (int)nvect->NfsiVert() == 1 ) { // An event with FSI must have at least two vertices // if (nvect->NfsiPart()!=1 || nvect->Fsiprob!=-1) // ERR(WRN) << "T2KNeutUtils::fill_neut_commons(TTree) NfsiPart!=1 or Fsiprob!=-1 when NfsiVert==1" << std::endl; fsihist_.nvert = 0; fsihist_.nvcvert = 0; fsihist_.fsiprob = 1; } else { // Real FSI event fsihist_.nvert = (int)nvect->NfsiVert(); for (int ivert = 0; ivert < fsihist_.nvert; ivert++) { fsihist_.iflgvert[ivert] = nvect->FsiVertInfo(ivert)->fVertID; fsihist_.posvert[ivert][0] = (float)nvect->FsiVertInfo(ivert)->fPos.X(); fsihist_.posvert[ivert][1] = (float)nvect->FsiVertInfo(ivert)->fPos.Y(); fsihist_.posvert[ivert][2] = (float)nvect->FsiVertInfo(ivert)->fPos.Z(); } fsihist_.nvcvert = nvect->NfsiPart(); for (int ip = 0; ip < fsihist_.nvcvert; ip++) { fsihist_.abspvert[ip] = (float)nvect->FsiPartInfo(ip)->fMomLab; fsihist_.abstpvert[ip] = (float)nvect->FsiPartInfo(ip)->fMomNuc; fsihist_.ipvert[ip] = nvect->FsiPartInfo(ip)->fPID; fsihist_.iverti[ip] = nvect->FsiPartInfo(ip)->fVertStart; fsihist_.ivertf[ip] = nvect->FsiPartInfo(ip)->fVertEnd; fsihist_.dirvert[ip][0] = (float)nvect->FsiPartInfo(ip)->fDir.X(); fsihist_.dirvert[ip][1] = (float)nvect->FsiPartInfo(ip)->fDir.Y(); fsihist_.dirvert[ip][2] = (float)nvect->FsiPartInfo(ip)->fDir.Z(); } fsihist_.fsiprob = nvect->Fsiprob; } neutcrscom_.crsx = nvect->Crsx; neutcrscom_.crsy = nvect->Crsy; neutcrscom_.crsz = nvect->Crsz; neutcrscom_.crsphi = nvect->Crsphi; neutcrscom_.crsq2 = nvect->Crsq2; neuttarget_.numbndn = nvect->TargetA - nvect->TargetZ; neuttarget_.numbndp = nvect->TargetZ; neuttarget_.numfrep = nvect->TargetH; neuttarget_.numatom = nvect->TargetA; posinnuc_.ibound = nvect->Ibound; // put empty nucleon FSI history (since it is not saved in the NeutVect format) //Comment out as NEUT does not have the necessary proton FSI information yet // nucleonfsihist_.nfnvert = 0; // nucleonfsihist_.nfnstep = 0; } #endif diff --git a/src/InputHandler/NUANCEInputHandler.cxx b/src/InputHandler/NUANCEInputHandler.cxx index cf7e4f4..178c36b 100644 --- a/src/InputHandler/NUANCEInputHandler.cxx +++ b/src/InputHandler/NUANCEInputHandler.cxx @@ -1,834 +1,835 @@ #ifdef __NUANCE_ENABLED__ #include "NUANCEInputHandler.h" NUANCEGeneratorInfo::~NUANCEGeneratorInfo() { DeallocateParticleStack(); } void NUANCEGeneratorInfo::AddBranchesToTree(TTree * tn) { // tn->Branch("NEUTParticleN", fNEUTParticleN, "NEUTParticleN/I"); // tn->Branch("NEUTParticleStatusCode", fNEUTParticleStatusCode, "NEUTParticleStatusCode[NEUTParticleN]/I"); // tn->Branch("NEUTParticleAliveCode", fNEUTParticleAliveCode, "NEUTParticleAliveCode[NEUTParticleN]/I"); } void NUANCEGeneratorInfo::SetBranchesFromTree(TTree* tn) { // tn->SetBranchAddress("NEUTParticleN", &fNEUTParticleN ); // tn->SetBranchAddress("NEUTParticleStatusCode", &fNEUTParticleStatusCode ); // tn->SetBranchAddress("NEUTParticleAliveCode", &fNEUTParticleAliveCode ); } void NUANCEGeneratorInfo::AllocateParticleStack(int stacksize) { // fNEUTParticleN = 0; // fNEUTParticleStatusCode = new int[stacksize]; // fNEUTParticleStatusCode = new int[stacksize]; } void NUANCEGeneratorInfo::DeallocateParticleStack() { // delete fNEUTParticleStatusCode; // delete fNEUTParticleAliveCode; } void NUANCEGeneratorInfo::FillGeneratorInfo(NuanceEvent* nevent) { Reset(); // for (int i = 0; i < nevent->Npart(); i++) { // fNEUTParticleStatusCode[i] = nevent->PartInfo(i)->fStatus; // fNEUTParticleAliveCode[i] = nevent->PartInfo(i)->fIsAlive; // fNEUTParticleN++; // } } void NUANCEGeneratorInfo::Reset() { // for (int i = 0; i < fNEUTParticleN; i++) { // fNEUTParticleStatusCode[i] = -1; // fNEUTParticleAliveCode[i] = 9; // } // fNEUTParticleN = 0; } NUANCEInputHandler::NUANCEInputHandler(std::string const& handle, std::string const& rawinputs) { LOG(SAM) << "Creating NUANCEInputHandler : " << handle << std::endl; // Run a joint input handling fName = handle; fSaveExtra = FitPar::Config().GetParB("SaveExtraNUANCE"); fCacheSize = FitPar::Config().GetParI("CacheSize"); fMaxEvents = FitPar::Config().GetParI("MAXEVENTS"); // Parse Inputs std::vector<std::string> inputs = InputUtils::ParseInputFileList(rawinputs); if (inputs.size() > 1) { ERR(FTL) << "NUANCE is not currently setup to handle joint inputs sorry!" << std::endl << "If you know how to correctly normalise the events for this" << " please let us know!" << std::endl; } // Read in NUANCE Tree fNUANCETree = new TChain("h3"); fNUANCETree->AddFile(rawinputs.c_str()); // Get entries and fNuwroEvent int nevents = fNUANCETree->GetEntries(); double EnuMin = 0.0; double EnuMax = 1000.0; TH1D* fluxhist = new TH1D((fName + "_FLUX").c_str(), (fName + "_FLUX").c_str(), 100, EnuMin, EnuMax); for (int i = 0; i < fluxhist->GetNbinsX(); i++) { fluxhist->SetBinContent(i + 1, 1.0); } fluxhist->Scale(1.0 / fluxhist->Integral()); TH1D* eventhist = new TH1D((fName + "_EVT").c_str(), (fName + "_EVT").c_str(), 100, EnuMin, EnuMax); for (int i = 0; i < fluxhist->GetNbinsX(); i++) { eventhist->SetBinContent(i + 1, 1.0); } eventhist->Scale(1.0 / eventhist->Integral()); RegisterJointInput( rawinputs, nevents, fluxhist, eventhist ); SetupJointInputs(); // Setup Reader fNuanceEvent = new NuanceEvent(); fNuanceEvent->SetBranchAddresses(fNUANCETree); + fNUANCETree->GetEntry(0); // Setup Event in FitEvent fNUISANCEEvent = new FitEvent(); fNUISANCEEvent->SetNuanceEvent(fNuanceEvent); // Setup extra if needed if (fSaveExtra){ ERR(FTL) << "NO SAVEExtra Implemented for NUANCE YET!" << std::endl; throw; // fNuanceInfo = new NUANCEGeneratorInfo(); // fNUISANCEEvent->AddGeneratorInfo(fNuanceInfo); } }; NUANCEInputHandler::~NUANCEInputHandler() { if (fNuanceEvent) delete fNuanceEvent; if (fNUANCETree) delete fNUANCETree; // if (fNuanceInfo) delete fNuanceInfo; } void NUANCEInputHandler::CreateCache() { if (fCacheSize > 0) { fNUANCETree->SetCacheEntryRange(0, fNEvents); fNUANCETree->AddBranchToCache("h3", 1); fNUANCETree->SetCacheSize(fCacheSize); } } void NUANCEInputHandler::RemoveCache() { fNUANCETree->SetCacheEntryRange(0, fNEvents); fNUANCETree->AddBranchToCache("h3", 0); fNUANCETree->SetCacheSize(0); } FitEvent* NUANCEInputHandler::GetNuisanceEvent(const UInt_t entry, const bool lightweight) { // Check out of bounds if (entry >= (UInt_t)fNEvents) return NULL; // Read Entry from TTree to fill NEUT Vect in BaseFitEvt; fNUANCETree->GetEntry(entry); // Setup Input scaling for joint inputs fNUISANCEEvent->InputWeight = GetInputWeight(entry); // Run NUISANCE Vector Filler if (!lightweight) { CalcNUISANCEKinematics(); } return fNUISANCEEvent; } void NUANCEInputHandler::CalcNUISANCEKinematics() { // Reset all variables fNUISANCEEvent->ResetEvent(); // Get shortened pointer FitEvent* evt = fNUISANCEEvent; // Fill Global evt->fMode = ConvertNuanceMode(fNuanceEvent); evt->Mode = evt->fMode; evt->fEventNo = 0.0; evt->fTotCrs = 1.0; evt->fTargetA = 0.0; evt->fTargetZ = 0.0; evt->fTargetH = 0; evt->fBound = 0.0; // Fill particle Stack evt->fNParticles = 0; // Check Particle Stack UInt_t npart = 2 + fNuanceEvent->n_leptons + fNuanceEvent->n_hadrons; UInt_t kmax = evt->kMaxParticles; if (npart > kmax) { ERR(FTL) << "NUANCE has too many particles" << std::endl; ERR(FTL) << "npart=" << npart << " kMax=" << kmax << std::endl; throw; } // Fill Neutrino evt->fParticleState[0] = kInitialState; evt->fParticleMom[0][0] = fNuanceEvent->p_neutrino[0]; evt->fParticleMom[0][1] = fNuanceEvent->p_neutrino[1]; evt->fParticleMom[0][2] = fNuanceEvent->p_neutrino[2]; evt->fParticleMom[0][3] = fNuanceEvent->p_neutrino[3]; evt->fParticlePDG[0] = fNuanceEvent->neutrino; // Fill Target Nucleon evt->fParticleState[1] = kInitialState; evt->fParticleMom[1][0] = fNuanceEvent->p_targ[0]; evt->fParticleMom[1][1] = fNuanceEvent->p_targ[1]; evt->fParticleMom[1][2] = fNuanceEvent->p_targ[2]; evt->fParticleMom[1][3] = fNuanceEvent->p_targ[3]; evt->fParticlePDG[1] = fNuanceEvent->target; evt->fNParticles = 2; // Fill Outgoing Leptons for (int i = 0; i < fNuanceEvent->n_leptons; i++) { evt->fParticleState[evt->fNParticles] = kFinalState; evt->fParticleMom[evt->fNParticles][0] = fNuanceEvent->p_lepton[i][0]; evt->fParticleMom[evt->fNParticles][1] = fNuanceEvent->p_lepton[i][1]; evt->fParticleMom[evt->fNParticles][2] = fNuanceEvent->p_lepton[i][2]; evt->fParticleMom[evt->fNParticles][3] = fNuanceEvent->p_lepton[i][3]; evt->fParticlePDG[evt->fNParticles] = fNuanceEvent->lepton[i]; evt->fNParticles++; } // Fill Outgoing Hadrons for (int i = 0; i < fNuanceEvent->n_hadrons; i++) { evt->fParticleState[evt->fNParticles] = kFinalState; evt->fParticleMom[evt->fNParticles][0] = fNuanceEvent->p_hadron[i][0]; evt->fParticleMom[evt->fNParticles][1] = fNuanceEvent->p_hadron[i][1]; evt->fParticleMom[evt->fNParticles][2] = fNuanceEvent->p_hadron[i][2]; evt->fParticleMom[evt->fNParticles][3] = fNuanceEvent->p_hadron[i][3]; evt->fParticlePDG[evt->fNParticles] = fNuanceEvent->hadron[i]; evt->fNParticles++; } // Save Extra info if (fSaveExtra) { // fNuanceInfo->FillGeneratorInfo(fNuanceEvent); } // Run Initial, FSI, Final, Other ordering. fNUISANCEEvent-> OrderStack(); return; } void NUANCEInputHandler::Print() {} int NUANCEInputHandler::ConvertNuanceMode(NuanceEvent * evt) { int ch = evt->channel; int sg = 1; if (evt->neutrino < 0) sg = -1; switch (ch) { // 1 NUANCE CCQE -> NEUT CCQE 1 case 1: return sg * 1; // 2 NUANCE NCEL -> NEUT NCEL 51,52 -> Set from whether target is p or n case 2: if (evt->target == 2212) return sg * 51; else return sg * 52; // 3 NUANCE CCPIP -> NEUT CCPIP 11 case 3: return sg * 11; // 4 NUANCE CCPI0 -> NEUT CCPI0 = 12 case 4: return sg * 12; // 5 NUANCE CCPIPn -> NEUT CCPIPn 13 case 5: return sg * 13; // 6 NUANCE NCpPI0 -> NEUT NCpPI0 32 case 6: return sg * 32; // 7 NUANCE NCpPI+ -> NEUT NCpPI+ 34 case 7: return sg * 34; // 8 NUANCE NCnPI0 -> NEUT NCnPI0 31 case 8: return sg * 31; // 9 NUANCE NCnPIM -> NEUT NCnPIM 33 case 9: return sg * 33; // 10 NUANCE CCPIP -> NEUT CCPIP -11 case 10: return sg * 11; // 11 NUANCE CCPI0 -> NEUT CCPI0 -12 case 11: return sg * 12; // 12 NUANCE CCPIPn -> NEUT CCPIPn 13 case 12: return sg * 13; // 13 NUANCE NCpPI0 -> NEUT NCnPI0 -32 case 13: return sg * 32; // 14 NUANCE NCpPI+ -> NEUT NCpPI+ -34 case 14: return sg * 34; // 15 NUANCE NCnPI0 -> NEUT NCnPI0 -31 case 15: return sg * 31; // 16 NUANCE NCnPIM -> NEUT NCnPIM -33 case 16: return sg * 33; // 17 NUANCE -> NEUT 21 CC MULTIPI case 17: return sg * 21; // 18 NUANCE -> NEUT 21 CC MULTIPI case 18: return sg * 21; // 19 NUANCE -> NEUT 21 CC MULTIPI case 19: return sg * 21; // 20 NUANCE -> NEUT 21 CC MULTIPI case 20: return sg * 21; // 21 NUANCE -> NEUT 21 CC MULTIPI case 21: return sg * 21; // 22 NUANCE -> NEUT 41 NC MULTIPI case 22: return sg * 41; // 23 NUANCE -> NEUT 41 NC MULTIPI case 23: return sg * 41; // 24 NUANCE -> NEUT 41 NC MULTIPI case 24: return sg * 41; // 25 NUANCE -> NEUT 41 NC MULTIPI case 25: return sg * 41; // 26 NUANCE -> NEUT 41 NC MULTIPI case 26: return sg * 41; // 27 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV) case 27: return sg * 41; // 28 NUANCE -> NEUT -21 CC (1.3 < W < 2 GeV) case 28: return sg * 21; // 29 NUANCE -> NEUT -21 CC (1.3 < W < 2 GeV) case 29: return sg * 21; // 30 NUANCE -> NEUT -21 CC (1.3 < W < 2 GeV) case 30: return sg * 21; // 31 NUANCE -> NEUT -21 CC (1.3 < W < 2 GeV) case 31: return sg * 21; // 32 NUANCE -> NEUT -21 CC (1.3 < W < 2 GeV) case 32: return sg * 21; // 33 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV) case 33: return sg * 41; // 34 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV) case 34: return sg * 41; // 35 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV) case 35: return sg * 41; // 36 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV) case 36: return sg * 41; // 37 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV) case 37: return sg * 41; // 38 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV) case 38: return sg * 41; // 39 NUANCE -> NEUT 22 case 39: return sg * 22; // 40 NUANCE -> NEUT 22 case 40: return sg * 22; // 41 NUANCE -> NEUT 22 case 41: return sg * 22; // 42 NUANCE -> NEUT 43 case 42: return sg * 43; // 43 NUANCE -> NEUT 43 case 43: return sg * 43; // 44 NUANCE -> NUET 42 case 44: return sg * 42; // 45 NUANCE -> NEUT -42 case 45: return sg * 42; // 46 NUANCE -> NEUT -22 case 46: return sg * 22; // 47 NUANCE -> NEUT -22 case 47: return sg * 22; // 48 NUANCE -> NEUT -22 case 48: return sg * 22; // 49 NUANCE -> NEUT -43 case 49: return sg * 43; // 50 NUANCE -> NEUT -43 case 50: return sg * 43; // 51 NUANCE -> NEUT -42 case 51: return sg * 42; // 52 NUANCE -> NEUT -42 case 52: return sg * 42; // 53 NUANCE -> NEUT 23 CC 1K case 53: return sg * 23; // 54 NUANCE -> NEUT 23 CC 1K case 54: return sg * 23; // 55 NUANCE -> NEUT 23 CC 1K case 55: return sg * 23; // 56 NUANCE -> NEUT 45 NC 1K case 56: return sg * 45; // 57 NUANCE -> NEUT 44 NC 1K case 57: return sg * 44; // 58 NUANCE -> NEUT 44 NC 1K case 58: return sg * 44; // 59 NUANCE -> NEUT 44 NC 1K case 59: return sg * 44; // 60 NUANCE -> NEUT -23 CC 1K case 60: return sg * 23; // 61 NUANCE -> NEUT -23 CC 1K case 61: return sg * 23; // 62 NUANCE -> NEUT -23 CC 1K case 62: return sg * 23; // 63 NUANCE -> NEUT -23 CC 1K case 63: return sg * 23; // 64 NUANCE -> NEUT -44 NC 1K case 64: return sg * 44; // 65 NUANCE -> NEUT -44 NC 1K case 65: return sg * 44; // 66 NUANCE -> NEUT -45 NC 1K case 66: return sg * 45; // 67 NUANCE -> NEUT 22 CC1eta case 67: return sg * 22; // 68 NUANCE -> NEUT 43 NC p eta case 68: return sg * 43; // 69 NUANCE -> NEUT 43 NC n eta case 69: return sg * 43; // 70 NUANCE -> NEUT -22 CC1eta case 70: return sg * 22; // 71 NUANCE -> NEUT -43 NC p eta case 71: return sg * 43; // 72 NUANCE -> NEUT 42 NC n eta case 72: return sg * 42; // 73 NUANCE -> NEUT 21 CC Multi Pi case 73: return sg * 21; // 74 NUANCE -> NEUT 41 NC Multi Pi case 74: return sg * 41; // 75 NUANCE -> NEUT 41 NC Multi Pi case 75: return sg * 41; // 76 NUANCE -> NEUT -21 CC Multi Pi case 76: return sg * 21; // 77 NUANCE -> NEUT -41 NC Multi Pi case 77: return sg * 41; // 78 NUANCE -> NEUT -41 NC Multi Pi case 78: return sg * 41; // 79 NUANCE -> NEUT 21 CC Multi Pi case 79: return sg * 21; // 80 NUANCE -> NEUT 21 CC Multi Pi case 80: return sg * 21; // 81 NUANCE -> NEUT 41 NC Multi Pi case 81: return sg * 41; // 82 NUANCE -> NEUT 41 NC Multi Pi case 82: return sg * 41; // 83 NUANCE -> NEUT 41 NC Multi Pi case 83: return sg * 41; // 84 NUANCE -> NEUT 41 NC Multi Pi case 84: return sg * 84; // 85 NUANCE -> NEUT -21 CC Multi Pi case 85: return sg * 21; // 86 NUANCE -> NEUT -21 CC Multi Pi case 86: return sg * 21; // 87 NUANCE -> NEUT -41 CC Multi Pi case 87: return sg * 41; // 88 NUANCE -> NEUT -41 case 88: return sg * 41; // 89 NUANCE -> NEUT -41 case 89: return sg * 41; // 90 NUANCE -> NEUT -41 case 90: return sg * 41; // 91 NUANCE -> NEUT 26 CC DIS case 91: return sg * 26; // 92 NUANCE -> NEUT 46 NC DIS case 92: return sg * 46; // 93 NUANCE -> NEUT 17 1#gamma from #Delta case 93: return sg * 17; // 94 NUANCE -> NEUT 39 1#gamma from #Delta case 94: return sg * 39; // 95 -> UNKOWN NEUT MODE case 95: return sg * 0; // 96 NUANCE -> NEUT 36 NC COH case 96: return sg * 36; // 97 NUANCE -> NEUT 16 case 97: return sg * 16; // 98 -> UNKNOWN NEUT MODE case 98: return sg * 0; // 99 -> UNKNOWN NEUT MODE case 99: return sg * 0; default: ERR(FTL) << "Unknown Nuance Channel ID = " << ch << std::endl; throw ("Exiting."); return 0; } return 0; } /* // Notes copied from NuanceChannels.pdf 1 NUANCE CCQE -> NEUT CCQE 1 CC, numu n --> mu- p Cabibbo-allowed quasi-elastic scattering from nucleons 2 NUANCE NCEL -> NEUT NCEL 51,52 -> Set from whether target is p or n NC, numu N --> num N, (N=n,p) (quasi)-elastic scattering from nucleons 3 NUANCE CCPIP -> NEUT CCPIP 11 CC, numu p --> mu- p pi+ resonant single pion production 4 NUANCE CCPI0 -> NEUT CCPI0 = 12 CC, numu n --> mu- p pi0 resonant single pion production 5 NUANCE CCPIPn -> NEUT CCPIPn 13 CC, numu n --> mu- n pi+ resonant single pion production 6 NUANCE NCpPI0 -> NEUT NCpPI0 32 NC, numu p --> numu p pi0 resonant single pion production 7 NUANCE NCpPI+ -> NEUT NCpPI+ 34 NC, numu p --> numu n pi+ resonant single pion production 8 NUANCE NCnPI0 -> NEUT NCnPI0 31 NC, numu n --> numu n pi0 resonant single pion production 9 NUANCE NCnPIM -> NEUT NCnPIM 33 NC, numu n --> numu p pi- resonant single pion production 10 NUANCE CCPIP -> NEUT CCPIP -11 CC, numubar p --> mu- p pi+ resonant single pion production 11 NUANCE CCPI0 -> NEUT CCPI0 -12 CC, numubar n --> mu- p pi0 resonant single pion production 12 NUANCE CCPIPn -> NEUT CCPIPn -13 CC, numubar n --> mu- n pi+ resonant single pion production 13 NUANCE NCpPI0 -> NEUT NCnPI0 -32 NC, numubar p --> numubar p pi0 resonant single pion production 14 NUANCE NCpPI+ -> NEUT NCpPI+ -34 NC, numubar p --> numubar n pi+ resonant single pion production 15 NUANCE NCnPI0 -> NEUT NCnPI0 -31 NC, numubar n --> numubar n pi0 resonant single pion production 16 NUANCE NCnPIM -> NEUT NCnPIM -33 NC, numubar n --> numubar p pi- resonant single pion production 17 NUANCE -> NEUT 21 CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi CC, numu p --> mu- Delta+ pi+ resonant processes involving more than a single pion 18 NUANCE -> NEUT 21 CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi CC, numu p --> mu- Delta++ pi0 resonant processes involving more than a single pion 19 NUANCE -> NEUT 21 CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi CC, numu n --> mu- Delta+ pi0 resonant processes involving more than a single pion 20 NUANCE -> NEUT 21 CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi CC, numu n --> mu- Delta0 pi+ resonant processes involving more than a single pion 21 NUANCE -> NEUT 21 CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi CC, numu n --> mu- Delta++ pi- resonant processes involving more than a single pion 22 NUANCE -> NEUT 41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC, numu p+ --> numu Delta+ pi0 resonant processes involving more than a single pion 23 NUANCE -> NEUT 41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC,numu p --> numu Delta0 pi+ resonant processes involving more than a single pion 24 NUANCE -> NEUT 41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC, numu p --> numu Delta++ pi- resonant processes involving more than a single pion 25 NUANCE -> NEUT 41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC, numu n --> numu Delta+ pi- resonant processes involving more than a single pion 26 NUANCE -> NEUT 41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC, numu n --> numu Delta0 pi0 resonant processes involving more than a single pion 27 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC, numubar n --> numubar Delta- pi+ resonant processes involving more than a single pion 28 NUANCE -> NEUT -21 CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi CC, numubar p --> mu- Delta+ pi+ resonant processes involving more than a single pion 29 UANCE -> NEUT -21 CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi CC, numubar p --> mu- Delta++ pi0 resonant processes involving more than a single pion 30 NUANCE -> NEUT -21 CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi CC, numubar n --> mu- Delta+ pi0 resonant processes involving more than a single pion 31 NUANCE -> NEUT -21 CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi CC, numubar n --> mu- Delta0 pi+ resonant processes involving more than a single pion 32 NUANCE -> NEUT -21 CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi CC, numubar n --> mu- Delta++ pi- resonant processes involving more than a single pion 33 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC, numubar p+ --> numubar Delta+ pi0 resonant processes involving more than a single pion 34 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC,numubar p --> numubar Delta0 pi+ resonant processes involving more than a single pion 35 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC, numubar p --> numubar Delta++ pi- resonant processes involving more than a single pion 36 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC, numubar n --> numubar Delta+ pi- resonant processes involving more than a single pion 37 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC, numubar n --> numubar Delta0 pi0 resonant processes involving more than a single pion 38 NUANCE -> NEUT -41 "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi" NC, numubar n --> numubar Delta- pi+ resonant processes involving more than a single pion // RHO Production lumped in with eta production 22 CCeta 43 NCeta on p 42 NCeta on n 39 NUANCE -> NEUT 22 CC, numu p --> mu- p rho+(770) resonant processes involving more than a single pion 40 NUANCE -> NEUT 22 CC, numu n --> mu- p rho0(770) resonant processes involving more than a single pion 41 NUANCE -> NEUT 22 CC, numu n --> mu- n rho+(770) resonant processes involving more than a single pion 42 NUANCE -> NEUT 43 NC, numu p --> numu p rho0(770) resonant processes involving more than a single pion 43 NUANCE -> NEUT 43 NC, numu p --> numu n rho+(770) resonant processes involving more than a single pion 44 NUANCE -> NUET 42 NC, numu n --> numu n rho0(770) resonant processes involving more than a single pion 45 NUANCE -> NEUT -42 NC, numubar n --> numubar p rho-(770) resonant processes involving more than a single pion 46 NUANCE -> NEUT -22 CC, numubar p --> mu- p rho+(770) resonant processes involving more than a single pion 47 NUANCE -> NEUT -22 CC, numubar n --> mu- p rho0(770) resonant processes involving more than a single pion 48 NUANCE -> NEUT -22 CC, numubar n --> mu- n rho+(770) resonant processes involving more than a single pion 49 NUANCE -> NEUT -43 NC, numubar p --> numubar p rho0(770) resonant processes involving more than a single pion 50 NUANCE -> NEUT -43 NC, numubar p --> numubar n rho+(770) resonant processes involving more than a single pion 51 NUANCE -> NEUT -42 NC, numubar n --> numubar n rho0(770) resonant processes involving more than a single pion 52 NUANCE -> NEUT -42 NC, numubar n --> numubar p rho-(770) resonant processes involving more than a single pion 53 NUANCE -> NEUT 23 CC 1K: #nu_{l} n #rightarrow l^{-} #Lambda K^{+} CC, numu p --> mu- Sigma+ K+ resonant processes involving more than a single pion 54 NUANCE -> NEUT 23 CC 1K: #nu_{l} n #rightarrow l^{-} #Lambda K^{+} CC, numu n --> mu- Sigma0 K+ resonant processes involving more than a single pion 55 NUANCE -> NEUT 23 CC 1K: #nu_{l} n #rightarrow l^{-} #Lambda K^{+} CC, numu n --> mu- Sigma+ K0 resonant processes involving more than a single pion 56 NUANCE -> NEUT 45 NC 1K: #nu_{l} n #rightarrow #nu_{l} #Lambda K^{+} NC, numu p --> numu Sigma0 K+ resonant processes involving more than a single pion 57 NUANCE -> NEUT 44 NC 1K: #nu_{l} n #rightarrow #nu_{l} #Lambda K^{0} NC, numu p --> numu Sigma+ K0 resonant processes involving more than a single pion 58 NUANCE -> NEUT 44 NC 1K: #nu_{l} n #rightarrow #nu_{l} #Lambda K^{0} NC, numu n --> numu Sigma0 K0 resonant processes involving more than a single pion 59 NUANCE -> NEUT 45 NC 1K: #nu_{l} n #rightarrow #nu_{l} #Lambda K^{+} NC, numu n --> numu Sigma- K+ resonant processes involving more than a single pion 60 NUANCE -> NEUT -23 CC 1K: #nu_{l} n #rightarrow l^{-} #Lambda K^{+} CC, numubar p --> mu- Sigma+ K+ resonant processes involving more than a single pion 61 NUANCE -> NEUT -23 CC 1K: #nu_{l} n #rightarrow l^{-} #Lambda K^{+} CC, numubar n --> mu- Sigma0 K+ resonant processes involving more than a single pion 62 NUANCE -> NEUT -23 CC 1K: #nu_{l} n #rightarrow l^{-} #Lambda K^{+} CC, numubar n --> mu- Sigma+ K0 resonant processes involving more than a single pion 63 NUANCE -> NEUT -45 NC 1K: #nu_{l} n #rightarrow #nu_{l} #Lambda K^{+} NC, numubar p --> numubar Sigma0 K+ resonant processes involving more than a single pion 64 NUANCE -> NEUT -44 NC 1K: #nu_{l} n #rightarrow #nu_{l} #Lambda K^{0} NC, numubar p --> numubar Sigma+ K0 resonant processes involving more than a single pion 65 NUANCE -> NEUT -44 NC 1K: #nu_{l} n #rightarrow #nu_{l} #Lambda K^{0} NC, numubar n --> numubar Sigma0 K0 resonant processes involving more than a single pion 66 NUANCE -> NEUT -45 NC 1K: #nu_{l} n #rightarrow #nu_{l} #Lambda K^{+} NC, numubar n --> numubar Sigma- K+ resonant processes involving more than a single pion 67 NUANCE -> NEUT 22 ModeStack[22]->SetTitle("CC1#eta^{0} on n"); CC, numu n --> mu- p eta resonant processes involving more than a single pion 68 NUANCE -> NEUT 43 NC, numu p --> numu p eta resonant processes involving more than a single pion 69 NUANCE -> NEUT 42 NC, numu n --> numu n eta resonant processes involving more than a single pion 70 NUANCE -> NEUT -22 ModeStack[22]->SetTitle("CC1#eta^{0} on n"); CC, numubar n --> mu- p eta resonant processes involving more than a single pion 71 NUANCE -> NEUT -43 ModeStack[43]->SetTitle("NC1#eta^{0} on p"); NC, numubar p --> numubar p eta resonant processes involving more than a single pion 72 NUANCE -> NEUT -42 ModeStack[42]->SetTitle("NC1#eta^{0} on n"); NC, numubar n --> numubar n eta resonant processes involving more than a single pion 73 NUANCE -> NEUT 21 ModeStack[21]->SetTitle("Multi #pi (1.3 < W < 2.0)"); CC, numu n --> mu- K+ Lambda resonant processes involving more than a single pion 74 NUANCE -> NEUT 41 ModeStack[41]->SetTitle("Multi #pi (1.3 < W < 2.0)"); NC, numu p --> numu K+ Lambda resonant processes involving more than a single pion 75 NUANCE -> NEUT 41 ModeStack[41]->SetTitle("Multi #pi (1.3 < W < 2.0)"); NC, numu n --> numu K0 Lambda resonant processes involving more than a single pion 76 NUANCE -> NEUT -21 ModeStack[21]->SetTitle("Multi #pi (1.3 < W < 2.0)"); CC, numubar n --> mu- K+ Lambda resonant processes involving more than a single pion 77 NUANCE -> NEUT -41 ModeStack[41]->SetTitle("Multi #pi (1.3 < W < 2.0)"); NC, numubar p --> numubar K+ Lambda resonant processes involving more than a single pion 78 NUANCE -> NEUT -41 ModeStack[41]->SetTitle("Multi #pi (1.3 < W < 2.0)"); NC, numubar n --> numubar K0 Lambda resonant processes involving more than a single pion CC Multipi ModeStack[21]->SetTitle("Multi #pi (1.3 < W < 2.0)"); NC Multipi ModeStack[41]->SetTitle("Multi #pi (1.3 < W < 2.0)"); 79 NUANCE -> NEUT 21 CC, numu n --> mu- p pi+ pi- two pion production 80 NUANCE -> NEUT 21 CC, numu n --> mu- p pi0 pi0 two pion production 81 NUANCE -> NEUT 41 NC, numu p --> numu p pi+ pi- two pion production 82 NUANCE -> NEUT 41 NC, numu p --> numu p pi0 pi0 two pion production 83 NUANCE -> NEUT 41 NC, numu n --> numu n pi+ pi- two pion production 84 NUANCE -> NEUT 41 NC, numu n --> numu n pi0 pi0 two pion production 85 NUANCE -> NEUT -21 CC, numubar n --> mu- p pi+ pi- two pion production 86 NUANCE -> NEUT -21 CC, numubar n --> mu- p pi0 pi0 two pion production 87 NUANCE -> NEUT -41 ModeStack[41]->SetTitle("Multi #pi (1.3 < W < 2.0)"); NC, numubar p --> numubar p pi+ pi- two pion production 88 NUANCE -> NEUT -41 ModeStack[41]->SetTitle("Multi #pi (1.3 < W < 2.0)"); NC, numubar p --> numubar p pi0 pi0 two pion production 89 NUANCE -> NEUT -41 ModeStack[41]->SetTitle("Multi #pi (1.3 < W < 2.0)"); NC, numubar n --> numubar n pi+ pi- two pion production 90 NUANCE -> NEUT -41 ModeStack[41]->SetTitle("Multi #pi (1.3 < W < 2.0)"); NC, numubar n --> numubar n pi0 pi0 two pion production 91 NUANCE -> NEUT 26 ModeStack[26]->SetTitle("DIS (W > 2.0)"); CC, numu N --> mu- X (where N=n,p) deep inelastic scattering (nu or nubar) 92 NUANCE -> NEUT 46 ModeStack[46]->SetTitle("DIS (W > 2.0)"); NC, numu N --> numu X (where N=n,p) deep inelastic scattering (nu or nubar) 93 NUANCE -> NEUT 17 1#gamma from #Delta: #nu_{l} n #rightarrow l^{-} p #gamma CC, numu n --> mu- p gamma Delta radiative decay, Delta --> N gamma (only in NUANCE versions v3 and and higher) 94 NUANCE -> NEUT 39 1#gamma from #Delta: #nu_{l} p #rightarrow #nu_{l} p #gamma neutModeID[15] = 38; neutModeName[15] = "ncngam"; neutModeTitle[15] = "1#gamma from #Delta: #nu_{l} n #rightarrow #nu_{l} n #gamma"; neutModeID[16] = 39; neutModeName[16] = "ncpgam"; neutModeTitle[16] = "1#gamma from #Delta: #nu_{l} p #rightarrow #nu_{l} p #gamma"; NC, numu N --> numu N gamma Delta radiative decay, Delta --> N gamma (only in NUANCE versions v3 and and higher) 95 -> UNKOWN NEUT MODE CC, numubar p --> mu+ Lambda, numubar n -- > mu+ Sigma-, numubar p --> mu+ Sigma0 Cabibbo-suppressed QE hyperon production from nucleons 96 NUANCE -> NEUT 36 neutModeID[14] = 36; neutModeName[14] = "nccoh"; neutModeTitle[14] = "NC coherent-#pi: #nu_{l} ^{16}O #rightarrow #nu_{l} ^{16}O #pi^{0}"; NC, numu A --> numu pi0 A coherent or diffractive pi0 production 97 NUANCE -> NEUT 16 neutModeID[4] = 16; neutModeName[4] = "cccoh"; neutModeTitle[4] = "CC coherent-#pi: #nu_{l} ^{16}O #rightarrow l^{-} ^{16}O #pi^{+}"; CC, numu A --> mu- pi+ A (or numubar A --> coherent or diffractive pi0 production 98 -> UNKNOWN NEUT MODE NC, numu e- --> numu e- (or numubar e- --> neutrino + electron elastic scattering 99 -> UNKNOWN NEUT MODE CC, numu e- --> mu- nue neutrino + electron inverse muon decay NEUT Modes: // CC Modes neutModeID[0] = 1; neutModeName[0] = "ccqe"; neutModeTitle[0] = "CCQE: #nu_{l} n #rightarrow l^{-} p"; neutModeID[1] = 11; neutModeName[1] = "ccppip"; neutModeTitle[1] = "CC 1#pi: #nu_{l} p #rightarrow l^{-} p #pi^{+}"; neutModeID[2] = 12; neutModeName[2] = "ccppi0"; neutModeTitle[2] = "CC 1#pi: #nu_{l} n #rightarrow l^{-} p #pi^{0}"; neutModeID[3] = 13; neutModeName[3] = "ccnpip"; neutModeTitle[3] = "CC 1#pi: #nu_{l} n #rightarrow l^{-} n #pi^{+}"; neutModeID[4] = 16; neutModeName[4] = "cccoh"; neutModeTitle[4] = "CC coherent-#pi: #nu_{l} ^{16}O #rightarrow l^{-} ^{16}O #pi^{+}"; neutModeID[5] = 17; neutModeName[5] = "ccgam"; neutModeTitle[5] = "1#gamma from #Delta: #nu_{l} n #rightarrow l^{-} p #gamma"; neutModeID[6] = 21; neutModeName[6] = "ccmpi"; neutModeTitle[6] = "CC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow l^{-} N' multi-#pi"; neutModeID[7] = 22; neutModeName[7] = "cceta"; neutModeTitle[7] = "CC 1#eta: #nu_{l} n #rightarrow l^{-} p #eta"; neutModeID[8] = 23; neutModeName[8] = "cck"; neutModeTitle[8] = "CC 1K: #nu_{l} n #rightarrow l^{-} #Lambda K^{+}"; neutModeID[9] = 26; neutModeName[9] = "ccdis"; neutModeTitle[9] = "CC DIS (2 GeV < W): #nu_{l} N #rightarrow l^{-} N' mesons"; neutModeID[10] = 31; neutModeName[10] = "ncnpi0"; neutModeTitle[10] = "NC 1#pi: #nu_{l} n #rightarrow #nu_{l} n #pi^{0}"; neutModeID[11] = 32; neutModeName[11] = "ncppi0"; neutModeTitle[11] = "NC 1#pi: #nu_{l} p #rightarrow #nu_{l} p #pi^{0}"; neutModeID[12] = 33; neutModeName[12] = "ncppim"; neutModeTitle[12] = "NC 1#pi: #nu_{l} n #rightarrow #nu_{l} p #pi^{-}"; neutModeID[13] = 34; neutModeName[13] = "ncnpip"; neutModeTitle[13] = "NC 1#pi: #nu_{l} p #rightarrow #nu_{l} n #pi^{+}"; neutModeID[14] = 36; neutModeName[14] = "nccoh"; neutModeTitle[14] = "NC coherent-#pi: #nu_{l} ^{16}O #rightarrow #nu_{l} ^{16}O #pi^{0}"; neutModeID[15] = 38; neutModeName[15] = "ncngam"; neutModeTitle[15] = "1#gamma from #Delta: #nu_{l} n #rightarrow #nu_{l} n #gamma"; neutModeID[16] = 39; neutModeName[16] = "ncpgam"; neutModeTitle[16] = "1#gamma from #Delta: #nu_{l} p #rightarrow #nu_{l} p #gamma"; neutModeID[17] = 41; neutModeName[17] = "ncmpi"; neutModeTitle[17] = "NC (1.3 < W < 2 GeV): #nu_{l} N #rightarrow #nu_{l} N multi-#pi"; neutModeID[18] = 42; neutModeName[18] = "ncneta"; neutModeTitle[18] = "NC 1#eta: #nu_{l} n #rightarrow #nu_{l} n #eta"; neutModeID[19] = 43; neutModeName[19] = "ncpeta"; neutModeTitle[19] = "NC 1#eta: #nu_{l} p #rightarrow #nu_{l} p #eta"; neutModeID[20] = 44; neutModeName[20] = "nck0"; neutModeTitle[20] = "NC 1K: #nu_{l} n #rightarrow #nu_{l} #Lambda K^{0}"; neutModeID[21] = 45; neutModeName[21] = "nckp"; neutModeTitle[21] = "NC 1K: #nu_{l} n #rightarrow #nu_{l} #Lambda K^{+}"; neutModeID[22] = 46; neutModeName[22] = "ncdis"; neutModeTitle[22] = "NC DIS (2 GeV < W): #nu_{l} N #rightarrow #nu_{l} N' mesons"; neutModeID[23] = 51; neutModeName[23] = "ncqep"; neutModeTitle[23] = "NC elastic: #nu_{l} p #rightarrow #nu_{l} p"; neutModeID[24] = 52; neutModeName[24] = "ncqen"; neutModeTitle[24] = "NC elastic: #nu_{l} n #rightarrow #nu_{l} n"; */ #endif diff --git a/src/InputHandler/NuWroInputHandler.cxx b/src/InputHandler/NuWroInputHandler.cxx index e0625e8..1de469b 100644 --- a/src/InputHandler/NuWroInputHandler.cxx +++ b/src/InputHandler/NuWroInputHandler.cxx @@ -1,465 +1,472 @@ #ifdef __NUWRO_ENABLED__ #include "NuWroInputHandler.h" NuWroGeneratorInfo::~NuWroGeneratorInfo(){ delete fNuWroParticlePDGs; } void NuWroGeneratorInfo::AddBranchesToTree(TTree* tn) { tn->Branch("NuWroParticlePDGs", &fNuWroParticlePDGs, "NuWroParticlePDGs/I"); } void NuWroGeneratorInfo::SetBranchesFromTree(TTree* tn) { tn->SetBranchAddress("NuWroParticlePDGs", &fNuWroParticlePDGs); } void NuWroGeneratorInfo::AllocateParticleStack(int stacksize) { fNuWroParticlePDGs = new int[stacksize]; } void NuWroGeneratorInfo::DeallocateParticleStack() { delete fNuWroParticlePDGs; } void NuWroGeneratorInfo::FillGeneratorInfo(event* e) { Reset(); } void NuWroGeneratorInfo::Reset() { for (int i = 0; i < kMaxParticles; i++) { fNuWroParticlePDGs[i] = 0; } } NuWroInputHandler::NuWroInputHandler(std::string const& handle, std::string const& rawinputs) { LOG(SAM) << "Creating NuWroInputHandler : " << handle << std::endl; // Run a joint input handling fName = handle; fMaxEvents = FitPar::Config().GetParI("MAXEVENTS"); fSaveExtra = false; //FitPar::Config().GetParB("NuWroSaveExtra"); // Setup the TChain fNuWroTree = new TChain("treeout"); // Loop over all inputs and grab flux, eventhist, and nevents std::vector<std::string> inputs = InputUtils::ParseInputFileList(rawinputs); for (size_t inp_it = 0; inp_it < inputs.size(); ++inp_it) { // Open File for histogram access TFile* inp_file = new TFile(inputs[inp_it].c_str(), "READ"); if (!inp_file or inp_file->IsZombie()) { ERR(FTL) << "nuwro File IsZombie() at " << inputs[inp_it] << std::endl; throw; } // Get Flux/Event hist TH1D* fluxhist = (TH1D*)inp_file->Get( (PlotUtils::GetObjectWithName(inp_file, "FluxHist")).c_str()); TH1D* eventhist = (TH1D*)inp_file->Get( (PlotUtils::GetObjectWithName(inp_file, "EvtHist")).c_str()); if (!fluxhist or !eventhist) { ERR(FTL) << "nuwro FILE doesn't contain flux/xsec info" << std::endl; if (FitPar::Config().GetParB("regennuwro")) { ERR(FTL) << "Regen NuWro has not been added yet. Email the developers!" << std::endl; // ProcessNuWroInputFlux(inputs[inp_it]); throw; } else { ERR(FTL) << "If you would like NUISANCE to generate these for you " << "please set parameter regennuwro=1 and re-run." << std::endl; throw; } } // Get N Events TTree* nuwrotree = (TTree*)inp_file->Get("treeout"); if (!nuwrotree) { ERR(FTL) << "treeout not located in nuwro file! " << inputs[inp_it] << std::endl; throw; } int nevents = nuwrotree->GetEntries(); // Register input to form flux/event rate hists RegisterJointInput(inputs[inp_it], nevents, fluxhist, eventhist); // Add to TChain fNuWroTree->Add( inputs[inp_it].c_str() ); } // Registor all our file inputs SetupJointInputs(); // Setup Events fNuWroEvent = NULL; fNuWroTree->SetBranchAddress("e", &fNuWroEvent); + fNuWroTree->GetEntry(0); fNUISANCEEvent = new FitEvent(); fNUISANCEEvent->SetNuwroEvent(fNuWroEvent); fNUISANCEEvent->HardReset(); if (fSaveExtra) { fNuWroInfo = new NuWroGeneratorInfo(); fNUISANCEEvent->AddGeneratorInfo(fNuWroInfo); } }; NuWroInputHandler::~NuWroInputHandler(){ if (fNuWroTree) delete fNuWroTree; } void NuWroInputHandler::CreateCache() { // fNuWroTree->SetCacheEntryRange(0, fNEvents); - fNuWroTree->AddBranchToCache("*", 1); - fNuWroTree->SetCacheSize(fCacheSize); + // fNuWroTree->AddBranchToCache("*", 1); + // fNuWroTree->SetCacheSize(fCacheSize); } void NuWroInputHandler::RemoveCache() { // fNuWroTree->SetCacheEntryRange(0, fNEvents); - fNuWroTree->AddBranchToCache("*", 0); - fNuWroTree->SetCacheSize(0); + // fNuWroTree->AddBranchToCache("*", 0); + // fNuWroTree->SetCacheSize(0); } void NuWroInputHandler::ProcessNuWroInputFlux(const std::string file) { } FitEvent* NuWroInputHandler::GetNuisanceEvent(const UInt_t entry, const bool lightweight) { // Catch too large entries if (entry >= (UInt_t)fNEvents) return NULL; // Read Entry from TTree to fill NEUT Vect in BaseFitEvt; fNuWroTree->GetEntry(entry); // Setup Input scaling for joint inputs fNUISANCEEvent->InputWeight = GetInputWeight(entry); // Run NUISANCE Vector Filler if (!lightweight) { CalcNUISANCEKinematics(); } return fNUISANCEEvent; } int NuWroInputHandler::ConvertNuwroMode (event * e) { Int_t proton_pdg, neutron_pdg, pion_pdg, pion_plus_pdg, pion_minus_pdg, lambda_pdg, eta_pdg, kaon_pdg, kaon_plus_pdg; proton_pdg = 2212; eta_pdg = 221; neutron_pdg = 2112; pion_pdg = 111; pion_plus_pdg = 211; pion_minus_pdg = -211; //O_16_pdg = 100069; // oznacznie z Neuta lambda_pdg = 3122; kaon_pdg = 311; kaon_plus_pdg = 321; if (e->flag.qel) // kwiazielastyczne oddziaływanie { if (e->flag.anty) // jeśli jest to oddziaływanie z antyneutrinem { if (e->flag.cc) return -1; else { if (e->nof (proton_pdg)) return -51; else if (e->nof (neutron_pdg)) return -52; // sprawdzam dodatkowo ? } } else // oddziaływanie z neutrinem { if (e->flag.cc) return 1; else { if (e->nof (proton_pdg)) return 51; else if (e->nof (neutron_pdg)) return 52; } } } if (e->flag.mec) { if (e->flag.anty) return -2; else return 2; } if (e->flag.res) //rezonansowa produkcja: pojedynczy pion, pojed.eta, kaon, multipiony { Int_t liczba_pionow, liczba_kaonow; liczba_pionow = e->nof (pion_pdg) + e->nof (pion_plus_pdg) + e->nof (pion_minus_pdg); liczba_kaonow = e->nof (kaon_pdg) + e->nof (kaon_pdg); if (liczba_pionow > 1 || liczba_pionow == 0) // multipiony { if (e->flag.anty) { if (e->flag.cc) return -21; else return -41; } else { if (e->flag.cc) return 21; else return 41; } } if (liczba_pionow == 1) { if (e->flag.anty) // jeśli jest to oddziaływanie z antyneutrinem { if (e->flag.cc) { if (e->nof (neutron_pdg) && e->nof (pion_minus_pdg)) return -11; if (e->nof (neutron_pdg) && e->nof (pion_pdg)) return -12; if (e->nof (proton_pdg) && e->nof (pion_minus_pdg)) return -13; } else { if (e->nof (proton_pdg)) { if (e->nof (pion_minus_pdg)) return -33; else if (e->nof (pion_pdg)) return -32; } else if (e->nof (neutron_pdg)) { if (e->nof (pion_plus_pdg)) return -34; else if (e->nof (pion_pdg)) return -31; } } } else // oddziaływanie z neutrinem { if (e->flag.cc) { if (e->nof (proton_pdg) && e->nof (pion_plus_pdg)) return 11; if (e->nof (proton_pdg) && e->nof (pion_pdg)) return 12; if (e->nof (neutron_pdg) && e->nof (pion_plus_pdg)) return 13; } else { if (e->nof (proton_pdg)) { if (e->nof (pion_minus_pdg)) return 33; else if (e->nof (pion_pdg)) return 32; } else if (e->nof (neutron_pdg)) { if (e->nof (pion_plus_pdg)) return 34; else if (e->nof (pion_pdg)) return 31; } } } } if (e->nof (eta_pdg)) // produkcja rezonansowa ety { if (e->flag.anty) // jeśli jest to oddziaływanie z antyneutrinem { if (e->flag.cc) return -22; else { if (e->nof (neutron_pdg)) return -42; else if (e->nof (proton_pdg)) return -43; // sprawdzam dodatkowo ? } } else // oddziaływanie z neutrinem { if (e->flag.cc) return 22; else { if (e->nof (neutron_pdg)) return 42; else if (e->nof (proton_pdg)) return 43; } } } if (e->nof (lambda_pdg) == 1 && liczba_kaonow == 1) // produkcja rezonansowa kaonu { if (e->flag.anty) // jeśli jest to oddziaływanie z antyneutrinem { if (e->flag.cc && e->nof (kaon_pdg)) return -23; else { if (e->nof (kaon_pdg)) return -44; else if (e->nof (kaon_plus_pdg)) return -45; } } else // oddziaływanie z neutrinem { if (e->flag.cc && e->nof (kaon_plus_pdg)) return 23; else { if (e->nof (kaon_pdg)) return 44; else if (e->nof (kaon_plus_pdg)) return 45; } } } } if (e->flag.coh) // koherentne oddziaływanie tylko na O(16) { Int_t _target; _target = e->par.nucleus_p + e->par.nucleus_n; // liczba masowa O(16) if (_target == 16) { if (e->flag.anty) // jeśli jest to oddziaływanie z antyneutrinem { if (e->flag.cc && e->nof (pion_minus_pdg)) return -16; else if (e->nof (pion_pdg)) return -36; } else // oddziaływanie z neutrinem { if (e->flag.cc && e->nof (pion_plus_pdg)) return 16; else if (e->nof (pion_pdg)) return 36; } } } // gleboko nieelastyczne rozpraszanie if (e->flag.dis) { if (e->flag.anty) { if (e->flag.cc) return -26; else return -46; } else { if (e->flag.cc) return 26; else return 46; } } return 9999; } void NuWroInputHandler::CalcNUISANCEKinematics() { // std::cout << "NuWro Event Address " << fNuWroEvent << std::endl; // Reset all variables fNUISANCEEvent->ResetEvent(); FitEvent* evt = fNUISANCEEvent; // Sort Event Info evt->fMode = ConvertNuwroMode(fNuWroEvent); - if (abs(evt->fMode) > 60) evt->fMode = 0; + + if (abs(evt->fMode) > 60) { + evt->fMode = 0; + + // Remove failed mode converts + // return; + } evt->Mode = evt->fMode; evt->fEventNo = 0.0; evt->fTotCrs = 0.0; evt->fTargetA = fNuWroEvent->par.nucleus_p + fNuWroEvent->par.nucleus_n; evt->fTargetZ = fNuWroEvent->par.nucleus_p; evt->fTargetH = 0; evt->fBound = (evt->fTargetA) == 1; // Check Particle Stack UInt_t npart_in = fNuWroEvent->in.size(); UInt_t npart_out = fNuWroEvent->out.size(); UInt_t npart_post = fNuWroEvent->post.size(); UInt_t npart = npart_in + npart_out + npart_post; UInt_t kmax = evt->kMaxParticles; if (npart > kmax) { ERR(WRN) << "NUWRO has too many particles. Expanding stack." << std::endl; fNUISANCEEvent->ExpandParticleStack(npart); } // Sort Particles evt->fNParticles = 0; std::vector<particle>::iterator p_iter; // Initial State for (p_iter = fNuWroEvent->in.begin(); p_iter != fNuWroEvent->in.end(); p_iter++) { AddNuWroParticle(fNUISANCEEvent, (*p_iter), kInitialState); } // FSI State - for (size_t i = 0; i < npart_in; i++ ) { - AddNuWroParticle(fNUISANCEEvent, (*p_iter), kFSIState); - } + // for (size_t i = 0; i < npart_in; i++ ) { + // AddNuWroParticle(fNUISANCEEvent, (*p_iter), kFSIState); + // } // Final State for (p_iter = fNuWroEvent->post.begin(); p_iter != fNuWroEvent->post.end(); p_iter++) { AddNuWroParticle(fNUISANCEEvent, (*p_iter), kFinalState); } // Fill Generator Info if (fSaveExtra) fNuWroInfo->FillGeneratorInfo(fNuWroEvent); // Run Initial, FSI, Final, Other ordering. fNUISANCEEvent->OrderStack(); return; } void NuWroInputHandler::AddNuWroParticle(FitEvent * evt, const particle & p, int state) { // Add Mom evt->fParticleMom[evt->fNParticles][0] = p.p4().x; evt->fParticleMom[evt->fNParticles][1] = p.p4().y; evt->fParticleMom[evt->fNParticles][2] = p.p4().z; evt->fParticleMom[evt->fNParticles][3] = p.p4().t; // Status/PDG evt->fParticleState[evt->fNParticles] = state; evt->fParticlePDG[evt->fNParticles] = p.pdg; // Add to particle count evt->fNParticles++; } void NuWroInputHandler::Print(){ } #endif diff --git a/src/MINERvA/MINERvA_CC0pi_XSec_1DEe_nue.cxx b/src/MINERvA/MINERvA_CC0pi_XSec_1DEe_nue.cxx index b807165..2a36858 100644 --- a/src/MINERvA/MINERvA_CC0pi_XSec_1DEe_nue.cxx +++ b/src/MINERvA/MINERvA_CC0pi_XSec_1DEe_nue.cxx @@ -1,97 +1,102 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "MINERvA_SignalDef.h" #include "MINERvA_CC0pi_XSec_1DEe_nue.h" //******************************************************************** MINERvA_CC0pi_XSec_1DEe_nue::MINERvA_CC0pi_XSec_1DEe_nue(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "MINERvA CC0pi nue Ee sample. \n" \ "Target: CH \n" \ "Flux: MINERvA 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.SetDescription(descrip); fSettings.SetXTitle("E_{e} (GeV)"); fSettings.SetYTitle("d#sigma/dE_{e} (cm^{2}/GeV)"); fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/FULL"); - fSettings.SetEnuRange(0.0, 20.0); + fSettings.SetEnuRange(0.0, 10.0); fSettings.DefineAllowedTargets("C,H"); // CCQELike plot information fSettings.SetTitle("MINERvA #nu_e CC0#pi"); fSettings.SetDataInput( FitPar::GetDataBase() + "/MINERvA/CC0pi/MINERvA_CC0pi_nue_Data_ARX1509_05729.root;Data_1DEe" ); fSettings.SetCovarInput( FitPar::GetDataBase() + "/MINERvA/CC0pi/MINERvA_CC0pi_nue_Data_ARX1509_05729.root;Covar_1DEe" ); fSettings.DefineAllowedSpecies("nue,nueb"); FinaliseSampleSettings(); // Scaling Setup --------------------------------------------------- // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38 / (fNEvents + 0.)) / TotalIntegratedFlux(); // Plot Setup ------------------------------------------------------- SetDataFromRootFile( fSettings.GetDataInput() ); SetCovarFromRootFile(fSettings.GetCovarInput() ); ScaleCovar(1.0 / 100.0); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; //******************************************************************** void MINERvA_CC0pi_XSec_1DEe_nue::FillEventVariables(FitEvent *event) { //******************************************************************** + + int PDGnu = event->GetNeutrinoIn()->fPID; + int PDGe = 0; + if (PDGnu == 12) PDGe = 11; + else if (PDGnu == -12) PDGe = -11; - if (event->NumFSParticle(11) == 0) + if (event->NumFSParticle(PDGe) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; - TLorentzVector Pe = event->GetHMFSParticle(11)->fP; + TLorentzVector Pe = event->GetHMFSParticle(PDGe)->fP; Thetae = Pnu.Vect().Angle(Pe.Vect()); - Enu_rec = FitUtils::EnuQErec(Pe, cos(Thetae), 34., true); Q2QEe = FitUtils::Q2QErec(Pe, cos(Thetae), 34., true); Ee = Pe.E() / 1000.0; fXVar = Ee; return; } //******************************************************************** bool MINERvA_CC0pi_XSec_1DEe_nue::isSignal(FitEvent *event) { //******************************************************************* // Check that this is a nue CC0pi event - if (!SignalDef::isCC0pi(event, 12, EnuMin, EnuMax)) return false; + if (!(SignalDef::isCC0pi(event, 12, EnuMin, EnuMax)) and + !(SignalDef::isCC0pi(event, -12, EnuMin, EnuMax))) return false; // Electron Enrgy if (Ee < 0.5) return false; return true; }; diff --git a/src/MINERvA/MINERvA_CC0pi_XSec_1DQ2_nue.cxx b/src/MINERvA/MINERvA_CC0pi_XSec_1DQ2_nue.cxx index 3768710..6846f22 100644 --- a/src/MINERvA/MINERvA_CC0pi_XSec_1DQ2_nue.cxx +++ b/src/MINERvA/MINERvA_CC0pi_XSec_1DQ2_nue.cxx @@ -1,97 +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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "MINERvA_SignalDef.h" #include "MINERvA_CC0pi_XSec_1DQ2_nue.h" //******************************************************************** MINERvA_CC0pi_XSec_1DQ2_nue::MINERvA_CC0pi_XSec_1DQ2_nue(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "MINERvA_CC0pi_XSec_1DQ2_nue sample. \n" \ "Target: CH \n" \ "Flux: MINERvA 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.SetDescription(descrip); fSettings.SetXTitle("Q^{2}_{e} (GeV)"); fSettings.SetYTitle("d#sigma/dQ^{2}_{e} (cm^{2}/GeV)^{2}"); fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/FULL"); - fSettings.SetEnuRange(0.0, 20.0); + fSettings.SetEnuRange(0.0, 10.0); fSettings.DefineAllowedTargets("C,H"); // CCQELike plot information fSettings.SetTitle("MINERvA_CC0pi_XSec_1DQ2_nue"); fSettings.SetDataInput( FitPar::GetDataBase() + "/MINERvA/CC0pi/MINERvA_CC0pi_nue_Data_ARX1509_05729.root;Data_1DQ2" ); fSettings.SetCovarInput( FitPar::GetDataBase() + "/MINERvA/CC0pi/MINERvA_CC0pi_nue_Data_ARX1509_05729.root;Covar_1DQ2" ); fSettings.DefineAllowedSpecies("nue,nueb"); FinaliseSampleSettings(); // Scaling Setup --------------------------------------------------- // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38 / (fNEvents + 0.)) / TotalIntegratedFlux(); // Plot Setup ------------------------------------------------------- SetDataFromRootFile( fSettings.GetDataInput() ); SetCovarFromRootFile(fSettings.GetCovarInput() ); ScaleCovar(1.0 / 100.0); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; //******************************************************************** void MINERvA_CC0pi_XSec_1DQ2_nue::FillEventVariables(FitEvent *event){ //******************************************************************** + + int PDGnu = event->GetNeutrinoIn()->fPID; + int PDGe = 0; + if (PDGnu == 12) PDGe= 11; + else if (PDGnu == -12) PDGe = -11; - if (event->NumFSParticle(11) == 0) + if (event->NumFSParticle(PDGe) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; - TLorentzVector Pe = event->GetHMFSParticle(11)->fP; + TLorentzVector Pe = event->GetHMFSParticle(PDGe)->fP; Thetae = Pnu.Vect().Angle(Pe.Vect()); - Enu_rec = FitUtils::EnuQErec(Pe, cos(Thetae), 34.,true); - Q2QEe = FitUtils::Q2QErec(Pe, cos(Thetae), 34.,true); - Ee = Pe.E()/1000.0; + Q2QEe = FitUtils::Q2QErec(Pe, cos(Thetae), 34., true); + Ee = Pe.E() / 1000.0; fXVar = Q2QEe; + return; } //******************************************************************** bool MINERvA_CC0pi_XSec_1DQ2_nue::isSignal(FitEvent *event){ //******************************************************************* // Check that this is a nue CC0pi event - if (!SignalDef::isCC0pi(event, 12, EnuMin, EnuMax)) return false; + if (!(SignalDef::isCC0pi(event, 12, EnuMin, EnuMax)) and + !(SignalDef::isCC0pi(event, -12, EnuMin, EnuMax))) return false; // Restrct Ee if (Ee < 0.5) return false; return true; }; diff --git a/src/MINERvA/MINERvA_CC0pi_XSec_1DThetae_nue.cxx b/src/MINERvA/MINERvA_CC0pi_XSec_1DThetae_nue.cxx index e1bb244..468fe7b 100644 --- a/src/MINERvA/MINERvA_CC0pi_XSec_1DThetae_nue.cxx +++ b/src/MINERvA/MINERvA_CC0pi_XSec_1DThetae_nue.cxx @@ -1,98 +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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "MINERvA_SignalDef.h" #include "MINERvA_CC0pi_XSec_1DThetae_nue.h" //******************************************************************** MINERvA_CC0pi_XSec_1DThetae_nue::MINERvA_CC0pi_XSec_1DThetae_nue(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "MINERvA_CC0pi_XSec_1DThetae_nue sample. \n" \ "Target: CH \n" \ "Flux: MINERvA 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.SetDescription(descrip); fSettings.SetXTitle("#theta_{e}"); fSettings.SetYTitle("d#sigma/d#theta_{e} (cm^{2})"); fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/FULL"); - fSettings.SetEnuRange(0.0, 20.0); + fSettings.SetEnuRange(0.0, 10.0); fSettings.DefineAllowedTargets("C,H"); // CCQELike plot information fSettings.SetTitle("MINERvA #nu_e CC0#pi"); fSettings.SetDataInput( FitPar::GetDataBase() + "/MINERvA/CC0pi/MINERvA_CC0pi_nue_Data_ARX1509_05729.root;Data_1DThetae" ); fSettings.SetCovarInput( FitPar::GetDataBase() + "/MINERvA/CC0pi/MINERvA_CC0pi_nue_Data_ARX1509_05729.root;Covar_1DThetae" ); fSettings.DefineAllowedSpecies("nue,nueb"); FinaliseSampleSettings(); // Scaling Setup --------------------------------------------------- // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon fScaleFactor = (GetEventHistogram()->Integral("width") * 1E-38 / (fNEvents + 0.)) / TotalIntegratedFlux(); // Plot Setup ------------------------------------------------------- SetDataFromRootFile( fSettings.GetDataInput() ); SetCovarFromRootFile(fSettings.GetCovarInput() ); ScaleCovar(1.0 / 100.0); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; //******************************************************************** void MINERvA_CC0pi_XSec_1DThetae_nue::FillEventVariables(FitEvent *event){ //******************************************************************** - if (event->NumFSParticle(11) == 0) + int PDGnu = event->GetNeutrinoIn()->fPID; + int PDGe = 0; + if (PDGnu == 12) PDGe= 11; + else if (PDGnu == -12) PDGe = -11; + + if (event->NumFSParticle(PDGe) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; - TLorentzVector Pe = event->GetHMFSParticle(11)->fP; + TLorentzVector Pe = event->GetHMFSParticle(PDGe)->fP; - Thetae = Pnu.Vect().Angle(Pe.Vect()) * 180. / TMath::Pi(); - Ee = Pe.E()/1000.0; + Thetae = Pnu.Vect().Angle(Pe.Vect()); + Q2QEe = FitUtils::Q2QErec(Pe, cos(Thetae), 34., true); + Ee = Pe.E() / 1000.0; - fXVar = Thetae; - LOG(EVT) << "fXVar = "<<fXVar<<std::endl; + fXVar = Thetae * 180. / TMath::Pi(); return; } //******************************************************************** bool MINERvA_CC0pi_XSec_1DThetae_nue::isSignal(FitEvent *event){ //******************************************************************* // Check this is a nue CC0pi event - if (!SignalDef::isCC0pi(event, 12, EnuMin, EnuMax)) return false; + if (!(SignalDef::isCC0pi(event, 12, EnuMin, EnuMax)) and + !(SignalDef::isCC0pi(event, -12, EnuMin, EnuMax))) return false; // Restrict EE if (Ee < 0.5) return false; return true; }; diff --git a/src/MINERvA/MINERvA_CCNpip_XSec_1DTpi_nu.cxx b/src/MINERvA/MINERvA_CCNpip_XSec_1DTpi_nu.cxx index 2ad381b..a3d5886 100644 --- a/src/MINERvA/MINERvA_CCNpip_XSec_1DTpi_nu.cxx +++ b/src/MINERvA/MINERvA_CCNpip_XSec_1DTpi_nu.cxx @@ -1,273 +1,276 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "MINERvA_SignalDef.h" #include "MINERvA_CCNpip_XSec_1DTpi_nu.h" //******************************************************************** MINERvA_CCNpip_XSec_1DTpi_nu::MINERvA_CCNpip_XSec_1DTpi_nu(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "MINERvA_CCNpip_XSec_1DTpi_nu sample. \n" \ "Target: CH \n" \ "Flux: MINERvA 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.SetDescription(descrip); fSettings.SetXTitle("T_{#pi} (MeV)"); fSettings.SetYTitle("(1/T#Phi) dN_{#pi}/dT_{#pi} (cm^{2}/MeV/nucleon)"); fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/FULL"); fSettings.SetEnuRange(1.5, 10.0); fSettings.DefineAllowedTargets("C,H"); fSettings.DefineAllowedSpecies("numu"); fFullPhaseSpace = !fSettings.Found("name", "_20deg"); fFluxCorrection = fSettings.Found("name", "fluxcorr"); fUpdatedData = !fSettings.Found("name", "2015"); fSettings.SetTitle("MINERvA_CCNpip_XSec_1DTpi_nu"); FinaliseSampleSettings(); // Scaling Setup --------------------------------------------------- // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon fScaleFactor = GetEventHistogram()->Integral("width") * double(1E-38) / double(fNEvents) / TotalIntegratedFlux("width"); // Plot Setup ------------------------------------------------------- // Full Phase Space if (fFullPhaseSpace) { // 2016 release if (fUpdatedData) { SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CCNpip/2016/nu-ccNpi+-xsec-pion-kinetic-energy.csv"); // MINERvA has the error quoted as a percentage of the cross-section // Need to make this into an absolute error before we go from correlation // matrix -> covariance matrix since it depends on the error in the ith // bin for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) { fDataHist->SetBinError(i + 1, fDataHist->GetBinContent(i + 1) * (fDataHist->GetBinError(i + 1) / 100.)); } // This is a correlation matrix, not covariance matrix, so needs to be // converted SetCorrelationFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CCNpip/2016/nu-ccNpi+-correlation-pion-kinetic-energy.csv"); // 2015 release } else { // If we're doing shape only if (fIsShape) { SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CCNpip/2015/MINERvA_CCNpi_Tpi_shape.txt"); SetCorrelationFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CCNpip/2015/MINERvA_CCNpi_Tpi_shape_cov.txt"); // If we're doing full cross-section } else { SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CCNpip/2015/MINERvA_CCNpi_Tpi.txt"); SetCorrelationFromTextFile( GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CCNpip/2015/MINERvA_CCNpi_Tpi_cov.txt"); } } // Restricted Phase Space } else { // Only 2015 data released restricted muon phase space cross-section // unfortunately if (fUpdatedData) { ERR(FTL) << fName << " has no updated 2016 data for restricted phase space! Using 2015 data." << std::endl; throw; } // If we're using the shape only data if (fIsShape) { SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CCNpip/2015/MINERvA_CCNpi_Tpi_20deg_shape.txt"); SetCorrelationFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CCNpip/2015/MINERvA_CCNpi_Tpi_20deg_shape_cov.txt"); // Or total cross-section } else { SetDataFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CCNpip/2015/MINERvA_CCNpi_Tpi_20deg.txt"); SetCorrelationFromTextFile(GeneralUtils::GetTopLevelDir() + "/data/MINERvA/CCNpip/2015/MINERvA_CCNpi_Tpi_20deg_cov.txt"); } } // Scale the MINERvA data to account for the flux difference // Adjust MINERvA data to flux correction; roughly a 11% normalisation increase in data // Please change when MINERvA releases new data! if (fFluxCorrection) { for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) { fDataHist->SetBinContent(i + 1, fDataHist->GetBinContent(i + 1) * 1.11); } } // Make some auxillary helper plots onePions = (TH1D*)(fDataHist->Clone()); onePions->SetNameTitle((fName + "_1pions").c_str(), (fName + "_1pions" + fPlotTitles).c_str()); SetAutoProcessTH1(onePions, kCMD_Reset, kCMD_Scale, kCMD_Norm); twoPions = (TH1D*)(fDataHist->Clone()); twoPions->SetNameTitle((fName + "_2pions").c_str(), (fName + "_2pions;" + fPlotTitles).c_str()); SetAutoProcessTH1(twoPions, kCMD_Reset, kCMD_Scale, kCMD_Norm); threePions = (TH1D*)(fDataHist->Clone()); threePions->SetNameTitle((fName + "_3pions").c_str(), (fName + "_3pions" + fPlotTitles).c_str()); SetAutoProcessTH1(threePions, kCMD_Reset, kCMD_Scale, kCMD_Norm); morePions = (TH1D*)(fDataHist->Clone()); morePions->SetNameTitle((fName + "_4pions").c_str(), (fName + "_4pions" + fPlotTitles).c_str()); SetAutoProcessTH1(morePions, kCMD_Reset, kCMD_Scale, kCMD_Norm); // Reserve length 3 for the number of pions // We fill once per pion found in the event, so can fill multiple times for one event TpiVect.reserve(3); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; //******************************************************************** // Here we have to fill for every pion we find in the event void MINERvA_CCNpip_XSec_1DTpi_nu::FillEventVariables(FitEvent *event) { //******************************************************************** if (event->NumFSParticle(211) == 0 && event->NumFSParticle(-211) == 0) return; if (event->NumFSParticle(13) == 0) return; // Clear out the vectors TpiVect.clear(); TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; double hadMass = FitUtils::Wrec(Pnu, Pmu); if (hadMass < 1800) { // Loop over the particle stack for (unsigned int j = 2; j < event->Npart(); ++j) { + // Only include alive particles + // if (event->GetParticleState(j) != kFinalState) continue; + if (!(event->PartInfo(j))->fIsAlive && (event->PartInfo(j))->fNEUTStatusCode != 0) continue; int PID = (event->PartInfo(j))->fPID; // Pick up the charged pions in the event if (abs(PID) == 211) { double ppi = FitUtils::T(event->PartInfo(j)->fP) * 1000.; TpiVect.push_back(ppi); } } } fXVar = 0; return; }; //******************************************************************** // The last bool refers to if we're using restricted phase space or not bool MINERvA_CCNpip_XSec_1DTpi_nu::isSignal(FitEvent *event) { //******************************************************************** // Last false refers to that this is NOT the restricted MINERvA phase space, // in which only forward-going muons are accepted return SignalDef::isCCNpip_MINERvA(event, EnuMin, EnuMax, !fFullPhaseSpace); } //******************************************************************** // Need to override FillHistograms() here because we fill the histogram N_pion // times void MINERvA_CCNpip_XSec_1DTpi_nu::FillHistograms() { //******************************************************************** if (Signal) { unsigned int nPions = TpiVect.size(); // Need to loop over all the pions in the sample for (size_t k = 0; k < nPions; ++k) { double tpi = TpiVect[k]; this->fMCHist->Fill(tpi, Weight); this->fMCFine->Fill(tpi, Weight); this->fMCStat->Fill(tpi, 1.0); if (nPions == 1) { onePions->Fill(tpi, Weight); } else if (nPions == 2) { twoPions->Fill(tpi, Weight); } else if (nPions == 3) { threePions->Fill(tpi, Weight); } else if (nPions > 3) { morePions->Fill(tpi, Weight); } if (fMCHist_Modes) fMCHist_Modes->Fill(Mode, tpi, Weight); } } } //******************************************************************** void MINERvA_CCNpip_XSec_1DTpi_nu::ScaleEvents() { //******************************************************************** Measurement1D::ScaleEvents(); onePions->Scale(this->fScaleFactor, "width"); twoPions->Scale(this->fScaleFactor, "width"); threePions->Scale(this->fScaleFactor, "width"); morePions->Scale(this->fScaleFactor, "width"); return; } //******************************************************************** void MINERvA_CCNpip_XSec_1DTpi_nu::Write(std::string drawOpts) { //******************************************************************** Measurement1D::Write(drawOpts); // Draw the npions stack onePions->SetTitle("1#pi"); onePions->SetLineColor(kBlack); // onePions->SetFillStyle(0); onePions->SetFillColor(onePions->GetLineColor()); twoPions->SetTitle("2#pi"); twoPions->SetLineColor(kRed); // twoPions->SetFillStyle(0); twoPions->SetFillColor(twoPions->GetLineColor()); threePions->SetTitle("3#pi"); threePions->SetLineColor(kGreen); // threePions->SetFillStyle(0); threePions->SetFillColor(threePions->GetLineColor()); morePions->SetTitle(">3#pi"); morePions->SetLineColor(kBlue); // morePions->SetFillStyle(0); morePions->SetFillColor(morePions->GetLineColor()); THStack pionStack = THStack((fName + "_pionStack").c_str(), (fName + "_pionStack").c_str()); pionStack.Add(onePions); pionStack.Add(twoPions); pionStack.Add(threePions); pionStack.Add(morePions); pionStack.Write(); return; } diff --git a/src/MINERvA/MINERvA_SignalDef.cxx b/src/MINERvA/MINERvA_SignalDef.cxx index acd222d..4696975 100644 --- a/src/MINERvA/MINERvA_SignalDef.cxx +++ b/src/MINERvA/MINERvA_SignalDef.cxx @@ -1,214 +1,214 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "SignalDef.h" #include "FitUtils.h" #include "MINERvA_SignalDef.h" namespace SignalDef { // ********************************* // MINERvA CC1pi+/- signal definition (2015 release) // Note: There is a 2016 release which is different to this (listed below), but // it is CCNpi+ and has a different W cut // Note2: The W cut is implemented in the class implementation in MINERvA/ // rather than here so we can draw events that don't pass the W cut (W cut is // 1.4 GeV) // Could possibly be changed for slight speed increase since less events // would be used // // MINERvA signal is slightly different to MiniBooNE // // Exactly one negative muon // Exactly one charged pion (both + and -); however, there is a Michel e- // requirement but UNCLEAR IF UNFOLDED OR NOT (so don't know if should be // applied) // Exactly 1 charged pion exits (so + and - charge), however, has Michel // electron requirement, so look for + only here? // No restriction on neutral pions or other mesons // MINERvA has unfolded and not unfolded muon phase space for 2015 // // Possible issues with the data: // 1) pi- is allowed in signal even when Michel cut included; most pi- is efficiency corrected in GENIE // 2) There is a T_pi < 350 MeV cut coming from requiring a stopping pion; this is efficiency corrected in GENIE // 3) There is a 1.5 < Enu < 10.0 cut in signal definition // 4) There is an angular muon cut which is sometimes efficiency corrected (why we have bool isRestricted below) // // Nice things: // Much data given: with and without muon angle cuts and with and without shape // only data + covariance // bool isCC1pip_MINERvA(FitEvent *event, double EnuMin, double EnuMax, bool isRestricted) { // ********************************* // Signal is both pi+ and pi- // WARNING: PI- CONTAMINATION IS FULLY GENIE BECAUSE THE MICHEL TAG // First, make sure it's CCINC if (!isCCINC(event, 14, EnuMin, EnuMax)) return false; // Allow pi+/pi- int piPDG[] = {211, -211}; int nLeptons = event->NumFSLeptons(); int nPion = event->NumFSParticle(piPDG); // Check that the desired pion exists and is the only meson if (nPion != 1) return false; // Check that there is only one final state lepton if (nLeptons != 1) return false; // MINERvA released another CC1pi+ xsec without muon unfolding! // here the muon angle is < 20 degrees (seen in MINOS) if (isRestricted) { TLorentzVector pnu = event->GetHMISParticle(14)->fP; TLorentzVector pmu = event->GetHMFSParticle(13)->fP; double th_nu_mu = FitUtils::th(pmu, pnu) * 180. / M_PI; if (th_nu_mu >= 20) return false; } return true; }; // ********************************* // MINERvA CCNpi+/- signal definition from 2016 publication // Different to CC1pi+/- listed above; additional has W < 1.8 GeV // // For notes on strangeness of signal definition, see CC1pip_MINERvA // // One negative muon // At least one charged pion // 1.5 < Enu < 10 // No restrictions on pi0 or other mesons or baryons // W_reconstructed (ignoring initial state motion) cut at 1.8 GeV // // Also writes number of pions (nPions) if studies on this want to be done... bool isCCNpip_MINERvA(FitEvent *event, double EnuMin, double EnuMax, bool isRestricted) { // ********************************* // First, make sure it's CCINC if (!isCCINC(event, 14, EnuMin, EnuMax)) return false; int nLeptons = event->NumFSLeptons(); // Write the number of pions to the measurement class... // Maybe better to just do that inside the class? int nPions = event->NumFSParticle(PhysConst::pdg_charged_pions); // Check that there is a pion! if (nPions == 0) return false; // Check that there is only one final state lepton if (nLeptons != 1) return false; // Need the muon and the neutrino to check angles and W - TLorentzVector pnu = event->GetHMISParticle(14)->fP; + TLorentzVector pnu = event->GetNeutrinoIn()->fP; TLorentzVector pmu = event->GetHMFSParticle(13)->fP; // MINERvA released some data with restricted muon angle // Here the muon angle is < 20 degrees (seen in MINOS) if (isRestricted) { double th_nu_mu = FitUtils::th(pmu, pnu) * 180. / M_PI; - if (th_nu_mu >= 20) return false; + if (th_nu_mu >= 20.) return false; } // Lastly check the W cut (always at 1.8 GeV) double Wrec = FitUtils::Wrec(pnu, pmu); - if (Wrec > 1800) return false; + if (Wrec > 1800.) return false; return true; }; //******************************************************************** bool isCCQEnumu_MINERvA(FitEvent *event, double EnuMin, double EnuMax, bool fullphasespace) { //******************************************************************** if (!isCCQELike(event, 14, EnuMin, EnuMax)) return false; TLorentzVector pnu = event->GetHMISParticle(14)->fP; TLorentzVector pmu = event->GetHMFSParticle(13)->fP; double ThetaMu = pnu.Vect().Angle(pmu.Vect()); double Enu_rec = FitUtils::EnuQErec(pmu, cos(ThetaMu), 34., true); // If Restricted phase space if (!fullphasespace && ThetaMu > 0.34906585) return false; // restrict energy range if (Enu_rec < EnuMin || Enu_rec > EnuMax) return false; return true; }; //******************************************************************** bool isCCQEnumubar_MINERvA(FitEvent *event, double EnuMin, double EnuMax, bool fullphasespace) { //******************************************************************** if (!isCCQELike(event, -14, EnuMin, EnuMax)) return false; TLorentzVector pnu = event->GetHMISParticle(-14)->fP; TLorentzVector pmu = event->GetHMFSParticle(-13)->fP; double ThetaMu = pnu.Vect().Angle(pmu.Vect()); double Enu_rec = FitUtils::EnuQErec(pmu, cos(ThetaMu), 30., true); // If Restricted phase space if (!fullphasespace && ThetaMu > 0.34906585) return false; // restrict energy range if (Enu_rec < EnuMin || Enu_rec > EnuMax) return false; return true; } //******************************************************************** bool isCCincLowRecoil_MINERvA(FitEvent *event, double EnuMin, double EnuMax) { //******************************************************************** if (!isCCINC(event, 14, EnuMin, EnuMax)) return false; // Need at least one muon if (event->NumFSParticle(13) < 1) return false; TLorentzVector pmu = event->GetHMFSParticle(13)->fP; TLorentzVector pnu = event->GetHMISParticle(14)->fP; // Cut on muon angle greated than 20deg if (cos(pnu.Vect().Angle(pmu.Vect())) < 0.93969262078) return false; // Cut on muon energy < 1.5 GeV if (pmu.E()/1000.0 < 1.5) return false; return true; } bool isCC0pi1p_MINERvA(FitEvent *event, double enumin, double enumax) { // Require numu CC0pi event with a proton above threshold bool signal = (isCC0pi(event, 14, enumin, enumax) && HasProtonKEAboveThreshold(event, 110.0)); return signal; } } diff --git a/src/MiniBooNE/MiniBooNE_CC1pip_XSec_1DEnu_nu.cxx b/src/MiniBooNE/MiniBooNE_CC1pip_XSec_1DEnu_nu.cxx index 55adb49..03e177e 100644 --- a/src/MiniBooNE/MiniBooNE_CC1pip_XSec_1DEnu_nu.cxx +++ b/src/MiniBooNE/MiniBooNE_CC1pip_XSec_1DEnu_nu.cxx @@ -1,110 +1,110 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "MiniBooNE_CC1pip_XSec_1DEnu_nu.h" //******************************************************************** MiniBooNE_CC1pip_XSec_1DEnu_nu::MiniBooNE_CC1pip_XSec_1DEnu_nu(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "MiniBooNE_CC1pip_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} (MeV)"); fSettings.SetYTitle("#sigma(E_{#nu}) (cm^{2}/CH_{2})"); fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG/NORM/MASK", "FIX"); - fSettings.SetEnuRange(0.0, 3.0); + fSettings.SetEnuRange(0.0, 100.0); fSettings.DefineAllowedTargets("C,H"); // CCQELike plot information fSettings.SetTitle("MiniBooNE_CC1pip_XSec_1DEnu_nu"); fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/CC1pip/ccpipXSec_enu.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() ); SetCovarFromDiagonal(); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; //******************************************************************** void MiniBooNE_CC1pip_XSec_1DEnu_nu::FillEventVariables(FitEvent* event) { //******************************************************************** if (event->NumFSParticle(211) == 0 || event->NumFSParticle(13) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; // No W cut on MiniBooNE data from publication // WARNING: DRAGONS LAY HERE! Mike Wilking's thesis might not have this. Beware that the publication says W < 1.35 GeV, but this is "efficiency corrected", i.e. FILLED WITH MONTE-CARLO!!!!!!!! AAAAAH //double hadMass = FitUtils::Wrec(Pnu, Pmu, Ppip); double Enu = FitUtils::EnuCC1piprec(Pnu, Pmu, Ppip); // if (isRat) Enu = Enu/1000.; //CCpi+/CCQE ratio paper puts in GeV, CCpi+ paper in MeV fXVar = Enu; return; }; // ********************************************* // MiniBooNE CC1pi+ signal definition // Warning: This one is a little scary because there's a W = 1.35 GeV cut for // signal in the selection // Although this is unfolded over and is filled up with NUANCE // So there is actually no W cut applied, but everything above W = 1.35 // GeV is NUANCE... // // The signal definition is: // Exactly one negative muon // Exactly one positive pion // No other mesons // No requirements on photons, nucleons and // multi-nucleons // Doesn't mention other leptons // // Additionally, it asks for 2 Michel e- from decay of muon and pion // So there is good purity and we can be fairly sure that the positive pion is a // positive pion // bool MiniBooNE_CC1pip_XSec_1DEnu_nu::isSignal(FitEvent *event) { return SignalDef::isCC1pi(event, 14, 211, EnuMin, EnuMax); } diff --git a/src/MiniBooNE/MiniBooNE_CC1pip_XSec_1DQ2_nu.cxx b/src/MiniBooNE/MiniBooNE_CC1pip_XSec_1DQ2_nu.cxx index 70eb368..e4c0b2b 100644 --- a/src/MiniBooNE/MiniBooNE_CC1pip_XSec_1DQ2_nu.cxx +++ b/src/MiniBooNE/MiniBooNE_CC1pip_XSec_1DQ2_nu.cxx @@ -1,87 +1,87 @@ // 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 <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "MiniBooNE_CC1pip_XSec_1DQ2_nu.h" //******************************************************************** MiniBooNE_CC1pip_XSec_1DQ2_nu::MiniBooNE_CC1pip_XSec_1DQ2_nu(nuiskey samplekey) { //******************************************************************** // Sample overview --------------------------------------------------- std::string descrip = "MiniBooNE_CC1pip_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}/MeV^{2}/CH_{2})"); fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG/NORM/MASK", "FIX/DIAG"); - fSettings.SetEnuRange(0.0, 3.0); + fSettings.SetEnuRange(0.0, 100.0); // No energy range given in v1r0 fSettings.DefineAllowedTargets("C,H"); // CCQELike plot information fSettings.SetTitle("MiniBooNE CC1pi"); fSettings.SetDataInput( FitPar::GetDataBase() + "MiniBooNE/CC1pip/ccpipXSec_Q2.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")/1E6; // Added /1E6. comes from Q2 being in MeV^2, not GeV^2 I think... Or maybe the units in the paper are simply wrong; 1E-45 is very small! :D // Plot Setup ------------------------------------------------------- SetDataFromTextFile( fSettings.GetDataInput() ); SetCovarFromDiagonal(); // Final setup --------------------------------------------------- FinaliseMeasurement(); }; //******************************************************************** void MiniBooNE_CC1pip_XSec_1DQ2_nu::FillEventVariables(FitEvent *event){ //******************************************************************** if (event->NumFSParticle(211) == 0 || event->NumFSParticle(13) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; // No W cut on MiniBooNE CC1pi+ double Q2CC1pip = FitUtils::Q2CC1piprec(Pnu, Pmu, Ppip); fXVar = Q2CC1pip; return; }; //******************************************************************** bool MiniBooNE_CC1pip_XSec_1DQ2_nu::isSignal(FitEvent *event) { //******************************************************************** return SignalDef::isCC1pi(event, 14, 211, EnuMin, EnuMax); } diff --git a/src/Reweight/FitWeight.cxx b/src/Reweight/FitWeight.cxx index 0ba834a..ffbac6f 100644 --- a/src/Reweight/FitWeight.cxx +++ b/src/Reweight/FitWeight.cxx @@ -1,235 +1,242 @@ #include "FitWeight.h" void FitWeight::AddRWEngine(int type) { switch (type) { case kNEUT: fAllRW[type] = new NEUTWeightEngine("neutrw"); break; case kNUWRO: fAllRW[type] = new NuWroWeightEngine("nuwrorw"); break; case kGENIE: fAllRW[type] = new GENIEWeightEngine("genierw"); break; case kNORM: fAllRW[type] = new SampleNormEngine("normrw"); break; case kLIKEWEIGHT: fAllRW[type] = new LikelihoodWeightEngine("likerw"); break; case kT2K: fAllRW[type] = new T2KWeightEngine("t2krw"); break; case kCUSTOM: fAllRW[type] = new NUISANCEWeightEngine("nuisrw"); break; case kSPLINEPARAMETER: fAllRW[type] = new SplineWeightEngine("splinerw"); break; case kNIWG: fAllRW[type] = new NIWGWeightEngine("niwgrw"); break; + default: + THROW("CANNOT ADD RW Engine for unknown dial type: " << type); + break; } } void FitWeight::IncludeDial(std::string name, std::string type, double val) { // Should register the dial here. int typeenum = Reweight::ConvDialType(type); IncludeDial(name, typeenum, val); } void FitWeight::IncludeDial(std::string name, int dialtype, double val) { // Get the dial enum int nuisenum = Reweight::ConvDial(name, dialtype); + if (nuisenum == -1){ + THROW("NUISENUM == " << nuisenum << " for " << name); + } + // Setup RW Engine Pointer if (fAllRW.find(dialtype) == fAllRW.end()) { AddRWEngine(dialtype); } WeightEngineBase* rw = fAllRW[dialtype]; // Include the dial rw->IncludeDial(name, val); // Set Dial Value if (val != -9999.9) { rw->SetDialValue(name, val); } // Sort Maps fAllEnums[name] = nuisenum; fAllValues[nuisenum] = val; // Sort Lists fNameList.push_back(name); fEnumList.push_back(nuisenum); fValueList.push_back(val); } void FitWeight::Reconfigure(bool silent) { // Reconfigure all added RW engines for (std::map<int, WeightEngineBase*>::iterator iter = fAllRW.begin(); iter != fAllRW.end(); iter++) { (*iter).second->Reconfigure(silent); } } void FitWeight::SetDialValue(std::string name, double val) { int nuisenum = fAllEnums[name]; SetDialValue(nuisenum, val); } // Allow for name aswell using GlobalList to determine sample name. void FitWeight::SetDialValue(int nuisenum, double val) { // Conv dial type int dialtype = int(nuisenum - (nuisenum % 1000)) / 1000; if (fAllRW.find(dialtype) == fAllRW.end()){ - THROW("Cannot find RW Engine for dialtype = " << dialtype); + THROW("Cannot find RW Engine for dialtype = " << dialtype << " " << nuisenum << " " << (nuisenum - (nuisenum % 1000)) / 1000); } // Get RW Engine for this dial fAllRW[dialtype]->SetDialValue(nuisenum, val); fAllValues[nuisenum] = val; // Update ValueList for (size_t i = 0; i < fEnumList.size(); i++) { if (fEnumList[i] == nuisenum) { fValueList[i] = val; } } } void FitWeight::SetAllDials(const double* x, int n) { for (size_t i = 0; i < (UInt_t)n; i++) { int rwenum = fEnumList[i]; SetDialValue(rwenum, x[i]); } Reconfigure(); } double FitWeight::GetDialValue(std::string name) { int nuisenum = fAllEnums[name]; return GetDialValue(nuisenum); } double FitWeight::GetDialValue(int nuisenum) { return fAllValues[nuisenum]; } int FitWeight::GetDialPos(std::string name) { int rwenum = fAllEnums[name]; return GetDialPos(rwenum); } int FitWeight::GetDialPos(int nuisenum) { for (size_t i = 0; i < fEnumList.size(); i++) { if (fEnumList[i] == nuisenum) { return i; } } ERR(FTL) << "No Dial Found! " << std::endl; throw; return -1; } bool FitWeight::DialIncluded(std::string name) { return (fAllEnums.find(name) != fAllEnums.end()); } bool FitWeight::DialIncluded(int rwenum) { return (fAllValues.find(rwenum) != fAllValues.end()); } double FitWeight::CalcWeight(BaseFitEvt* evt) { double rwweight = 1.0; for (std::map<int, WeightEngineBase*>::iterator iter = fAllRW.begin(); iter != fAllRW.end(); iter++) { double w = (*iter).second->CalcWeight(evt); // LOG(FIT) << "Iter " << (*iter).second->fCalcName << " = " << w << std::endl; rwweight *= w; } return rwweight; } void FitWeight::UpdateWeightEngine(const double* x) { size_t count = 0; for (std::vector<int>::iterator iter = fEnumList.begin(); iter != fEnumList.end(); iter++) { SetDialValue( (*iter), x[count] ); count++; } } void FitWeight::GetAllDials(double* x, int n) { for (int i = 0; i < n; i++) { x[i] = GetDialValue( fEnumList[i] ); } } bool FitWeight::NeedsEventReWeight(const double* x) { bool haschange = false; size_t count = 0; // Compare old to new and decide if RW needed. for (std::vector<int>::iterator iter = fEnumList.begin(); iter != fEnumList.end(); iter++) { int nuisenum = (*iter); int type = (nuisenum / 1000) - (nuisenum % 1000); // Compare old to new double oldval = GetDialValue(nuisenum); double newval = x[count]; if (oldval != newval) { if (fAllRW[type]->NeedsEventReWeight()) { haschange = true; } } count++; } return haschange; } double FitWeight::GetSampleNorm(std::string name) { if (name.empty()) return 1.0; // Find norm dial if (fAllEnums.find(name) != fAllEnums.end()) { if (fAllValues.find(fAllEnums[name]) != fAllValues.end()){ return fAllValues[ fAllEnums[name] ]; } else { return 1.0; } } else { return 1.0; } } void FitWeight::Print() { LOG(REC) << "Fit Weight State: " << std::endl; for (size_t i = 0; i < fNameList.size(); i++) { LOG(REC) << " -> Par " << i << ". " << fNameList[i] << " " << fValueList[i] << std::endl; } } diff --git a/src/Reweight/GENIEWeightEngine.cxx b/src/Reweight/GENIEWeightEngine.cxx index 2a2e73f..c066d8c 100644 --- a/src/Reweight/GENIEWeightEngine.cxx +++ b/src/Reweight/GENIEWeightEngine.cxx @@ -1,178 +1,200 @@ #include "GENIEWeightEngine.h" GENIEWeightEngine::GENIEWeightEngine(std::string name) { #ifdef __GENIE_ENABLED__ // Setup the NEUT Reweight engien fCalcName = name; LOG(FIT) << "Setting up GENIE RW : " << fCalcName << std::endl; // Create RW Engine suppressing cout StopTalking(); fGenieRW = new genie::rew::GReWeight(); // Get List of Vetos (Just for debugging) std::string rw_engine_list = FitPar::Config().GetParS("FitWeight.fGenieRW_veto"); bool xsec_ncel = rw_engine_list.find("xsec_ncel") == std::string::npos; bool xsec_ccqe = rw_engine_list.find("xsec_ccqe") == std::string::npos; bool xsec_coh = rw_engine_list.find("xsec_coh") == std::string::npos; bool xsec_nnres = rw_engine_list.find("xsec_nonresbkg") == std::string::npos; bool xsec_nudis = rw_engine_list.find("nuclear_dis") == std::string::npos; bool xsec_resdec = rw_engine_list.find("hadro_res_decay") == std::string::npos; bool xsec_fzone = rw_engine_list.find("hadro_intranuke") == std::string::npos; bool xsec_intra = rw_engine_list.find("hadro_fzone") == std::string::npos; bool xsec_agky = rw_engine_list.find("hadro_agky") == std::string::npos; bool xsec_qevec = rw_engine_list.find("xsec_ccqe_vec") == std::string::npos; bool xsec_dis = rw_engine_list.find("xsec_dis") == std::string::npos; bool xsec_nc = rw_engine_list.find("xsec_nc") == std::string::npos; bool xsec_ccres = rw_engine_list.find("xsec_ccres") == std::string::npos; bool xsec_ncres = rw_engine_list.find("xsec_ncres") == std::string::npos; bool xsec_nucqe = rw_engine_list.find("nuclear_qe") == std::string::npos; + bool xsec_qeaxial = rw_engine_list.find("xsec_ccqe_axial") == std::string::npos; // Now actually add the RW Calcs if (xsec_ncel) fGenieRW->AdoptWghtCalc("xsec_ncel", new genie::rew::GReWeightNuXSecNCEL); if (xsec_ccqe) fGenieRW->AdoptWghtCalc("xsec_ccqe", new genie::rew::GReWeightNuXSecCCQE); if (xsec_coh) fGenieRW->AdoptWghtCalc("xsec_coh", new genie::rew::GReWeightNuXSecCOH); if (xsec_nnres) fGenieRW->AdoptWghtCalc("xsec_nonresbkg", new genie::rew::GReWeightNonResonanceBkg); if (xsec_nudis) fGenieRW->AdoptWghtCalc("nuclear_dis", new genie::rew::GReWeightDISNuclMod); if (xsec_resdec) fGenieRW->AdoptWghtCalc("hadro_res_decay", new genie::rew::GReWeightResonanceDecay); if (xsec_fzone) fGenieRW->AdoptWghtCalc("hadro_fzone", new genie::rew::GReWeightFZone); if (xsec_intra) fGenieRW->AdoptWghtCalc("hadro_intranuke", new genie::rew::GReWeightINuke); if (xsec_agky) fGenieRW->AdoptWghtCalc("hadro_agky", new genie::rew::GReWeightAGKY); if (xsec_qevec) fGenieRW->AdoptWghtCalc("xsec_ccqe_vec", new genie::rew::GReWeightNuXSecCCQEvec); + if (xsec_qeaxial) + fGenieRW->AdoptWghtCalc("xsec_ccqe_axial", + new genie::rew::GReWeightNuXSecCCQEaxial); if (xsec_dis) fGenieRW->AdoptWghtCalc("xsec_dis", new genie::rew::GReWeightNuXSecDIS); if (xsec_nc) fGenieRW->AdoptWghtCalc("xsec_nc", new genie::rew::GReWeightNuXSecNC); if (xsec_ccres) fGenieRW->AdoptWghtCalc("xsec_ccres", new genie::rew::GReWeightNuXSecCCRES); if (xsec_ncres) fGenieRW->AdoptWghtCalc("xsec_ncres", new genie::rew::GReWeightNuXSecNCRES); if (xsec_nucqe) fGenieRW->AdoptWghtCalc("nuclear_qe", new genie::rew::GReWeightFGM); - GReWeightNuXSecCCQE * rwccqe = dynamic_cast<GReWeightNuXSecCCQE *> (fGenieRW->WghtCalc("xsec_ccqe")); rwccqe->SetMode(GReWeightNuXSecCCQE::kModeMa); // Default to include shape and normalization changes for CCRES (can be changed downstream if desired) GReWeightNuXSecCCRES * rwccres = dynamic_cast<GReWeightNuXSecCCRES *> (fGenieRW->WghtCalc("xsec_ccres")); rwccres->SetMode(GReWeightNuXSecCCRES::kModeMaMv); // Default to include shape and normalization changes for NCRES (can be changed downstream if desired) GReWeightNuXSecNCRES * rwncres = dynamic_cast<GReWeightNuXSecNCRES *> (fGenieRW->WghtCalc("xsec_ncres")); rwncres->SetMode(GReWeightNuXSecNCRES::kModeMaMv); // Default to include shape and normalization changes for DIS (can be changed downstream if desired) GReWeightNuXSecDIS * rwdis = dynamic_cast<GReWeightNuXSecDIS *> (fGenieRW->WghtCalc("xsec_dis")); rwdis->SetMode(GReWeightNuXSecDIS::kModeABCV12u); // Final Reconfigure fGenieRW->Reconfigure(); // Set Abs Twk Config fIsAbsTwk = (FitPar::Config().GetParB("setabstwk")); // allow cout again StartTalking(); #else ERR(FTL) << "GENIE RW NOT ENABLED" << std::endl; #endif }; void GENIEWeightEngine::IncludeDial(int nuisenum, double startval) { #ifdef __GENIE_ENABLED__ // Get RW Enum and name int rwenum = (nuisenum % 1000); genie::rew::GSyst_t rwsyst = static_cast<genie::rew::GSyst_t>(rwenum); std::string name = GSyst::AsString(rwsyst); // Fill Maps fGenieNameSysts[name] = rwsyst; fGenieEnumSysts[nuisenum] = rwsyst; // Initialize dial fGenieRW->Systematics().Init( fGenieEnumSysts[nuisenum] ); + // Add line to check dial is actually handled. + // if (fGenieRW->Systematics().IsHandled + // If Absolute if (fIsAbsTwk) { GSystUncertainty::Instance()->SetUncertainty( fGenieEnumSysts[nuisenum], 1.0, 1.0 ); } // Set Value if given if (startval != -999.9) { SetDialValue(nuisenum, startval); } #endif }; void GENIEWeightEngine::SetDialValue(int nuisenum, double val) { #ifdef __GENIE_ENABLED__ // Set RW engine values int rwenum = (nuisenum % 1000); fGenieRW->Systematics().Set(static_cast<genie::rew::GSyst_t>(rwenum), val); #endif } void GENIEWeightEngine::Reconfigure(bool silent) { #ifdef __GENIE_ENABLED__ // Hush now... if (silent) StopTalking(); // Reconf fGenieRW->Reconfigure(); // Shout again if (silent) StartTalking(); #endif } double GENIEWeightEngine::CalcWeight(BaseFitEvt* evt) { double rw_weight = 1.0; #ifdef __GENIE_ENABLED__ // Skip Non GENIE if (evt->fType != kGENIE) return 1.0; // Make nom weight + if (!evt){ + THROW("evt not found : " << evt); + } + + if (!(evt->genie_event)){ + THROW("evt->genie_event not found!" << evt->genie_event); + } + + if (!(evt->genie_event->event)){ + THROW("evt->genie_event->event GHepRecord not found!" << (evt->genie_event->event)); + } + + if (!fGenieRW){ + THROW("GENIE RW Not Found!" << fGenieRW); + } + rw_weight = fGenieRW->CalcWeight(*(evt->genie_event->event)); // std::cout << "Returning GENIE Weight for electron scattering = " << rw_weight << std::endl; #endif // Return rw_weight return rw_weight; } diff --git a/src/Reweight/GENIEWeightEngine.h b/src/Reweight/GENIEWeightEngine.h index 2211a68..cf31dd8 100644 --- a/src/Reweight/GENIEWeightEngine.h +++ b/src/Reweight/GENIEWeightEngine.h @@ -1,58 +1,59 @@ #ifndef WEIGHT_ENGINE_GENIE_H #define WEIGHT_ENGINE_GENIE_H #include "FitLogger.h" #ifdef __GENIE_ENABLED__ #include "EVGCore/EventRecord.h" #include "EVGCore/EventRecord.h" #include "GHEP/GHepRecord.h" #include "GSyst.h" #include "GSystUncertainty.h" #include "Ntuple/NtpMCEventRecord.h" #include "ReWeight/GReWeight.h" #include "ReWeight/GReWeightAGKY.h" #include "ReWeight/GReWeightDISNuclMod.h" #include "ReWeight/GReWeightFGM.h" #include "ReWeight/GReWeightFZone.h" #include "ReWeight/GReWeightINuke.h" #include "ReWeight/GReWeightNonResonanceBkg.h" #include "ReWeight/GReWeightNuXSecCCQE.h" #include "ReWeight/GReWeightNuXSecCCQEvec.h" +#include "ReWeight/GReWeightNuXSecCCQEaxial.h" #include "ReWeight/GReWeightNuXSecCCRES.h" #include "ReWeight/GReWeightNuXSecCOH.h" #include "ReWeight/GReWeightNuXSecDIS.h" #include "ReWeight/GReWeightNuXSecNC.h" #include "ReWeight/GReWeightNuXSecNCEL.h" #include "ReWeight/GReWeightNuXSecNCRES.h" #include "ReWeight/GReWeightResonanceDecay.h" using namespace genie; using namespace genie::rew; #endif #include "GeneratorUtils.h" #include "WeightEngineBase.h" #include "FitWeight.h" class GENIEWeightEngine : public WeightEngineBase { public: GENIEWeightEngine(std::string name); ~GENIEWeightEngine() {}; void IncludeDial(int nuisenum, double startval); void SetDialValue(int rwenum, double val); void Reconfigure(bool silent = false); double CalcWeight(BaseFitEvt* evt); inline bool NeedsEventReWeight() { return true; }; #ifdef __GENIE_ENABLED__ std::map<std::string, genie::rew::GSyst_t> fGenieNameSysts; std::map<int, genie::rew::GSyst_t> fGenieEnumSysts; genie::rew::GReWeight* fGenieRW; //!< Genie RW Object #endif }; #endif diff --git a/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx b/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx index c058c03..6e04801 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuDelta_nu.cxx @@ -1,73 +1,74 @@ #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); // 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 cd97a9a..6779ad4 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuMB_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1DEnuMB_nu.cxx @@ -1,79 +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); + // 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 4156798..a92a430 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmu_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmu_nu.cxx @@ -1,72 +1,73 @@ #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); + // 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 5b6264a..a56f805 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcosmupi_nu.cxx @@ -1,70 +1,71 @@ #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); + // 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 51ccaf4..3ba843d 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dcospi_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dcospi_nu.cxx @@ -1,67 +1,68 @@ #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); + // 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 d653511..5f482f0 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dpmu_nu.cxx @@ -1,69 +1,70 @@ #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); + // 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 beb9357..594c1be 100644 --- a/src/T2K/T2K_CC1pip_H2O_XSec_1Dppi_nu.cxx +++ b/src/T2K/T2K_CC1pip_H2O_XSec_1Dppi_nu.cxx @@ -1,68 +1,69 @@ #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); + // 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); } diff --git a/validation/nightly-test/README b/validation/nightly-test/README new file mode 100644 index 0000000..7c50ea4 --- /dev/null +++ b/validation/nightly-test/README @@ -0,0 +1,16 @@ + + +This set of quick and dirty scripts run rolling validations of a given nuisance branch if run-nightly-test is setup +to run at midnight with a cronjob + +To setup, the xml files in base-comparisons-1 need to be edited to point to the correct input files, and the generator +setup script needs to be pointed to all external libraries. + +run-nightly-test will checkout the branch, build it, run any comparisons, then clean and tar up the used branch code. + +When first setting up, a stable bench mark should be created by running create-benchmark.sh + + + + + diff --git a/validation/nightly-test/base-comparisons-1/build-script.sh b/validation/nightly-test/base-comparisons-1/build-script.sh new file mode 100644 index 0000000..aef4a7d --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/build-script.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Checkout nuisance +git clone http://nuisance.hepforge.org/git/nuisance.git + +# Setup Generators +source $PWD/generator-setup.sh + +# Build NUISANCE +mkdir nuisance/build/ +cd nuisance/build/ +cmake ../ -DUSE_NEUT=1 -DUSE_GENIE=1 -DUSE_NuWro=1 -DBUILD_GEVGEN=0 +make -j6 +make install +source Linux/setup.sh +cd ../../ +pwd +echo "Finished building" + + + + + diff --git a/validation/nightly-test/base-comparisons-1/clean-script.sh b/validation/nightly-test/base-comparisons-1/clean-script.sh new file mode 100644 index 0000000..56aa3a5 --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/clean-script.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +rm -rf nuisance/build/ +export GZIP=-9 +tar -czvf nuisance_code.tar.gz ./nuisance/ +rm -rf nuisance/ diff --git a/validation/nightly-test/base-comparisons-1/create-bench.sh b/validation/nightly-test/base-comparisons-1/create-bench.sh new file mode 100644 index 0000000..70d711c --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/create-bench.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +source build-script.sh +source run-nuisance.sh +source clean-script.sh + +ln -sf $PWD/ $PWD/../base-benchmark/ \ No newline at end of file diff --git a/validation/nightly-test/base-comparisons-1/generator-setup.sh b/validation/nightly-test/base-comparisons-1/generator-setup.sh new file mode 100644 index 0000000..27b1cd0 --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/generator-setup.sh @@ -0,0 +1,127 @@ +# 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 <http://www.gnu.org/licenses/>. +################################################################################ + +#!/bin/sh +if ! [[ ":$PATH:" == *":/home/stowell/t2krep/NIWG/nuisance/branches/master_refactor/master/builds/default/Linux/bin:"* ]]; then + export PATH=/home/stowell/t2krep/NIWG/nuisance/branches/master_refactor/master/builds/default/Linux/bin:$PATH +fi + +if ! [[ ":$LD_LIBRARY_PATH:" == *":/home/stowell/t2krep/NIWG/nuisance/branches/master_refactor/master/builds/default/Linux/lib:"* ]]; then + export LD_LIBRARY_PATH=/home/stowell/t2krep/NIWG/nuisance/branches/master_refactor/master/builds/default/Linux/lib:$LD_LIBRARY_PATH +fi + +if [[ ! "${ROOTSYS}" ]]; then + echo "[INFO]: Sourcing ROOT from: /usr/local/t2k-software/ROOT-NUISANCE/root" + source "/usr/local/t2k-software/ROOT-NUISANCE/root/bin/thisroot.sh" +fi + + +if [[ "1" != "0" ]]; then + echo "[INFO]: Adding NEUT library paths to the environment." + export NEUT_ROOT=/data/stowell/NIWG/neut/branches/neut_5.3.6_freenucleonCCQE + export CERN=/usr/local/t2k-software/cern/ + export CERN_LEVEL=2005 + if ! [[ ":$LD_LIBRARY_PATH:" == *":${NEUT_ROOT}/lib/Linux_pc:"* ]]; then + export LD_LIBRARY_PATH=${NEUT_ROOT}/lib/Linux_pc:$LD_LIBRARY_PATH + fi + if ! [[ ":$LD_LIBRARY_PATH:" == *":${NEUT_ROOT}/src/reweight:"* ]]; then + export LD_LIBRARY_PATH=${NEUT_ROOT}/src/reweight:$LD_LIBRARY_PATH + fi +fi + +if [[ "1" != "0" ]]; then + echo "[INFO]: Adding NuWro library paths to the environment." + export NUWRO="/usr/local/t2k-software/NuWro-v12" + if ! [[ ":$LD_LIBRARY_PATH:" == *":/usr/local/t2k-software/NuWro-v12/build/Linux/lib:"* ]]; then + export LD_LIBRARY_PATH=/usr/local/t2k-software/NuWro-v12/build/Linux/lib:$LD_LIBRARY_PATH + fi +fi + +if [[ "TRUE" != "0" ]]; then + echo "[INFO]: Adding PYTHIA6 library paths to the environment." + export PYTHIA6="/usr/local/t2k-software/pythia6" + if ! [[ ":$LD_LIBRARY_PATH:" == *":/usr/local/t2k-software/pythia6:"* ]]; then + export LD_LIBRARY_PATH=/usr/local/t2k-software/pythia6:$LD_LIBRARY_PATH + fi +fi + +if [[ "1" != "0" ]]; then + echo "[INFO]: Adding GENIE paths to the environment." + + export GENIE="/data/stowell/NIWG/genie/branches/R-2_12_6" + + export LHAPDF_LIB="/usr/local/t2k-software/lhapdf/lib/" + export LHAPDF_INC="/usr/local/t2k-software/lhapdf/include/" + + export LIBXML2_LIB="/usr/lib/" + export LIBXML2_INC="/usr/include/libxml2/libxml/" + + export LOG4CPP_LIB="/usr/local/t2k-software/log4cpp/src/.libs" + export LOG4CPP_INC="/usr/local/t2k-software/log4cpp/include" + + export LHAPATH="/usr/local/t2k-software/lhapdf/share/lhapdf/PDFsets" + + if ! [[ ":$LD_LIBRARY_PATH:" == *":/data/stowell/NIWG/genie/branches/R-2_12_6/lib:"* ]]; then + export LD_LIBRARY_PATH=/data/stowell/NIWG/genie/branches/R-2_12_6/lib:$LD_LIBRARY_PATH + fi + + if ! [[ ":$LD_LIBRARY_PATH:" == *":/usr/local/t2k-software/lhapdf/lib/:"* ]]; then + export LD_LIBRARY_PATH=/usr/local/t2k-software/lhapdf/lib/:$LD_LIBRARY_PATH + fi + + if ! [[ ":$LD_LIBRARY_PATH:" == *":/usr/lib/:"* ]]; then + export LD_LIBRARY_PATH=/usr/lib/:$LD_LIBRARY_PATH + fi + + if ! [[ ":$LD_LIBRARY_PATH:" == *":/usr/local/t2k-software/log4cpp/src/.libs:"* ]]; then + export LD_LIBRARY_PATH=/usr/local/t2k-software/log4cpp/src/.libs:$LD_LIBRARY_PATH + fi +fi + +if [[ "0" != "0" ]]; then + echo "[INFO]: Adding NIWG paths to the environment." + export NIWG= + export NIWGREWEIGHT_INPUTS=/inputs + if ! [[ ":$LD_LIBRARY_PATH:" == *"::"* ]]; then + export LD_LIBRARY_PATH=${NIWG}:${LD_LIBRARY_PATH} + fi + +fi + +if [[ "0" != "0" ]]; then + echo "[INFO]: Adding T2K paths to the environment." + export T2KREWEIGHT= + if ! [[ ":$LD_LIBRARY_PATH:" == *":/lib:"* ]]; then + export LD_LIBRARY_PATH=${T2KREWEIGHT}/lib:${LD_LIBRARY_PATH} + fi +fi + +if [[ "0" != "0" ]]; then + echo "[INFO]: Sourcing GiBUU tools." + source /home/stowell/t2krep/NIWG/nuisance/branches/master_refactor/master/builds/default/GiBUUTools/src/GiBUUTools-build/Linux/setup.sh +fi + +source $GENIE/genie_prereq.sh + +source $GENIE/genie_setup.sh + + + + + diff --git a/validation/nightly-test/base-comparisons-1/genie_allsamples.xml b/validation/nightly-test/base-comparisons-1/genie_allsamples.xml new file mode 100644 index 0000000..a8eac6e --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/genie_allsamples.xml @@ -0,0 +1,268 @@ +<nuisance> + + <config GENIE_DIR='/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/' /> + + <!-- ANL SAMPLES --> + <!-- ANL CCQE --> + <sample name="ANL_CCQE_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CCQE_XSec_1DEnu_nu_PRD26" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CCQE_XSec_1DEnu_nu_PRL31" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CCQE_XSec_1DEnu_nu_PRD16" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu_PRL31" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu_PRD26" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu_PRD16" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <!-- ANL CC1PPIP --> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_W14Cut" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_W14Cut_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_W16Cut_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_Evt_1DQ2_nu_W14Cut" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_Evt_1Dppi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_Evt_1Dthpr_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_Evt_1DcosmuStar_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_Evt_1DcosthAdler_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1ppip_Evt_1Dphi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <!-- ANL CC1NPIP --> + <sample name="ANL_CC1npip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_W14Cut" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_W14Cut_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_W16Cut_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1npip_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1npip_Evt_1DQ2_nu_W14Cut" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1npip_Evt_1Dppi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1npip_Evt_1DcosmuStar_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_W14Cut" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_W14Cut_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_W16Cut_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1pi0_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1pi0_Evt_1DQ2_nu_W14Cut" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC1pi0_Evt_1DcosmuStar_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <!-- ANL NC --> + <sample name="ANL_NC1npip_Evt_1Dppi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_NC1ppim_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_NC1ppim_Evt_1DcosmuStar_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <!-- ANL CC2PI --> + <sample name="ANL_CC2pi_1pim1pip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dpmu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dppip_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dppim_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dpprot_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pip1pip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1Dpmu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1Dpneut_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1DppipHigh_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1DppipLow_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pip1pi0_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dpmu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dppip_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dppi0_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dpprot_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ANL/ANL_numu_2.5M.root" /> + + <!-- ArgoNeuT SAMPLES --> + <!-- ArgoNeuT Neutrino --> + <sample name="ArgoNeuT_CCInc_XSec_1Dpmu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ArgoNeut/ArgoNeut_numu_2.5M.root" /> + <sample name="ArgoNeuT_CCInc_XSec_1Dthetamu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ArgoNeut/ArgoNeut_numu_2.5M.root" /> + <!-- ArgoNeuT AntiNeutrino --> + <sample name="ArgoNeuT_CCInc_XSec_1Dpmu_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ArgoNeut/ArgoNeut_numub_2.5M.root" /> + <sample name="ArgoNeuT_CCInc_XSec_1Dthetamu_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/ArgoNeut/ArgoNeut_numub_2.5M.root" /> + + <!-- BNL SAMPLES --> + <!-- BNL CCQE --> + <sample name="BNL_CCQE_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CCQE_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <!-- BNL CC1ppip --> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu_W14Cut" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu_W14Cut_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CC1ppip_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CC1ppip_Evt_1DQ2_nu_W14Cut" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CC1ppip_Evt_1DcosthAdler_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CC1ppip_Evt_1Dphi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <!-- BNL CC1npip --> + <sample name="BNL_CC1npip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CC1npip_XSec_1DEnu_nu_Uncorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CC1npip_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <!-- BNL CC1ppip --> + <sample name="BNL_CC1pi0_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + <sample name="BNL_CC1pi0_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BNL/BNL_numu_2.5M.root" /> + + <!-- FNAL SAMPLES --> + <!-- FNAL CCQE --> + <sample name="FNAL_CCQE_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/FNAL/FNAL_numu_2.5M.root" /> + <!-- FNAL CC1ppip --> + <sample name="FNAL_CC1ppip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/FNAL/FNAL_numu_2.5M.root" /> + <sample name="FNAL_CC1ppip_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/FNAL/FNAL_numu_2.5M.root" /> + <sample name="FNAL_CC1ppip_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/FNAL/FNAL_numu_2.5M.root" /> + <!-- FNAL CC1ppim Antineutrino --> + <sample name="FNAL_CC1ppim_XSec_1DEnu_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/FNAL/FNAL_numub_2.5M.root" /> + + <!-- BEBC SAMPLES --> + <!-- BEBC CCQE --> + <sample name="BEBC_CCQE_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numu_2.5M.root" /> + <!-- BEBC CC1ppip --> + <sample name="BEBC_CC1ppip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numu_2.5M.root" /> + <sample name="BEBC_CC1ppip_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numu_2.5M.root" /> + <!-- BEBC CC1npip --> + <sample name="BEBC_CC1npip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numu_2.5M.root" /> + <sample name="BEBC_CC1npip_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numu_2.5M.root" /> + <!-- BEBC CC1pi0 --> + <sample name="BEBC_CC1pi0_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numu_2.5M.root" /> + <sample name="BEBC_CC1pi0_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numu_2.5M.root" /> + <!-- BEBC CC1npim Antineutrino --> + <sample name="BEBC_CC1npim_XSec_1DEnu_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numub_2.5M.root" /> + <sample name="BEBC_CC1npim_XSec_1DQ2_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numub_2.5M.root" /> + <sample name="BEBC_CC1ppim_XSec_1DEnu_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numub_2.5M.root" /> + <sample name="BEBC_CC1ppim_XSec_1DQ2_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/BEBC/BEBC_numub_2.5M.root" /> + + <!-- GGM SAMPLES --> + <!-- GGM CC1ppip --> + <sample name="GGM_CC1ppip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/GGM/GGM_numu_2.5M.root" /> + <sample name="GGM_CC1ppip_Evt_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/GGM/GGM_numu_2.5M.root" /> + + <!-- MiniBooNE SAMPLES --> + <!-- MiniBooNE CCQELike NuMu --> + <sample name="MiniBooNE_CCQE_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CCQE_XSec_2DTcos_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <!-- MiniBooNE CC0PI NuMu --> + <sample name="MiniBooNE_CCQELike_XSec_2DTcos_nu" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numub_2.5M.root)" /> + <sample name="MiniBooNE_CCQELike_XSec_1DQ2_nu" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numub_2.5M.root)" /> + <!-- MiniBooNE CCQELike AntiNuMu --> + <sample name="MiniBooNE_CCQE_XSec_1DQ2_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numub_2.5M.root" /> + <sample name="MiniBooNE_CCQE_CTarg_XSec_1DQ2_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numub_2.5M.root" /> + <sample name="MiniBooNE_CCQE_XSec_2DTcos_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numub_2.5M.root" /> + <!-- MiniBooNE CC0PI AntiNuMu --> + <sample name="MiniBooNE_CCQELike_XSec_2DTcos_antinu" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numub_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numu_2.5M.root)" /> + <sample name="MiniBooNE_CCQELike_XSec_1DQ2_antinu" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numub_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numu_2.5M.root)" /> + <!-- MiniBooNE CC1PIP --> + <sample name="MiniBooNE_CC1pip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pip_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pip_XSec_1DTpi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pip_XSec_1DTu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DQ2Enu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTpiCospi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTpiEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTuCosmu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTuEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <!-- MiniBooNE CC1PI0 --> + <sample name="MiniBooNE_CC1pi0_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1DTu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1Dcosmu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1Dcospi0_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1Dppi0_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <!-- MiniBooNE NC1pi0 Neutrino --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root" /> + <!-- MiniBooNE NC1pi0 Antineutrino --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numub_2.5M.root" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numub_2.5M.root" /> + <!-- MiniBooNE NC1pi0 FHC --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_fhc" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numub_2.5M.root)" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_fhc" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numub_2.5M.root)" /> + <!-- MiniBooNE NC1pi0 RHC --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_rhc" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numub_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numu_2.5M.root)" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_rhc" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numub_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_RHC_numu_2.5M.root)" /> + <!-- MiniBooNE NCEL --> + <sample name="MiniBooNE_NCEL_XSec_Treco_nu" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numu_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MiniBooNE/MiniBooNE_FHC_numub_2.5M.root)" /> + + <!-- MINERvA SAMPLES --> + <!-- MINERvA CCQELike NUMU --> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu_20deg" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu_oldflux" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu_20deg_oldflux" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <!-- MINERvA CCQELike NUMUBAR --> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu_20deg" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu_oldflux" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu_20deg_oldflux" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <!-- MINERvA CCQELike JOINT --> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint_oldflux" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint_20deg_oldflux" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint_20deg" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <!-- MINERvA CC0PI JOINT --> + <sample name="MINERvA_CC0pi_XSec_1DEe_nue" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_nue_CH_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_nueb_CH_2.5M.root)" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_nue" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_nue_CH_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_nueb_CH_2.5M.root)" /> + <sample name="MINERvA_CC0pi_XSec_1DThetae_nue" input="GENIE:(/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_nue_CH_2.5M.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_nueb_CH_2.5M.root)" /> + <!-- MINERvA CC0PI1p --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_nu_proton" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <!-- MINERvA CC1ppip --> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu_20deg" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu_20deg_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu_20deg" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu_20deg_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <!-- MINERvA CCNpip --> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2016" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015_20deg" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015_20deg_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2016" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015_20deg" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015_20deg_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dthmu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dpmu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1DQ2_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCNpip_XSec_1DEnu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <!-- MINERvA CC1pi0 Antineutrino --> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2015" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2016" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2015_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2016_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dppi0_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dppi0_antinu_fluxcorr" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1DTpi0_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1DQ2_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dthmu_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dpmu_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CC1pi0_XSec_1DEnu_antinu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <sample name="MINERvA_CCinc_XSec_2DEavq3_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_RHC_numub_CH_2.5M.root" /> + <!-- MINERvA Carbon targets --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtC_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_C_2.5M.root" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtRatioC_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_C_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCinc_XSec_1Dx_ratio_C12_CH" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_C_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCinc_XSec_1DEnu_ratio_C12_CH" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_C_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <!-- MINERvA Iron targets --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtFe_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_Fe_2.5M.root" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtRatioFe_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_Fe_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCinc_XSec_1Dx_ratio_Fe56_CH" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_Fe_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCinc_XSec_1DEnu_ratio_Fe56_CH" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_Fe_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <!-- MINERvA Lead targets --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtPb_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_Pb_2.5M.root" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtRatioPb_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_Pb_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCinc_XSec_1Dx_ratio_Pb208_CH" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_Pb_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + <sample name="MINERvA_CCinc_XSec_1DEnu_ratio_Pb208_CH" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_Pb_2.5M.root;GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/MINERvA/MINERvA_FHC_numu_CH_2.5M.root" /> + + <!-- T2K SAMPLES --> + <!-- T2K CC0pi --> + <sample name="T2K_CC0pi_XSec_2DPcos_nu_II" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/T2K/T2K_FHC_numu_CH_2.5M.root" /> + <sample name="T2K_CC0pi_XSec_2DPcos_nu_nonuniform" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/T2K/T2K_FHC_numu_CH_2.5M.root" /> + <!-- T2K CC1pi H2O --> + <sample name="T2K_CC1pip_H2O_XSec_1DEnuDelta_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/T2K/T2K_FHC_numu_H2O_2.5M.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1DEnuMB_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/T2K/T2K_FHC_numu_H2O_2.5M.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dcosmu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/T2K/T2K_FHC_numu_H2O_2.5M.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dcosmupi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/T2K/T2K_FHC_numu_H2O_2.5M.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dcospi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/T2K/T2K_FHC_numu_H2O_2.5M.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dpmu_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/T2K/T2K_FHC_numu_H2O_2.5M.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dppi_nu" input="GENIE:/data/stowell/NIWG/NuisanceEvents/Winter2016/genie/T2K/T2K_FHC_numu_H2O_2.5M.root" /> + +</nuisance> diff --git a/validation/nightly-test/base-comparisons-1/neut_allsamples.xml b/validation/nightly-test/base-comparisons-1/neut_allsamples.xml new file mode 100644 index 0000000..2fa6700 --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/neut_allsamples.xml @@ -0,0 +1,268 @@ +<nuisance> + + <config NEUT_DIR='/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/' /> + + <!-- ANL SAMPLES --> + <!-- ANL CCQE --> + <sample name="ANL_CCQE_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CCQE_XSec_1DEnu_nu_PRD26" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CCQE_XSec_1DEnu_nu_PRL31" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CCQE_XSec_1DEnu_nu_PRD16" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu_PRL31" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu_PRD26" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu_PRD16" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <!-- ANL CC1PPIP --> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_W14Cut" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_W14Cut_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_W16Cut_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_Evt_1DQ2_nu_W14Cut" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_Evt_1Dppi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_Evt_1Dthpr_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_Evt_1DcosmuStar_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_Evt_1DcosthAdler_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1ppip_Evt_1Dphi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <!-- ANL CC1NPIP --> + <sample name="ANL_CC1npip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_W14Cut" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_W14Cut_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_W16Cut_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1npip_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1npip_Evt_1DQ2_nu_W14Cut" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1npip_Evt_1Dppi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1npip_Evt_1DcosmuStar_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_W14Cut" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_W14Cut_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_W16Cut_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1pi0_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1pi0_Evt_1DQ2_nu_W14Cut" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC1pi0_Evt_1DcosmuStar_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <!-- ANL NC --> + <sample name="ANL_NC1npip_Evt_1Dppi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_NC1ppim_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_NC1ppim_Evt_1DcosmuStar_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <!-- ANL CC2PI --> + <sample name="ANL_CC2pi_1pim1pip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dpmu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dppip_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dppim_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dpprot_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pip1pip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1Dpmu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1Dpneut_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1DppipHigh_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1DppipLow_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pip1pi0_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dpmu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dppip_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dppi0_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dpprot_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_ANL_fhc_numu_D2_numu.root" /> + + <!-- ArgoNeuT SAMPLES --> + <!-- ArgoNeuT Neutrino --> + <sample name="ArgoNeuT_CCInc_XSec_1Dpmu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/ArgoNeut_numu_trunk_merge.root" /> + <sample name="ArgoNeuT_CCInc_XSec_1Dthetamu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/ArgoNeut_numu_trunk_merge.root" /> + <!-- ArgoNeuT AntiNeutrino --> + <sample name="ArgoNeuT_CCInc_XSec_1Dpmu_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/ArgoNeut_numubar_trunk_merge.root" /> + <sample name="ArgoNeuT_CCInc_XSec_1Dthetamu_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/ArgoNeut_numubar_trunk_merge.root" /> + + <!-- BNL SAMPLES --> + <!-- BNL CCQE --> + <sample name="BNL_CCQE_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CCQE_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <!-- BNL CC1ppip --> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu_W14Cut" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu_W14Cut_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CC1ppip_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CC1ppip_Evt_1DQ2_nu_W14Cut" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CC1ppip_Evt_1DcosthAdler_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CC1ppip_Evt_1Dphi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <!-- BNL CC1npip --> + <sample name="BNL_CC1npip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CC1npip_XSec_1DEnu_nu_Uncorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CC1npip_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <!-- BNL CC1ppip --> + <sample name="BNL_CC1pi0_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + <sample name="BNL_CC1pi0_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BNL_fhc_numu_D2_numu.root" /> + + <!-- FNAL SAMPLES --> + <!-- FNAL CCQE --> + <sample name="FNAL_CCQE_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_FNAL_fhc_numu_D2_numu.root" /> + <!-- FNAL CC1ppip --> + <sample name="FNAL_CC1ppip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_FNAL_fhc_numu_D2_numu.root" /> + <sample name="FNAL_CC1ppip_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_FNAL_fhc_numu_D2_numu.root" /> + <sample name="FNAL_CC1ppip_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_FNAL_fhc_numu_D2_numu.root" /> + <!-- FNAL CC1ppim Antineutrino --> + <sample name="FNAL_CC1ppim_XSec_1DEnu_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/FNAL_numubar_CCQE_trunk_merge.root" /> + + <!-- BEBC SAMPLES --> + <!-- BEBC CCQE --> + <sample name="BEBC_CCQE_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numu_D2_numu.root" /> + <!-- BEBC CC1ppip --> + <sample name="BEBC_CC1ppip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numu_D2_numu.root" /> + <sample name="BEBC_CC1ppip_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numu_D2_numu.root" /> + <!-- BEBC CC1npip --> + <sample name="BEBC_CC1npip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numu_D2_numu.root" /> + <sample name="BEBC_CC1npip_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numu_D2_numu.root" /> + <!-- BEBC CC1pi0 --> + <sample name="BEBC_CC1pi0_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numu_D2_numu.root" /> + <sample name="BEBC_CC1pi0_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numu_D2_numu.root" /> + <!-- BEBC CC1npim Antineutrino --> + <sample name="BEBC_CC1npim_XSec_1DEnu_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numub_D2_numub.root" /> + <sample name="BEBC_CC1npim_XSec_1DQ2_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numub_D2_numub.root" /> + <sample name="BEBC_CC1ppim_XSec_1DEnu_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numub_D2_numub.root" /> + <sample name="BEBC_CC1ppim_XSec_1DQ2_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/freenucleons_dipole_neut_trunk_NUISANCE_BEBC_fhc_numub_D2_numub.root" /> + + <!-- GGM SAMPLES --> + <!-- GGM CC1ppip --> + <sample name="GGM_CC1ppip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/GGM_numu_trunk_merge.root" /> + <sample name="GGM_CC1ppip_Evt_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/GGM_numu_trunk_merge.root" /> + + <!-- MiniBooNE SAMPLES --> + <!-- MiniBooNE CCQELike NuMu --> + <sample name="MiniBooNE_CCQE_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CCQE_XSec_2DTcos_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <!-- MiniBooNE CC0PI NuMu --> + <sample name="MiniBooNE_CCQELike_XSec_2DTcos_nu" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_fhc_trunk_merge.root)" /> + <sample name="MiniBooNE_CCQELike_XSec_1DQ2_nu" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_fhc_trunk_merge.root)" /> + <!-- MiniBooNE CCQELike AntiNuMu --> + <sample name="MiniBooNE_CCQE_XSec_1DQ2_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_rhc_trunk_merge.root" /> + <sample name="MiniBooNE_CCQE_CTarg_XSec_1DQ2_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_rhc_trunk_merge.root" /> + <sample name="MiniBooNE_CCQE_XSec_2DTcos_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_rhc_trunk_merge.root" /> + <!-- MiniBooNE CC0PI AntiNuMu --> + <sample name="MiniBooNE_CCQELike_XSec_2DTcos_antinu" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_rhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_rhc_trunk_merge.root)" /> + <sample name="MiniBooNE_CCQELike_XSec_1DQ2_antinu" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_rhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_rhc_trunk_merge.root)" /> + <!-- MiniBooNE CC1PIP --> + <sample name="MiniBooNE_CC1pip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pip_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pip_XSec_1DTpi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pip_XSec_1DTu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DQ2Enu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTpiCospi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTpiEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTuCosmu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTuEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <!-- MiniBooNE CC1PI0 --> + <sample name="MiniBooNE_CC1pi0_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1DTu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1Dcosmu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1Dcospi0_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1Dppi0_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <!-- MiniBooNE NC1pi0 Neutrino --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root" /> + <!-- MiniBooNE NC1pi0 Antineutrino --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_rhc_trunk_merge.root" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_rhc_trunk_merge.root" /> + <!-- MiniBooNE NC1pi0 FHC --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_fhc" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_fhc_trunk_merge.root)" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_fhc" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_fhc_trunk_merge.root)" /> + <!-- MiniBooNE NC1pi0 RHC --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_rhc" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_rhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_rhc_trunk_merge.root)" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_rhc" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_rhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_rhc_trunk_merge.root)" /> + <!-- MiniBooNE NCEL --> + <sample name="MiniBooNE_NCEL_XSec_Treco_nu" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numu_fhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MB_numubar_fhc_trunk_merge.root)" /> + + <!-- MINERvA SAMPLES --> + <!-- MINERvA CCQELike NUMU --> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu_20deg" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu_oldflux" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu_20deg_oldflux" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <!-- MINERvA CCQELike NUMUBAR --> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu_20deg" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu_oldflux" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu_20deg_oldflux" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <!-- MINERvA CCQELike JOINT --> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint_oldflux" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint_20deg_oldflux" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint_20deg" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <!-- MINERvA CC0PI JOINT --> + <sample name="MINERvA_CC0pi_XSec_1DEe_nue" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_nue_fhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_nue_rhc_trunk_merge.root)" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_nue" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_nue_fhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_nue_rhc_trunk_merge.root)" /> + <sample name="MINERvA_CC0pi_XSec_1DThetae_nue" input="NEUT:(/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_nue_fhc_trunk_merge.root,/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_nue_rhc_trunk_merge.root)" /> + <!-- MINERvA CC0PI1p --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_nu_proton" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <!-- MINERvA CC1ppip --> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu_20deg" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu_20deg_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu_20deg" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu_20deg_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <!-- MINERvA CCNpip --> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2016" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015_20deg" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015_20deg_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2016" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015_20deg" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015_20deg_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dthmu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dpmu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1DQ2_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCNpip_XSec_1DEnu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <!-- MINERvA CC1pi0 Antineutrino --> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2015" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2016" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2015_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2016_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dppi0_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dppi0_antinu_fluxcorr" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1DTpi0_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1DQ2_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dthmu_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dpmu_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CC1pi0_XSec_1DEnu_antinu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <sample name="MINERvA_CCinc_XSec_2DEavq3_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numubar_rhc_traunk_merge.root" /> + <!-- MINERvA Carbon targets --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtC_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_C_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtRatioC_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_C_numu_fhc_trunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCinc_XSec_1Dx_ratio_C12_CH" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_C_numu_fhc_trunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCinc_XSec_1DEnu_ratio_C12_CH" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_C_numu_fhc_trunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <!-- MINERvA Iron targets --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtFe_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_Fe_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtRatioFe_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_Fe_numu_fhc_trunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCinc_XSec_1Dx_ratio_Fe56_CH" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_Fe_numu_fhc_trunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCinc_XSec_1DEnu_ratio_Fe56_CH" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_Fe_numu_fhc_trunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <!-- MINERvA Lead targets --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtPb_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_Pb_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtRatioPb_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_Pb_numu_fhc_trunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCinc_XSec_1Dx_ratio_Pb208_CH" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_Pb_numu_fhc_trunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + <sample name="MINERvA_CCinc_XSec_1DEnu_ratio_Pb208_CH" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_Pb_numu_fhc_trunk_merge.root;NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/MIN_CH_numu_fhc_trunk_merge.root" /> + + <!-- T2K SAMPLES --> + <!-- T2K CC0pi --> + <sample name="T2K_CC0pi_XSec_2DPcos_nu_II" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/T2K_CH_numu_fhc_trunk_merge.root" /> + <sample name="T2K_CC0pi_XSec_2DPcos_nu_nonuniform" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/T2K_CH_numu_fhc_trunk_merge.root" /> + <!-- T2K CC1pi H2O --> + <sample name="T2K_CC1pip_H2O_XSec_1DEnuDelta_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/T2K_H2O_numu_fhc_trunk_merge.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1DEnuMB_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/T2K_H2O_numu_fhc_trunk_merge.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dcosmu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/T2K_H2O_numu_fhc_trunk_merge.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dcosmupi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/T2K_H2O_numu_fhc_trunk_merge.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dcospi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/T2K_H2O_numu_fhc_trunk_merge.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dpmu_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/T2K_H2O_numu_fhc_trunk_merge.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dppi_nu" input="NEUT:/data/stowell/NIWG/NuisanceEvents/Winter2016/neut/T2K_H2O_numu_fhc_trunk_merge.root" /> + +</nuisance> diff --git a/validation/nightly-test/base-comparisons-1/nuwro_allsamples.xml b/validation/nightly-test/base-comparisons-1/nuwro_allsamples.xml new file mode 100644 index 0000000..7bd479c --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/nuwro_allsamples.xml @@ -0,0 +1,266 @@ +<nuisance> + + <!-- ANL SAMPLES --> + <!-- ANL CCQE --> + <sample name="ANL_CCQE_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CCQE_XSec_1DEnu_nu_PRD26" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CCQE_XSec_1DEnu_nu_PRL31" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CCQE_XSec_1DEnu_nu_PRD16" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu_PRL31" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu_PRD26" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CCQE_Evt_1DQ2_nu_PRD16" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <!-- ANL CC1PPIP --> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_W14Cut" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_W14Cut_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_XSec_1DEnu_nu_W16Cut_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_Evt_1DQ2_nu_W14Cut" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_Evt_1Dppi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_Evt_1Dthpr_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_Evt_1DcosmuStar_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_Evt_1DcosthAdler_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1ppip_Evt_1Dphi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <!-- ANL CC1NPIP --> + <sample name="ANL_CC1npip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_W14Cut" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_W14Cut_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1npip_XSec_1DEnu_nu_W16Cut_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1npip_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1npip_Evt_1DQ2_nu_W14Cut" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1npip_Evt_1Dppi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1npip_Evt_1DcosmuStar_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_W14Cut" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_W14Cut_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1pi0_XSec_1DEnu_nu_W16Cut_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1pi0_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1pi0_Evt_1DQ2_nu_W14Cut" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC1pi0_Evt_1DcosmuStar_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <!-- ANL NC --> + <sample name="ANL_NC1npip_Evt_1Dppi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_NC1ppim_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_NC1ppim_Evt_1DcosmuStar_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <!-- ANL CC2PI --> + <sample name="ANL_CC2pi_1pim1pip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dpmu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dppip_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dppim_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pim1pip_Evt_1Dpprot_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pip1pip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1Dpmu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1Dpneut_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1DppipHigh_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pip1pip_Evt_1DppipLow_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pip1pi0_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dpmu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dppip_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dppi0_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + <sample name="ANL_CC2pi_1pip1pi0_Evt_1Dpprot_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_ANL_fhc_numu_D2.root" /> + + <!-- ArgoNeuT SAMPLES --> + <!-- ArgoNeuT Neutrino --> + <sample name="ArgoNeuT_CCInc_XSec_1Dpmu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ArgoNeuT_fhcnumu_Ar_25E5_raw.root" /> + <sample name="ArgoNeuT_CCInc_XSec_1Dthetamu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ArgoNeuT_fhcnumu_Ar_25E5_raw.root" /> + <!-- ArgoNeuT AntiNeutrino --> + <sample name="ArgoNeuT_CCInc_XSec_1Dpmu_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ArgoNeuT_rhcnumub_Ar_25E5_raw.root" /> + <sample name="ArgoNeuT_CCInc_XSec_1Dthetamu_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ArgoNeuT_rhcnumub_Ar_25E5_raw.root" /> + + <!-- BNL SAMPLES --> + <!-- BNL CCQE --> + <sample name="BNL_CCQE_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CCQE_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <!-- BNL CC1ppip --> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu_W14Cut" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CC1ppip_XSec_1DEnu_nu_W14Cut_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CC1ppip_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CC1ppip_Evt_1DQ2_nu_W14Cut" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CC1ppip_Evt_1DcosthAdler_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CC1ppip_Evt_1Dphi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <!-- BNL CC1npip --> + <sample name="BNL_CC1npip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CC1npip_XSec_1DEnu_nu_Uncorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CC1npip_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <!-- BNL CC1ppip --> + <sample name="BNL_CC1pi0_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + <sample name="BNL_CC1pi0_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BNL_fhcnumu_D2_25E5_raw.root" /> + + <!-- FNAL SAMPLES --> + <!-- FNAL CCQE --> + <sample name="FNAL_CCQE_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_FNAL_fhc_numu_D2.root" /> + <!-- FNAL CC1ppip --> + <sample name="FNAL_CC1ppip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_FNAL_fhc_numu_D2.root" /> + <sample name="FNAL_CC1ppip_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_FNAL_fhc_numu_D2.root" /> + <sample name="FNAL_CC1ppip_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_FNAL_fhc_numu_D2.root" /> + <!-- FNAL CC1ppim Antineutrino --> + <sample name="FNAL_CC1ppim_XSec_1DEnu_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/freenucleons_dipole_nuwrolp_head_NUISANCE_FNAL_fhc_numu_D2.root" /> + + <!-- BEBC SAMPLES --> + <!-- BEBC CCQE --> + <sample name="BEBC_CCQE_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_fhcnumu_D2_25E5_raw.root" /> + <!-- BEBC CC1ppip --> + <sample name="BEBC_CC1ppip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_fhcnumu_D2_25E5_raw.root" /> + <sample name="BEBC_CC1ppip_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_fhcnumu_D2_25E5_raw.root" /> + <!-- BEBC CC1npip --> + <sample name="BEBC_CC1npip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_fhcnumu_D2_25E5_raw.root" /> + <sample name="BEBC_CC1npip_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_fhcnumu_D2_25E5_raw.root" /> + <!-- BEBC CC1pi0 --> + <sample name="BEBC_CC1pi0_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_fhcnumu_D2_25E5_raw.root" /> + <sample name="BEBC_CC1pi0_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_fhcnumu_D2_25E5_raw.root" /> + <!-- BEBC CC1npim Antineutrino --> + <sample name="BEBC_CC1npim_XSec_1DEnu_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_rhcnumub_D2_25E5_raw.root" /> + <sample name="BEBC_CC1npim_XSec_1DQ2_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_rhcnumub_D2_25E5_raw.root" /> + <sample name="BEBC_CC1ppim_XSec_1DEnu_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_rhcnumub_D2_25E5_raw.root" /> + <sample name="BEBC_CC1ppim_XSec_1DQ2_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_BEBC_rhcnumub_D2_25E5_raw.root" /> + + <!-- GGM SAMPLES --> + <!-- GGM CC1ppip --> + <sample name="GGM_CC1ppip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_GGM_fhcnumu_D2_25E5_raw.root" /> + <sample name="GGM_CC1ppip_Evt_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_GGM_fhcnumu_D2_25E5_raw.root" /> + + <!-- MiniBooNE SAMPLES --> + <!-- MiniBooNE CCQELike NuMu --> + <sample name="MiniBooNE_CCQE_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CCQE_XSec_2DTcos_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <!-- MiniBooNE CC0PI NuMu --> + <sample name="MiniBooNE_CCQELike_XSec_2DTcos_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CCQELike_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <!-- MiniBooNE CCQELike AntiNuMu --> + <sample name="MiniBooNE_CCQE_XSec_1DQ2_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_rhcnumubnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CCQE_CTarg_XSec_1DQ2_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_rhcnumubnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CCQE_XSec_2DTcos_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_rhcnumubnumu_CH2_25E5_raw.root" /> + <!-- MiniBooNE CC0PI AntiNuMu --> + <sample name="MiniBooNE_CCQELike_XSec_2DTcos_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_rhcnumubnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CCQELike_XSec_1DQ2_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_rhcnumubnumu_CH2_25E5_raw.root" /> + <!-- MiniBooNE CC1PIP --> + <sample name="MiniBooNE_CC1pip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pip_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pip_XSec_1DTpi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pip_XSec_1DTu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DQ2Enu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTpiCospi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTpiEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTuCosmu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pip_XSec_2DTuEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <!-- MiniBooNE CC1PI0 --> + <sample name="MiniBooNE_CC1pi0_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1DTu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1Dcosmu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1Dcospi0_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_CC1pi0_XSec_1Dppi0_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <!-- MiniBooNE NC1pi0 Neutrino --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <!-- MiniBooNE NC1pi0 Antineutrino --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_rhcnumubnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_rhcnumubnumu_CH2_25E5_raw.root" /> + <!-- MiniBooNE NC1pi0 FHC --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_fhc" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_fhc" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + <!-- MiniBooNE NC1pi0 RHC --> + <sample name="MiniBooNE_NC1pi0_XSec_1Dcospi0_rhc" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_rhcnumubnumu_CH2_25E5_raw.root" /> + <sample name="MiniBooNE_NC1pi0_XSec_1Dppi0_rhc" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_rhcnumubnumu_CH2_25E5_raw.root" /> + <!-- MiniBooNE NCEL --> + <sample name="MiniBooNE_NCEL_XSec_Treco_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MiniBooNE_fhcnumu_CH2_25E5_raw.root" /> + + <!-- MINERvA SAMPLES --> + <!-- MINERvA CCQELike NUMU --> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu_20deg" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu_oldflux" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_nu_20deg_oldflux" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <!-- MINERvA CCQELike NUMUBAR --> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu_20deg" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu_oldflux" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_antinu_20deg_oldflux" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <!-- MINERvA CCQELike JOINT --> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint_oldflux" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint_20deg_oldflux" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCQE_XSec_1DQ2_joint_20deg" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <!-- MINERvA CC0PI JOINT --> + <sample name="MINERvA_CC0pi_XSec_1DEe_nue" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MINERvA_fhcnuenueb_CH_25E5_raw.root" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_nue" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MINERvA_fhcnuenueb_CH_25E5_raw.root" /> + <sample name="MINERvA_CC0pi_XSec_1DThetae_nue" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MINERvA_fhcnuenueb_CH_25E5_raw.root" /> + <!-- MINERvA CC0PI1p --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_nu_proton" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <!-- MINERvA CC1ppip --> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu_20deg" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pip_XSec_1DTpi_nu_20deg_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu_20deg" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pip_XSec_1Dth_nu_20deg_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <!-- MINERvA CCNpip --> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2016" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015_20deg" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dth_nu_2015_20deg_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2016" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015_20deg" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1DTpi_nu_2015_20deg_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dthmu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1Dpmu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1DQ2_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCNpip_XSec_1DEnu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <!-- MINERvA CC1pi0 Antineutrino --> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2015" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2016" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2015_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dth_antinu_2016_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dppi0_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dppi0_antinu_fluxcorr" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1DTpi0_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1DQ2_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dthmu_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1Dpmu_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CC1pi0_XSec_1DEnu_antinu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <sample name="MINERvA_CCinc_XSec_2DEavq3_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_rhcnumub_CH_25E5_raw.root" /> + <!-- MINERvA Carbon targets --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtC_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_C_25E5_raw.root" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtRatioC_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_C_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCinc_XSec_1Dx_ratio_C12_CH" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_C_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCinc_XSec_1DEnu_ratio_C12_CH" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_C_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <!-- MINERvA Iron targets --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtFe_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_Fe_25E5_raw.root" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtRatioFe_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_Fe_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCinc_XSec_1Dx_ratio_Fe56_CH" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_Fe_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCinc_XSec_1DEnu_ratio_Fe56_CH" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_Fe_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <!-- MINERvA Lead targets --> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtPb_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_Pb_25E5_raw.root" /> + <sample name="MINERvA_CC0pi_XSec_1DQ2_TgtRatioPb_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_Pb_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCinc_XSec_1Dx_ratio_Pb208_CH" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_Pb_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + <sample name="MINERvA_CCinc_XSec_1DEnu_ratio_Pb208_CH" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_Pb_25E5_raw.root;NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_MIN_fhcnumu_CH_25E5_raw.root" /> + + <!-- T2K SAMPLES --> + <!-- T2K CC0pi --> + <sample name="T2K_CC0pi_XSec_2DPcos_nu_II" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ND280_fhcnumu_CH_25E5_raw.root" /> + <sample name="T2K_CC0pi_XSec_2DPcos_nu_nonuniform" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ND280_fhcnumu_CH_25E5_raw.root" /> + <!-- T2K CC1pi H2O --> + <sample name="T2K_CC1pip_H2O_XSec_1DEnuDelta_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ND280_fhcnumu_H2O_25E5_raw.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1DEnuMB_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ND280_fhcnumu_H2O_25E5_raw.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dcosmu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ND280_fhcnumu_H2O_25E5_raw.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dcosmupi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ND280_fhcnumu_H2O_25E5_raw.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dcospi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ND280_fhcnumu_H2O_25E5_raw.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dpmu_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ND280_fhcnumu_H2O_25E5_raw.root" /> + <sample name="T2K_CC1pip_H2O_XSec_1Dppi_nu" input="NUWRO:/data/stowell/NIWG/NuisanceEvents/Winter2016/nuwro/nuwrov12_lfgvalrpa_211216_ND280_fhcnumu_H2O_25E5_raw.root" /> + +</nuisance> diff --git a/validation/nightly-test/base-comparisons-1/run-nuisance.sh b/validation/nightly-test/base-comparisons-1/run-nuisance.sh new file mode 100644 index 0000000..9ef7fc1 --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/run-nuisance.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Setup NUISANCE +source nuisance/build/Linux/setup.sh + +# Run NUISANCE comparison scripts +for obj in ./*allsamples.xml +do + nuiscomp -c $obj -o ${obj/.xml/.root} +done + +wait +echo "Done running nuisance" \ No newline at end of file diff --git a/validation/nightly-test/base-comparisons-1/run-test.sh b/validation/nightly-test/base-comparisons-1/run-test.sh new file mode 100644 index 0000000..358fa6d --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/run-test.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +source build-script.sh +source run-nuisance.sh +source run-validate-nuiscomp.sh +source clean-script.sh \ No newline at end of file diff --git a/validation/nightly-test/base-comparisons-1/run-validate-nuiscomp.sh b/validation/nightly-test/base-comparisons-1/run-validate-nuiscomp.sh new file mode 100644 index 0000000..5086d66 --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/run-validate-nuiscomp.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +for obj in genie neut nuwro +do + python validate-nuiscomp.py $PWD/../base-benchmark/${obj}_allsamples.root $PWD/${obj}_allsamples.root ${obj}_nuiscomp -b & +done +wait diff --git a/validation/nightly-test/base-comparisons-1/validate-nuiscomp.py b/validation/nightly-test/base-comparisons-1/validate-nuiscomp.py new file mode 100644 index 0000000..95922df --- /dev/null +++ b/validation/nightly-test/base-comparisons-1/validate-nuiscomp.py @@ -0,0 +1,87 @@ +from ROOT import * +import sys + +print "Reading Infile_NEW :",sys.argv[1] +infile_new = TFile(sys.argv[1],"READ") +print "Reading infile bench :",sys.argv[2] +infile_bench = TFile(sys.argv[2],"READ") +print "Reading outfile :",sys.argv[3] +outfile = sys.argv[3] + +c1 = TCanvas("c1","c1",900,300) +c1.Divide(3,1) + + +totalcount = 0 +errorcount = 0 + +keylist = infile_new.GetListOfKeys() +# Get N Valid Keys +nkeys = 0 +for obj in keylist: + hist_new = infile_new.Get(obj.GetName()) + if "TH1D" in str(type(hist_new)): + nkeys += 1 + + +for obj in keylist: + + hist_new = infile_new.Get(obj.GetName()) + hist_bench = infile_bench.Get(obj.GetName()) + + if hist_new and not hist_bench: + print "ERROR: Cannot find bench mark plot for : ",obj.GetName() + hist_bench = hist_new.Clone("newbench") + hist_bench.Reset() + + if "TH1D" in str(type(hist_new)): + + hist_dif = hist_new.Clone("dif") + hist_dif.Add(hist_bench,-1.0) + + hist_bench.SetLineColor(kBlack) + hist_bench.SetLineWidth(3) + hist_new.SetLineColor(kGreen) + hist_dif.SetLineColor(kRed) + gStyle.SetOptTitle(1) + + c1.cd(1) + hist_bench.SetTitle(obj.GetName()) + hist_bench.Draw() + hist_new.Draw("SAME") + + c1.cd(2) + hist_new.SetTitle("Latest") + hist_new.Draw() + + c1.cd(3) + hist_dif.SetTitle("Difference : " + str(hist_dif.Integral())) + hist_dif.Draw() + + c1.Update() + + tolerance = 1E-4 + if (fabs(hist_dif.Integral()) > tolerance): + print "ERROR: Difference found for: ", obj.GetName() + + errorsave = outfile + "_errors.pdf" + if errorcount == 0: errorsave += "(" + c1.SaveAs(errorsave) + errorcount+=1 + + totalsave = outfile + "_total.pdf" + if totalcount == 0: totalsave += "(" + + c1.SaveAs(totalsave) + totalcount+=1 + + +leg = TLegend(0.1,0.1,0.9,0.9) +blank = TLine(0.0,0.0,1.0,1.0) +leg.AddEntry(blank,"End of Plots","") +c1.cd() +leg.Draw() +if totalcount > 0: c1.SaveAs(totalsave + ")") +if errorcount > 0: c1.SaveAs(errorsave + ")") + + diff --git a/validation/nightly-test/create-benchmark.sh b/validation/nightly-test/create-benchmark.sh new file mode 100644 index 0000000..58d0ba7 --- /dev/null +++ b/validation/nightly-test/create-benchmark.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# Get Date +DATE=`date +%Y-%m-%d_%H-%M-%S` +echo $DATE + +# Make new folder +mkdir nightly-test-${DATE} +cd nightly-test-${DATE} + +# Copy scripts +cp ../base-comparisons-1/* ./ + +# Run NUISANCE +source create-bench.sh >> ../nightly-test-log-${DATE}.txt 2>&1 + + + + diff --git a/validation/nightly-test/run-nightly-test.sh b/validation/nightly-test/run-nightly-test.sh new file mode 100644 index 0000000..a14f85d --- /dev/null +++ b/validation/nightly-test/run-nightly-test.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# Get Date +DATE=`date +%Y-%m-%d_%H-%M-%S` +echo $DATE + +# Make new folder +mkdir nightly-test-${DATE} +cd nightly-test-${DATE} + +# Copy scripts +cp ../base-comparisons-1/* ./ + +# Run NUISANCE +source run-test.sh >> ../nightly-test-log-${DATE}.txt 2>&1 + + + +