diff --git a/src/MINERvA/MINERvA_CC1pi0_XSec_1DQ2_antinu.cxx b/src/MINERvA/MINERvA_CC1pi0_XSec_1DQ2_antinu.cxx index 7e40385..e4ce007 100644 --- a/src/MINERvA/MINERvA_CC1pi0_XSec_1DQ2_antinu.cxx +++ b/src/MINERvA/MINERvA_CC1pi0_XSec_1DQ2_antinu.cxx @@ -1,77 +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 "MINERvA_SignalDef.h" #include "MINERvA_CC1pi0_XSec_1DQ2_antinu.h" // The constructor MINERvA_CC1pi0_XSec_1DQ2_antinu::MINERvA_CC1pi0_XSec_1DQ2_antinu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){ fName = "MINERvA_CC1pi0_XSec_1DQ2_antinu_2016"; fPlotTitles = "; Q^{2} (GeV^{2}); d#sigma/dQ^{2} (cm^{2}/(GeV^{2})/nucleon)"; EnuMin = 1.5; EnuMax = 10; fIsDiag = false; Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile); //this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/MINERvA/CC1pi0/2016/cc1pi0_q2.txt"); this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/MINERvA/CC1pi0/2016/anu-cc1pi0-xsec-q2.csv"); // Error is given as percentage of cross-section // Need to scale the bin error properly before we do correlation -> covariance conversion for (int i = 0; i < fDataHist->GetNbinsX()+1; i++) { fDataHist->SetBinError(i+1, fDataHist->GetBinContent(i+1)*fDataHist->GetBinError(i+1)/100.); } //this->SetCovarMatrixFromText(GeneralUtils::GetTopLevelDir()+"/data/MINERvA/CC1pi0/2016/cc1pi0_q2_corr.txt", fDataHist->GetNbinsX()); this->SetCovarMatrixFromText(GeneralUtils::GetTopLevelDir()+"/data/MINERvA/CC1pi0/2016/anu-cc1pi0-correlation-q2.csv", fDataHist->GetNbinsX()); this->SetupDefaultHist(); this->fScaleFactor = this->fEventHist->Integral("width")*double(1E-38)/double(fNEvents)/TotalIntegratedFlux("width"); + + // Print warning for covariance + if (!fIsDiag){ + ERR(FTL) << "The MINERvA CC1pi0 XSec 1DQ2 antinu covariance has problems inverting. We think it " + << " is not semi-positive definite. As a result the likelihoods for this class are probably not to be trusted." << std::endl; + sleep(3); + } + }; void MINERvA_CC1pi0_XSec_1DQ2_antinu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(111) == 0 || event->NumFSParticle(-13) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP; TLorentzVector Pmu = event->GetHMFSParticle(-13)->fP; double hadMass = FitUtils::Wrec(Pnu, Pmu); double Q2 = -999; if (hadMass > 100 && hadMass < 1800) Q2 = FitUtils::Q2CC1pi0rec(Pnu, Pmu, Ppi0); fXVar = Q2; return; }; //******************************************************************** bool MINERvA_CC1pi0_XSec_1DQ2_antinu::isSignal(FitEvent *event) { //******************************************************************** return SignalDef::isCC1pi(event, -14, 111, EnuMin, EnuMax); }