Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F9501503
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
118 KB
Subscribers
None
View Options
diff --git a/src/ANL/ANL_CCQE_Evt_1DQ2_nu.cxx b/src/ANL/ANL_CCQE_Evt_1DQ2_nu.cxx
index 435b62a..e4d354d 100755
--- a/src/ANL/ANL_CCQE_Evt_1DQ2_nu.cxx
+++ b/src/ANL/ANL_CCQE_Evt_1DQ2_nu.cxx
@@ -1,161 +1,160 @@
// 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_CCQE_Evt_1DQ2_nu.h"
//********************************************************************
ANL_CCQE_Evt_1DQ2_nu::ANL_CCQE_Evt_1DQ2_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "ANL CCQ2 Event Rate 1DQ2 nu sample. \n" \
"Target: D2 \n" \
"Flux: \n" \
"Signal: \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("Q^{2}_{CCQE} (GeV^{2})");
fSettings.SetYTitle("Number of events");
fSettings.SetAllowedTypes("EVT/SHAPE/DIAG", "EVT/SHAPE/DIAG/Q2CORR/MASK");
fSettings.SetEnuRange(0.0, 6.0);
fSettings.DefineAllowedTargets("D,H");
- fSettings.SetS("q2correction_file", FitPar::GetDataBase() + "/ANL/ANL_CCQE_Data_PRL31_844.root");
- fSettings.SetS("q2correction_hist", "ANL_XSec_1DQ2_Correction");
+
// plot information
fSettings.SetTitle("ANL #nu_mu CCQE");
fSettings.DefineAllowedSpecies("numu");
// Hadronic Cut Info
if (fSettings.Found("name", "PRL31")) {
fSettings.SetDataInput( FitPar::GetDataBase() + "ANL/ANL_CCQE_Data_PRL31_844.root;ANL_1DQ2_Data" );
fSettings.SetEnuRange(0.0, 3.0);
} else if (fSettings.Found("name", "PRD16")) {
fSettings.SetDataInput( FitPar::GetDataBase() + "ANL/ANL_CCQE_Data_PRD16_3103.root;ANL_1DQ2_Data" );
} else {
fSettings.SetDataInput( FitPar::GetDataBase() + "ANL/ANL_Data_PRD26_537.root;ANL_1DQ2_Data" );
}
// is Q2 Correction applied
applyQ2correction = fSettings.Found("type", "Q2CORR");
if (applyQ2correction) {
fSettings.SetS("q2correction_file", FitPar::GetDataBase() + "/ANL/ANL_CCQE_Data_PRL31_844.root");
fSettings.SetS("q2correction_hist", "ANL_XSec_1DQ2_Correction");
}
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor for shape
fScaleFactor = (fDataHist->Integral() / (fNEvents + 0.));
// Plot Setup -------------------------------------------------------
SetDataFromTextFile( fSettings.GetDataInput() );
SetPoissonErrors();
SetCovarFromDiagonal();
// Correction Histogram
if (applyQ2correction) {
// Correction Hist
CorrectionHist = PlotUtils::GetTH1DFromFile( fSettings.GetS("q2correction_file"),
fSettings.GetS("q2correction_hist") );
SetAutoProcessTH1(CorrectionHist, kCMD_Write);
// Make uncorrected MC hist
fMCHist_NoCorr = (TH1D*) fDataHist->Clone();
fMCHist_NoCorr->Reset();
fMCHist_NoCorr->SetNameTitle( (fName + "_NOCORR").c_str(),
(fName + "_NOCORR").c_str());
SetAutoProcessTH1(fMCHist_NoCorr);
}
// Final setup ---------------------------------------------------
FinaliseMeasurement();
}
//********************************************************************
void ANL_CCQE_Evt_1DQ2_nu::FillEventVariables(FitEvent * event) {
//********************************************************************
if (event->NumFSParticle(13) == 0)
return;
// Fill histogram with reconstructed Q2 Distribution
fXVar = -999.9;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
ThetaMu = Pnu.Vect().Angle(Pmu.Vect());
fXVar = FitUtils::Q2QErec(Pmu, cos(ThetaMu), 0., true);
GetQ2Box()->fQ2 = fXVar;
return;
};
//********************************************************************
bool ANL_CCQE_Evt_1DQ2_nu::isSignal(FitEvent * event) {
//********************************************************************
if (!SignalDef::isCCQE(event, 14, EnuMin, EnuMax)) return false;
// Q2 cut
if (GetQ2Box()->fQ2 <= 0) return false;
return true;
};
//********************************************************************
void ANL_CCQE_Evt_1DQ2_nu::FillHistograms() {
//********************************************************************
if (applyQ2correction) {
fMCHist_NoCorr->Fill( GetQ2Box()->fQ2, Weight);
if (GetQ2Box()->fQ2 < CorrectionHist->GetXaxis()->GetXmax() &&
GetQ2Box()->fQ2 > CorrectionHist->GetXaxis()->GetXmin())
Weight *= CorrectionHist->Interpolate(GetQ2Box()->fQ2);
}
Measurement1D::FillHistograms();
}
//********************************************************************
void ANL_CCQE_Evt_1DQ2_nu::ScaleEvents() {
//********************************************************************
Measurement1D::ScaleEvents();
// Flux unfold our extra histogram
if (applyQ2correction) {
if (fMCHist_NoCorr->Integral()) {
fMCHist_NoCorr->Scale(fDataHist->Integral() / fMCHist_NoCorr->Integral());
}
}
}
diff --git a/src/BEBC/BEBC_CC1npim_XSec_1DEnu_antinu.cxx b/src/BEBC/BEBC_CC1npim_XSec_1DEnu_antinu.cxx
index 5ec8b9e..ead028f 100644
--- a/src/BEBC/BEBC_CC1npim_XSec_1DEnu_antinu.cxx
+++ b/src/BEBC/BEBC_CC1npim_XSec_1DEnu_antinu.cxx
@@ -1,69 +1,89 @@
// 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 "BEBC_CC1npim_XSec_1DEnu_antinu.h"
-// The constructor
-BEBC_CC1npim_XSec_1DEnu_antinu::BEBC_CC1npim_XSec_1DEnu_antinu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
- fName = "BEBC_CC1npim_XSec_1DEnu_antinu";
- fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/neutron)";
- EnuMin = 5.;
- EnuMax = 200.;
- fIsDiag = true;
- fNormError = 0.20;
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BEBC/theses/BEBC_theses_ANU_CC1pi-_nFin_W14.txt");
- this->SetupDefaultHist();
+//********************************************************************
+BEBC_CC1npim_XSec_1DEnu_antinu::BEBC_CC1npim_XSec_1DEnu_antinu(nuiskey samplekey) {
+//********************************************************************
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CC1npim_XSec_1DEnu_antinu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- this->fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(16./8.);
-};
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("E_{#nu} (GeV)");
+ fSettings.SetYTitle("#sigma(E_{#nu}) (cm^{2}/neutron)");
+ fSettings.SetAllowedTypes("FIX/FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(5.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CC1npim_XSec_1DEnu_antinu");
+ fSettings.DefineAllowedSpecies("numub");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/BEBC/theses/BEBC_theses_ANU_CC1pi-_nFin_W14.txt" );
+
+ 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() );
+ SetCovarFromDiagonal();
+
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
+
+};
void BEBC_CC1npim_XSec_1DEnu_antinu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(2112) == 0 ||
event->NumFSParticle(-211) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pn = event->GetHMFSParticle(2112)->fP;
TLorentzVector Ppim = event->GetHMFSParticle(-211)->fP;
double hadMass = FitUtils::MpPi(Pn, Ppim);
double Enu = -1.0;
if (hadMass < 1400) Enu = Pnu.E()/1.E3;
fXVar = Enu;
return;
};
bool BEBC_CC1npim_XSec_1DEnu_antinu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, -14, -211, 2112, EnuMin, EnuMax);
}
diff --git a/src/BEBC/BEBC_CC1npim_XSec_1DEnu_antinu.h b/src/BEBC/BEBC_CC1npim_XSec_1DEnu_antinu.h
index 44296c0..b0c2b91 100644
--- a/src/BEBC/BEBC_CC1npim_XSec_1DEnu_antinu.h
+++ b/src/BEBC/BEBC_CC1npim_XSec_1DEnu_antinu.h
@@ -1,39 +1,37 @@
// 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 BEBC_CC1NPIM_XSEC_1DENU_ANTINU_H_SEEN
#define BEBC_CC1NPIM_XSEC_1DENU_ANTINU_H_SEEN
#include "Measurement1D.h"
class BEBC_CC1npim_XSec_1DEnu_antinu : public Measurement1D {
public:
- BEBC_CC1npim_XSec_1DEnu_antinu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ BEBC_CC1npim_XSec_1DEnu_antinu(nuiskey samplekey);
virtual ~BEBC_CC1npim_XSec_1DEnu_antinu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
- //void FillHistograms();
private:
};
#endif
diff --git a/src/BEBC/BEBC_CC1npim_XSec_1DQ2_antinu.cxx b/src/BEBC/BEBC_CC1npim_XSec_1DQ2_antinu.cxx
index 9ae0e47..9cdb865 100644
--- a/src/BEBC/BEBC_CC1npim_XSec_1DQ2_antinu.cxx
+++ b/src/BEBC/BEBC_CC1npim_XSec_1DQ2_antinu.cxx
@@ -1,88 +1,109 @@
// 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 "BEBC_CC1npim_XSec_1DQ2_antinu.h"
-// The constructor
-BEBC_CC1npim_XSec_1DQ2_antinu::BEBC_CC1npim_XSec_1DQ2_antinu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
- fName = "BEBC_CC1npim_XSec_1DQ2_antinu";
- fPlotTitles = "; Q^{2} (GeV^{2}); d#sigma/dQ^{2} (cm^{2}/GeV^{2}/neutron)";
- EnuMin = 5.;
- EnuMax = 200.;
- fIsDiag = true;
- fNormError = 0.20;
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
+//********************************************************************
+BEBC_CC1npim_XSec_1DQ2_antinu::BEBC_CC1npim_XSec_1DQ2_antinu(nuiskey samplekey) {
+//********************************************************************
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BEBC/Dfill/BEBC_Dfill_CC1pi-_on_n_W14_edit.txt");
- this->SetupDefaultHist();
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CC1npim_XSec_1DQ2_antinu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("Q^{2} (GeV^{2})");
+ fSettings.SetYTitle("d#sigma/dQ^{2} (cm^{2}/GeV^{2}/neutron)");
+ fSettings.SetAllowedTypes("FIX/FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(5.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CC1npim_XSec_1DQ2_antinu");
+ fSettings.DefineAllowedSpecies("numub");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/BEBC/Dfill/BEBC_Dfill_CC1pi-_on_n_W14_edit.txt" );
+
+ FinaliseSampleSettings();
+
+ // Scaling Setup ---------------------------------------------------
+ // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
+ fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.)*TotalIntegratedFlux("width"))*2./1.;
+
+ // Plot Setup -------------------------------------------------------
+ SetDataFromTextFile( fSettings.GetDataInput() );
+ SetCovarFromDiagonal();
hadMassHist = new TH1D((fName+"_Wrec").c_str(),(fName+"_Wrec").c_str(), 100, 1000, 2000);
hadMassHist->SetTitle((fName+"; W_{rec} (GeV/c^{2}); Area norm. # of events").c_str());
- this->fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.)*this->TotalIntegratedFlux("width"))*16./8.;
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
+
};
void BEBC_CC1npim_XSec_1DQ2_antinu::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 Ppim = event->GetHMFSParticle(-211)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(-13)->fP;
hadMass = FitUtils::MpPi(Pn, Ppim);
double q2CCpip = -1.0;
if (hadMass < 1400) q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6;
fXVar = q2CCpip;
return;
};
bool BEBC_CC1npim_XSec_1DQ2_antinu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, -14, -211, 2112, EnuMin, EnuMax);
}
void BEBC_CC1npim_XSec_1DQ2_antinu::FillHistograms() {
Measurement1D::FillHistograms();
-
+
hadMassHist->Fill(hadMass);
return;
}
void BEBC_CC1npim_XSec_1DQ2_antinu::Write(std::string drawOpt) {
Measurement1D::Write(drawOpt);
+
hadMassHist->Scale(1/hadMassHist->Integral());
hadMassHist->Write();
return;
}
diff --git a/src/BEBC/BEBC_CC1npim_XSec_1DQ2_antinu.h b/src/BEBC/BEBC_CC1npim_XSec_1DQ2_antinu.h
index 57b77a4..72bc15e 100644
--- a/src/BEBC/BEBC_CC1npim_XSec_1DQ2_antinu.h
+++ b/src/BEBC/BEBC_CC1npim_XSec_1DQ2_antinu.h
@@ -1,43 +1,42 @@
// 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 BEBC_CC1NPIM_XSEC_1DQ2_ANTINU_H_SEEN
#define BEBC_CC1NPIM_XSEC_1DQ2_ANTINU_H_SEEN
#include "Measurement1D.h"
class BEBC_CC1npim_XSec_1DQ2_antinu : public Measurement1D {
public:
- BEBC_CC1npim_XSec_1DQ2_antinu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ BEBC_CC1npim_XSec_1DQ2_antinu(nuiskey samplekey);
virtual ~BEBC_CC1npim_XSec_1DQ2_antinu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
void FillHistograms();
void Write(std::string drawOpts);
private:
TH1D *hadMassHist;
double hadMass;
};
#endif
diff --git a/src/BEBC/BEBC_CC1npip_XSec_1DEnu_nu.cxx b/src/BEBC/BEBC_CC1npip_XSec_1DEnu_nu.cxx
index 6b4fd6f..74fb299 100644
--- a/src/BEBC/BEBC_CC1npip_XSec_1DEnu_nu.cxx
+++ b/src/BEBC/BEBC_CC1npip_XSec_1DEnu_nu.cxx
@@ -1,65 +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 "BEBC_CC1npip_XSec_1DEnu_nu.h"
-// The constructor
-BEBC_CC1npip_XSec_1DEnu_nu::BEBC_CC1npip_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
- fName = "BEBC_CC1npip_XSec_1DEnu_nu";
- fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/neutron)";
- EnuMin = 5.;
- EnuMax = 200.;
- 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
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
+//********************************************************************
+BEBC_CC1npip_XSec_1DEnu_nu::BEBC_CC1npip_XSec_1DEnu_nu(nuiskey samplekey) {
+//********************************************************************
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BEBC/theses/BEBC_theses_CC1pip_on_n_W14.txt");
- this->SetupDefaultHist();
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CC1npip_XSec_1DEnu_nu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("E_{#nu} (GeV)");
+ fSettings.SetYTitle("#sigma(E_{#nu}) (cm^{2}/neutron)");
+ fSettings.SetAllowedTypes("FIX/FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(5.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CC1npip_XSec_1DEnu_nu");
+ fSettings.DefineAllowedSpecies("numu");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/BEBC/theses/BEBC_theses_CC1pip_on_n_W14.txt");
+
+ 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() );
+ SetCovarFromDiagonal();
+
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
- this->fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(16./8.);
};
+
void BEBC_CC1npip_XSec_1DEnu_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(2112) == 0 ||
event->NumFSParticle(211) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pn = event->GetHMFSParticle(2112)->fP;
TLorentzVector Ppip = event->GetHMFSParticle(211)->fP;
double hadMass = FitUtils::MpPi(Pn, Ppip);
double Enu = -1.0;
if (hadMass < 1400) Enu = Pnu.E()/1.E3;
fXVar = Enu;
return;
};
bool BEBC_CC1npip_XSec_1DEnu_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax);
}
diff --git a/src/BEBC/BEBC_CC1npip_XSec_1DEnu_nu.h b/src/BEBC/BEBC_CC1npip_XSec_1DEnu_nu.h
index cc49d59..e9f2345 100644
--- a/src/BEBC/BEBC_CC1npip_XSec_1DEnu_nu.h
+++ b/src/BEBC/BEBC_CC1npip_XSec_1DEnu_nu.h
@@ -1,39 +1,37 @@
// 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 BEBC_CC1NPIP_XSEC_1DENU_NU_H_SEEN
#define BEBC_CC1NPIP_XSEC_1DENU_NU_H_SEEN
#include "Measurement1D.h"
class BEBC_CC1npip_XSec_1DEnu_nu : public Measurement1D {
public:
- BEBC_CC1npip_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ BEBC_CC1npip_XSec_1DEnu_nu(nuiskey samplekey);
virtual ~BEBC_CC1npip_XSec_1DEnu_nu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
- //void FillHistograms();
private:
};
#endif
diff --git a/src/BEBC/BEBC_CC1npip_XSec_1DQ2_nu.cxx b/src/BEBC/BEBC_CC1npip_XSec_1DQ2_nu.cxx
index 08cb539..c486408 100644
--- a/src/BEBC/BEBC_CC1npip_XSec_1DQ2_nu.cxx
+++ b/src/BEBC/BEBC_CC1npip_XSec_1DQ2_nu.cxx
@@ -1,89 +1,108 @@
// 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 "BEBC_CC1npip_XSec_1DQ2_nu.h"
-// The constructor
-BEBC_CC1npip_XSec_1DQ2_nu::BEBC_CC1npip_XSec_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) {
- fName = "BEBC_CC1npip_XSec_1DQ2_nu";
- fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); d#sigma/dQ^{2} (cm^{2}/GeV^{2}/neutron)";
- EnuMin = 5;
- EnuMax = 200;
- fIsDiag = true;
- fNormError = 0.20;
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
+//********************************************************************
+BEBC_CC1npip_XSec_1DQ2_nu::BEBC_CC1npip_XSec_1DQ2_nu(nuiskey samplekey) {
+//********************************************************************
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BEBC/Dfill/BEBC_Dfill_CC1pi+_on_n_W14_edit.txt");
- this->SetupDefaultHist();
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CC1npip_XSec_1DQ2_nu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("Q^{2} (GeV^{2})");
+ fSettings.SetYTitle("d#sigma/dQ^{2} (cm^{2}/GeV^{2}/neutron)");
+ fSettings.SetAllowedTypes("FIX/FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(5.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CC1npip_XSec_1DQ2_nu");
+ fSettings.DefineAllowedSpecies("numu");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/BEBC/Dfill/BEBC_Dfill_CC1pi+_on_n_W14_edit.txt" );
+
+ FinaliseSampleSettings();
+
+ // Scaling Setup ---------------------------------------------------
+ // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
+ fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.)*TotalIntegratedFlux("width"))*2./1.;
+
+ // Plot Setup -------------------------------------------------------
+ SetDataFromTextFile( fSettings.GetDataInput() );
+ SetCovarFromDiagonal();
hadMassHist = new TH1D((fName+"_Wrec").c_str(),(fName+"_Wrec").c_str(), 100, 1000, 2000);
hadMassHist->SetTitle((fName+"; W_{rec} (GeV/c^{2}); Area norm. # of events").c_str());
- this->fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.)*this->TotalIntegratedFlux("width"))*16./8.;
-};
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
+};
void BEBC_CC1npip_XSec_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;
hadMass = FitUtils::MpPi(Pn, Ppip);
double q2CCpip = -1.0;
// BEBC has a 1.1GeV < M(pi, p) < 1.4 GeV cut imposed (also no cut measurement but not useful for delta tuning)
if (hadMass < 1400) q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6;
fXVar = q2CCpip;
return;
};
bool BEBC_CC1npip_XSec_1DQ2_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax);
}
void BEBC_CC1npip_XSec_1DQ2_nu::FillHistograms() {
Measurement1D::FillHistograms();
hadMassHist->Fill(hadMass);
return;
}
void BEBC_CC1npip_XSec_1DQ2_nu::Write(std::string drawOpt) {
Measurement1D::Write(drawOpt);
hadMassHist->Scale(1/hadMassHist->Integral());
hadMassHist->Write();
return;
}
diff --git a/src/BEBC/BEBC_CC1npip_XSec_1DQ2_nu.h b/src/BEBC/BEBC_CC1npip_XSec_1DQ2_nu.h
index 4de557c..1581a1c 100644
--- a/src/BEBC/BEBC_CC1npip_XSec_1DQ2_nu.h
+++ b/src/BEBC/BEBC_CC1npip_XSec_1DQ2_nu.h
@@ -1,43 +1,42 @@
// 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 BEBC_CC1NPIP_XSEC_1DQ2_NU_H_SEEN
#define BEBC_CC1NPIP_XSEC_1DQ2_NU_H_SEEN
#include "Measurement1D.h"
class BEBC_CC1npip_XSec_1DQ2_nu : public Measurement1D {
public:
- BEBC_CC1npip_XSec_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ BEBC_CC1npip_XSec_1DQ2_nu(nuiskey samplekey);
virtual ~BEBC_CC1npip_XSec_1DQ2_nu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
void FillHistograms();
void Write(std::string drawOpts);
private:
TH1D *hadMassHist;
double hadMass;
};
#endif
diff --git a/src/BEBC/BEBC_CC1pi0_XSec_1DEnu_nu.cxx b/src/BEBC/BEBC_CC1pi0_XSec_1DEnu_nu.cxx
index fe05fd5..3f31236 100644
--- a/src/BEBC/BEBC_CC1pi0_XSec_1DEnu_nu.cxx
+++ b/src/BEBC/BEBC_CC1pi0_XSec_1DEnu_nu.cxx
@@ -1,67 +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 "BEBC_CC1pi0_XSec_1DEnu_nu.h"
-// The constructor
-BEBC_CC1pi0_XSec_1DEnu_nu::BEBC_CC1pi0_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
- fName = "BEBC_CC1pi0_XSec_1DEnu_nu";
- fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/neutron)";
- EnuMin = 5.;
- EnuMax = 200.;
- 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
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
+//********************************************************************
+BEBC_CC1pi0_XSec_1DEnu_nu::BEBC_CC1pi0_XSec_1DEnu_nu(nuiskey samplekey) {
+//********************************************************************
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BEBC/theses/BEBC_theses_CC1pi0_W14.txt");
- this->SetupDefaultHist();
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CC1pi0_XSec_1DEnu_nu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("E_{#nu} (GeV)");
+ fSettings.SetYTitle("#sigma(E_{#nu}) (cm^{2}/neutron)");
+ fSettings.SetAllowedTypes("FIX/FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(5.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CC1pi0_XSec_1DEnu_nu");
+ fSettings.DefineAllowedSpecies("numu");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/BEBC/theses/BEBC_theses_CC1pi0_W14.txt");
+
+ 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() );
+ SetCovarFromDiagonal();
+
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
- this->fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(16./8.);
- //this->fScaleFactor = double(1.0E-38)/double(fNEvents)*(16./8.);
};
void BEBC_CC1pi0_XSec_1DEnu_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(2212) == 0 ||
event->NumFSParticle(111) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pp = event->GetHMFSParticle(2212)->fP;
TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP;
double hadMass = FitUtils::MpPi(Pp, Ppi0);
double Enu = -1.0;
if (hadMass < 1400) Enu = Pnu.E()/1.E3;
fXVar = Enu;
return;
};
bool BEBC_CC1pi0_XSec_1DEnu_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax);
}
diff --git a/src/BEBC/BEBC_CC1pi0_XSec_1DEnu_nu.h b/src/BEBC/BEBC_CC1pi0_XSec_1DEnu_nu.h
index 380c817..5ec66b8 100644
--- a/src/BEBC/BEBC_CC1pi0_XSec_1DEnu_nu.h
+++ b/src/BEBC/BEBC_CC1pi0_XSec_1DEnu_nu.h
@@ -1,39 +1,37 @@
// 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 BEBC_CC1PI0_XSEC_1DENU_NU_H_SEEN
#define BEBC_CC1PI0_XSEC_1DENU_NU_H_SEEN
#include "Measurement1D.h"
class BEBC_CC1pi0_XSec_1DEnu_nu : public Measurement1D {
public:
- BEBC_CC1pi0_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ BEBC_CC1pi0_XSec_1DEnu_nu(nuiskey samplekey);
virtual ~BEBC_CC1pi0_XSec_1DEnu_nu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
- //void FillHistograms();
private:
};
#endif
diff --git a/src/BEBC/BEBC_CC1pi0_XSec_1DQ2_nu.cxx b/src/BEBC/BEBC_CC1pi0_XSec_1DQ2_nu.cxx
index 855573e..31a4725 100644
--- a/src/BEBC/BEBC_CC1pi0_XSec_1DQ2_nu.cxx
+++ b/src/BEBC/BEBC_CC1pi0_XSec_1DQ2_nu.cxx
@@ -1,88 +1,108 @@
// 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 "BEBC_CC1pi0_XSec_1DQ2_nu.h"
-// The constructor
-BEBC_CC1pi0_XSec_1DQ2_nu::BEBC_CC1pi0_XSec_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) {
- fName = "BEBC_CC1pi0_XSec_1DQ2_nu";
- fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); d#sigma/dQ^{2} (cm^{2}/GeV^{2}/neutron)";
- EnuMin = 5.;
- EnuMax = 200.;
- fIsDiag = true;
- fNormError = 0.20;
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
+//********************************************************************
+BEBC_CC1pi0_XSec_1DQ2_nu::BEBC_CC1pi0_XSec_1DQ2_nu(nuiskey samplekey) {
+//********************************************************************
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BEBC/Dfill/BEBC_Dfill_CC1pi0_on_n_W14_edit.txt");
- this->SetupDefaultHist();
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CC1pi0_XSec_1DQ2_nu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("Q^{2} (GeV^{2})");
+ fSettings.SetYTitle("d#sigma/dQ^{2} (cm^{2}/GeV^{2}/neutron)");
+ fSettings.SetAllowedTypes("FIX/FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(5.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CC1pi0_XSec_1DQ2_nu");
+ fSettings.DefineAllowedSpecies("numu");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/BEBC/Dfill/BEBC_Dfill_CC1pi0_on_n_W14_edit.txt" );
+
+ FinaliseSampleSettings();
+
+ // Scaling Setup ---------------------------------------------------
+ // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
+ fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.)*TotalIntegratedFlux("width"))*2./1.;
+
+ // Plot Setup -------------------------------------------------------
+ SetDataFromTextFile( fSettings.GetDataInput() );
+ SetCovarFromDiagonal();
hadMassHist = new TH1D((fName+"_Wrec").c_str(),(fName+"_Wrec").c_str(), 100, 1000, 2000);
hadMassHist->SetTitle((fName+"; W_{rec} (GeV/c^{2}); Area norm. # of events").c_str());
- this->fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.)*this->TotalIntegratedFlux("width"))*16./8.;
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
+
};
void BEBC_CC1pi0_XSec_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;
hadMass = FitUtils::MpPi(Pp, Ppi0);
double q2CCpi0 = -1.0;
if (hadMass < 1400) q2CCpi0 = -1*(Pnu-Pmu).Mag2()/1.E6;
fXVar = q2CCpi0;
return;
};
bool BEBC_CC1pi0_XSec_1DQ2_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax);
}
void BEBC_CC1pi0_XSec_1DQ2_nu::FillHistograms() {
Measurement1D::FillHistograms();
hadMassHist->Fill(hadMass);
return;
}
void BEBC_CC1pi0_XSec_1DQ2_nu::Write(std::string drawOpt) {
Measurement1D::Write(drawOpt);
hadMassHist->Scale(1/hadMassHist->Integral());
hadMassHist->Write();
return;
}
diff --git a/src/BEBC/BEBC_CC1pi0_XSec_1DQ2_nu.h b/src/BEBC/BEBC_CC1pi0_XSec_1DQ2_nu.h
index a65c1f8..d6172ef 100644
--- a/src/BEBC/BEBC_CC1pi0_XSec_1DQ2_nu.h
+++ b/src/BEBC/BEBC_CC1pi0_XSec_1DQ2_nu.h
@@ -1,43 +1,42 @@
// 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 BEBC_CC1PI0_XSEC_1DQ2_NU_H_SEEN
#define BEBC_CC1PI0_XSEC_1DQ2_NU_H_SEEN
#include "Measurement1D.h"
class BEBC_CC1pi0_XSec_1DQ2_nu : public Measurement1D {
public:
- BEBC_CC1pi0_XSec_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ BEBC_CC1pi0_XSec_1DQ2_nu(nuiskey samplekey);
virtual ~BEBC_CC1pi0_XSec_1DQ2_nu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
void FillHistograms();
void Write(std::string drawOpts);
private:
TH1D *hadMassHist;
double hadMass;
};
#endif
diff --git a/src/BEBC/BEBC_CC1ppim_XSec_1DEnu_antinu.cxx b/src/BEBC/BEBC_CC1ppim_XSec_1DEnu_antinu.cxx
index 72ea5f0..0503e31 100644
--- a/src/BEBC/BEBC_CC1ppim_XSec_1DEnu_antinu.cxx
+++ b/src/BEBC/BEBC_CC1ppim_XSec_1DEnu_antinu.cxx
@@ -1,68 +1,88 @@
// 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 "BEBC_CC1ppim_XSec_1DEnu_antinu.h"
-// The constructor
-BEBC_CC1ppim_XSec_1DEnu_antinu::BEBC_CC1ppim_XSec_1DEnu_antinu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
- fName = "BEBC_CC1ppim_XSec_1DEnu_antinu";
- fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/proton)";
- EnuMin = 5.;
- EnuMax = 200.;
- 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
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BEBC/theses/BEBC_theses_ANU_CC1pi-_pFin_W14.txt");
- this->SetupDefaultHist();
+//********************************************************************
+BEBC_CC1ppim_XSec_1DEnu_antinu::BEBC_CC1ppim_XSec_1DEnu_antinu(nuiskey samplekey) {
+//********************************************************************
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CC1ppim_XSec_1DEnu_antinu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- this->fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(16./8.);
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("E_{#nu} (GeV)");
+ fSettings.SetYTitle("#sigma(E_{#nu}) (cm^{2}/proton)");
+ fSettings.SetAllowedTypes("FIX/FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(5.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CC1ppim_XSec_1DEnu_antinu");
+ fSettings.DefineAllowedSpecies("numub");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/BEBC/theses/BEBC_theses_ANU_CC1pi-_pFin_W14.txt" );
+
+ 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() );
+ SetCovarFromDiagonal();
+
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
};
void BEBC_CC1ppim_XSec_1DEnu_antinu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(2212) == 0 ||
event->NumFSParticle(-211) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pp = event->GetHMFSParticle(2212)->fP;
TLorentzVector Ppim = event->GetHMFSParticle(-211)->fP;
double hadMass = FitUtils::MpPi(Pp, Ppim);
double Enu = -1.0;
if (hadMass < 1400) Enu = Pnu.E()/1.E3;
fXVar = Enu;
return;
};
bool BEBC_CC1ppim_XSec_1DEnu_antinu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, -14, -211, 2212, EnuMin, EnuMax);
}
diff --git a/src/BEBC/BEBC_CC1ppim_XSec_1DEnu_antinu.h b/src/BEBC/BEBC_CC1ppim_XSec_1DEnu_antinu.h
index 0024128..d8b3c47 100644
--- a/src/BEBC/BEBC_CC1ppim_XSec_1DEnu_antinu.h
+++ b/src/BEBC/BEBC_CC1ppim_XSec_1DEnu_antinu.h
@@ -1,41 +1,38 @@
// 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 BEBC_CC1PPIM_XSEC_1DENU_ANTINU_H_SEEN
#define BEBC_CC1PPIM_XSEC_1DENU_ANTINU_H_SEEN
#include "Measurement1D.h"
class BEBC_CC1ppim_XSec_1DEnu_antinu : public Measurement1D {
public:
- BEBC_CC1ppim_XSec_1DEnu_antinu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ BEBC_CC1ppim_XSec_1DEnu_antinu(nuiskey samplekey);
virtual ~BEBC_CC1ppim_XSec_1DEnu_antinu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
- //void FillHistograms();
-
private:
};
#endif
diff --git a/src/BEBC/BEBC_CC1ppim_XSec_1DQ2_antinu.cxx b/src/BEBC/BEBC_CC1ppim_XSec_1DQ2_antinu.cxx
index 6c403b2..d7f376f 100644
--- a/src/BEBC/BEBC_CC1ppim_XSec_1DQ2_antinu.cxx
+++ b/src/BEBC/BEBC_CC1ppim_XSec_1DQ2_antinu.cxx
@@ -1,88 +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 "BEBC_CC1ppim_XSec_1DQ2_antinu.h"
-// The constructor
-BEBC_CC1ppim_XSec_1DQ2_antinu::BEBC_CC1ppim_XSec_1DQ2_antinu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
- fName = "BEBC_CC1ppim_XSec_1DQ2_antinu";
- fPlotTitles = "; Q^{2} (GeV^{2}); d#sigma/dQ^{2} (cm^{2}/GeV^{2}/proton)";
- EnuMin = 5.;
- EnuMax = 200.;
- 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
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
+//********************************************************************
+BEBC_CC1ppim_XSec_1DQ2_antinu::BEBC_CC1ppim_XSec_1DQ2_antinu(nuiskey samplekey) {
+//********************************************************************
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BEBC/Dfill/BEBC_Dfill_CC1pi-_on_p_W14_edit.txt");
- this->SetupDefaultHist();
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CC1ppim_XSec_1DQ2_antinu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("Q^{2} (GeV^{2})");
+ fSettings.SetYTitle("d#sigma/dQ^{2} (cm^{2}/GeV^{2}/neutron)");
+ fSettings.SetAllowedTypes("FIX/FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(5.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CC1ppim_XSec_1DQ2_antinu");
+ fSettings.DefineAllowedSpecies("numub");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/BEBC/Dfill/BEBC_Dfill_CC1pi-_on_p_W14_edit.txt" );
+
+ FinaliseSampleSettings();
+
+ // Scaling Setup ---------------------------------------------------
+ // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
+ fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.)*TotalIntegratedFlux("width"))*2./1.;
+
+ // Plot Setup -------------------------------------------------------
+ SetDataFromTextFile( fSettings.GetDataInput() );
+ SetCovarFromDiagonal();
hadMassHist = new TH1D((fName+"_Wrec").c_str(),(fName+"_Wrec").c_str(), 100, 1000, 2000);
hadMassHist->SetTitle((fName+"; W_{rec} (GeV/c^{2}); Area norm. # of events").c_str());
- this->fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.)*this->TotalIntegratedFlux("width"))*16./8.;
-};
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
+};
void BEBC_CC1ppim_XSec_1DQ2_antinu::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 Ppim = event->GetHMFSParticle(-211)->fP;
TLorentzVector Pmu = event->GetHMFSParticle(-13)->fP;
hadMass = FitUtils::MpPi(Pp, Ppim);
double q2CCpip = -1.0;
if (hadMass < 1400) q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6;
fXVar = q2CCpip;
return;
};
bool BEBC_CC1ppim_XSec_1DQ2_antinu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, -14, -211, 2212, EnuMin, EnuMax);
}
void BEBC_CC1ppim_XSec_1DQ2_antinu::FillHistograms() {
Measurement1D::FillHistograms();
hadMassHist->Fill(hadMass);
return;
}
void BEBC_CC1ppim_XSec_1DQ2_antinu::Write(std::string drawOpt) {
Measurement1D::Write(drawOpt);
hadMassHist->Scale(1/hadMassHist->Integral());
hadMassHist->Write();
return;
}
diff --git a/src/BEBC/BEBC_CC1ppim_XSec_1DQ2_antinu.h b/src/BEBC/BEBC_CC1ppim_XSec_1DQ2_antinu.h
index 0944694..027824b 100644
--- a/src/BEBC/BEBC_CC1ppim_XSec_1DQ2_antinu.h
+++ b/src/BEBC/BEBC_CC1ppim_XSec_1DQ2_antinu.h
@@ -1,44 +1,43 @@
// 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 BEBC_CC1PPIM_XSEC_1DQ2_ANTINU_H_SEEN
#define BEBC_CC1PPIM_XSEC_1DQ2_ANTINU_H_SEEN
#include "Measurement1D.h"
class BEBC_CC1ppim_XSec_1DQ2_antinu : public Measurement1D {
public:
- BEBC_CC1ppim_XSec_1DQ2_antinu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ BEBC_CC1ppim_XSec_1DQ2_antinu(nuiskey samplekey);
virtual ~BEBC_CC1ppim_XSec_1DQ2_antinu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
void FillHistograms();
void Write(std::string drawOpts);
private:
TH1D *hadMassHist;
double hadMass;
};
#endif
diff --git a/src/BEBC/BEBC_CC1ppip_XSec_1DEnu_nu.cxx b/src/BEBC/BEBC_CC1ppip_XSec_1DEnu_nu.cxx
index 2137252..ca501fc 100644
--- a/src/BEBC/BEBC_CC1ppip_XSec_1DEnu_nu.cxx
+++ b/src/BEBC/BEBC_CC1ppip_XSec_1DEnu_nu.cxx
@@ -1,67 +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 "BEBC_CC1ppip_XSec_1DEnu_nu.h"
-// The constructor
-BEBC_CC1ppip_XSec_1DEnu_nu::BEBC_CC1ppip_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
- fName = "BEBC_CC1ppip_XSec_1DEnu_nu";
- fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/proton)";
- EnuMin = 5.;
- EnuMax = 200.;
- fIsDiag = true; // refers to covariance matrix; this measurement has none so only use errors, not covariance
- fNormError = 0.20;
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
-
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BEBC/theses/BEBC_theses_CC1pip_on_p_W14.txt");
- this->SetupDefaultHist();
-
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
-
- this->fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(16./8.);
+//********************************************************************
+BEBC_CC1ppip_XSec_1DEnu_nu::BEBC_CC1ppip_XSec_1DEnu_nu(nuiskey samplekey) {
+//********************************************************************
+
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CC1ppip_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}/proton)");
+ fSettings.SetAllowedTypes("FIX/FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(5.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CC1ppip_XSec_1DEnu_nu");
+ fSettings.DefineAllowedSpecies("numu");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/BEBC/theses/BEBC_theses_CC1pip_on_p_W14.txt");
+
+ 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() );
+ SetCovarFromDiagonal();
+
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
};
void BEBC_CC1ppip_XSec_1DEnu_nu::FillEventVariables(FitEvent *event) {
if (event->NumFSParticle(2212) == 0 ||
event->NumFSParticle(211) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pp = event->GetHMFSParticle(2212)->fP;
TLorentzVector Ppip = event->GetHMFSParticle(211)->fP;
double hadMass = FitUtils::MpPi(Pp, Ppip);
double Enu = -1.0;
if (hadMass < 1400) Enu = Pnu.E()/1.E3;
fXVar = Enu;
return;
};
bool BEBC_CC1ppip_XSec_1DEnu_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax);
}
diff --git a/src/BEBC/BEBC_CC1ppip_XSec_1DEnu_nu.h b/src/BEBC/BEBC_CC1ppip_XSec_1DEnu_nu.h
index b8e5056..d4b100f 100644
--- a/src/BEBC/BEBC_CC1ppip_XSec_1DEnu_nu.h
+++ b/src/BEBC/BEBC_CC1ppip_XSec_1DEnu_nu.h
@@ -1,41 +1,38 @@
// 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 BEBC_CC1PPIP_XSEC_1DENU_NU_H_SEEN
#define BEBC_CC1PPIP_XSEC_1DENU_NU_H_SEEN
#include "Measurement1D.h"
class BEBC_CC1ppip_XSec_1DEnu_nu : public Measurement1D {
public:
- BEBC_CC1ppip_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ BEBC_CC1ppip_XSec_1DEnu_nu(nuiskey samplekey);
virtual ~BEBC_CC1ppip_XSec_1DEnu_nu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
- //void FillHistograms();
-
private:
};
#endif
diff --git a/src/BEBC/BEBC_CC1ppip_XSec_1DQ2_nu.cxx b/src/BEBC/BEBC_CC1ppip_XSec_1DQ2_nu.cxx
index 6c451ba..3bc4a93 100644
--- a/src/BEBC/BEBC_CC1ppip_XSec_1DQ2_nu.cxx
+++ b/src/BEBC/BEBC_CC1ppip_XSec_1DQ2_nu.cxx
@@ -1,91 +1,112 @@
// 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 "BEBC_CC1ppip_XSec_1DQ2_nu.h"
-// The constructor
-BEBC_CC1ppip_XSec_1DQ2_nu::BEBC_CC1ppip_XSec_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) {
- fName = "BEBC_CC1ppip_XSec_1DQ2_nu";
- fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); d#sigma/dQ^{2} (cm^{2}/GeV^{2}/proton)";
- EnuMin = 5;
- EnuMax = 200;
- 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
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
+//********************************************************************
+BEBC_CC1ppip_XSec_1DQ2_nu::BEBC_CC1ppip_XSec_1DQ2_nu(nuiskey samplekey) {
+//********************************************************************
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BEBC/Dfill/BEBC_Dfill_CC1pi+_on_p_W14_edit.txt");
- this->SetupDefaultHist();
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CC1ppip_XSec_1DQ2_nu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("Q^{2} (GeV^{2})");
+ fSettings.SetYTitle("d#sigma/dQ^{2} (cm^{2}/GeV^{2}/proton)");
+ fSettings.SetAllowedTypes("FIX/FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(5.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CC1ppip_XSec_1DQ2_nu");
+ fSettings.DefineAllowedSpecies("numu");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/BEBC/Dfill/BEBC_Dfill_CC1pi+_on_p_W14_edit.txt" );
+
+ FinaliseSampleSettings();
+
+ // Scaling Setup ---------------------------------------------------
+ // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
+ fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.)*TotalIntegratedFlux("width"))*2./1.;
+
+ // Plot Setup -------------------------------------------------------
+ SetDataFromTextFile( fSettings.GetDataInput() );
+ SetCovarFromDiagonal();
hadMassHist = new TH1D((fName+"_Wrec").c_str(),(fName+"_Wrec").c_str(), 100, 1000, 2000);
hadMassHist->SetTitle((fName+"; W_{rec} (GeV/c^{2}); Area norm. # of events").c_str());
- this->fScaleFactor = (GetEventHistogram()->Integral("width")*1E-38)/((fNEvents+0.)*this->TotalIntegratedFlux("width"))*16./8.;
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
+
};
+
void BEBC_CC1ppip_XSec_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;
hadMass = FitUtils::MpPi(Pp, Ppip);
double q2CCpip = -1.0;
// BEBC has a M(pi, p) < 1.4 GeV cut imposed only on this channel
if (hadMass < 1400) q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6;
fXVar = q2CCpip;
return;
};
bool BEBC_CC1ppip_XSec_1DQ2_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax);
}
void BEBC_CC1ppip_XSec_1DQ2_nu::FillHistograms() {
Measurement1D::FillHistograms();
hadMassHist->Fill(hadMass);
return;
}
void BEBC_CC1ppip_XSec_1DQ2_nu::Write(std::string drawOpt) {
Measurement1D::Write(drawOpt);
hadMassHist->Scale(1/hadMassHist->Integral());
hadMassHist->Write();
return;
}
diff --git a/src/BEBC/BEBC_CC1ppip_XSec_1DQ2_nu.h b/src/BEBC/BEBC_CC1ppip_XSec_1DQ2_nu.h
index c3551f5..7c3e913 100644
--- a/src/BEBC/BEBC_CC1ppip_XSec_1DQ2_nu.h
+++ b/src/BEBC/BEBC_CC1ppip_XSec_1DQ2_nu.h
@@ -1,43 +1,41 @@
// 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 BEBC_CC1PPIP_XSEC_1DQ2_NU_H_SEEN
#define BEBC_CC1PPIP_XSEC_1DQ2_NU_H_SEEN
#include "Measurement1D.h"
class BEBC_CC1ppip_XSec_1DQ2_nu : public Measurement1D {
public:
- BEBC_CC1ppip_XSec_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ BEBC_CC1ppip_XSec_1DQ2_nu(nuiskey samplekey);
virtual ~BEBC_CC1ppip_XSec_1DQ2_nu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
void FillHistograms();
void Write(std::string drawOpts);
-
private:
TH1D *hadMassHist;
double hadMass;
};
#endif
diff --git a/src/BEBC/BEBC_CCQE_XSec_1DQ2_nu.cxx b/src/BEBC/BEBC_CCQE_XSec_1DQ2_nu.cxx
index dd21074..0aa17d6 100755
--- a/src/BEBC/BEBC_CCQE_XSec_1DQ2_nu.cxx
+++ b/src/BEBC/BEBC_CCQE_XSec_1DQ2_nu.cxx
@@ -1,163 +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/>.
*******************************************************************************/
#include "BEBC_CCQE_XSec_1DQ2_nu.h"
+
//********************************************************************
-/// @brief BEBC CCQE Q2 Measurement on Free Nucleons (Ref: Nuc.Phys.B.343 285)
-///
-/// @details Q2 Extracted assuming numu CCQE scattering of free nucleons.
-BEBC_CCQE_XSec_1DQ2_nu::BEBC_CCQE_XSec_1DQ2_nu(std::string name, std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
-//********************************************************************
+BEBC_CCQE_XSec_1DQ2_nu::BEBC_CCQE_XSec_1DQ2_nu(nuiskey samplekey) {
+//********************************************************************
+
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "BEBC_CCQE_XSec_1DQ2_nu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
+
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("Q^{2}_{CCQE} (GeV^{2})");
+ fSettings.SetYTitle("Number of events");
+ fSettings.SetAllowedTypes("EVT/SHAPE/DIAG", "EVT/SHAPE/DIAG/Q2CORR/MASK");
+ fSettings.SetEnuRange(0.0, 200.0);
+ fSettings.DefineAllowedTargets("D,H");
+
+ // plot information
+ fSettings.SetTitle("BEBC_CCQE_XSec_1DQ2_nu");
+ fSettings.DefineAllowedSpecies("numu");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "BEBC/BEBC_CCQE_Data_NPB343_285.root;BEBC_1DQ2_Data");
+
+ // is Q2 Correction applied
+ applyQ2correction = fSettings.Found("type", "Q2CORR");
+ if (applyQ2correction) {
+ fSettings.SetS("q2correction_file", FitPar::GetDataBase() + "/data/ANL/ANL_CCQE_Data_PRL31_844.root");
+ fSettings.SetS("q2correction_hist", "ANL_XSec_1DQ2_Correction");
+ }
- // Measurement Details
- fName = name;
- EnuMin = 0.;
- EnuMax = 200.;
- applyQ2correction = type.find("Q2CORR") != std::string::npos;
- fIsDiag = true;
- fIsRawEvents = false;
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
+ FinaliseSampleSettings();
+ // Scaling Setup ---------------------------------------------------
+ // ScaleFactor for shape
+ fScaleFactor = (GetEventHistogram()->Integral("width")/(fNEvents+0.))*1E-38 / (TotalIntegratedFlux("width"));
- // In future read most of these from a card file
- this->SetDataFromDatabase("BEBC/BEBC_CCQE_Data_NPB343_285.root", "BEBC_1DQ2_Data");
- this->SetupDefaultHist();
+ // Plot Setup -------------------------------------------------------
+ SetDataFromTextFile( fSettings.GetDataInput() );
+ SetCovarFromDiagonal();
- if (applyQ2correction){
- this->CorrectionHist = PlotUtils::GetTH1DFromFile(GeneralUtils::GetTopLevelDir() + "/data/ANL/ANL_CCQE_Data_PRL31_844.root","ANL_XSec_1DQ2_Correction");
- this->fMCHist_NoCorr = (TH1D*) this->fMCHist->Clone();
- this->fMCHist_NoCorr->SetNameTitle( (this->fName + "_NOCORR").c_str(),(this->fName + "_NOCORR").c_str());
- }
+ // Correction Histogram
+ if (applyQ2correction) {
+ // Correction Hist
+ CorrectionHist = PlotUtils::GetTH1DFromFile( fSettings.GetS("q2correction_file"),
+ fSettings.GetS("q2correction_hist") );
+ SetAutoProcessTH1(CorrectionHist, kCMD_Write);
- // Setup Covariance
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
- // Generate events on H2 to get the normalisation right.
- this->fScaleFactor = (GetEventHistogram()->Integral("width")/(fNEvents+0.))*1E-38 / (this->TotalIntegratedFlux("width")); // NEUT
+ // Make uncorrected MC hist
+ fMCHist_NoCorr = (TH1D*) fDataHist->Clone();
+ fMCHist_NoCorr->Reset();
+ fMCHist_NoCorr->SetNameTitle( (fName + "_NOCORR").c_str(),
+ (fName + "_NOCORR").c_str());
+ SetAutoProcessTH1(fMCHist_NoCorr);
+ }
- // Set starting scale factor
- scaleF = -1.0;
-
-};
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
+}
//********************************************************************
-/// @details Extract q2qe from event assuming quasi-elastic scattering
-void BEBC_CCQE_XSec_1DQ2_nu::FillEventVariables(FitEvent *event){
+void BEBC_CCQE_XSec_1DQ2_nu::FillEventVariables(FitEvent * event) {
//********************************************************************
if (event->NumFSParticle(13) == 0)
return;
// Fill histogram with reconstructed Q2 Distribution
- q2qe = 0.0;
+ fXVar = -999.9;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
ThetaMu = Pnu.Vect().Angle(Pmu.Vect());
- q2qe = FitUtils::Q2QErec(Pmu, cos(ThetaMu), 0.,true);
+ fXVar = FitUtils::Q2QErec(Pmu, cos(ThetaMu), 0., true);
- fXVar = q2qe;
+ GetQ2Box()->fQ2 = fXVar;
return;
};
//********************************************************************
-/// @brief Signal is defined as True CCQE numu scattering
-/// @details cut 1: numu event
-/// @details cut 2: EnuMin < Enu < EnuMax
-/// @details cut 3: Q2 non-zero
-bool BEBC_CCQE_XSec_1DQ2_nu::isSignal(FitEvent *event){
-//********************************************************************
- if (!SignalDef::isCCQE(event, 14, EnuMin, EnuMax)) return false;
- if (q2qe <= 0) return false;
- return true;
-};
-
-//********************************************************************
-/// @details Reset the histogram uncorrect
-void BEBC_CCQE_XSec_1DQ2_nu::ResetAll(){
+bool BEBC_CCQE_XSec_1DQ2_nu::isSignal(FitEvent * event) {
//********************************************************************
- Measurement1D::ResetAll();
- this->fMCHist->Reset();
-
- if (applyQ2correction)
- this->fMCHist_NoCorr->Reset();
+ if (!SignalDef::isCCQE(event, 14, EnuMin, EnuMax)) return false;
+ // Q2 cut
+ if (GetQ2Box()->fQ2 <= 0) return false;
-}
+ return true;
+};
//********************************************************************
-/// @details Apply additional event weights for free nucleon measurements
-void BEBC_CCQE_XSec_1DQ2_nu::FillHistograms(){
+void BEBC_CCQE_XSec_1DQ2_nu::FillHistograms() {
//********************************************************************
+ if (applyQ2correction) {
+ fMCHist_NoCorr->Fill( GetQ2Box()->fQ2, Weight);
- if (applyQ2correction){
- this->fMCHist_NoCorr->Fill(fXVar, Weight);
-
- if (fXVar < 0.225)
- this->Weight *= this->CorrectionHist->Interpolate(fXVar);
+ if (GetQ2Box()->fQ2 < CorrectionHist->GetXaxis()->GetXmax() &&
+ GetQ2Box()->fQ2 > CorrectionHist->GetXaxis()->GetXmin())
+ Weight *= CorrectionHist->Interpolate(GetQ2Box()->fQ2);
}
Measurement1D::FillHistograms();
}
-//********************************************************************
-void BEBC_CCQE_XSec_1DQ2_nu::ScaleEvents(){
-//********************************************************************
-
- Measurement1D::ScaleEvents();
- if (applyQ2correction) this->fMCHist_NoCorr->Scale(this->fScaleFactor, "width");
-
- return;
-}
-
-//********************************************************************
-void BEBC_CCQE_XSec_1DQ2_nu::ApplyNormScale(double norm){
-//********************************************************************
-
- Measurement1D::ApplyNormScale(norm);
- if (norm == 0.0) scaleF = 0.0;
- else scaleF = 1.0/norm;
-
- if (applyQ2correction) this->fMCHist_NoCorr->Scale(scaleF);
-
- return;
-}
-
-//********************************************************************
-/// @brief Include Q2 Correction plots into data write
-void BEBC_CCQE_XSec_1DQ2_nu::Write(std::string drawOpt){
-//********************************************************************
-
- Measurement1D::Write(drawOpt);
-
- if (applyQ2correction){
- this->CorrectionHist->Write();
- this->fMCHist_NoCorr->Write();
- }
-
-
- return;
-}
diff --git a/src/BEBC/BEBC_CCQE_XSec_1DQ2_nu.h b/src/BEBC/BEBC_CCQE_XSec_1DQ2_nu.h
index c732a2c..3e10cce 100755
--- a/src/BEBC/BEBC_CCQE_XSec_1DQ2_nu.h
+++ b/src/BEBC/BEBC_CCQE_XSec_1DQ2_nu.h
@@ -1,52 +1,57 @@
// 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 BEBC_CCQE_XSEC_1DQ2_NU_H_SEEN
#define BEBC_CCQE_XSEC_1DQ2_NU_H_SEEN
#include "Measurement1D.h"
+#include "CustomVariableBoxes.h"
//********************************************************************
class BEBC_CCQE_XSec_1DQ2_nu : public Measurement1D {
//********************************************************************
-
public:
-
- BEBC_CCQE_XSec_1DQ2_nu(std::string name, std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+
+ BEBC_CCQE_XSec_1DQ2_nu(nuiskey samplekey);
virtual ~BEBC_CCQE_XSec_1DQ2_nu() {};
+ /// \brief Fill Q2QE Event Information
void FillEventVariables(FitEvent *event);
- void ApplyNormScale(double norm);
- bool isSignal(FitEvent *event);
+
+ /// \brief Selection only true CCQE
+ bool isSignal(FitEvent *event);
+
+ /// \brief Fill main histograms and correction histograms
void FillHistograms();
- void Write(std::string drawOpt);
- void ResetAll();
- void ScaleEvents();
+
+ /// \brief Use Q2 Box to save correction info
+ inline Q2VariableBox1D* GetQ2Box(){ return static_cast<Q2VariableBox1D*>(GetBox()); };
+
+ /// \brief Create Q2 Box to save correction info
+ inline MeasurementVariableBox* CreateBox(){ return new Q2VariableBox1D(); };
private:
+
bool applyQ2correction; ///< Flag of whether deut correction applied
TH1D* CorrectionHist; ///< Correction factor
TH1D* fMCHist_NoCorr; ///< Uncorrected fMCHist
- double q2qe; ///< fXVar
- double scaleF; ///< Nominal Scale Factor
-
};
#endif
diff --git a/src/FCN/SampleList.cxx b/src/FCN/SampleList.cxx
index 107b978..f840e2b 100644
--- a/src/FCN/SampleList.cxx
+++ b/src/FCN/SampleList.cxx
@@ -1,619 +1,619 @@
#include "SampleList.h"
//! Functions to make it easier for samples to be created and handled.
namespace SampleUtils {
//! Create a given sample given its name, file, type, fakdata(fkdt) file and the
//! current rw engine and push it back into the list fChain.
MeasurementBase* CreateSample(std::string name, std::string file,
std::string type, std::string fkdt, FitWeight* rw) {
nuiskey samplekey = Config::CreateKey("sample");
samplekey.AddS("name", name);
samplekey.AddS("input", file);
samplekey.AddS("type", type);
return CreateSample(samplekey);
}
MeasurementBase* CreateSample(nuiskey samplekey) {
FitWeight* rw = FitBase::GetRW();
std::string name = samplekey.GetS("name");
std::string file = samplekey.GetS("input");
std::string type = samplekey.GetS("type");
std::string fkdt = "";
/*
ANL CCQE Samples
*/
if (!name.compare("ANL_CCQE_XSec_1DEnu_nu") ||
!name.compare("ANL_CCQE_XSec_1DEnu_nu_PRD26") ||
!name.compare("ANL_CCQE_XSec_1DEnu_nu_PRL31") ||
!name.compare("ANL_CCQE_XSec_1DEnu_nu_PRD16")) {
return (new ANL_CCQE_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("ANL_CCQE_Evt_1DQ2_nu") ||
!name.compare("ANL_CCQE_Evt_1DQ2_nu_PRL31") ||
!name.compare("ANL_CCQE_Evt_1DQ2_nu_PRD26") ||
!name.compare("ANL_CCQE_Evt_1DQ2_nu_PRD16")) {
return (new ANL_CCQE_Evt_1DQ2_nu(samplekey));
/*
ANL CC1ppip samples
*/
} else if (!name.compare("ANL_CC1ppip_XSec_1DEnu_nu") ||
!name.compare("ANL_CC1ppip_XSec_1DEnu_nu_W14Cut") ||
!name.compare("ANL_CC1ppip_XSec_1DEnu_nu_Uncorr") ||
!name.compare("ANL_CC1ppip_XSec_1DEnu_nu_W14Cut_Uncorr") ||
!name.compare("ANL_CC1ppip_XSec_1DEnu_nu_W16Cut_Uncorr")) {
return (new ANL_CC1ppip_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("ANL_CC1ppip_XSec_1DQ2_nu")) {
return (new ANL_CC1ppip_XSec_1DQ2_nu(samplekey));
} else if (!name.compare("ANL_CC1ppip_Evt_1DQ2_nu") ||
!name.compare("ANL_CC1ppip_Evt_1DQ2_nu_W14Cut")) {
return (new ANL_CC1ppip_Evt_1DQ2_nu(samplekey));
} else if (!name.compare("ANL_CC1ppip_Evt_1Dppi_nu")) {
return (new ANL_CC1ppip_Evt_1Dppi_nu(samplekey));
} else if (!name.compare("ANL_CC1ppip_Evt_1Dthpr_nu")) {
return (new ANL_CC1ppip_Evt_1Dthpr_nu(samplekey));
} else if (!name.compare("ANL_CC1ppip_Evt_1DcosmuStar_nu")) {
return (new ANL_CC1ppip_Evt_1DcosmuStar_nu(samplekey));
} else if (!name.compare("ANL_CC1ppip_Evt_1DcosthAdler_nu")) {
return (new ANL_CC1ppip_Evt_1DcosthAdler_nu(samplekey));
} else if (!name.compare("ANL_CC1ppip_Evt_1Dphi_nu")) {
return (new ANL_CC1ppip_Evt_1Dphi_nu(samplekey));
/*
ANL CC1npip sample
*/
} else if (!name.compare("ANL_CC1npip_XSec_1DEnu_nu") ||
!name.compare("ANL_CC1npip_XSec_1DEnu_nu_W14Cut") ||
!name.compare("ANL_CC1npip_XSec_1DEnu_nu_Uncorr") ||
!name.compare("ANL_CC1npip_XSec_1DEnu_nu_W14Cut_Uncorr") ||
!name.compare("ANL_CC1npip_XSec_1DEnu_nu_W16Cut_Uncorr")) {
return (new ANL_CC1npip_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("ANL_CC1npip_Evt_1DQ2_nu") ||
!name.compare("ANL_CC1npip_Evt_1DQ2_nu_W14Cut")) {
return (new ANL_CC1npip_Evt_1DQ2_nu(samplekey));
} else if (!name.compare("ANL_CC1npip_Evt_1Dppi_nu")) {
return (new ANL_CC1npip_Evt_1Dppi_nu(samplekey));
} else if (!name.compare("ANL_CC1npip_Evt_1DcosmuStar_nu")) {
return (new ANL_CC1npip_Evt_1DcosmuStar_nu(samplekey));
/*
ANL CC1pi0 sample
*/
} else if (!name.compare("ANL_CC1pi0_XSec_1DEnu_nu") ||
!name.compare("ANL_CC1pi0_XSec_1DEnu_nu_W14Cut") ||
!name.compare("ANL_CC1pi0_XSec_1DEnu_nu_Uncorr") ||
!name.compare("ANL_CC1pi0_XSec_1DEnu_nu_W14Cut_Uncorr") ||
!name.compare("ANL_CC1pi0_XSec_1DEnu_nu_W16Cut_Uncorr")) {
return (new ANL_CC1pi0_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("ANL_CC1pi0_Evt_1DQ2_nu") ||
!name.compare("ANL_CC1pi0_Evt_1DQ2_nu_W14Cut")) {
return (new ANL_CC1pi0_Evt_1DQ2_nu(samplekey));
} else if (!name.compare("ANL_CC1pi0_Evt_1DcosmuStar_nu")) {
return (new ANL_CC1pi0_Evt_1DcosmuStar_nu(samplekey));
/*
ANL NC1npip sample
*/
} else if (!name.compare("ANL_NC1npip_Evt_1Dppi_nu")) {
return (new ANL_NC1npip_Evt_1Dppi_nu(samplekey));
/*
ANL NC1ppim sample
*/
} else if (!name.compare("ANL_NC1ppim_XSec_1DEnu_nu")) {
return (new ANL_NC1ppim_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("ANL_NC1ppim_Evt_1DcosmuStar_nu")) {
return (new ANL_NC1ppim_Evt_1DcosmuStar_nu(samplekey));
/*
ANL CC2pi sample
*/
} else if (!name.compare("ANL_CC2pi_1pim1pip_XSec_1DEnu_nu")) {
return (new ANL_CC2pi_1pim1pip_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pim1pip_Evt_1Dpmu_nu")) {
return (new ANL_CC2pi_1pim1pip_Evt_1Dpmu_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pim1pip_Evt_1Dppip_nu")) {
return (new ANL_CC2pi_1pim1pip_Evt_1Dppip_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pim1pip_Evt_1Dppim_nu")) {
return (new ANL_CC2pi_1pim1pip_Evt_1Dppim_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pim1pip_Evt_1Dpprot_nu")) {
return (new ANL_CC2pi_1pim1pip_Evt_1Dpprot_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pip1pip_XSec_1DEnu_nu")) {
return (new ANL_CC2pi_1pip1pip_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pip1pip_Evt_1Dpmu_nu")) {
return (new ANL_CC2pi_1pip1pip_Evt_1Dpmu_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pip1pip_Evt_1Dpneut_nu")) {
return (new ANL_CC2pi_1pip1pip_Evt_1Dpneut_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pip1pip_Evt_1DppipHigh_nu")) {
return (new ANL_CC2pi_1pip1pip_Evt_1DppipHigh_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pip1pip_Evt_1DppipLow_nu")) {
return (new ANL_CC2pi_1pip1pip_Evt_1DppipLow_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pip1pi0_XSec_1DEnu_nu")) {
return (new ANL_CC2pi_1pip1pi0_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pip1pi0_Evt_1Dpmu_nu")) {
return (new ANL_CC2pi_1pip1pi0_Evt_1Dpmu_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pip1pi0_Evt_1Dppip_nu")) {
return (new ANL_CC2pi_1pip1pi0_Evt_1Dppip_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pip1pi0_Evt_1Dppi0_nu")) {
return (new ANL_CC2pi_1pip1pi0_Evt_1Dppi0_nu(samplekey));
} else if (!name.compare("ANL_CC2pi_1pip1pi0_Evt_1Dpprot_nu")) {
return (new ANL_CC2pi_1pip1pi0_Evt_1Dpprot_nu(samplekey));
/*
ArgoNeut Samples
*/
} else if (!name.compare("ArgoNeuT_CCInc_XSec_1Dpmu_antinu")) {
return (new ArgoNeuT_CCInc_XSec_1Dpmu_antinu(samplekey));
} else if (!name.compare("ArgoNeuT_CCInc_XSec_1Dpmu_nu")) {
return (new ArgoNeuT_CCInc_XSec_1Dpmu_nu(samplekey));
} else if (!name.compare("ArgoNeuT_CCInc_XSec_1Dthetamu_antinu")) {
return (new ArgoNeuT_CCInc_XSec_1Dthetamu_antinu(samplekey));
} else if (!name.compare("ArgoNeuT_CCInc_XSec_1Dthetamu_nu")) {
return (new ArgoNeuT_CCInc_XSec_1Dthetamu_nu(samplekey));
/*
BNL Samples
*/
} else if (!name.compare("BNL_CCQE_XSec_1DEnu_nu")) {
return (new BNL_CCQE_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("BNL_CCQE_Evt_1DQ2_nu")) {
return (new BNL_CCQE_Evt_1DQ2_nu(samplekey));
/*
BNL CC1ppip samples
*/
} else if (!name.compare("BNL_CC1ppip_XSec_1DEnu_nu") ||
!name.compare("BNL_CC1ppip_XSec_1DEnu_nu_Uncorr")) {
return (new BNL_CC1ppip_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("BNL_CC1ppip_Evt_1DQ2_nu") ||
!name.compare("BNL_CC1ppip_Evt_1DQ2_nu_W14Cut")) {
return (new BNL_CC1ppip_Evt_1DQ2_nu(samplekey));
} else if (!name.compare("BNL_CC1ppip_Evt_1DcosthAdler_nu")) {
return (new BNL_CC1ppip_Evt_1DcosthAdler_nu(samplekey));
} else if (!name.compare("BNL_CC1ppip_Evt_1Dphi_nu")) {
return (new BNL_CC1ppip_Evt_1Dphi_nu(samplekey));
/*
BNL CC1npip samples
*/
} else if (!name.compare("BNL_CC1npip_XSec_1DEnu_nu") ||
!name.compare("BNL_CC1npip_XSec_1DEnu_nu_Uncorr")) {
return (new BNL_CC1npip_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("BNL_CC1npip_Evt_1DQ2_nu")) {
return (new BNL_CC1npip_Evt_1DQ2_nu(samplekey));
/*
BNL CC1pi0 samples
*/
} else if (!name.compare("BNL_CC1pi0_XSec_1DEnu_nu")) {
return (new BNL_CC1pi0_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("BNL_CC1pi0_Evt_1DQ2_nu")) {
return (new BNL_CC1pi0_Evt_1DQ2_nu(samplekey));
/*
FNAL Samples
*/
} else if (!name.compare("FNAL_CCQE_Evt_1DQ2_nu")) {
return (new FNAL_CCQE_Evt_1DQ2_nu(samplekey));
/*
FNAL CC1ppip
*/
} else if (!name.compare("FNAL_CC1ppip_XSec_1DEnu_nu")) {
return (new FNAL_CC1ppip_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("FNAL_CC1ppip_XSec_1DQ2_nu")) {
return (new FNAL_CC1ppip_XSec_1DQ2_nu(samplekey));
} else if (!name.compare("FNAL_CC1ppip_Evt_1DQ2_nu")) {
return (new FNAL_CC1ppip_Evt_1DQ2_nu(samplekey));
/*
FNAL CC1ppim
*/
} else if (!name.compare("FNAL_CC1ppim_XSec_1DEnu_antinu")) {
return (new FNAL_CC1ppim_XSec_1DEnu_antinu(samplekey));
/*
BEBC Samples
*/
} else if (!name.compare("BEBC_CCQE_XSec_1DQ2_nu")) {
- return (new BEBC_CCQE_XSec_1DQ2_nu(name, file, rw, type, fkdt));
+ return (new BEBC_CCQE_XSec_1DQ2_nu(samplekey));
/*
BEBC CC1ppip samples
*/
} else if (!name.compare("BEBC_CC1ppip_XSec_1DEnu_nu")) {
- return (new BEBC_CC1ppip_XSec_1DEnu_nu(file, rw, type, fkdt));
+ return (new BEBC_CC1ppip_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("BEBC_CC1ppip_XSec_1DQ2_nu")) {
- return (new BEBC_CC1ppip_XSec_1DQ2_nu(file, rw, type, fkdt));
+ return (new BEBC_CC1ppip_XSec_1DQ2_nu(samplekey));
/*
BEBC CC1npip samples
*/
} else if (!name.compare("BEBC_CC1npip_XSec_1DEnu_nu")) {
- return (new BEBC_CC1npip_XSec_1DEnu_nu(file, rw, type, fkdt));
+ return (new BEBC_CC1npip_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("BEBC_CC1npip_XSec_1DQ2_nu")) {
- return (new BEBC_CC1npip_XSec_1DQ2_nu(file, rw, type, fkdt));
+ return (new BEBC_CC1npip_XSec_1DQ2_nu(samplekey));
/*
BEBC CC1pi0 samples
*/
} else if (!name.compare("BEBC_CC1pi0_XSec_1DEnu_nu")) {
- return (new BEBC_CC1pi0_XSec_1DEnu_nu(file, rw, type, fkdt));
+ return (new BEBC_CC1pi0_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("BEBC_CC1pi0_XSec_1DQ2_nu")) {
- return (new BEBC_CC1pi0_XSec_1DQ2_nu(file, rw, type, fkdt));
+ return (new BEBC_CC1pi0_XSec_1DQ2_nu(samplekey));
/*
BEBC CC1npim samples
*/
} else if (!name.compare("BEBC_CC1npim_XSec_1DEnu_antinu")) {
- return (new BEBC_CC1npim_XSec_1DEnu_antinu(file, rw, type, fkdt));
+ return (new BEBC_CC1npim_XSec_1DEnu_antinu(samplekey));
} else if (!name.compare("BEBC_CC1npim_XSec_1DQ2_antinu")) {
- return (new BEBC_CC1npim_XSec_1DQ2_antinu(file, rw, type, fkdt));
+ return (new BEBC_CC1npim_XSec_1DQ2_antinu(samplekey));
/*
BEBC CC1ppim samples
*/
} else if (!name.compare("BEBC_CC1ppim_XSec_1DEnu_antinu")) {
- return (new BEBC_CC1ppim_XSec_1DEnu_antinu(file, rw, type, fkdt));
+ return (new BEBC_CC1ppim_XSec_1DEnu_antinu(samplekey));
} else if (!name.compare("BEBC_CC1ppim_XSec_1DQ2_antinu")) {
- return (new BEBC_CC1ppim_XSec_1DQ2_antinu(file, rw, type, fkdt));
+ return (new BEBC_CC1ppim_XSec_1DQ2_antinu(samplekey));
/*
GGM CC1ppip samples
*/
} else if (!name.compare("GGM_CC1ppip_XSec_1DEnu_nu")) {
- return (new GGM_CC1ppip_XSec_1DEnu_nu(file, rw, type, fkdt));
+ return (new GGM_CC1ppip_XSec_1DEnu_nu(samplekey));
} else if (!name.compare("GGM_CC1ppip_Evt_1DQ2_nu")) {
- return (new GGM_CC1ppip_Evt_1DQ2_nu(file, rw, type, fkdt));
+ return (new GGM_CC1ppip_Evt_1DQ2_nu(samplekey));
/*
MiniBooNE Samples
*/
/*
CCQE
*/
} else if (!name.compare("MiniBooNE_CCQE_XSec_1DQ2_nu") ||
!name.compare("MiniBooNE_CCQELike_XSec_1DQ2_nu")) {
return (
new MiniBooNE_CCQE_XSec_1DQ2_nu(samplekey));
} else if (!name.compare("MiniBooNE_CCQE_XSec_1DQ2_antinu") ||
!name.compare("MiniBooNE_CCQELike_XSec_1DQ2_antinu") ||
!name.compare("MiniBooNE_CCQE_CTarg_XSec_1DQ2_antinu")) {
return (
new MiniBooNE_CCQE_XSec_1DQ2_antinu(samplekey));
} else if (!name.compare("MiniBooNE_CCQE_XSec_2DTcos_nu") ||
!name.compare("MiniBooNE_CCQELike_XSec_2DTcos_nu")) {
return (
new MiniBooNE_CCQE_XSec_2DTcos_nu(name, file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CCQE_XSec_2DTcos_antinu") ||
!name.compare("MiniBooNE_CCQELike_XSec_2DTcos_antinu")) {
return (
new MiniBooNE_CCQE_XSec_2DTcos_antinu(name, file, rw, type, fkdt));
/*
MiniBooNE CC1pi+
*/
// 1D
} else if (!name.compare("MiniBooNE_CC1pip_XSec_1DEnu_nu")) {
return (new MiniBooNE_CC1pip_XSec_1DEnu_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pip_XSec_1DQ2_nu")) {
return (new MiniBooNE_CC1pip_XSec_1DQ2_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pip_XSec_1DTpi_nu")) {
return (new MiniBooNE_CC1pip_XSec_1DTpi_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pip_XSec_1DTu_nu")) {
return (new MiniBooNE_CC1pip_XSec_1DTu_nu(file, rw, type, fkdt));
// 2D
} else if (!name.compare("MiniBooNE_CC1pip_XSec_2DQ2Enu_nu")) {
return (
new MiniBooNE_CC1pip_XSec_2DQ2Enu_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pip_XSec_2DTpiCospi_nu")) {
return (
new MiniBooNE_CC1pip_XSec_2DTpiCospi_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pip_XSec_2DTpiEnu_nu")) {
return (
new MiniBooNE_CC1pip_XSec_2DTpiEnu_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pip_XSec_2DTuCosmu_nu")) {
return (
new MiniBooNE_CC1pip_XSec_2DTuCosmu_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pip_XSec_2DTuEnu_nu")) {
return (
new MiniBooNE_CC1pip_XSec_2DTuEnu_nu(file, rw, type, fkdt));
/*
MiniBooNE CC1pi0
*/
} else if (!name.compare("MiniBooNE_CC1pi0_XSec_1DEnu_nu")) {
return (new MiniBooNE_CC1pi0_XSec_1DEnu_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pi0_XSec_1DQ2_nu")) {
return (new MiniBooNE_CC1pi0_XSec_1DQ2_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pi0_XSec_1DTu_nu")) {
return (new MiniBooNE_CC1pi0_XSec_1DTu_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pi0_XSec_1Dcosmu_nu")) {
return (
new MiniBooNE_CC1pi0_XSec_1Dcosmu_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pi0_XSec_1Dcospi0_nu")) {
return (
new MiniBooNE_CC1pi0_XSec_1Dcospi0_nu(file, rw, type, fkdt));
} else if (!name.compare("MiniBooNE_CC1pi0_XSec_1Dppi0_nu")) {
return (
new MiniBooNE_CC1pi0_XSec_1Dppi0_nu(samplekey));
/*
MiniBooNE NCEL
*/
} else if (!name.compare("MiniBooNE_NCEL_XSec_Treco_nu")) {
ERR(FTL)
<< "MiniBooNE_NCEL_XSec_Treco_nu not implemented in current interface."
<< std::endl;
throw 5;
// return (new MiniBooNE_NCEL_XSec_Treco_nu(file, rw, type,
// fkdt));
/*
MINERvA Samples
*/
} else if (!name.compare("MINERvA_CCQE_XSec_1DQ2_nu") ||
!name.compare("MINERvA_CCQE_XSec_1DQ2_nu_20deg") ||
!name.compare("MINERvA_CCQE_XSec_1DQ2_nu_oldflux") ||
!name.compare("MINERvA_CCQE_XSec_1DQ2_nu_20deg_oldflux")) {
return (
new MINERvA_CCQE_XSec_1DQ2_nu(name, file, rw, type, fkdt));
} else if (!name.compare("MINERvA_CCQE_XSec_1DQ2_antinu") ||
!name.compare("MINERvA_CCQE_XSec_1DQ2_antinu_20deg") ||
!name.compare("MINERvA_CCQE_XSec_1DQ2_antinu_oldflux") ||
!name.compare("MINERvA_CCQE_XSec_1DQ2_antinu_20deg_oldflux")) {
return (
new MINERvA_CCQE_XSec_1DQ2_antinu(name, file, rw, type, fkdt));
} else if (!name.compare("MINERvA_CCQE_XSec_1DQ2_joint_oldflux") ||
!name.compare("MINERvA_CCQE_XSec_1DQ2_joint_20deg_oldflux") ||
!name.compare("MINERvA_CCQE_XSec_1DQ2_joint") ||
!name.compare("MINERvA_CCQE_XSec_1DQ2_joint_20deg")) {
return (new MINERvA_CCQE_XSec_1DQ2_joint(name, file, rw, type, fkdt));
} else if (!name.compare("MINERvA_CC0pi_XSec_1DEe_nue")) {
return (new MINERvA_CC0pi_XSec_1DEe_nue(samplekey));
} else if (!name.compare("MINERvA_CC0pi_XSec_1DQ2_nue")) {
return (new MINERvA_CC0pi_XSec_1DQ2_nue(file, rw, type, fkdt));
} else if (!name.compare("MINERvA_CC0pi_XSec_1DThetae_nue")) {
return (
new MINERvA_CC0pi_XSec_1DThetae_nue(file, rw, type, fkdt));
} else if (!name.compare("MINERvA_CC0pi_XSec_1DQ2_nu_proton")) {
return (
new MINERvA_CC0pi_XSec_1DQ2_nu_proton(file, rw, type, fkdt));
/*
CC1pi+
*/
// DONE
} else if (!name.compare("MINERvA_CC1pip_XSec_1DTpi_nu") ||
!name.compare("MINERvA_CC1pip_XSec_1DTpi_nu_20deg")) {
return (new MINERvA_CC1pip_XSec_1DTpi_nu(name, file, rw, type, fkdt));
// DONE
} else if (!name.compare("MINERvA_CC1pip_XSec_1Dth_nu") ||
!name.compare("MINERvA_CC1pip_XSec_1Dth_nu_20deg")) {
return (new MINERvA_CC1pip_XSec_1Dth_nu(name, file, rw, type, fkdt));
/*
CCNpi+
*/
// DONE
} else if (!name.compare("MINERvA_CCNpip_XSec_1Dth_nu") ||
!name.compare("MINERvA_CCNpip_XSec_1Dth_nu_2015") ||
!name.compare("MINERvA_CCNpip_XSec_1Dth_nu_2016") ||
!name.compare("MINERvA_CCNpip_XSec_1Dth_nu_20deg")) {
return (new MINERvA_CCNpip_XSec_1Dth_nu(name, file, rw, type, fkdt));
// Done
} else if (!name.compare("MINERvA_CCNpip_XSec_1DTpi_nu") ||
!name.compare("MINERvA_CCNpip_XSec_1DTpi_nu_2015") ||
!name.compare("MINERvA_CCNpip_XSec_1DTpi_nu_2016") ||
!name.compare("MINERvA_CCNpip_XSec_1DTpi_nu_20deg")) {
return (new MINERvA_CCNpip_XSec_1DTpi_nu(name, file, rw, type, fkdt));
// Done
} else if (!name.compare("MINERvA_CCNpip_XSec_1Dthmu_nu")) {
return (new MINERvA_CCNpip_XSec_1Dthmu_nu(file, rw, type, fkdt));
// Done
} else if (!name.compare("MINERvA_CCNpip_XSec_1Dpmu_nu")) {
return (new MINERvA_CCNpip_XSec_1Dpmu_nu(file, rw, type, fkdt));
// Done
} else if (!name.compare("MINERvA_CCNpip_XSec_1DQ2_nu")) {
return (new MINERvA_CCNpip_XSec_1DQ2_nu(file, rw, type, fkdt));
// Done
} else if (!name.compare("MINERvA_CCNpip_XSec_1DEnu_nu")) {
return (new MINERvA_CCNpip_XSec_1DEnu_nu(file, rw, type, fkdt));
/*
CC1pi0
*/
// Done
} else if (!name.compare("MINERvA_CC1pi0_XSec_1Dth_antinu") ||
!name.compare("MINERvA_CC1pi0_XSec_1Dth_antinu_2015") ||
!name.compare("MINERvA_CC1pi0_XSec_1Dth_antinu_2016")) {
return (
new MINERvA_CC1pi0_XSec_1Dth_antinu(name, file, rw, type, fkdt));
} else if (!name.compare("MINERvA_CC1pi0_XSec_1Dppi0_antinu")) {
return (
new MINERvA_CC1pi0_XSec_1Dppi0_antinu(file, rw, type, fkdt));
} else if (!name.compare("MINERvA_CC1pi0_XSec_1DTpi0_antinu")) {
return (
new MINERvA_CC1pi0_XSec_1DTpi0_antinu(file, rw, type, fkdt));
// Done
} else if (!name.compare("MINERvA_CC1pi0_XSec_1DQ2_antinu")) {
return (
new MINERvA_CC1pi0_XSec_1DQ2_antinu(file, rw, type, fkdt));
// Done
} else if (!name.compare("MINERvA_CC1pi0_XSec_1Dthmu_antinu")) {
return (
new MINERvA_CC1pi0_XSec_1Dthmu_antinu(file, rw, type, fkdt));
// Done
} else if (!name.compare("MINERvA_CC1pi0_XSec_1Dpmu_antinu")) {
return (
new MINERvA_CC1pi0_XSec_1Dpmu_antinu(file, rw, type, fkdt));
// Done
} else if (!name.compare("MINERvA_CC1pi0_XSec_1DEnu_antinu")) {
return (
new MINERvA_CC1pi0_XSec_1DEnu_antinu(file, rw, type, fkdt));
/*
CCINC
*/
} else if (!name.compare("MINERvA_CCinc_XSec_2DEavq3_nu")) {
return (new MINERvA_CCinc_XSec_2DEavq3_nu(file, rw, type, fkdt));
} else if (!name.compare("MINERvA_CCinc_XSec_1Dx_ratio_C12_CH") ||
!name.compare("MINERvA_CCinc_XSec_1Dx_ratio_Fe56_CH") ||
!name.compare("MINERvA_CCinc_XSec_1Dx_ratio_Pb208_CH")) {
return (
new MINERvA_CCinc_XSec_1Dx_ratio(name, file, rw, type, fkdt));
} else if (!name.compare("MINERvA_CCinc_XSec_1DEnu_ratio_C12_CH") ||
!name.compare("MINERvA_CCinc_XSec_1DEnu_ratio_Fe56_CH") ||
!name.compare("MINERvA_CCinc_XSec_1DEnu_ratio_Pb208_CH")) {
return (
new MINERvA_CCinc_XSec_1DEnu_ratio(name, file, rw, type, fkdt));
/*
T2K Samples
*/
} else if (!name.compare("T2K_CC0pi_XSec_2DPcos_nu") ||
!name.compare("T2K_CC0pi_XSec_2DPcos_nu_I") ||
!name.compare("T2K_CC0pi_XSec_2DPcos_nu_II")) {
return (new T2K_CC0pi_XSec_2DPcos_nu(name, file, rw, type));
/*
T2K CC1pi+ CH samples
*/
// Comment these out for now because we don't have the proper data
/*
} else if (!name.compare("T2K_CC1pip_CH_XSec_1Dpmu_nu")) {
return (new T2K_CC1pip_CH_XSec_1Dpmu_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_CH_XSec_1Dppi_nu")) {
return (new T2K_CC1pip_CH_XSec_1Dppi_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_CH_XSec_1DQ2_nu")) {
return (new T2K_CC1pip_CH_XSec_1DQ2_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_CH_XSec_1Dq3_nu")) {
return (new T2K_CC1pip_CH_XSec_1Dq3_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_CH_XSec_1Dthmupi_nu")) {
return (new T2K_CC1pip_CH_XSec_1Dthmupi_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_CH_XSec_1Dthpi_nu")) {
return (new T2K_CC1pip_CH_XSec_1Dthpi_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_CH_XSec_1Dthq3pi_nu")) {
return (new T2K_CC1pip_CH_XSec_1Dthq3pi_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_CH_XSec_1DWrec_nu")) {
return (new T2K_CC1pip_CH_XSec_1DWrec_nu(file, rw, type, fkdt));
*/
/*
T2K CC1pi+ H2O samples
*/
} else if (!name.compare("T2K_CC1pip_H2O_XSec_1DEnuDelta_nu")) {
return (new T2K_CC1pip_H2O_XSec_1DEnuDelta_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_H2O_XSec_1DEnuMB_nu")) {
return (new T2K_CC1pip_H2O_XSec_1DEnuMB_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_H2O_XSec_1Dcosmu_nu")) {
return (new T2K_CC1pip_H2O_XSec_1Dcosmu_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_H2O_XSec_1Dcosmupi_nu")) {
return (new T2K_CC1pip_H2O_XSec_1Dcosmupi_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_H2O_XSec_1Dcospi_nu")) {
return (new T2K_CC1pip_H2O_XSec_1Dcospi_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_H2O_XSec_1Dpmu_nu")) {
return (new T2K_CC1pip_H2O_XSec_1Dpmu_nu(file, rw, type, fkdt));
} else if (!name.compare("T2K_CC1pip_H2O_XSec_1Dppi_nu")) {
return (new T2K_CC1pip_H2O_XSec_1Dppi_nu(file, rw, type, fkdt));
/*
T2K CC0pi + np CH samples
*/
} else if (!name.compare("T2K_CC0pinp_STV_XSec_1Ddpt_nu")) {
return (new T2K_CC0pinp_STV_XSec_1Ddpt_nu(file, rw, type, fkdt));
/*
K2K Samples
*/
/*
NC1pi0
*/
} else if (!name.compare("K2K_NC1pi0_Evt_1Dppi0_nu")) {
return (new K2K_NC1pi0_Evt_1Dppi0_nu(file, rw, type, fkdt));
/*
Fake Studies
*/
} else if (name.find("ExpMultDist_CCQE_XSec_1D") != std::string::npos &&
name.find("_FakeStudy") != std::string::npos) {
return (
new ExpMultDist_CCQE_XSec_1DVar_FakeStudy(name, file, rw, type, fkdt));
} else if (name.find("ExpMultDist_CCQE_XSec_2D") != std::string::npos &&
name.find("_FakeStudy") != std::string::npos) {
return (
new ExpMultDist_CCQE_XSec_2DVar_FakeStudy(name, file, rw, type, fkdt));
} else if (name.find("GenericFlux_") != std::string::npos) {
return (new GenericFlux_Tester(name, file, rw, type, fkdt));
} else if (!name.compare("ElectronFlux_FlatTree")) {
return (new ElectronFlux_FlatTree(name, file, rw, type, fkdt));
//<<<<<<< HEAD
// } else if (name.find("MCStudy_KaonPreSelection") != std::string::npos) {
// return (new MCStudy_KaonPreSelection(name, file, rw, type, fkdt));
//=======
//} else if (name.find("MCStudy_KaonPreSelection") != std::string::npos) {
//fChain->push_back(new MCStudy_KaonPreSelection(name, file, rw, type, fkdt));
//>>>>>>> 96ed014ac03821c4f771d6c484740e8b25350aa1
} else if (name.find("MuonValidation_") != std::string::npos) {
return (new MCStudy_MuonValidation(name, file, rw, type, fkdt));
} else {
ERR(FTL) << "Error: No such sample: " << name << std::endl;
exit(-1);
return NULL;
}
// Return NULL if no sample loaded.
return NULL;
}
}
diff --git a/src/GGM/GGM_CC1ppip_Evt_1DQ2_nu.cxx b/src/GGM/GGM_CC1ppip_Evt_1DQ2_nu.cxx
index 7fffd5f..90fb1b0 100644
--- a/src/GGM/GGM_CC1ppip_Evt_1DQ2_nu.cxx
+++ b/src/GGM/GGM_CC1ppip_Evt_1DQ2_nu.cxx
@@ -1,74 +1,88 @@
// 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 "GGM_CC1ppip_Evt_1DQ2_nu.h"
-// The constructor
-GGM_CC1ppip_Evt_1DQ2_nu::GGM_CC1ppip_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) {
- fName = "GGM_CC1ppip_Evt_1DQ2_nu";
- // could replace with fName = std::string(__FILE__).substr(0, std::string(__FILE__).find_last_of("."))
- fPlotTitles = "; Q^{2}_{CC1#pi} (GeV^{2}); Number of events";
- EnuMin = 1;
- EnuMax = 10;
- fIsDiag = true;
- fIsRawEvents = true;
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/GGM/CC1pip_on_p/GGM_CC1ppip_Q2_events_bin_edit.txt");
- this->SetupDefaultHist();
+//********************************************************************
+GGM_CC1ppip_Evt_1DQ2_nu::GGM_CC1ppip_Evt_1DQ2_nu(nuiskey samplekey) {
+//********************************************************************
- // 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)));
- }
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "GGM_CC1ppip_Evt_1DQ2_nu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("Q^{2}_{CC1#pi} (GeV^{2})");
+ fSettings.SetYTitle("Number of events");
+ fSettings.SetAllowedTypes("EVT/SHAPE/DIAG", "EVT/SHAPE/DIAG");
+ fSettings.SetEnuRange(1.0, 10.0);
+ fSettings.DefineAllowedTargets("D,H");
- this->fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents+0.)*(16./8.);
-};
+ // plot information
+ fSettings.SetTitle("GGM_CC1ppip_Evt_1DQ2_nu");
+ fSettings.DefineAllowedSpecies("numu");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "GGM/CC1pip_on_p/GGM_CC1ppip_Q2_events_bin_edit.txt");
+ FinaliseSampleSettings();
+
+ // Scaling Setup ---------------------------------------------------
+ // ScaleFactor for shape
+ fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents+0.)*(2./1.);
+
+ // Plot Setup -------------------------------------------------------
+ SetDataFromTextFile( fSettings.GetDataInput() );
+ SetPoissonErrors();
+ SetCovarFromDiagonal();
+
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
+
+}
void GGM_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;
// GGM has a M(pi, p) < 1.4 GeV cut imposed only on this channel
if (hadMass < 1400) q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6;
fXVar = q2CCpip;
return;
}
bool GGM_CC1ppip_Evt_1DQ2_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax);
}
diff --git a/src/GGM/GGM_CC1ppip_Evt_1DQ2_nu.h b/src/GGM/GGM_CC1ppip_Evt_1DQ2_nu.h
index 10ffba5..d2f883e 100644
--- a/src/GGM/GGM_CC1ppip_Evt_1DQ2_nu.h
+++ b/src/GGM/GGM_CC1ppip_Evt_1DQ2_nu.h
@@ -1,40 +1,37 @@
// 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 GGM_CC1PPIP_EVT_1DQ2_NU_H_SEEN
#define GGM_CC1PPIP_EVT_1DQ2_NU_H_SEEN
#include "Measurement1D.h"
class GGM_CC1ppip_Evt_1DQ2_nu : public Measurement1D {
public:
- GGM_CC1ppip_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ GGM_CC1ppip_Evt_1DQ2_nu(nuiskey samplekey);
virtual ~GGM_CC1ppip_Evt_1DQ2_nu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
- //void FillHistograms();
-
private:
};
#endif
diff --git a/src/GGM/GGM_CC1ppip_XSec_1DEnu_nu.cxx b/src/GGM/GGM_CC1ppip_XSec_1DEnu_nu.cxx
index 764b052..c961121 100644
--- a/src/GGM/GGM_CC1ppip_XSec_1DEnu_nu.cxx
+++ b/src/GGM/GGM_CC1ppip_XSec_1DEnu_nu.cxx
@@ -1,68 +1,88 @@
// 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 "GGM_CC1ppip_XSec_1DEnu_nu.h"
-// The constructor
-GGM_CC1ppip_XSec_1DEnu_nu::GGM_CC1ppip_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile){
- fName = "GGM_CC1ppip_XSec_1DEnu_nu";
- fPlotTitles = "; E_{#nu} (GeV); #sigma(E_{#nu}) (cm^{2}/proton)";
- EnuMin = 1.;
- EnuMax = 10.0;
- fIsDiag = true;
- fNormError = 0.20;
- Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile);
+//********************************************************************
+GGM_CC1ppip_XSec_1DEnu_nu::GGM_CC1ppip_XSec_1DEnu_nu(nuiskey samplekey) {
+//********************************************************************
- this->SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/GGM/CC1pip_on_p/Gargamelle78-numu-p-to-mu-p-piplus-lowW_EDGES.txt");
- this->SetupDefaultHist();
+ // Sample overview ---------------------------------------------------
+ std::string descrip = "GGM_CC1ppip_XSec_1DEnu_nu sample. \n" \
+ "Target: D2 \n" \
+ "Flux: \n" \
+ "Signal: \n";
- fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist);
- covar = StatUtils::GetInvert(fFullCovar);
+ // Setup common settings
+ fSettings = LoadSampleSettings(samplekey);
+ fSettings.SetDescription(descrip);
+ fSettings.SetXTitle("E_{#nu} (GeV)");
+ fSettings.SetYTitle("#sigma(E_{#nu}) (cm^{2}/proton)");
+ fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG", "FIX/DIAG");
+ fSettings.SetEnuRange(1.0, 10.0);
+ fSettings.DefineAllowedTargets("D,H");
- this->fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(16./8.);
-};
+ // plot information
+ fSettings.SetTitle("GGM_CC1ppip_XSec_1DEnu_nu");
+ fSettings.DefineAllowedSpecies("numu");
+ fSettings.SetDataInput( FitPar::GetDataBase() + "GGM/CC1pip_on_p/Gargamelle78-numu-p-to-mu-p-piplus-lowW_EDGES.txt");
+
+ FinaliseSampleSettings();
+
+ // Scaling Setup ---------------------------------------------------
+ // ScaleFactor for shape
+ fScaleFactor = GetEventHistogram()->Integral("width")*double(1E-38)/double(fNEvents)*(2./1.);
+
+ // Plot Setup -------------------------------------------------------
+ SetDataFromTextFile( fSettings.GetDataInput() );
+ SetCovarFromDiagonal();
+
+ // Final setup ---------------------------------------------------
+ FinaliseMeasurement();
+
+}
void GGM_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;
// should probably put in a weight here!
double hadMass = FitUtils::MpPi(Pp, Ppip);
double Enu = -1.0;
if (hadMass < 1400) Enu = Pnu.E()/1.E3;
fXVar = Enu;
return;
}
bool GGM_CC1ppip_XSec_1DEnu_nu::isSignal(FitEvent *event) {
return SignalDef::isCC1pi3Prong(event, 14, 211, 2212,EnuMin,EnuMax);
}
diff --git a/src/GGM/GGM_CC1ppip_XSec_1DEnu_nu.h b/src/GGM/GGM_CC1ppip_XSec_1DEnu_nu.h
index f6c3b7d..b02e431 100644
--- a/src/GGM/GGM_CC1ppip_XSec_1DEnu_nu.h
+++ b/src/GGM/GGM_CC1ppip_XSec_1DEnu_nu.h
@@ -1,40 +1,37 @@
// 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 GGM_CC1PPIP_XSEC_1DENU_NU_H_SEEN
#define GGM_CC1PPIP_XSEC_1DENU_NU_H_SEEN
#include "Measurement1D.h"
class GGM_CC1ppip_XSec_1DEnu_nu : public Measurement1D {
public:
- GGM_CC1ppip_XSec_1DEnu_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile);
+ GGM_CC1ppip_XSec_1DEnu_nu(nuiskey samplekey);
virtual ~GGM_CC1ppip_XSec_1DEnu_nu() {};
void FillEventVariables(FitEvent *event);
- //void ScaleEvents();
bool isSignal(FitEvent *event);
- //void FillHistograms();
-
private:
};
#endif
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Feb 23, 2:33 PM (16 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486641
Default Alt Text
(118 KB)
Attached To
rNUISANCEGIT nuisancegit
Event Timeline
Log In to Comment