Page MenuHomeHEPForge

No OneTemporary

diff --git a/src/ANL/ANL_CC1npip_XSec_1DEnu_nu.cxx b/src/ANL/ANL_CC1npip_XSec_1DEnu_nu.cxx
index 99d7ea6..342e0a7 100644
--- a/src/ANL/ANL_CC1npip_XSec_1DEnu_nu.cxx
+++ b/src/ANL/ANL_CC1npip_XSec_1DEnu_nu.cxx
@@ -1,137 +1,135 @@
// 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) {
- std::cout << type << " in ANL CC1piplus1n" << std::endl;
-
// Measurement Details
fName = "ANL_CC1npip_XSec_1DEnu_nu";
fPlotTitles = "; E_{#nu} (GeV^{2}); #sigma (cm^{2}/nucleon)";
EnuMin = 0.;
EnuMax = 1.5;
fIsDiag = true;
fNormError = 0.20;
fDefaultTypes = "FIX/DIAG";
fAllowedTypes = "FIX,FREE,SHAPE/DIAG/UNCORR/W14/W16/NOW";
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
// User can specify "UNCORR" for uncorrected data
// Default is to use correction
if (type.find("UNCORR") != std::string::npos) {
UseCorrectedData = false;
fName += "_uncorr";
} else {
UseCorrectedData = true;
fName += "_corr";
}
// 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;
fName += "_w14";
} else if (type.find("W16") != std::string::npos) {
wTrueCut = 1.6;
fName += "_w16";
} else {
// In the case
wTrueCut = 10.0;
fName += "_noW";
}
// 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";
} else if (wTrueCut == 10.0) {
DataLocation += "anl82corr-numu-n-to-mu-n-piplus-noW_edges.txt";
} else {
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;
exit(-1);
}
// 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";
} else {
ERR(FTL) << "Can only run W = 1.4, 1.6 and no W cut" << std::endl;
ERR(FTL) << "You specified: " << wTrueCut << std::endl;
exit(-1);
}
}
// Setup Plots
this->SetDataValues(DataLocation);
this->SetupDefaultHist();
// Setup Covariance
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
this->fScaleFactor = this->fEventHist->Integral("width")*double(1E-38)/double(fNEvents)*(16./8.); // NEUT (16./8. from /nucleus -> /nucleon scaling for nucleon interactions)
};
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/1000. < wTrueCut) {
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_XSec_1DEnu_nu.cxx b/src/ANL/ANL_CC1pi0_XSec_1DEnu_nu.cxx
index bd9181d..e04a322 100644
--- a/src/ANL/ANL_CC1pi0_XSec_1DEnu_nu.cxx
+++ b/src/ANL/ANL_CC1pi0_XSec_1DEnu_nu.cxx
@@ -1,158 +1,156 @@
// 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){
- std::cout << type << " in ANL CC1pi0" << std::endl;
-
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/W14/W16/NOW";
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
// User can specify "UNCORR" for uncorrected data
// Default is to use correction
if (type.find("UNCORR") != std::string::npos) {
UseCorrectedData = false;
fName += "_uncorr";
} else {
UseCorrectedData = true;
fName += "_corr";
}
// 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;
fName += "_w14";
} else if (type.find("W16") != std::string::npos) {
wTrueCut = 1.6;
fName += "_w16";
} else {
wTrueCut = 10.0;
fName += "_noW";
}
// 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";
} else {
ERR(FTL) << "Can not run ANL CC1pi01n 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;
exit(-1);
}
// 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";
} else {
ERR(FTL) << "Can only run W = 1.4, 1.6 and no W cut" << std::endl;
ERR(FTL) << "You specified: " << wTrueCut << std::endl;
exit(-1);
}
}
this->SetDataValues(DataLocation);
this->SetupDefaultHist();
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
this->fScaleFactor = this->fEventHist->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);
}
/*
void ANL_CC1pi0_XSec_1DEnu_nu::FillHistograms() {
if (makeHadronicMassHist) {
hadMassHist->Fill(hadMass);
}
Measurement1D::FillHistograms();
return;
}
void ANL_CC1pi0_XSec_1DEnu_nu::ScaleEvents() {
PlotUtils::FluxUnfoldedScaling(fMCHist, fFluxHist);
PlotUtils::FluxUnfoldedScaling(fMCFine, fFluxHist);
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 8b41b2b..d9b4f3f 100644
--- a/src/ANL/ANL_CC1ppip_XSec_1DEnu_nu.cxx
+++ b/src/ANL/ANL_CC1ppip_XSec_1DEnu_nu.cxx
@@ -1,136 +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) {
- std::cout << type << " in ANL CC1piplus1p" << std::endl;
-
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/W14/W16/NOW";
Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
// User can specify "UNCORR" for uncorrected data
// Default is to use correction
if (type.find("UNCORR") != std::string::npos) {
UseCorrectedData = false;
fName += "_uncorr";
} else {
UseCorrectedData = true;
fName += "_corr";
}
// 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;
fName += "_w14";
} else if (type.find("W16") != std::string::npos) {
wTrueCut = 1.6;
fName += "_w16";
} else {
wTrueCut = 10.0;
fName += "_noW";
}
// 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 if (wTrueCut == 10.0) {
DataLocation += "anl82corr-numu-p-to-mu-p-piplus-noW_edges.txt";
} else {
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;
exit(-1);
}
// 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";
} else {
ERR(FTL) << "Can only run W = 1.4, 1.6 and no W cut" << std::endl;
ERR(FTL) << "You specified: " << wTrueCut << std::endl;
exit(-1);
}
}
this->SetDataValues(DataLocation);
this->SetupDefaultHist();
fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
covar = StatUtils::GetInvert(fFullCovar);
this->fScaleFactor = this->fEventHist->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);
}

File Metadata

Mime Type
text/x-diff
Expires
Sat, Dec 21, 1:44 PM (19 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023012
Default Alt Text
(15 KB)

Event Timeline