Page MenuHomeHEPForge

No OneTemporary

diff --git a/src/ANL/ANL_CC1npip_Evt_1DQ2_nu.cxx b/src/ANL/ANL_CC1npip_Evt_1DQ2_nu.cxx
index c5e2a62..43a17b2 100644
--- a/src/ANL/ANL_CC1npip_Evt_1DQ2_nu.cxx
+++ b/src/ANL/ANL_CC1npip_Evt_1DQ2_nu.cxx
@@ -1,111 +1,111 @@
// 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_1DQ2_nu.h"
// The constructor
// User can specify W < 1.4 or no W cut in std::string type (W14 or NOW, default reverts to NOW)
//********************************************************************
ANL_CC1npip_Evt_1DQ2_nu::ANL_CC1npip_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) {
//********************************************************************
fName = "ANL_CC1npip_Evt_1DQ2_nu";
fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); Number of events";
EnuMin = 0;
EnuMax = 1.5;
fIsDiag = true;
fIsRawEvents = true;
fDefaultTypes="EVT/SHAPE/DIAG";
fAllowedTypes = "EVT/SHAPE/DIAG/W14/NOW";
// User can specify W < 1.4 or no W cut
if (type.find("W14") != std::string::npos) {
HadCut = 1.4;
} else {
HadCut = 10.0;
}
std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/ANL/CC1pip_on_n/";
if (HadCut == 1.4) {
DataLocation += "ANL_CC1pip_on_n_noEvents_Q2_W14GeV_firstQ2rem.txt";
} else {
DataLocation += "ANL_CC1pip_on_n_noEvents_Q2_noWcut_firstQ2rem.txt";
}
// Get rid of the slashes in the type
- if (!type.empty()) {
+ if (!type.empty() && type != "DEFAULT") {
std::string temp_type = type;
std::replace(temp_type.begin(), temp_type.end(), '/', '_');
fName += "_"+temp_type;
}
SetupMeasurement(inputfile, type, rw, fakeDataFile);
SetDataValues(DataLocation);
SetupDefaultHist();
// Set Poisson errors on fDataHist (scanned does not have this)
// Simple counting experiment here
for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) {
fDataHist->SetBinError(i+1, sqrt(fDataHist->GetBinContent(i+1)));
}
// Setup Covariance
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
fScaleFactor = (GetEventHistogram()->Integral()/double(fNEvents));
};
//********************************************************************
void ANL_CC1npip_Evt_1DQ2_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 q2CCpip;
// ANL has a M(pi, p) < 1.4 GeV cut imposed (also no cut measurement but not useful for delta tuning)
if (hadMass < HadCut*1000.) {
q2CCpip = -1.0*(Pnu-Pmu).Mag2()/1.E6;
} else {
q2CCpip = -1.0;
}
fXVar = q2CCpip;
return;
};
//********************************************************************
bool ANL_CC1npip_Evt_1DQ2_nu::isSignal(FitEvent *event) {
//********************************************************************
return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax);
}
diff --git a/src/ANL/ANL_CC1npip_XSec_1DEnu_nu.cxx b/src/ANL/ANL_CC1npip_XSec_1DEnu_nu.cxx
index 0a121cf..a3a16ee 100644
--- a/src/ANL/ANL_CC1npip_XSec_1DEnu_nu.cxx
+++ b/src/ANL/ANL_CC1npip_XSec_1DEnu_nu.cxx
@@ -1,138 +1,138 @@
// 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/>.
*******************************************************************************/
/**
* Radecky et al. Phys Rev D, 3rd series, volume 25, number 5, 1 March 1982, p 1161-1173
*/
#include "ANL_CC1npip_XSec_1DEnu_nu.h"
// The constructor
ANL_CC1npip_XSec_1DEnu_nu::ANL_CC1npip_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) : wTrueCut(2.0), UseCorrectedData(true) {
// Measurement Details
fName = "ANL_CC1npip_XSec_1DEnu_nu";
- fPlotTitles = "; E_{#nu} (GeV^{2}); #sigma (cm^{2}/nucleon)";
+ fPlotTitles = "; E_{#nu} (GeV); #sigma (cm^{2}/nucleon)";
EnuMin = 0.;
EnuMax = 1.5;
fIsDiag = true;
fNormError = 0.20;
fDefaultTypes = "FIX/DIAG";
fAllowedTypes = "FIX,FREE,SHAPE/DIAG/UNCORR/CORR/W14/W16/NOW";
// User can specify "UNCORR" for uncorrected data
// Default is to use correction
if (type.find("UNCORR") != std::string::npos) {
UseCorrectedData = false;
} else {
UseCorrectedData = true;
}
// User can specify "W14" for W < 1.4 GeV cut
// "W16" for W < 1.6 GeV cut
// The default is W < 2.0
if (type.find("W14") != std::string::npos) {
wTrueCut = 1.4;
} else if (type.find("W16") != std::string::npos) {
wTrueCut = 1.6;
} else {
// In the case
wTrueCut = 10.0;
}
if (UseCorrectedData && wTrueCut == 1.6) {
ERR(FTL) << "Can not run ANL CC1pi+1n W < 1.6 GeV with CORRECTION, because the data DOES NOT EXIST" << std::endl;
ERR(FTL) << "Correction exists for W < 1.4 GeV and no W cut data ONLY" << std::endl;
ERR(FTL) << "Reverting to using uncorrected data!" << std::endl;
UseCorrectedData = false;
}
// Get rid of the slashes in the type
- if (!type.empty()) {
+ if (!type.empty() && type != "DEFAULT") {
std::string temp_type = type;
std::replace(temp_type.begin(), temp_type.end(), '/', '_');
fName += "_"+temp_type;
}
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
// Now read in different data depending on what the user has specified
std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/ANL/CC1pip_on_n/";
// If we're using corrected data
if (UseCorrectedData) {
if (wTrueCut == 1.4) {
DataLocation += "anl82corr-numu-n-to-mu-n-piplus-lowW_edges.txt";
// No W cut
} else {
DataLocation += "anl82corr-numu-n-to-mu-n-piplus-noW_edges.txt";
}
// If we're using raw uncorrected data
} else {
if (wTrueCut == 1.4) {
DataLocation += "anl82-numu-cc1npip-14Wcut.txt";
} else if (wTrueCut == 1.6) {
DataLocation += "anl82-numu-cc1npip-16Wcut.txt";
} else if (wTrueCut == 10.0) {
DataLocation += "anl82-numu-cc1npip-noWcut.txt";
}
}
// Setup Plots
SetDataValues(DataLocation);
SetupDefaultHist();
// Setup Covariance
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(16./8.);
};
void ANL_CC1npip_XSec_1DEnu_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 Enu = -1.0;
// ANL has a W cuts at 1.4, 1.6 and no w cut
// This is set by user, or defaults to 2.0
if (hadMass < wTrueCut*1000.) {
Enu = Pnu.E()/1.E3;
}
fXVar = Enu;
return;
};
bool ANL_CC1npip_XSec_1DEnu_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax);
}
diff --git a/src/ANL/ANL_CC1pi0_Evt_1DQ2_nu.cxx b/src/ANL/ANL_CC1pi0_Evt_1DQ2_nu.cxx
index 48bec83..6099ddf 100644
--- a/src/ANL/ANL_CC1pi0_Evt_1DQ2_nu.cxx
+++ b/src/ANL/ANL_CC1pi0_Evt_1DQ2_nu.cxx
@@ -1,121 +1,121 @@
// 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_CC1pi0_Evt_1DQ2_nu.h"
// The constructor
ANL_CC1pi0_Evt_1DQ2_nu::ANL_CC1pi0_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) {
fName = "ANL_CC1pi0_Evt_1DQ2_nu";
fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); Number of events";
EnuMin = 0;
EnuMax = 1.5;
fIsDiag = true; // refers to covariance matrix; this measurement has none so only use errors, not covariance
fIsRawEvents = true;
fDefaultTypes="EVT/SHAPE/DIAG";
fAllowedTypes="EVT/SHAPE/DIAG/W14/NOW";
// User can specify W < 1.4 or no W cut
if (type.find("W14") != std::string::npos) {
HadCut = 1.4;
} else {
HadCut = 10.0;
}
std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/ANL/CC1pi0_on_n/";
if (HadCut == 1.4) {
DataLocation += "ANL_CC1pi0_on_n_noEvents_Q2_W14GeV_firstQ2rem.txt";
} else {
DataLocation += "ANL_CC1pi0_on_n_noEvents_Q2_noWcut_firstQ2rem.txt";
}
// Get rid of the slashes in the type
- if (!type.empty()) {
+ if (!type.empty() && type != "DEFAULT") {
std::string temp_type = type;
std::replace(temp_type.begin(), temp_type.end(), '/', '_');
fName += "_"+temp_type;
}
SetupMeasurement(inputfile, type, rw, fakeDataFile);
SetDataValues(DataLocation);
SetupDefaultHist();
// Set Poisson errors on fDataHist (scanned does not have this)
// Simple counting experiment here
for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) {
fDataHist->SetBinError(i+1, sqrt(fDataHist->GetBinContent(i+1)));
}
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
fScaleFactor = GetEventHistogram()->Integral("width")/(fNEvents+0.);
};
void ANL_CC1pi0_Evt_1DQ2_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(111) == 0 || event->NumFSParticle(13) == 0) {
return;
}
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pp = event->GetHMFSParticle(2212)->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double hadMass = FitUtils::MpPi(Pp, Ppi0);
double q2CCpi0 = -1.0;
// ANL has a M(pi, p) < 1.4 GeV cut imposed
if (hadMass < HadCut*1000.) {
q2CCpi0 = -1.0*(Pnu-Pmu).Mag2()/1.E6;
}
fXVar = q2CCpi0;
return;
};
bool ANL_CC1pi0_Evt_1DQ2_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax);
}
/*
void ANL_CC1pi0_Evt_1DQ2_nu::FillHistograms() {
if (makeHadronicMassHist) {
hadMassHist->Fill(hadMass);
}
Measurement1D::FillHistograms();
}
void ANL_CC1pi0_Evt_1DQ2_nu::ScaleEvents() {
// PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram());
//PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram());
fMCHist->Scale(fScaleFactor);
fMCFine->Scale(fScaleFactor);
return;
}
*/
diff --git a/src/ANL/ANL_CC1pi0_XSec_1DEnu_nu.cxx b/src/ANL/ANL_CC1pi0_XSec_1DEnu_nu.cxx
index be180af..f5a3894 100644
--- a/src/ANL/ANL_CC1pi0_XSec_1DEnu_nu.cxx
+++ b/src/ANL/ANL_CC1pi0_XSec_1DEnu_nu.cxx
@@ -1,132 +1,132 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
/**
* Radecky et al. Phys Rev D, 3rd series, volume 25, number 5, 1 March 1982, p 1161-1173
*/
#include "ANL_CC1pi0_XSec_1DEnu_nu.h"
// The constructor
ANL_CC1pi0_XSec_1DEnu_nu::ANL_CC1pi0_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
fName = "ANL_CC1pi0_XSec_1DEnu_nu";
fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/neutron)";
EnuMin = 0.;
EnuMax = 1.5;
fIsDiag = true;
fNormError = 0.20;
fDefaultTypes = "FIX/DIAG";
fAllowedTypes = "FIX,FREE,SHAPE/DIAG/UNCORR/CORR/W14/W16/NOW";
// User can specify "UNCORR" for uncorrected data
// Default is to use correction
if (type.find("UNCORR") != std::string::npos) {
UseCorrectedData = false;
} else {
UseCorrectedData = true;
}
// User can specify "W14" for W < 1.4 GeV cut
// "W16" for W < 1.6 GeV cut
// The default is no W cut (10 GeV)
if (type.find("W14") != std::string::npos) {
wTrueCut = 1.4;
} else if (type.find("W16") != std::string::npos) {
wTrueCut = 1.6;
} else {
wTrueCut = 10.0;
}
if (UseCorrectedData && wTrueCut == 1.6) {
ERR(FTL) << "Can not run ANL CC1pi+1n W < 1.6 GeV with CORRECTION, because the data DOES NOT EXIST" << std::endl;
ERR(FTL) << "Correction exists for W < 1.4 GeV and no W cut data ONLY" << std::endl;
ERR(FTL) << "Reverting to using uncorrected data!" << std::endl;
UseCorrectedData = false;
}
// Get rid of the slashes in the type
- if (!type.empty()) {
+ if (!type.empty() && type != "DEFAULT") {
std::string temp_type = type;
std::replace(temp_type.begin(), temp_type.end(), '/', '_');
fName += "_"+temp_type;
}
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
// Now read in different data depending on what the user has specified
std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/ANL/CC1pi0_on_n/";
// If we're using corrected data
if (UseCorrectedData) {
if (wTrueCut == 1.4) {
DataLocation += "anl82corr-numu-n-to-mu-p-pi0-lowW_edges.txt";
} else if (wTrueCut == 10.0) {
DataLocation += "anl82corr-numu-n-to-mu-p-pi0-noW_edges.txt";
}
// If we're using raw uncorrected data
} else {
if (wTrueCut == 1.4) {
DataLocation += "anl82-numu-cc1pi0-14Wcut.txt";
} else if (wTrueCut == 1.6) {
DataLocation += "anl82-numu-cc1pi0-16Wcut.txt";
} else if (wTrueCut == 10.0) {
DataLocation += "anl82-numu-cc1pi0-noWcut.txt";
}
}
SetDataValues(DataLocation);
SetupDefaultHist();
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents+0.)*(16./8.);
};
void ANL_CC1pi0_XSec_1DEnu_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(111) == 0 || event->NumFSParticle(13) == 0) {
return;
}
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pp = event->GetHMFSParticle(2212)->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double hadMass = FitUtils::MpPi(Pp, Ppi0);
double Enu = -1.0;
if (hadMass/1000. < wTrueCut) {
Enu = Pnu.E()/1.E3;
}
fXVar = Enu;
return;
};
bool ANL_CC1pi0_XSec_1DEnu_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax);
}
diff --git a/src/ANL/ANL_CC1ppip_Evt_1DQ2_nu.cxx b/src/ANL/ANL_CC1ppip_Evt_1DQ2_nu.cxx
index ee43ef5..b8a0c74 100644
--- a/src/ANL/ANL_CC1ppip_Evt_1DQ2_nu.cxx
+++ b/src/ANL/ANL_CC1ppip_Evt_1DQ2_nu.cxx
@@ -1,126 +1,126 @@
// 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/>.
*******************************************************************************/
/**
* Radecky et al. Phys Rev D, 3rd series, volume 25, number 5, 1 March 1982, p 1161-1173
*/
#include "ANL_CC1ppip_Evt_1DQ2_nu.h"
// The constructor
ANL_CC1ppip_Evt_1DQ2_nu::ANL_CC1ppip_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) {
fName = "ANL_CC1ppip_Evt_1DQ2_nu";
fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); Number of events";
EnuMin = 0;
EnuMax = 6.0;
fIsDiag = true;
fIsRawEvents = true;
fDefaultTypes="EVT/SHAPE/DIAG";
fAllowedTypes="EVT/SHAPE/DIAG/W14/NOW";
// User can specify W < 1.4 or no W cut
if (type.find("W14") != std::string::npos) {
HadCut = 1.4;
} else {
HadCut = 10.0;
}
std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/ANL/CC1pip_on_p/";
if (HadCut == 1.4) {
DataLocation += "ANL_CC1pip_on_p_noEvents_Q2_W14GeV_firstQ2rem.txt";
} else {
DataLocation += "ANL_CC1pip_on_p_noEvents_Q2_noW_firstQ2rem.txt";
}
// Get rid of the slashes in the type
- if (!type.empty()) {
+ if (!type.empty() && type != "DEFAULT") {
std::string temp_type = type;
std::replace(temp_type.begin(), temp_type.end(), '/', '_');
fName += "_"+temp_type;
}
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
SetDataValues(DataLocation);
SetupDefaultHist();
// Set Poisson errors on fDataHist (scanned does not have this)
// Simple counting experiment here
for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) {
fDataHist->SetBinError(i+1, sqrt(fDataHist->GetBinContent(i+1)));
}
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
fScaleFactor = GetEventHistogram()->Integral("width")/(fNEvents+0.)*16./8.;
};
void ANL_CC1ppip_Evt_1DQ2_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;
double hadMass = FitUtils::MpPi(Pp, Ppip);
double q2CCpip = -1.0;
// ANL has a M(pi, p) < 1.4 GeV cut imposed or no W cut
if (hadMass < HadCut*1000.) {
q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6;
}
fXVar = q2CCpip;
return;
};
bool ANL_CC1ppip_Evt_1DQ2_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax);
}
/*
void ANL_CC1ppip_Evt_1DQ2_nu::FillHistograms() {
if (makeHadronicMassHist) {
hadMassHist->Fill(hadMass);
}
Measurement1D::FillHistograms();
}
void ANL_CC1ppip_Evt_1DQ2_nu::ScaleEvents() {
PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram());
PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram());
fMCHist->Scale(fScaleFactor);
fMCFine->Scale(fScaleFactor);
return;
}
*/
diff --git a/src/ANL/ANL_CC1ppip_XSec_1DEnu_nu.cxx b/src/ANL/ANL_CC1ppip_XSec_1DEnu_nu.cxx
index f4483eb..f6bc67a 100644
--- a/src/ANL/ANL_CC1ppip_XSec_1DEnu_nu.cxx
+++ b/src/ANL/ANL_CC1ppip_XSec_1DEnu_nu.cxx
@@ -1,134 +1,134 @@
// 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/>.
*******************************************************************************/
/**
* Radecky et al. Phys Rev D, 3rd series, volume 25, number 5, 1 March 1982, p 1161-1173
*/
#include "ANL_CC1ppip_XSec_1DEnu_nu.h"
// The constructor
ANL_CC1ppip_XSec_1DEnu_nu::ANL_CC1ppip_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) : wTrueCut(2.0), UseCorrectedData(true) {
fName = "ANL_CC1ppip_XSec_1DEnu_nu";
fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/nucleon)";
EnuMin = 0.;
EnuMax = 6.0;
fIsDiag = true; // refers to covariance matrix; this measurement has none so only use errors, not covariance
fNormError = 0.20; // normalisation error on ANL BNL flux
fDefaultTypes = "FIX/DIAG";
fAllowedTypes = "FIX,FREE,SHAPE/DIAG/UNCORR/CORR/W14/W16/NOW";
// User can specify "UNCORR" for uncorrected data
// Default is to use correction
if (type.find("UNCORR") != std::string::npos) {
UseCorrectedData = false;
} else {
UseCorrectedData = true;
}
// User can specify "W14" for W < 1.4 GeV cut
// "W16" for W < 1.6 GeV cut
// The default is no W cut
if (type.find("W14") != std::string::npos) {
wTrueCut = 1.4;
} else if (type.find("W16") != std::string::npos) {
wTrueCut = 1.6;
} else {
wTrueCut = 10.0;
}
if (UseCorrectedData && wTrueCut == 1.6) {
ERR(FTL) << "Can not run ANL CC1pi+1p W < 1.6 GeV with CORRECTION, because the data DOES NOT EXIST" << std::endl;
ERR(FTL) << "Correction exists for W < 1.4 GeV and no W cut data ONLY" << std::endl;
ERR(FTL) << "Reverting to using uncorrected data!" << std::endl;
UseCorrectedData = false;
}
// Get rid of the slashes in the type
- if (!type.empty()) {
+ if (!type.empty() && type != "DEFAULT") {
std::string temp_type = type;
std::replace(temp_type.begin(), temp_type.end(), '/', '_');
fName += "_"+temp_type;
}
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
// Now read in different data depending on what the user has specified
std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/ANL/CC1pip_on_p/";
// If we're using corrected data
if (UseCorrectedData) {
if (wTrueCut == 1.4) {
DataLocation += "anl82corr-numu-p-to-mu-p-piplus-lowW_edges.txt";
} else {
DataLocation += "anl82corr-numu-p-to-mu-p-piplus-noW_edges.txt";
}
// If we're using raw uncorrected data
} else {
if (wTrueCut == 1.4) {
DataLocation += "anl82-numu-cc1ppip-14Wcut.txt";
} else if (wTrueCut == 1.6) {
DataLocation += "anl82-numu-cc1ppip-16Wcut.txt";
} else if (wTrueCut == 10.0) {
DataLocation += "anl82-numu-cc1ppip-noWcut.txt";
}
}
SetDataValues(DataLocation);
SetupDefaultHist();
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(16./8.);
};
void ANL_CC1ppip_XSec_1DEnu_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;
double hadMass = FitUtils::MpPi(Pp, Ppip);
double Enu = -1.0;
// ANL has a W cuts at 1.4, 1.6 and no w cut
// This is set by user, or defaults to 2.0
if (hadMass/1000. < wTrueCut) {
Enu = Pnu.E()/1.E3;
}
fXVar = Enu;
return;
}
bool ANL_CC1ppip_XSec_1DEnu_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax);
}
diff --git a/src/BNL/BNL_CC1npip_XSec_1DEnu_nu.cxx b/src/BNL/BNL_CC1npip_XSec_1DEnu_nu.cxx
index a3908c7..3e35b38 100644
--- a/src/BNL/BNL_CC1npip_XSec_1DEnu_nu.cxx
+++ b/src/BNL/BNL_CC1npip_XSec_1DEnu_nu.cxx
@@ -1,117 +1,117 @@
// 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_XSec_1DEnu_nu.h"
// The constructor
BNL_CC1npip_XSec_1DEnu_nu::BNL_CC1npip_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) {
fName = "BNL_CC1npip_XSec_1DEnu_nu";
fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/neutron)";
EnuMin = 0.;
EnuMax = 3.0;
fIsDiag = true;
fNormError = 0.15;
fDefaultTypes = "FIX/DIAG";
fAllowedTypes = "FIX,FREE,SHAPE/DIAG/UNCORR";
// User can give option of corrected BNL data or not
// The correction follows Wilkinson & Rodriguez et al.
if (type.find("UNCORR") != std::string::npos) {
UseCorrectedData = false;
} else {
UseCorrectedData = true;
}
std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pip_on_n/";
if (UseCorrectedData) {
DataLocation += "BNL_CC1pip_on_n_1986_corr.txt";
} else {
DataLocation += "BNL_CC1pip_on_n_1986.txt";
}
- if (!type.empty()) {
+ if (!type.empty() && type != "DEFAULT") {
std::string temp_type = type;
std::replace(temp_type.begin(), temp_type.end(), '/', '_');
fName += "_"+temp_type;
}
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
SetDataValues(DataLocation);
SetupDefaultHist();
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.))*16./8.;
};
void BNL_CC1npip_XSec_1DEnu_nu::FillEventVariables(FitEvent *event) {
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
// No W cut for BNL CC1pi+ on neutron (I'm happy if you can find it!!!)
double Enu = Pnu.E()/1000.;
fXVar = Enu;
return;
};
bool BNL_CC1npip_XSec_1DEnu_nu::isSignal(FitEvent *event) {
// BNL has somewhat tricky signal definition for the selection:
// P_visible = visible 4-momentum, so the three tracks total momentum
// P_visible > 150 MeV/c2
// Theta_Pvis_nu (angle between visible momentum and neutrino direction) < 50 degrees
// At least one negative track leaves chamber without interacting or stops consistent with muon
// THESE ARE NOT IMPLEMENTED BUT SHOULD BE KNOWN BY ANYONE WHO FITS THIS DATA! (see Kitagaki et al. 2556)
//
// The only actual restriction seems to be the final state particles. There's no mention of E_nu restrictions either (events span to 10GeV in fig 2, Kitagaki)
// There's a mention of uncertainity in the neutrino flux for Enu > 6.0 GeV
return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax);
}
/*
void BNL_CC1npip_XSec_1DEnu_nu::FillHistograms() {
if (makeHadronicMassHist) {
hadMassHist->Fill(hadMass);
}
Measurement1D::FillHistograms();
}
void BNL_CC1npip_XSec_1DEnu_nu::ScaleEvents() {
PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram());
PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram());
fMCHist->Scale(fScaleFactor);
fMCFine->Scale(fScaleFactor);
return;
}
*/
diff --git a/src/BNL/BNL_CC1pi0_XSec_1DEnu_nu.cxx b/src/BNL/BNL_CC1pi0_XSec_1DEnu_nu.cxx
index 927494a..2392332 100644
--- a/src/BNL/BNL_CC1pi0_XSec_1DEnu_nu.cxx
+++ b/src/BNL/BNL_CC1pi0_XSec_1DEnu_nu.cxx
@@ -1,107 +1,107 @@
// 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_CC1pi0_XSec_1DEnu_nu.h"
// The constructor
BNL_CC1pi0_XSec_1DEnu_nu::BNL_CC1pi0_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
fName = "BNL_CC1pi0_XSec_1DEnu_nu";
fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/neutron)";
EnuMin = 0.;
EnuMax = 6.0;
fIsDiag = true;
fNormError = 0.15;
fDefaultTypes = "FIX/DIAG";
fAllowedTypes = "FIX,FREE,SHAPE/DIAG/UNCORR";
// User can give option of corrected BNL data or not
// The correction follows Wilkinson & Rodriguez et al.
if (type.find("UNCORR") != std::string::npos) {
UseCorrectedData = false;
} else {
UseCorrectedData = true;
}
std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pi0_on_n/";
if (UseCorrectedData) {
DataLocation += "BNL_CC1pi0_on_n_1986_corr.txt";
} else {
DataLocation += "BNL_CC1pi0_on_n_1986.txt";
}
- if (!type.empty()) {
+ if (!type.empty() && type != "DEFAULT") {
std::string temp_type = type;
std::replace(temp_type.begin(), temp_type.end(), '/', '_');
fName += "_"+temp_type;
}
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
SetDataValues(DataLocation);
SetupDefaultHist();
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/(fNEvents+0.)*16./8.;
};
void BNL_CC1pi0_XSec_1DEnu_nu::FillEventVariables(FitEvent *event) {
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
//BNL doesn't have a W cut for CC1pi0 sadly (I'm super happy if you can find it!)
double Enu = Pnu.E()/1000.;
fXVar = Enu;
return;
}
bool BNL_CC1pi0_XSec_1DEnu_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax);
}
/*
void BNL_CC1pi0_XSec_1DEnu_nu::FillHistograms() {
if (makeHadronicMassHist) {
hadMassHist->Fill(hadMass);
}
Measurement1D::FillHistograms();
}
void BNL_CC1pi0_XSec_1DEnu_nu::ScaleEvents() {
PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram());
PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram());
fMCHist->Scale(fScaleFactor);
fMCFine->Scale(fScaleFactor);
return;
}
*/
diff --git a/src/BNL/BNL_CC1ppip_Evt_1DQ2_nu.cxx b/src/BNL/BNL_CC1ppip_Evt_1DQ2_nu.cxx
index 4354384..5bcc948 100644
--- a/src/BNL/BNL_CC1ppip_Evt_1DQ2_nu.cxx
+++ b/src/BNL/BNL_CC1ppip_Evt_1DQ2_nu.cxx
@@ -1,137 +1,137 @@
// 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/>.
*******************************************************************************/
/**
* Kitagaki et al. Phys Rev D, Volume 34, Number 9, 1 November 1986, p2254-2565
* K. Furuno et al. NuInt02 proceedings, (supposedly published in Nucl. Phys. B but I never found it), Retreieved from KEK preprints.
* KEK Preprint 2003-48, RCNS-03-01, September 2003
*/
#include "BNL_CC1ppip_Evt_1DQ2_nu.h"
// The constructor
BNL_CC1ppip_Evt_1DQ2_nu::BNL_CC1ppip_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) {
fName = "BNL_CC1ppip_Evt_1DQ2_nu";
fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); Number of events";
EnuMin = 0.5;
EnuMax = 6.;
fIsDiag = true;
fIsRawEvents = true;
fDefaultTypes="EVT/SHAPE/DIAG";
fAllowedTypes = "EVT/SHAPE/DIAG/W14/NOW";
// Look if user has specified a W cut
if (type.find("W14") != std::string::npos) {
HadCut = 1.4;
} else {
HadCut = 10.0;
EnuMin = 0.0;
EnuMax = 10.0;
}
- if (!type.empty()) {
+ if (!type.empty() && type != "DEFAULT") {
std::string temp_type = type;
std::replace(temp_type.begin(), temp_type.end(), '/', '_');
fName += "_"+temp_type;
}
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pip_on_p/";
// If W < 1.4 GeV cut
if (HadCut == 1.4) {
DataLocation += "BNL_CC1pip_on_p_noEvents_q2_w14_enu05to6_firstQ2rem.txt";
// If W < 2.0 GeV
} else {
// No Enu cuts on full W space
DataLocation += "BNL_CC1pip_on_p_noEvents_q2_noWcut_firstQ2rem.txt";
}
SetDataValues(DataLocation);
SetupDefaultHist();
// Set Poisson errors on fDataHist (scanned does not have this)
// Simple counting experiment here
for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) {
fDataHist->SetBinError(i+1, sqrt(fDataHist->GetBinContent(i+1)));
}
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
fScaleFactor = GetEventHistogram()->Integral("width")/(fNEvents+0.);
};
void BNL_CC1ppip_Evt_1DQ2_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;
double hadMass = FitUtils::MpPi(Pp, Ppip);
double q2CCpip = -1.0;
// BNL has a M(pi, p) < 1.4 GeV cut and no W cut.
// This should be specified by user in "type" field
// Reverts to 10 GeV (essentially no W cut!)
if (hadMass < HadCut*1000.) {
q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6;
}
fXVar = q2CCpip;
return;
};
bool BNL_CC1ppip_Evt_1DQ2_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2212,EnuMin,EnuMax);
}
/*
void BNL_CC1ppip_Evt_1DQ2_nu::FillHistograms() {
if (makeHadronicMassHist) {
hadMassHist->Fill(hadMass);
}
Measurement1D::FillHistograms();
}
void BNL_CC1ppip_Evt_1DQ2_nu::ScaleEvents() {
PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram());
PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram());
fMCHist->Scale(fScaleFactor);
fMCFine->Scale(fScaleFactor);
return;
}
*/
diff --git a/src/BNL/BNL_CC1ppip_XSec_1DEnu_nu.cxx b/src/BNL/BNL_CC1ppip_XSec_1DEnu_nu.cxx
index 715c80b..5306ec5 100644
--- a/src/BNL/BNL_CC1ppip_XSec_1DEnu_nu.cxx
+++ b/src/BNL/BNL_CC1ppip_XSec_1DEnu_nu.cxx
@@ -1,113 +1,113 @@
// 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_CC1ppip_XSec_1DEnu_nu.h"
// The constructor
BNL_CC1ppip_XSec_1DEnu_nu::BNL_CC1ppip_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
fName = "BNL_CC1ppip_XSec_1DEnu_nu";
fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/proton)";
EnuMin = 0.;
EnuMax = 3.0;
fIsDiag = true;
fNormError = 0.15;
fDefaultTypes = "FIX/DIAG";
fAllowedTypes = "FIX,FREE,SHAPE/DIAG/UNCORR";
// User can give option of corrected BNL data or not
// The correction follows Wilkinson & Rodriguez et al.
if (type.find("UNCORR") != std::string::npos) {
UseCorrectedData = false;
} else {
UseCorrectedData = true;
}
std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pip_on_p/";
if (UseCorrectedData) {
DataLocation += "BNL_CC1pip_on_p_1986_corr.txt";
EnuMax = 6.0;
} else {
DataLocation += "BNL_CC1pip_on_p_1986.txt";
EnuMax = 3.0;
}
- if (!type.empty()) {
+ if (!type.empty() && type != "DEFAULT") {
std::string temp_type = type;
std::replace(temp_type.begin(), temp_type.end(), '/', '_');
fName += "_"+temp_type;
}
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
SetDataValues(DataLocation);
SetupDefaultHist();
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.))*16./8.;
};
void BNL_CC1ppip_XSec_1DEnu_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;
double hadMass = FitUtils::MpPi(Pp, Ppip);
double Enu = -1.0;
// Found a corrected one but only reliable to ~3GeV
if (hadMass < 1400) Enu = Pnu.E()/1000.;
fXVar = Enu;
return;
};
bool BNL_CC1ppip_XSec_1DEnu_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax);
}
/*
void BNL_CC1ppip_XSec_1DEnu_nu::FillHistograms() {
if (makeHadronicMassHist) {
hadMassHist->Fill(hadMass);
}
Measurement1D::FillHistograms();
}
void BNL_CC1ppip_XSec_1DEnu_nu::ScaleEvents() {
PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram());
PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram());
fMCHist->Scale(fScaleFactor);
fMCFine->Scale(fScaleFactor);
return;
}
*/

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 8:22 PM (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3806015
Default Alt Text
(42 KB)

Event Timeline