diff --git a/data/ANL/CC1pi0_on_n/ANL_CC1pi0_on_n_noEvents_Q2_noWcut_HighQ2Gone.txt b/data/ANL/CC1pi0_on_n/ANL_CC1pi0_on_n_noEvents_Q2_noWcut_HighQ2Gone.txt new file mode 100755 index 0000000..b4e039c --- /dev/null +++ b/data/ANL/CC1pi0_on_n/ANL_CC1pi0_on_n_noEvents_Q2_noWcut_HighQ2Gone.txt @@ -0,0 +1,18 @@ +0.10 26.0 +0.15 24.2 +0.20 19.1 +0.25 15.3 +0.30 19.0 +0.35 10.9 +0.40 13.0 +0.45 10.0 +0.50 12.6 +0.55 7.56 +0.60 2.99 +0.65 4.04 +0.70 3.07 +0.75 0.00 +0.85 2.54 +0.90 0.748 +0.95 0.599 +1.00 0.00 diff --git a/data/ANL/CC1pip_on_n/ANL_CC1pip_on_n_noEvents_Q2_noWcut_HighQ2Gone.txt b/data/ANL/CC1pip_on_n/ANL_CC1pip_on_n_noEvents_Q2_noWcut_HighQ2Gone.txt new file mode 100755 index 0000000..4ebb6c7 --- /dev/null +++ b/data/ANL/CC1pip_on_n/ANL_CC1pip_on_n_noEvents_Q2_noWcut_HighQ2Gone.txt @@ -0,0 +1,20 @@ +0.10 34.2 +0.15 20.4 +0.20 20.9 +0.25 22.6 +0.30 12.7 +0.35 6.50 +0.40 5.10 +0.45 7.10 +0.50 3.80 +0.55 8.80 +0.60 2.40 +0.65 1.90 +0.70 2.20 +0.75 2.80 +0.80 1.70 +0.85 1.20 +0.90 2.00 +0.95 2.80 +1.00 1.10 +1.05 0.00 diff --git a/data/ANL/CC1pip_on_p/ANL_CC1pip_on_p_noEvents_Q2_noW_HighQ2Gone.txt b/data/ANL/CC1pip_on_p/ANL_CC1pip_on_p_noEvents_Q2_noW_HighQ2Gone.txt new file mode 100755 index 0000000..583c056 --- /dev/null +++ b/data/ANL/CC1pip_on_p/ANL_CC1pip_on_p_noEvents_Q2_noW_HighQ2Gone.txt @@ -0,0 +1,20 @@ +0.10 92.3 +0.15 75.3 +0.20 75.5 +0.25 62.8 +0.30 48.5 +0.35 55.5 +0.40 44.0 +0.45 32.0 +0.50 28.3 +0.55 29.5 +0.60 21.0 +0.65 17.0 +0.70 19.8 +0.75 16.3 +0.80 14.8 +0.85 10.0 +0.90 6.75 +0.95 6.75 +1.00 4.00 +1.05 0.00 diff --git a/data/BNL/CC1pi0_on_n/BNL_CC1pi0_on_n_noEvents_q2_noWcut_HighQ2Gone.txt b/data/BNL/CC1pi0_on_n/BNL_CC1pi0_on_n_noEvents_q2_noWcut_HighQ2Gone.txt new file mode 100755 index 0000000..a481f76 --- /dev/null +++ b/data/BNL/CC1pi0_on_n/BNL_CC1pi0_on_n_noEvents_q2_noWcut_HighQ2Gone.txt @@ -0,0 +1,13 @@ +0.1 129 +0.2 105 +0.3 77 +0.4 68 +0.5 62 +0.6 57 +0.7 32 +0.8 23 +0.9 29 +1 18 +1.1 18 +1.2 13 +1.3 0 diff --git a/data/BNL/CC1pip_on_n/BNL_CC1pip_on_n_noEvents_q2_noWcut_HighQ2Gone.txt b/data/BNL/CC1pip_on_n/BNL_CC1pip_on_n_noEvents_q2_noWcut_HighQ2Gone.txt new file mode 100755 index 0000000..b055def --- /dev/null +++ b/data/BNL/CC1pip_on_n/BNL_CC1pip_on_n_noEvents_q2_noWcut_HighQ2Gone.txt @@ -0,0 +1,12 @@ +0.1 96 +0.2 70 +0.3 58 +0.4 54 +0.5 49 +0.6 41 +0.7 34 +0.8 25 +0.9 33 +1 30 +1.1 16 +1.2 0 diff --git a/data/BNL/CC1pip_on_p/BNL_CC1pip_on_p_noEvents_q2_noWcut_HighQ2Gone.txt b/data/BNL/CC1pip_on_p/BNL_CC1pip_on_p_noEvents_q2_noWcut_HighQ2Gone.txt new file mode 100755 index 0000000..adad500 --- /dev/null +++ b/data/BNL/CC1pip_on_p/BNL_CC1pip_on_p_noEvents_q2_noWcut_HighQ2Gone.txt @@ -0,0 +1,13 @@ +0.1 237 +0.2 231 +0.3 195 +0.4 168 +0.5 116 +0.6 87 +0.7 75 +0.8 58 +0.9 47 +1.0 38 +1.1 30 +1.2 31 +1.3 0 diff --git a/src/ANL/ANL_CC1npip_Evt_1DQ2_nu.cxx b/src/ANL/ANL_CC1npip_Evt_1DQ2_nu.cxx index 43a17b2..42a09ab 100644 --- a/src/ANL/ANL_CC1npip_Evt_1DQ2_nu.cxx +++ b/src/ANL/ANL_CC1npip_Evt_1DQ2_nu.cxx @@ -1,111 +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 "ANL_CC1npip_Evt_1DQ2_nu.h" // The constructor // User can specify W < 1.4 or no W cut in std::string type (W14 or NOW, default reverts to NOW) //******************************************************************** ANL_CC1npip_Evt_1DQ2_nu::ANL_CC1npip_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) { //******************************************************************** fName = "ANL_CC1npip_Evt_1DQ2_nu"; fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); Number of events"; EnuMin = 0; EnuMax = 1.5; fIsDiag = true; fIsRawEvents = true; fDefaultTypes="EVT/SHAPE/DIAG"; fAllowedTypes = "EVT/SHAPE/DIAG/W14/NOW"; // User can specify W < 1.4 or no W cut if (type.find("W14") != std::string::npos) { HadCut = 1.4; } else { HadCut = 10.0; } std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/ANL/CC1pip_on_n/"; if (HadCut == 1.4) { DataLocation += "ANL_CC1pip_on_n_noEvents_Q2_W14GeV_firstQ2rem.txt"; } else { - DataLocation += "ANL_CC1pip_on_n_noEvents_Q2_noWcut_firstQ2rem.txt"; + //DataLocation += "ANL_CC1pip_on_n_noEvents_Q2_noWcut_firstQ2rem.txt"; + DataLocation += "ANL_CC1pip_on_n_noEvents_Q2_noWcut_HighQ2Gone.txt"; } // Get rid of the slashes in the type if (!type.empty() && type != "DEFAULT") { std::string temp_type = type; std::replace(temp_type.begin(), temp_type.end(), '/', '_'); fName += "_"+temp_type; } SetupMeasurement(inputfile, type, rw, fakeDataFile); SetDataValues(DataLocation); SetupDefaultHist(); // Set Poisson errors on fDataHist (scanned does not have this) // Simple counting experiment here for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) { fDataHist->SetBinError(i+1, sqrt(fDataHist->GetBinContent(i+1))); } // Setup Covariance fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist); covar = StatUtils::GetInvert(fFullCovar); fScaleFactor = (GetEventHistogram()->Integral()/double(fNEvents)); }; //******************************************************************** void ANL_CC1npip_Evt_1DQ2_nu::FillEventVariables(FitEvent *event) { //******************************************************************** if (event->NumFSParticle(2112) == 0 || event->NumFSParticle(211) == 0 || event->NumFSParticle(13) == 0) { return; } TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Pn = event->GetHMFSParticle(2112)->fP; TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; double hadMass = FitUtils::MpPi(Pn, Ppip); double q2CCpip; // ANL has a M(pi, p) < 1.4 GeV cut imposed (also no cut measurement but not useful for delta tuning) if (hadMass < HadCut*1000.) { q2CCpip = -1.0*(Pnu-Pmu).Mag2()/1.E6; } else { q2CCpip = -1.0; } fXVar = q2CCpip; return; }; //******************************************************************** bool ANL_CC1npip_Evt_1DQ2_nu::isSignal(FitEvent *event) { //******************************************************************** return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); } diff --git a/src/ANL/ANL_CC1pi0_Evt_1DQ2_nu.cxx b/src/ANL/ANL_CC1pi0_Evt_1DQ2_nu.cxx index 6099ddf..aed4859 100644 --- a/src/ANL/ANL_CC1pi0_Evt_1DQ2_nu.cxx +++ b/src/ANL/ANL_CC1pi0_Evt_1DQ2_nu.cxx @@ -1,121 +1,122 @@ // Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret /******************************************************************************* * This file is part of NUISANCE. * * NUISANCE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * NUISANCE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NUISANCE. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "ANL_CC1pi0_Evt_1DQ2_nu.h" // The constructor ANL_CC1pi0_Evt_1DQ2_nu::ANL_CC1pi0_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) { fName = "ANL_CC1pi0_Evt_1DQ2_nu"; fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); Number of events"; EnuMin = 0; EnuMax = 1.5; fIsDiag = true; // refers to covariance matrix; this measurement has none so only use errors, not covariance fIsRawEvents = true; fDefaultTypes="EVT/SHAPE/DIAG"; fAllowedTypes="EVT/SHAPE/DIAG/W14/NOW"; // User can specify W < 1.4 or no W cut if (type.find("W14") != std::string::npos) { HadCut = 1.4; } else { HadCut = 10.0; } std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/ANL/CC1pi0_on_n/"; if (HadCut == 1.4) { DataLocation += "ANL_CC1pi0_on_n_noEvents_Q2_W14GeV_firstQ2rem.txt"; } else { - DataLocation += "ANL_CC1pi0_on_n_noEvents_Q2_noWcut_firstQ2rem.txt"; + //DataLocation += "ANL_CC1pi0_on_n_noEvents_Q2_noWcut_firstQ2rem.txt"; + DataLocation += "ANL_CC1pi0_on_n_noEvents_Q2_noWcut_HighQ2Gone.txt"; } // Get rid of the slashes in the type if (!type.empty() && type != "DEFAULT") { std::string temp_type = type; std::replace(temp_type.begin(), temp_type.end(), '/', '_'); fName += "_"+temp_type; } SetupMeasurement(inputfile, type, rw, fakeDataFile); SetDataValues(DataLocation); SetupDefaultHist(); // Set Poisson errors on fDataHist (scanned does not have this) // Simple counting experiment here for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) { fDataHist->SetBinError(i+1, sqrt(fDataHist->GetBinContent(i+1))); } fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist); covar = StatUtils::GetInvert(fFullCovar); fScaleFactor = GetEventHistogram()->Integral("width")/(fNEvents+0.); }; void ANL_CC1pi0_Evt_1DQ2_nu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(111) == 0 || event->NumFSParticle(13) == 0) { return; } TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; TLorentzVector Ppi0 = event->GetHMFSParticle(111)->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; double hadMass = FitUtils::MpPi(Pp, Ppi0); double q2CCpi0 = -1.0; // ANL has a M(pi, p) < 1.4 GeV cut imposed if (hadMass < HadCut*1000.) { q2CCpi0 = -1.0*(Pnu-Pmu).Mag2()/1.E6; } fXVar = q2CCpi0; return; }; bool ANL_CC1pi0_Evt_1DQ2_nu::isSignal(FitEvent *event) { return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); } /* void ANL_CC1pi0_Evt_1DQ2_nu::FillHistograms() { if (makeHadronicMassHist) { hadMassHist->Fill(hadMass); } Measurement1D::FillHistograms(); } void ANL_CC1pi0_Evt_1DQ2_nu::ScaleEvents() { // PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram()); //PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram()); fMCHist->Scale(fScaleFactor); fMCFine->Scale(fScaleFactor); return; } */ diff --git a/src/ANL/ANL_CC1ppip_Evt_1DQ2_nu.cxx b/src/ANL/ANL_CC1ppip_Evt_1DQ2_nu.cxx index b8a0c74..ca286c1 100644 --- a/src/ANL/ANL_CC1ppip_Evt_1DQ2_nu.cxx +++ b/src/ANL/ANL_CC1ppip_Evt_1DQ2_nu.cxx @@ -1,126 +1,127 @@ // Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret /******************************************************************************* * This file is part of NUISANCE. * * NUISANCE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * NUISANCE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NUISANCE. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ /** * Radecky et al. Phys Rev D, 3rd series, volume 25, number 5, 1 March 1982, p 1161-1173 */ #include "ANL_CC1ppip_Evt_1DQ2_nu.h" // The constructor ANL_CC1ppip_Evt_1DQ2_nu::ANL_CC1ppip_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) { fName = "ANL_CC1ppip_Evt_1DQ2_nu"; fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); Number of events"; EnuMin = 0; EnuMax = 6.0; fIsDiag = true; fIsRawEvents = true; fDefaultTypes="EVT/SHAPE/DIAG"; fAllowedTypes="EVT/SHAPE/DIAG/W14/NOW"; // User can specify W < 1.4 or no W cut if (type.find("W14") != std::string::npos) { HadCut = 1.4; } else { HadCut = 10.0; } std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/ANL/CC1pip_on_p/"; if (HadCut == 1.4) { DataLocation += "ANL_CC1pip_on_p_noEvents_Q2_W14GeV_firstQ2rem.txt"; } else { - DataLocation += "ANL_CC1pip_on_p_noEvents_Q2_noW_firstQ2rem.txt"; + //DataLocation += "ANL_CC1pip_on_p_noEvents_Q2_noW_firstQ2rem.txt"; + DataLocation += "ANL_CC1pip_on_p_noEvents_Q2_noW_HighQ2Gone.txt"; } // Get rid of the slashes in the type if (!type.empty() && type != "DEFAULT") { std::string temp_type = type; std::replace(temp_type.begin(), temp_type.end(), '/', '_'); fName += "_"+temp_type; } Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile); SetDataValues(DataLocation); SetupDefaultHist(); // Set Poisson errors on fDataHist (scanned does not have this) // Simple counting experiment here for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) { fDataHist->SetBinError(i+1, sqrt(fDataHist->GetBinContent(i+1))); } fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist); covar = StatUtils::GetInvert(fFullCovar); fScaleFactor = GetEventHistogram()->Integral("width")/(fNEvents+0.)*16./8.; }; void ANL_CC1ppip_Evt_1DQ2_nu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(211) == 0 || event->NumFSParticle(13) == 0) { return; } TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; double hadMass = FitUtils::MpPi(Pp, Ppip); double q2CCpip = -1.0; // ANL has a M(pi, p) < 1.4 GeV cut imposed or no W cut if (hadMass < HadCut*1000.) { q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6; } fXVar = q2CCpip; return; }; bool ANL_CC1ppip_Evt_1DQ2_nu::isSignal(FitEvent *event) { return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); } /* void ANL_CC1ppip_Evt_1DQ2_nu::FillHistograms() { if (makeHadronicMassHist) { hadMassHist->Fill(hadMass); } Measurement1D::FillHistograms(); } void ANL_CC1ppip_Evt_1DQ2_nu::ScaleEvents() { PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram()); PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram()); fMCHist->Scale(fScaleFactor); fMCFine->Scale(fScaleFactor); return; } */ diff --git a/src/BNL/BNL_CC1npip_Evt_1DQ2_nu.cxx b/src/BNL/BNL_CC1npip_Evt_1DQ2_nu.cxx index 018ea18..fce757e 100644 --- a/src/BNL/BNL_CC1npip_Evt_1DQ2_nu.cxx +++ b/src/BNL/BNL_CC1npip_Evt_1DQ2_nu.cxx @@ -1,94 +1,95 @@ // Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret /******************************************************************************* * This file is part of NUISANCE. * * NUISANCE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * NUISANCE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NUISANCE. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "BNL_CC1npip_Evt_1DQ2_nu.h" // The constructor BNL_CC1npip_Evt_1DQ2_nu::BNL_CC1npip_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) { fName = "BNL_CC1npip_Evt_1DQ2_nu"; fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); Number of events"; EnuMin = 0.; EnuMax = 3.; fIsDiag = true; fIsRawEvents = true; fAllowedTypes += "EVT"; Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile); - SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pip_on_n/BNL_CC1pip_on_n_noEvents_q2_noWcut_firstQ2rem.txt"); + //SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pip_on_n/BNL_CC1pip_on_n_noEvents_q2_noWcut_firstQ2rem.txt"); + SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pip_on_n/BNL_CC1pip_on_n_noEvents_q2_noWcut_HighQ2Gone.txt"); SetupDefaultHist(); // set Poisson errors on fDataHist (scanned does not have this) // Simple counting experiment here for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) { fDataHist->SetBinError(i+1, sqrt(fDataHist->GetBinContent(i+1))); } fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist); covar = StatUtils::GetInvert(fFullCovar); fScaleFactor = GetEventHistogram()->Integral("width")/(fNEvents+0.); }; void BNL_CC1npip_Evt_1DQ2_nu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(13) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; // No hadronic mass constraint in BNL CC1n1pi+ // This Q2 is Q2 true double q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6; fXVar = q2CCpip; return; }; bool BNL_CC1npip_Evt_1DQ2_nu::isSignal(FitEvent *event) { return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); } /* void BNL_CC1npip_Evt_1DQ2_nu::FillHistograms() { if (makeHadronicMassHist) { hadMassHist->Fill(hadMass); } Measurement1D::FillHistograms(); } void BNL_CC1npip_Evt_1DQ2_nu::ScaleEvents() { PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram()); PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram()); fMCHist->Scale(fScaleFactor); fMCFine->Scale(fScaleFactor); return; } */ diff --git a/src/BNL/BNL_CC1pi0_Evt_1DQ2_nu.cxx b/src/BNL/BNL_CC1pi0_Evt_1DQ2_nu.cxx index f65a324..98aa3cb 100644 --- a/src/BNL/BNL_CC1pi0_Evt_1DQ2_nu.cxx +++ b/src/BNL/BNL_CC1pi0_Evt_1DQ2_nu.cxx @@ -1,70 +1,71 @@ // Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret /******************************************************************************* * This file is part of NUISANCE. * * NUISANCE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * NUISANCE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NUISANCE. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ #include "BNL_CC1pi0_Evt_1DQ2_nu.h" // The constructor BNL_CC1pi0_Evt_1DQ2_nu::BNL_CC1pi0_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) { fName = "BNL_CC1pi0_Evt_1DQ2_nu"; fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); Number of events"; EnuMin = 0; EnuMax = 6.0; fIsDiag = true; fIsRawEvents = true; fAllowedTypes += "EVT"; Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile); - SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pi0_on_n/BNL_CC1pi0_on_n_noEvents_q2_noWcut_firstQ2rem.txt"); + //SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pi0_on_n/BNL_CC1pi0_on_n_noEvents_q2_noWcut_firstQ2rem.txt"); + SetDataValues(GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pi0_on_n/BNL_CC1pi0_on_n_noEvents_q2_noWcut_HighQ2Gone.txt"); SetupDefaultHist(); // set Poisson errors on fDataHist (scanned does not have this) // Simple counting experiment here for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) { fDataHist->SetBinError(i+1, sqrt(fDataHist->GetBinContent(i+1))); } fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist); covar = StatUtils::GetInvert(fFullCovar); fScaleFactor = GetEventHistogram()->Integral("width")/(fNEvents+0.); }; void BNL_CC1pi0_Evt_1DQ2_nu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(13) == 0) return; TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; // No W cut on BNL CC1pi0 // Want true Q2 double q2CCpi0 = -1*(Pnu-Pmu).Mag2()/1.E6; fXVar = q2CCpi0; return; }; bool BNL_CC1pi0_Evt_1DQ2_nu::isSignal(FitEvent *event) { return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); } diff --git a/src/BNL/BNL_CC1ppip_Evt_1DQ2_nu.cxx b/src/BNL/BNL_CC1ppip_Evt_1DQ2_nu.cxx index 5bcc948..43529bc 100644 --- a/src/BNL/BNL_CC1ppip_Evt_1DQ2_nu.cxx +++ b/src/BNL/BNL_CC1ppip_Evt_1DQ2_nu.cxx @@ -1,137 +1,138 @@ // Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret /******************************************************************************* * This file is part of NUISANCE. * * NUISANCE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * NUISANCE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NUISANCE. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ /** * Kitagaki et al. Phys Rev D, Volume 34, Number 9, 1 November 1986, p2254-2565 * K. Furuno et al. NuInt02 proceedings, (supposedly published in Nucl. Phys. B but I never found it), Retreieved from KEK preprints. * KEK Preprint 2003-48, RCNS-03-01, September 2003 */ #include "BNL_CC1ppip_Evt_1DQ2_nu.h" // The constructor BNL_CC1ppip_Evt_1DQ2_nu::BNL_CC1ppip_Evt_1DQ2_nu(std::string inputfile, FitWeight *rw, std::string type, std::string fakeDataFile) { fName = "BNL_CC1ppip_Evt_1DQ2_nu"; fPlotTitles = "; Q^{2}_{CC#pi} (GeV^{2}); Number of events"; EnuMin = 0.5; EnuMax = 6.; fIsDiag = true; fIsRawEvents = true; fDefaultTypes="EVT/SHAPE/DIAG"; fAllowedTypes = "EVT/SHAPE/DIAG/W14/NOW"; // Look if user has specified a W cut if (type.find("W14") != std::string::npos) { HadCut = 1.4; } else { HadCut = 10.0; EnuMin = 0.0; EnuMax = 10.0; } if (!type.empty() && type != "DEFAULT") { std::string temp_type = type; std::replace(temp_type.begin(), temp_type.end(), '/', '_'); fName += "_"+temp_type; } Measurement1D::SetupMeasurement(inputfile, type, rw, fakeDataFile); std::string DataLocation = GeneralUtils::GetTopLevelDir()+"/data/BNL/CC1pip_on_p/"; // If W < 1.4 GeV cut if (HadCut == 1.4) { DataLocation += "BNL_CC1pip_on_p_noEvents_q2_w14_enu05to6_firstQ2rem.txt"; // If W < 2.0 GeV } else { // No Enu cuts on full W space - DataLocation += "BNL_CC1pip_on_p_noEvents_q2_noWcut_firstQ2rem.txt"; + //DataLocation += "BNL_CC1pip_on_p_noEvents_q2_noWcut_firstQ2rem.txt"; + DataLocation += "BNL_CC1pip_on_p_noEvents_q2_noWcut_HighQ2Gone.txt"; } SetDataValues(DataLocation); SetupDefaultHist(); // Set Poisson errors on fDataHist (scanned does not have this) // Simple counting experiment here for (int i = 0; i < fDataHist->GetNbinsX() + 1; i++) { fDataHist->SetBinError(i+1, sqrt(fDataHist->GetBinContent(i+1))); } fFullCovar = StatUtils::MakeDiagonalCovarMatrix(fDataHist); covar = StatUtils::GetInvert(fFullCovar); fScaleFactor = GetEventHistogram()->Integral("width")/(fNEvents+0.); }; void BNL_CC1ppip_Evt_1DQ2_nu::FillEventVariables(FitEvent *event) { if (event->NumFSParticle(2212) == 0 || event->NumFSParticle(211) == 0 || event->NumFSParticle(13) == 0) { return; } TLorentzVector Pnu = event->GetNeutrinoIn()->fP; TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; double hadMass = FitUtils::MpPi(Pp, Ppip); double q2CCpip = -1.0; // BNL has a M(pi, p) < 1.4 GeV cut and no W cut. // This should be specified by user in "type" field // Reverts to 10 GeV (essentially no W cut!) if (hadMass < HadCut*1000.) { q2CCpip = -1*(Pnu-Pmu).Mag2()/1.E6; } fXVar = q2CCpip; return; }; bool BNL_CC1ppip_Evt_1DQ2_nu::isSignal(FitEvent *event) { return SignalDef::isCC1pi3Prong(event, 14, 211, 2212,EnuMin,EnuMax); } /* void BNL_CC1ppip_Evt_1DQ2_nu::FillHistograms() { if (makeHadronicMassHist) { hadMassHist->Fill(hadMass); } Measurement1D::FillHistograms(); } void BNL_CC1ppip_Evt_1DQ2_nu::ScaleEvents() { PlotUtils::FluxUnfoldedScaling(fMCHist, GetFluxHistogram()); PlotUtils::FluxUnfoldedScaling(fMCFine, GetFluxHistogram()); fMCHist->Scale(fScaleFactor); fMCFine->Scale(fScaleFactor); return; } */