diff --git a/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.cxx b/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.cxx new file mode 100644 index 0000000..d223090 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.cxx @@ -0,0 +1,83 @@ +// 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 "BNL_CC1npip_Evt_1DWNmu_nu.h" + +//******************************************************************** +BNL_CC1npip_Evt_1DWNmu_nu::BNL_CC1npip_Evt_1DWNmu_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1npip Event Rate 1D W(N mu) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1n#pi^{+}"); + fSettings.SetXTitle("W(N#mu) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_n/BNL_CC1npip_WNmu_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1npip_Evt_1DWNmu_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2112) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pn = event->GetHMFSParticle(2112)->fP; + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + + double hadMass = (Pn+Pmu).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1npip_Evt_1DWNmu_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.h b/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.h new file mode 100644 index 0000000..a259510 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWNmu_nu.h @@ -0,0 +1,36 @@ +// 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 . +*******************************************************************************/ + +#ifndef BNL_CC1NPIP_EVT_1DWNMU_NU_H_SEEN +#define BNL_CC1NPIP_EVT_1DWNMU_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1npip_Evt_1DWNmu_nu : public Measurement1D { +public: + BNL_CC1npip_Evt_1DWNmu_nu(nuiskey samplekey); + virtual ~BNL_CC1npip_Evt_1DWNmu_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.cxx b/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.cxx new file mode 100644 index 0000000..867b651 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.cxx @@ -0,0 +1,83 @@ +// 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 "BNL_CC1npip_Evt_1DWNpi_nu.h" + +//******************************************************************** +BNL_CC1npip_Evt_1DWNpi_nu::BNL_CC1npip_Evt_1DWNpi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1npip Event Rate 1D W(N pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1n#pi^{+}"); + fSettings.SetXTitle("W(N#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_n/BNL_CC1npip_WNpi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1npip_Evt_1DWNpi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2112) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pn = event->GetHMFSParticle(2112)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pn+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1npip_Evt_1DWNpi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.h b/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.h new file mode 100644 index 0000000..b5d9405 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWNpi_nu.h @@ -0,0 +1,36 @@ +// 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 . +*******************************************************************************/ + +#ifndef BNL_CC1NPIP_EVT_1DWNPI_NU_H_SEEN +#define BNL_CC1NPIP_EVT_1DWNPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1npip_Evt_1DWNpi_nu : public Measurement1D { +public: + BNL_CC1npip_Evt_1DWNpi_nu(nuiskey samplekey); + virtual ~BNL_CC1npip_Evt_1DWNpi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.cxx b/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.cxx new file mode 100644 index 0000000..3c56224 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.cxx @@ -0,0 +1,83 @@ +// 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 "BNL_CC1npip_Evt_1DWmupi_nu.h" + +//******************************************************************** +BNL_CC1npip_Evt_1DWmupi_nu::BNL_CC1npip_Evt_1DWmupi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1npip Event Rate 1D W(mu pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1n#pi^{+}"); + fSettings.SetXTitle("W(#mu#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_n/BNL_CC1npip_Wmupi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1npip_Evt_1DWmupi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2112) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pmu+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1npip_Evt_1DWmupi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2112, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.h b/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.h new file mode 100644 index 0000000..e396d87 --- /dev/null +++ b/src/BNL/BNL_CC1npip_Evt_1DWmupi_nu.h @@ -0,0 +1,36 @@ +// 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 . +*******************************************************************************/ + +#ifndef BNL_CC1NPIP_EVT_1DWMUPI_NU_H_SEEN +#define BNL_CC1NPIP_EVT_1DWMUPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1npip_Evt_1DWmupi_nu : public Measurement1D { +public: + BNL_CC1npip_Evt_1DWmupi_nu(nuiskey samplekey); + virtual ~BNL_CC1npip_Evt_1DWmupi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.cxx b/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.cxx new file mode 100644 index 0000000..d08833a --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.cxx @@ -0,0 +1,83 @@ +// 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 "BNL_CC1pi0_Evt_1DWNmu_nu.h" + +//******************************************************************** +BNL_CC1pi0_Evt_1DWNmu_nu::BNL_CC1pi0_Evt_1DWNmu_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1pi0 Event Rate 1D W(N mu) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{0}"); + fSettings.SetXTitle("W(N#mu) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pi0_on_n/BNL_CC1pi0_WNmu_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1pi0_Evt_1DWNmu_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(111) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + + double hadMass = (Pmu+Pp).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1pi0_Evt_1DWNmu_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.h b/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.h new file mode 100644 index 0000000..24c17bd --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWNmu_nu.h @@ -0,0 +1,36 @@ +// 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 . +*******************************************************************************/ + +#ifndef BNL_CC1PPI0_EVT_1DWNMU_NU_H_SEEN +#define BNL_CC1PPI0_EVT_1DWNMU_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1pi0_Evt_1DWNmu_nu : public Measurement1D { +public: + BNL_CC1pi0_Evt_1DWNmu_nu(nuiskey samplekey); + virtual ~BNL_CC1pi0_Evt_1DWNmu_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.cxx b/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.cxx new file mode 100644 index 0000000..50b6682 --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.cxx @@ -0,0 +1,83 @@ +// 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 "BNL_CC1pi0_Evt_1DWNpi_nu.h" + +//******************************************************************** +BNL_CC1pi0_Evt_1DWNpi_nu::BNL_CC1pi0_Evt_1DWNpi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1pi0 Event Rate 1D W(N pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{0}"); + fSettings.SetXTitle("W(N#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pi0_on_n/BNL_CC1pi0_WNpi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1pi0_Evt_1DWNpi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(111) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(111)->fP; + + double hadMass = (Pp+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1pi0_Evt_1DWNpi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.h b/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.h new file mode 100644 index 0000000..450ad50 --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWNpi_nu.h @@ -0,0 +1,36 @@ +// 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 . +*******************************************************************************/ + +#ifndef BNL_CC1PPI0_EVT_1DWNPI_NU_H_SEEN +#define BNL_CC1PPI0_EVT_1DWNPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1pi0_Evt_1DWNpi_nu : public Measurement1D { +public: + BNL_CC1pi0_Evt_1DWNpi_nu(nuiskey samplekey); + virtual ~BNL_CC1pi0_Evt_1DWNpi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.cxx b/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.cxx new file mode 100644 index 0000000..a586558 --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.cxx @@ -0,0 +1,83 @@ +// 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 "BNL_CC1pi0_Evt_1DWmupi_nu.h" + +//******************************************************************** +BNL_CC1pi0_Evt_1DWmupi_nu::BNL_CC1pi0_Evt_1DWmupi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1pi0 Event Rate 1D W(mu pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{0}"); + fSettings.SetXTitle("W(#mu#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pi0_on_n/BNL_CC1pi0_Wmupi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1pi0_Evt_1DWmupi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(111) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(111)->fP; + + double hadMass = (Pmu+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1pi0_Evt_1DWmupi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 111, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.h b/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.h new file mode 100644 index 0000000..eaab58a --- /dev/null +++ b/src/BNL/BNL_CC1pi0_Evt_1DWmupi_nu.h @@ -0,0 +1,36 @@ +// 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 . +*******************************************************************************/ + +#ifndef BNL_CC1PPI0_EVT_1DWMUPI_NU_H_SEEN +#define BNL_CC1PPI0_EVT_1DWMUPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1pi0_Evt_1DWmupi_nu : public Measurement1D { +public: + BNL_CC1pi0_Evt_1DWmupi_nu(nuiskey samplekey); + virtual ~BNL_CC1pi0_Evt_1DWmupi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.cxx b/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.cxx new file mode 100644 index 0000000..3bc4370 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.cxx @@ -0,0 +1,83 @@ +// 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 "BNL_CC1ppip_Evt_1DWNmu_nu.h" + +//******************************************************************** +BNL_CC1ppip_Evt_1DWNmu_nu::BNL_CC1ppip_Evt_1DWNmu_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1ppip Event Rate 1D W(N mu) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{+}"); + fSettings.SetXTitle("W(N#mu) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_p/BNL_CC1ppip_WNmu_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1ppip_Evt_1DWNmu_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + + double hadMass = (Pmu+Pp).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1ppip_Evt_1DWNmu_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.h b/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.h new file mode 100644 index 0000000..c755487 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWNmu_nu.h @@ -0,0 +1,36 @@ +// 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 . +*******************************************************************************/ + +#ifndef BNL_CC1PPIP_EVT_1DWNMU_NU_H_SEEN +#define BNL_CC1PPIP_EVT_1DWNMU_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1ppip_Evt_1DWNmu_nu : public Measurement1D { +public: + BNL_CC1ppip_Evt_1DWNmu_nu(nuiskey samplekey); + virtual ~BNL_CC1ppip_Evt_1DWNmu_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.cxx b/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.cxx new file mode 100644 index 0000000..64daf97 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.cxx @@ -0,0 +1,83 @@ +// 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 "BNL_CC1ppip_Evt_1DWNpi_nu.h" + +//******************************************************************** +BNL_CC1ppip_Evt_1DWNpi_nu::BNL_CC1ppip_Evt_1DWNpi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1ppip Event Rate 1D W(N pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{+}"); + fSettings.SetXTitle("W(N#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_p/BNL_CC1ppip_WNpi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1ppip_Evt_1DWNpi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pp = event->GetHMFSParticle(2212)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pp+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1ppip_Evt_1DWNpi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.h b/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.h new file mode 100644 index 0000000..5626c03 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWNpi_nu.h @@ -0,0 +1,36 @@ +// 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 . +*******************************************************************************/ + +#ifndef BNL_CC1PPIP_EVT_1DWNPI_NU_H_SEEN +#define BNL_CC1PPIP_EVT_1DWNPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1ppip_Evt_1DWNpi_nu : public Measurement1D { +public: + BNL_CC1ppip_Evt_1DWNpi_nu(nuiskey samplekey); + virtual ~BNL_CC1ppip_Evt_1DWNpi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.cxx b/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.cxx new file mode 100644 index 0000000..bf04364 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.cxx @@ -0,0 +1,83 @@ +// 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 "BNL_CC1ppip_Evt_1DWmupi_nu.h" + +//******************************************************************** +BNL_CC1ppip_Evt_1DWmupi_nu::BNL_CC1ppip_Evt_1DWmupi_nu(nuiskey samplekey) { +//******************************************************************** + + // Sample overview --------------------------------------------------- + std::string descrip = "BNL CC1ppip Event Rate 1D W(mu pi) nu sample. \n" \ + "Target: D2 \n" \ + "Flux: \n" \ + "Signal: \n"; + + // Setup common settings + fSettings = LoadSampleSettings(samplekey); + fSettings.SetDescription(descrip); + + fSettings.SetTitle("BNL #nu_mu CC1p#pi^{+}"); + fSettings.SetXTitle("W(#mu#pi) (GeV)"); + fSettings.SetYTitle("Number of events"); + fSettings.SetAllowedTypes("EVT/SHAPE/DIAG","EVT/SHAPE/DIAG"); + fSettings.DefineAllowedTargets("D,H"); + fSettings.DefineAllowedSpecies("numu"); + fSettings.SetEnuRange(0.0, 10); + + fSettings.SetDataInput( FitPar::GetDataBase() + "/BNL/CC1pip_on_p/BNL_CC1ppip_Wmupi_per_0.05GeV.txt" ); + + FinaliseSampleSettings(); + + // Scaling Setup --------------------------------------------------- + // ScaleFactor automatically setup for DiffXSec/cm2/Nucleon + fScaleFactor = GetEventHistogram()->Integral("width") / (fNEvents + 0.) * 2. / 1.; + + // Plot Setup ------------------------------------------------------- + SetDataFromTextFile( fSettings.GetDataInput() ); + SetPoissonErrors(); + SetCovarFromDiagonal(); + + // Final setup --------------------------------------------------- + FinaliseMeasurement(); + +}; + + +void BNL_CC1ppip_Evt_1DWmupi_nu::FillEventVariables(FitEvent *event) { + + if (event->NumFSParticle(2212) == 0 || + event->NumFSParticle(211) == 0 || + event->NumFSParticle(13) == 0) + return; + + TLorentzVector Pmu = event->GetHMFSParticle(13)->fP; + TLorentzVector Ppip = event->GetHMFSParticle(211)->fP; + + double hadMass = (Pmu+Ppip).Mag()/1000.; + + fXVar = hadMass; + + return; +}; + +bool BNL_CC1ppip_Evt_1DWmupi_nu::isSignal(FitEvent *event) { + return SignalDef::isCC1pi3Prong(event, 14, 211, 2212, EnuMin, EnuMax); +} + diff --git a/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.h b/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.h new file mode 100644 index 0000000..0324df4 --- /dev/null +++ b/src/BNL/BNL_CC1ppip_Evt_1DWmupi_nu.h @@ -0,0 +1,36 @@ +// 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 . +*******************************************************************************/ + +#ifndef BNL_CC1PPIP_EVT_1DWMUPI_NU_H_SEEN +#define BNL_CC1PPIP_EVT_1DWMUPI_NU_H_SEEN + +#include "Measurement1D.h" + +class BNL_CC1ppip_Evt_1DWmupi_nu : public Measurement1D { +public: + BNL_CC1ppip_Evt_1DWmupi_nu(nuiskey samplekey); + virtual ~BNL_CC1ppip_Evt_1DWmupi_nu() {}; + + void FillEventVariables(FitEvent *event); + bool isSignal(FitEvent *event); + + private: +}; + +#endif