diff --git a/src/SciBooNE/SciBooNE_CCCOH_1TRK_1DQ2_nu.cxx b/src/SciBooNE/SciBooNE_CCCOH_1TRK_1DQ2_nu.cxx
index ce4f963..c9057ac 100644
--- a/src/SciBooNE/SciBooNE_CCCOH_1TRK_1DQ2_nu.cxx
+++ b/src/SciBooNE/SciBooNE_CCCOH_1TRK_1DQ2_nu.cxx
@@ -1,100 +1,100 @@
// 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 .
*******************************************************************************/
#include "SciBooNE_CCCOH_1TRK_1DQ2_nu.h"
SciBooNE_CCCOH_1TRK_1DQ2_nu::SciBooNE_CCCOH_1TRK_1DQ2_nu(nuiskey samplekey){
// Sample overview
std::string descrip = "SciBooNE CC-coherent 1 track sample.\n" \
"Target: CH \n" \
"Flux: SciBooNE FHC numu \n";
// Common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("Q^{2} (GeV^{2})");
fSettings.SetYTitle("Entries/0.05 (GeV^{2})");
this->SetFitOptions("NOWIDTH");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("SciBooNE CCCOH 1TRK");
fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig10a_CVs.csv");
fSettings.SetHasExtraHistograms(true);
fSettings.DefineAllowedSpecies("numu");
SetDataFromTextFile(fSettings.GetDataInput());
FinaliseSampleSettings();
// Setup Plots
if (SciBooNEUtils::GetUseZackEff())
this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu_ZACK.root", "Ratio2DBSCC");
else this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu.root", "stopped_muon_eff");
this->protonEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_proton_nu.root", "Ratio2DRS");
this->fMCStack = new SciBooNEUtils::ModeStack(fSettings.Name() + "_Stack",
"Mode breakdown" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
this->fPIDStack = new SciBooNEUtils::MainPIDStack(fSettings.Name() + "_MainPID",
"Main PID" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
SetAutoProcessTH1(fMCStack);
SetAutoProcessTH1(fPIDStack);
// Estimate the number of CH molecules in SciBooNE...
double nTargets = 10.6E6/13.*6.022E23;
this->fScaleFactor = GetEventHistogram()->Integral()*13.*1E-38/double(fNEvents)*nTargets;
FinaliseMeasurement();
};
void SciBooNE_CCCOH_1TRK_1DQ2_nu::FillEventVariables(FitEvent *event){
q2qe = 0;
this->mainIndex = SciBooNEUtils::GetMainTrack(event, this->muonStopEff, this->protonEff, this->mainTrack, this->Weight);
SciBooNEUtils::GetOtherTrackInfo(event, this->mainIndex, this->nProtons, this->nPiMus, this->nVertex, this->secondTrack);
FitParticle *nu = event->GetNeutrinoIn();
if (this->mainTrack){
- q2qe = FitUtils::Q2QErec(FitUtils::p(this->mainTrack),cos(FitUtils::th(nu,this->mainTrack)), 27., true);
+ q2qe = FitUtils::Q2QErec(SciBooNEUtils::smear_p(this->mainTrack),cos(SciBooNEUtils::smear_th(nu,this->mainTrack)), 27., true);
}
- if (q2qe < 0) return;
+ if (q2qe < 0) q2qe = 0; //return;
// Set X Variables
fXVar = q2qe;
return;
};
bool SciBooNE_CCCOH_1TRK_1DQ2_nu::isSignal(FitEvent *event){
if (!this->mainTrack) return false;
if (this->nProtons+this->nPiMus != 0) return false;
return true;
};
void SciBooNE_CCCOH_1TRK_1DQ2_nu::FillExtraHistograms(MeasurementVariableBox* vars, double weight){
if (Signal){
fMCStack->Fill(Mode, fXVar, weight);
fPIDStack->Fill(this->mainTrack->fPID, fXVar, weight);
}
return;
}
diff --git a/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu.cxx b/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu.cxx
index b790c3e..7da6cbf 100644
--- a/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu.cxx
+++ b/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu.cxx
@@ -1,108 +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 .
*******************************************************************************/
#include "SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu.h"
SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu::SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu(nuiskey samplekey){
// Sample overview
std::string descrip = "SciBooNE CC-coherent 1pion no VA.\n" \
"Target: CH \n" \
"Flux: SciBooNE FHC numu \n";
// Common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("Q^{2} (GeV^{2})");
fSettings.SetYTitle("Entries/0.05 (GeV^{2})");
this->SetFitOptions("NOWIDTH");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("SciBooNE CCCOH proton");
fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig10d_CVs.csv");
fSettings.SetHasExtraHistograms(true);
fSettings.DefineAllowedSpecies("numu");
SetDataFromTextFile(fSettings.GetDataInput());
FinaliseSampleSettings();
// Setup Plots
if (SciBooNEUtils::GetUseZackEff())
this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu_ZACK.root", "Ratio2DBSCC");
else this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu.root", "stopped_muon_eff");
this->protonEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_proton_nu.root", "Ratio2DRS");
this->fMCStack = new SciBooNEUtils::ModeStack(fSettings.Name() + "_Stack",
"Mode breakdown" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
this->fPIDStack = new SciBooNEUtils::MainPIDStack(fSettings.Name() + "_MainPID",
"Main PID" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
SetAutoProcessTH1(fMCStack);
SetAutoProcessTH1(fPIDStack);
double nTargets = 10.6E6/13.*6.022E23;
this->fScaleFactor = GetEventHistogram()->Integral()*13.*1E-38/double(fNEvents)*nTargets;
FinaliseMeasurement();
};
void SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu::FillEventVariables(FitEvent *event){
q2qe = 0;
this->mainIndex = SciBooNEUtils::GetMainTrack(event, this->muonStopEff, this->protonEff, this->mainTrack, this->Weight);
SciBooNEUtils::GetOtherTrackInfo(event, this->mainIndex, this->nProtons, this->nPiMus, this->nVertex, this->secondTrack);
FitParticle *nu = event->GetNeutrinoIn();
if (this->mainTrack){
- q2qe = FitUtils::Q2QErec(FitUtils::p(this->mainTrack),cos(FitUtils::th(nu,this->mainTrack)), 27., true);
+ q2qe = FitUtils::Q2QErec(SciBooNEUtils::smear_p(this->mainTrack),cos(SciBooNEUtils::smear_th(nu,this->mainTrack)), 27., true);
}
- if (q2qe < 0) return;
+ if (q2qe < 0) q2qe = 0;//return;
// Set X Variables
fXVar = q2qe;
return;
};
bool SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu::isSignal(FitEvent *event){
if (!this->mainTrack || !this->secondTrack) return false;
if (this->nPiMus + this->nProtons != 1) return false;
if (this->nVertex != 0) return false;
double misIDProb = SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->secondTrack));
- if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= 0.1;
+ if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->mainTrack));
if (this->nProtons == 1) this->Weight *= misIDProb;
if (this->nPiMus == 1) this->Weight *= (1 - misIDProb);
return true;
};
void SciBooNE_CCCOH_MuPiNoVA_1DQ2_nu::FillExtraHistograms(MeasurementVariableBox* vars, double weight){
if (Signal){
fMCStack->Fill(Mode, fXVar, weight);
fPIDStack->Fill(this->mainTrack->fPID, fXVar, weight);
}
return;
};
diff --git a/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu.cxx b/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu.cxx
index 89e8175..a82fed2 100644
--- a/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu.cxx
+++ b/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu.cxx
@@ -1,107 +1,107 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu.h"
SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu::SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu(nuiskey samplekey){
// Sample overview
std::string descrip = "SciBooNE CC-coherent 1pion no VA.\n" \
"Target: CH \n" \
"Flux: SciBooNE FHC numu \n";
// Common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("p_{#mu} (GeV)");
fSettings.SetYTitle("Entries");
this->SetFitOptions("NOWIDTH");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("SciBooNE CCCOH");
- fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig7.30_pmu.csv");
+ fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig7.30d_pmu.csv");
fSettings.SetHasExtraHistograms(true);
fSettings.DefineAllowedSpecies("numu");
SetDataFromTextFile(fSettings.GetDataInput());
FinaliseSampleSettings();
// Setup Plots
if (SciBooNEUtils::GetUseZackEff())
this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu_ZACK.root", "Ratio2DBSCC");
else this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu.root", "stopped_muon_eff");
this->protonEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_proton_nu.root", "Ratio2DRS");
this->fMCStack = new SciBooNEUtils::ModeStack2(fSettings.Name() + "_Stack",
"Mode breakdown" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
this->fPIDStack = new SciBooNEUtils::MainPIDStack(fSettings.Name() + "_MainPID",
"Main PID" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
SetAutoProcessTH1(fMCStack);
SetAutoProcessTH1(fPIDStack);
double nTargets = 10.6E6/13.*6.022E23;
this->fScaleFactor = GetEventHistogram()->Integral()*13.*1E-38/double(fNEvents)*nTargets;
FinaliseMeasurement();
};
void SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu::FillEventVariables(FitEvent *event){
pmu = 0;
this->mainIndex = SciBooNEUtils::GetMainTrack(event, this->muonStopEff, this->protonEff, this->mainTrack, this->Weight);
SciBooNEUtils::GetOtherTrackInfo(event, this->mainIndex, this->nProtons, this->nPiMus, this->nVertex, this->secondTrack);
if (this->mainTrack){
pmu = FitUtils::p(this->mainTrack);//SciBooNEUtils::smear_p(this->mainTrack);
}
if (pmu < 0) pmu = 0;//return;
// Set X Variables
fXVar = pmu;
return;
};
bool SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu::isSignal(FitEvent *event){
if (!this->mainTrack || !this->secondTrack) return false;
if (this->nPiMus + this->nProtons != 1) return false;
if (this->nVertex != 0) return false;
double misIDProb = SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->secondTrack));
- if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= 0.1;
+ if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->mainTrack));
if (this->nProtons == 1) this->Weight *= misIDProb;
if (this->nPiMus == 1) this->Weight *= (1 - misIDProb);
return true;
};
void SciBooNE_CCCOH_MuPiNoVA_1Dpmu_nu::FillExtraHistograms(MeasurementVariableBox* vars, double weight){
if (Signal){
fMCStack->Fill(Mode, fXVar, weight);
fPIDStack->Fill(this->mainTrack->fPID, fXVar, weight);
}
return;
};
diff --git a/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu.cxx b/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu.cxx
index 8318ec5..132e05d 100644
--- a/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu.cxx
+++ b/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu.cxx
@@ -1,108 +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 .
*******************************************************************************/
#include "SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu.h"
SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu::SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu(nuiskey samplekey){
// Sample overview
std::string descrip = "SciBooNE CC-coherent 1pion no VA.\n" \
"Target: CH \n" \
"Flux: SciBooNE FHC numu \n";
// Common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("cos#theta_{#mu}");
fSettings.SetYTitle("Entries");
this->SetFitOptions("NOWIDTH");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("SciBooNE CCCOH proton");
- fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig7.30_thetamu.csv");
+ fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig7.30d_thetamu.csv");
fSettings.SetHasExtraHistograms(true);
fSettings.DefineAllowedSpecies("numu");
SetDataFromTextFile(fSettings.GetDataInput());
FinaliseSampleSettings();
// Setup Plots
if (SciBooNEUtils::GetUseZackEff())
this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu_ZACK.root", "Ratio2DBSCC");
else this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu.root", "stopped_muon_eff");
this->protonEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_proton_nu.root", "Ratio2DRS");
this->fMCStack = new SciBooNEUtils::ModeStack2(fSettings.Name() + "_Stack",
"Mode breakdown" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
this->fPIDStack = new SciBooNEUtils::MainPIDStack(fSettings.Name() + "_MainPID",
"Main PID" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
SetAutoProcessTH1(fMCStack);
SetAutoProcessTH1(fPIDStack);
double nTargets = 10.6E6/13.*6.022E23;
this->fScaleFactor = GetEventHistogram()->Integral()*13.*1E-38/double(fNEvents)*nTargets;
FinaliseMeasurement();
};
void SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu::FillEventVariables(FitEvent *event){
thetamu = 0;
this->mainIndex = SciBooNEUtils::GetMainTrack(event, this->muonStopEff, this->protonEff, this->mainTrack, this->Weight);
SciBooNEUtils::GetOtherTrackInfo(event, this->mainIndex, this->nProtons, this->nPiMus, this->nVertex, this->secondTrack);
FitParticle *nu = event->GetNeutrinoIn();
if (this->mainTrack){
thetamu = cos(SciBooNEUtils::smear_th(nu,this->mainTrack));
}
if (thetamu < 0) thetamu = 0;//return;
// Set X Variables
fXVar = thetamu;
return;
};
bool SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu::isSignal(FitEvent *event){
if (!this->mainTrack || !this->secondTrack) return false;
if (this->nPiMus + this->nProtons != 1) return false;
if (this->nVertex != 0) return false;
double misIDProb = SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->secondTrack));
- if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= 0.1;
+ if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->mainTrack));
if (this->nProtons == 1) this->Weight *= misIDProb;
if (this->nPiMus == 1) this->Weight *= (1 - misIDProb);
return true;
};
void SciBooNE_CCCOH_MuPiNoVA_1Dthetamu_nu::FillExtraHistograms(MeasurementVariableBox* vars, double weight){
if (Signal){
fMCStack->Fill(Mode, fXVar, weight);
fPIDStack->Fill(this->mainTrack->fPID, fXVar, weight);
}
return;
};
diff --git a/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu.cxx b/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu.cxx
index a082846..184e033 100644
--- a/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu.cxx
+++ b/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu.cxx
@@ -1,109 +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 .
*******************************************************************************/
#include "SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu.h"
SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu::SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu(nuiskey samplekey){
// Sample overview
std::string descrip = "SciBooNE CC-coherent pion no VA pion angle.\n" \
"Target: CH \n" \
"Flux: SciBooNE FHC numu \n";
// Common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("Pion track angle (degrees)");
fSettings.SetYTitle("Entries/5 degrees");
this->SetFitOptions("NOWIDTH");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("SciBooNE CCCOH proton");
fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig12_CVs.csv");
fSettings.SetHasExtraHistograms(true);
fSettings.DefineAllowedSpecies("numu");
SetDataFromTextFile(fSettings.GetDataInput());
FinaliseSampleSettings();
// Setup Plots
if (SciBooNEUtils::GetUseZackEff())
this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu_ZACK.root", "Ratio2DBSCC");
else this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu.root", "stopped_muon_eff");
this->protonEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_proton_nu.root", "Ratio2DRS");
this->fMCStack = new SciBooNEUtils::ModeStack(fSettings.Name() + "_Stack",
"Mode breakdown" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
this->fPIDStack = new SciBooNEUtils::MainPIDStack(fSettings.Name() + "_MainPID",
"Main PID" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
SetAutoProcessTH1(fMCStack);
SetAutoProcessTH1(fPIDStack);
double nTargets = 10.6E6/13.*6.022E23;
this->fScaleFactor = GetEventHistogram()->Integral()*13.*1E-38/double(fNEvents)*nTargets;
FinaliseMeasurement();
};
void SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu::FillEventVariables(FitEvent *event){
this->mainIndex = SciBooNEUtils::GetMainTrack(event, this->muonStopEff, this->protonEff, this->mainTrack, this->Weight);
SciBooNEUtils::GetOtherTrackInfo(event, this->mainIndex, this->nProtons, this->nPiMus, this->nVertex, this->secondTrack);
thetapi = SciBooNEUtils::CalcThetaPi(event, this->secondTrack);
if (thetapi < 0) return;
// Set X Variables
fXVar = thetapi;
return;
};
bool SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu::isSignal(FitEvent *event){
if (!this->mainTrack) return false;
if (this->nPiMus + this->nProtons != 1) return false;
if (this->nVertex != 0) return false;
// Require dth_proton > 20
if (SciBooNEUtils::CalcThetaPr(event, this->mainTrack, this->secondTrack) < 20) return false;
double misIDProb = SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->secondTrack));
- if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= 0.1;
+ if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->mainTrack));
if (this->nProtons == 1) this->Weight *= misIDProb;
if (this->nPiMus == 1) this->Weight *= (1-misIDProb);
return true;
};
void SciBooNE_CCCOH_MuPiNoVA_1Dthetapi_nu::FillExtraHistograms(MeasurementVariableBox* vars, double weight){
if (Signal){
fMCStack->Fill(Mode, fXVar, weight);
fPIDStack->Fill(this->mainTrack->fPID, fXVar, weight);
}
return;
};
diff --git a/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu.cxx b/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu.cxx
index 617ec9a..0bed758 100644
--- a/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu.cxx
+++ b/src/SciBooNE/SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu.cxx
@@ -1,110 +1,110 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu.h"
SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu::SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu(nuiskey samplekey){
// Sample overview
std::string descrip = "SciBooNE CC-coherent 1 pion no VA #theta_{pr}.\n" \
"Target: CH \n" \
"Flux: SciBooNE FHC numu \n";
// Common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("#Delta #theta_{p} (degrees)");
fSettings.SetYTitle("Entries/5 degrees");
this->SetFitOptions("NOWIDTH");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("SciBooNE CCCOH pion no VA #theta_{pr}");
fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig11_CVs.csv");
fSettings.SetHasExtraHistograms(true);
fSettings.DefineAllowedSpecies("numu");
SetDataFromTextFile(fSettings.GetDataInput());
FinaliseSampleSettings();
// Setup Plots
if (SciBooNEUtils::GetUseZackEff())
this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu_ZACK.root", "Ratio2DBSCC");
else this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu.root", "stopped_muon_eff");
this->protonEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_proton_nu.root", "Ratio2DRS");
this->fMCStack = new SciBooNEUtils::ModeStack(fSettings.Name() + "_Stack",
"Mode breakdown" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
this->fPIDStack = new SciBooNEUtils::MainPIDStack(fSettings.Name() + "_MainPID",
"Main PID" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
SetAutoProcessTH1(fMCStack);
SetAutoProcessTH1(fPIDStack);
double nTargets = 10.6E6/13.*6.022E23;
this->fScaleFactor = GetEventHistogram()->Integral()*13.*1E-38/double(fNEvents)*nTargets;
FinaliseMeasurement();
};
void SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu::FillEventVariables(FitEvent *event){
thetapr = -999;
this->mainIndex = SciBooNEUtils::GetMainTrack(event, this->muonStopEff, this->protonEff, this->mainTrack, this->Weight);
SciBooNEUtils::GetOtherTrackInfo(event, this->mainIndex, this->nProtons, this->nPiMus, this->nVertex, this->secondTrack);
thetapr = SciBooNEUtils::CalcThetaPr(event, this->mainTrack, this->secondTrack);
if (thetapr < 0) {
//std::cout << "Error: theta_pr = " << thetapr << std::endl;
return;
}
// Set X Variables
fXVar = thetapr;
return;
};
bool SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu::isSignal(FitEvent *event){
if (!this->mainTrack || !this->secondTrack) return false;
if (this->nPiMus + this->nProtons != 1) return false;
if (this->nVertex != 0) return false;
double misIDProb = SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->secondTrack));
- if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= 0.1;
+ if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->mainTrack));
if (this->nProtons == 1) this->Weight *= misIDProb;
if (this->nPiMus == 1) this->Weight *= (1 - misIDProb);
return true;
};
void SciBooNE_CCCOH_MuPiNoVA_1Dthetapr_nu::FillExtraHistograms(MeasurementVariableBox* vars, double weight){
if (Signal){
fMCStack->Fill(Mode, fXVar, weight);
fPIDStack->Fill(this->mainTrack->fPID, fXVar, weight);
}
return;
};
diff --git a/src/SciBooNE/SciBooNE_CCCOH_MuPiVA_1DQ2_nu.cxx b/src/SciBooNE/SciBooNE_CCCOH_MuPiVA_1DQ2_nu.cxx
index 9298657..6e57629 100644
--- a/src/SciBooNE/SciBooNE_CCCOH_MuPiVA_1DQ2_nu.cxx
+++ b/src/SciBooNE/SciBooNE_CCCOH_MuPiVA_1DQ2_nu.cxx
@@ -1,107 +1,107 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see .
*******************************************************************************/
#include "SciBooNE_CCCOH_MuPiVA_1DQ2_nu.h"
SciBooNE_CCCOH_MuPiVA_1DQ2_nu::SciBooNE_CCCOH_MuPiVA_1DQ2_nu(nuiskey samplekey){
// Sample overview
std::string descrip = "SciBooNE CC-coherent 1 pion with VA.\n" \
"Target: CH \n" \
"Flux: SciBooNE FHC numu \n";
// Common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("Q^{2} (GeV^{2})");
fSettings.SetYTitle("Entries/0.05 (GeV^{2})");
this->SetFitOptions("NOWIDTH");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("SciBooNE CCCOH proton");
fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig10c_CVs.csv");
fSettings.SetHasExtraHistograms(true);
fSettings.DefineAllowedSpecies("numu");
SetDataFromTextFile(fSettings.GetDataInput());
FinaliseSampleSettings();
// Setup Plots
if (SciBooNEUtils::GetUseZackEff())
this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu_ZACK.root", "Ratio2DBSCC");
else this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu.root", "stopped_muon_eff");
this->protonEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_proton_nu.root", "Ratio2DRS");
this->fMCStack = new SciBooNEUtils::ModeStack(fSettings.Name() + "_Stack",
"Mode breakdown" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
this->fPIDStack = new SciBooNEUtils::MainPIDStack(fSettings.Name() + "_MainPID",
"Main PID" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
SetAutoProcessTH1(fMCStack);
SetAutoProcessTH1(fPIDStack);
double nTargets = 10.6E6/13.*6.022E23;
this->fScaleFactor = GetEventHistogram()->Integral()*13.*1E-38/double(fNEvents)*nTargets;
FinaliseMeasurement();
};
void SciBooNE_CCCOH_MuPiVA_1DQ2_nu::FillEventVariables(FitEvent *event){
q2qe = 0;
this->mainIndex = SciBooNEUtils::GetMainTrack(event, this->muonStopEff, this->protonEff, this->mainTrack, this->Weight);
SciBooNEUtils::GetOtherTrackInfo(event, this->mainIndex, this->nProtons, this->nPiMus, this->nVertex, this->secondTrack);
FitParticle *nu = event->GetNeutrinoIn();
if (this->mainTrack){
- q2qe = FitUtils::Q2QErec(FitUtils::p(this->mainTrack),cos(FitUtils::th(nu,this->mainTrack)), 27., true);
+ q2qe = FitUtils::Q2QErec(SciBooNEUtils::smear_p(this->mainTrack),cos(SciBooNEUtils::smear_th(nu,this->mainTrack)), 27., true);
}
- if (q2qe < 0) return;
+ if (q2qe < 0) q2qe = 0; //return;
// Set X Variables
fXVar = q2qe;
return;
};
bool SciBooNE_CCCOH_MuPiVA_1DQ2_nu::isSignal(FitEvent *event){
if (!this->mainTrack || !this->secondTrack) return false;
if (this->nPiMus + this->nProtons != 1) return false;
if (this->nVertex == 0) return false;
double misIDProb = SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->secondTrack));
if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= 0.1;
if (this->nProtons == 1) this->Weight *= misIDProb;
if (this->nPiMus == 1) this->Weight *= (1 - misIDProb);
return true;
};
void SciBooNE_CCCOH_MuPiVA_1DQ2_nu::FillExtraHistograms(MeasurementVariableBox* vars, double weight){
if (Signal){
fMCStack->Fill(Mode, fXVar, weight);
fPIDStack->Fill(this->mainTrack->fPID, fXVar, weight);
}
return;
};
diff --git a/src/SciBooNE/SciBooNE_CCCOH_MuPr_1DQ2_nu.cxx b/src/SciBooNE/SciBooNE_CCCOH_MuPr_1DQ2_nu.cxx
index d764736..48dcdae 100644
--- a/src/SciBooNE/SciBooNE_CCCOH_MuPr_1DQ2_nu.cxx
+++ b/src/SciBooNE/SciBooNE_CCCOH_MuPr_1DQ2_nu.cxx
@@ -1,110 +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 .
*******************************************************************************/
#include "SciBooNE_CCCOH_MuPr_1DQ2_nu.h"
SciBooNE_CCCOH_MuPr_1DQ2_nu::SciBooNE_CCCOH_MuPr_1DQ2_nu(nuiskey samplekey){
// Sample overview
std::string descrip = "SciBooNE CC-coherent proton sample.\n" \
"Target: CH \n" \
"Flux: SciBooNE FHC numu \n";
// Common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("Q^{2} (GeV^{2})");
fSettings.SetYTitle("Entries/0.05 (GeV^{2})");
this->SetFitOptions("NOWIDTH");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("SciBooNE CCCOH proton");
fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig10b_CVs.csv");
fSettings.SetHasExtraHistograms(true);
fSettings.DefineAllowedSpecies("numu");
SetDataFromTextFile(fSettings.GetDataInput());
FinaliseSampleSettings();
// Setup Plots
if (SciBooNEUtils::GetUseZackEff())
this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu_ZACK.root", "Ratio2DBSCC");
else this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu.root", "stopped_muon_eff");
this->protonEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_proton_nu.root", "Ratio2DRS");
this->fMCStack = new SciBooNEUtils::ModeStack(fSettings.Name() + "_Stack",
"Mode breakdown" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
this->fPIDStack = new SciBooNEUtils::MainPIDStack(fSettings.Name() + "_MainPID",
"Main PID " + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
SetAutoProcessTH1(fMCStack);
SetAutoProcessTH1(fPIDStack);
double nTargets = 10.6E6/13.*6.022E23;
this->fScaleFactor = GetEventHistogram()->Integral()*13.*1E-38/double(fNEvents)*nTargets;
FinaliseMeasurement();
};
void SciBooNE_CCCOH_MuPr_1DQ2_nu::FillEventVariables(FitEvent *event){
q2qe = 0;
this->mainIndex = SciBooNEUtils::GetMainTrack(event, this->muonStopEff, this->protonEff, this->mainTrack, this->Weight);
SciBooNEUtils::GetOtherTrackInfo(event, this->mainIndex, this->nProtons, this->nPiMus, this->nVertex, this->secondTrack);
FitParticle *nu = event->GetNeutrinoIn();
if (this->mainTrack){
- q2qe = FitUtils::Q2QErec(FitUtils::p(this->mainTrack),cos(FitUtils::th(nu,this->mainTrack)), 27., true);
+ q2qe = FitUtils::Q2QErec(SciBooNEUtils::smear_p(this->mainTrack),cos(SciBooNEUtils::smear_th(nu,this->mainTrack)), 27., true);
}
- if (q2qe < 0) return;
+ if (q2qe < 0) q2qe = 0; //return;
// Set X Variables
fXVar = q2qe;
return;
};
bool SciBooNE_CCCOH_MuPr_1DQ2_nu::isSignal(FitEvent *event){
if (!this->mainTrack) return false;
- // if (this->nPiMus != 0) return false;
- // if (this->nProtons != 1) return false;
if (this->nPiMus + this->nProtons != 1) return false;
double misIDProb = SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->secondTrack));
if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= 0.1;
if (this->nProtons == 1) this->Weight *= (1 - misIDProb);
if (this->nPiMus == 1) this->Weight *= misIDProb;
return true;
};
void SciBooNE_CCCOH_MuPr_1DQ2_nu::FillExtraHistograms(MeasurementVariableBox* vars, double weight){
if (Signal){
fMCStack->Fill(Mode, fXVar, weight);
fPIDStack->Fill(this->mainTrack->fPID, fXVar, weight);
}
return;
};
diff --git a/src/SciBooNE/SciBooNE_CCCOH_STOPFINAL_1DQ2_nu.cxx b/src/SciBooNE/SciBooNE_CCCOH_STOPFINAL_1DQ2_nu.cxx
index dfad394..cd00ee8 100644
--- a/src/SciBooNE/SciBooNE_CCCOH_STOPFINAL_1DQ2_nu.cxx
+++ b/src/SciBooNE/SciBooNE_CCCOH_STOPFINAL_1DQ2_nu.cxx
@@ -1,115 +1,115 @@
// 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 .
*******************************************************************************/
#include "SciBooNE_CCCOH_STOPFINAL_1DQ2_nu.h"
SciBooNE_CCCOH_STOPFINAL_1DQ2_nu::SciBooNE_CCCOH_STOPFINAL_1DQ2_nu(nuiskey samplekey){
// Sample overview
std::string descrip = "SciBooNE CC-coherent 1 pion no VA #theta_{pr}.\n" \
"Target: CH \n" \
"Flux: SciBooNE FHC numu \n";
// Common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("Q^{2} (GeV^{2})");
fSettings.SetYTitle("Entries/0.05 (GeV^{2})");
this->SetFitOptions("NOWIDTH");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fSettings.SetTitle("SciBooNE CCCOH pion no VA FINAL");
fSettings.SetDataInput( FitPar::GetDataBase()+"/SciBooNE/SB_COH_Fig13_CVs.csv");
fSettings.SetHasExtraHistograms(true);
fSettings.DefineAllowedSpecies("numu");
SetDataFromTextFile(fSettings.GetDataInput());
FinaliseSampleSettings();
// Setup Plots
if (SciBooNEUtils::GetUseZackEff())
this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu_ZACK.root", "Ratio2DBSCC");
else this->muonStopEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_stopped_muon_eff_nu.root", "stopped_muon_eff");
this->protonEff = PlotUtils::GetTH2DFromRootFile(FitPar::GetDataBase()+"/SciBooNE/SciBooNE_proton_nu.root", "Ratio2DRS");
this->fMCStack = new SciBooNEUtils::ModeStack(fSettings.Name() + "_Stack",
"Mode breakdown" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
this->fPIDStack = new SciBooNEUtils::MainPIDStack(fSettings.Name() + "_MainPID",
"Main PID" + fSettings.PlotTitles(),
PlotUtils::GetTH1DFromFile(fSettings.GetDataInput(), fSettings.GetName()));
SetAutoProcessTH1(fMCStack);
SetAutoProcessTH1(fPIDStack);
double nTargets = 10.6E6/13.*6.022E23;
this->fScaleFactor = GetEventHistogram()->Integral()*13.*1E-38/double(fNEvents)*nTargets;
FinaliseMeasurement();
};
void SciBooNE_CCCOH_STOPFINAL_1DQ2_nu::FillEventVariables(FitEvent *event){
q2qe = 0;
this->mainIndex = SciBooNEUtils::GetMainTrack(event, this->muonStopEff, this->protonEff, this->mainTrack, this->Weight);
SciBooNEUtils::GetOtherTrackInfo(event, this->mainIndex, this->nProtons, this->nPiMus, this->nVertex, this->secondTrack);
FitParticle *nu = event->GetNeutrinoIn();
if (this->mainTrack){
- q2qe = FitUtils::Q2QErec(FitUtils::p(this->mainTrack),cos(FitUtils::th(nu,this->mainTrack)), 27., true);
+ q2qe = FitUtils::Q2QErec(SciBooNEUtils::smear_p(this->mainTrack),cos(SciBooNEUtils::smear_th(nu,this->mainTrack)), 27., true);
}
- if (q2qe < 0) return;
+ if (q2qe < 0) q2qe = 0; //return;
// Set X Variables
fXVar = q2qe;
return;
};
bool SciBooNE_CCCOH_STOPFINAL_1DQ2_nu::isSignal(FitEvent *event){
if (!this->mainTrack) return false;
if (this->nPiMus + this->nProtons != 1) return false;
if (this->nVertex != 0) return false;
// Require dth_proton > 20
if (SciBooNEUtils::CalcThetaPr(event, this->mainTrack, this->secondTrack) < 20) return false;
// Require dth_pion < 90
if (SciBooNEUtils::CalcThetaPi(event, this->secondTrack) > 90) return false;
if (SciBooNEUtils::isProton(this->mainTrack)) this->Weight *= 0.1;
double misIDProb = SciBooNEUtils::ProtonMisIDProb(FitUtils::p(this->secondTrack));
if (this->nProtons == 1) this->Weight *= misIDProb;
if (this->nPiMus == 1) this->Weight *= (1 - misIDProb);
return true;
};
void SciBooNE_CCCOH_STOPFINAL_1DQ2_nu::FillExtraHistograms(MeasurementVariableBox* vars, double weight){
if (Signal){
fMCStack->Fill(Mode, fXVar, weight);
fPIDStack->Fill(this->mainTrack->fPID, fXVar, weight);
}
return;
};