diff --git a/CIValidations/CovarianceValidations.cpp b/CIValidations/CovarianceValidations.cpp index 5591fa5..cca9974 100755 --- a/CIValidations/CovarianceValidations.cpp +++ b/CIValidations/CovarianceValidations.cpp @@ -40,8 +40,8 @@ int main(int argc, char *argv[]) xsec->setParameters(ParProp); xsec->acceptStep(); ///// Test Params from DetId ///// - const std::vector Det_Id = {1, 984, 985}; - for (int id = 0; id < kSystTypes; ++id) + const std::vector Det_Id = {"Tutorial Beam", "Tutorial ATM", "tutorial beam", "blarb" "ATM"}; + for (size_t id = 0; id < Det_Id.size(); ++id) { for (int s = 0; s < kSystTypes; ++s) { diff --git a/CIValidations/TestOutputs/CovarianceOut.txt b/CIValidations/TestOutputs/CovarianceOut.txt index dba81e5..8421730 100644 --- a/CIValidations/TestOutputs/CovarianceOut.txt +++ b/CIValidations/TestOutputs/CovarianceOut.txt @@ -1,16 +1,20 @@ Likelihood Xsec=0.351154 -Found 3 for 1 Params of type Norm -Found 5 for 1 Params of type Spline -Found 4 for 1 Params of type Functional -Found 3 for 1 From GetNormParsFromDetID -Found 3 for 984 Params of type Norm -Found 5 for 984 Params of type Spline -Found 4 for 984 Params of type Functional -Found 3 for 984 From GetNormParsFromDetID -Found 3 for 985 Params of type Norm -Found 5 for 985 Params of type Spline -Found 4 for 985 Params of type Functional -Found 3 for 985 From GetNormParsFromDetID +Found 3 for Tutorial Beam Params of type Norm +Found 5 for Tutorial Beam Params of type Spline +Found 4 for Tutorial Beam Params of type Functional +Found 3 for Tutorial Beam From GetNormParsFromDetID +Found 3 for Tutorial ATM Params of type Norm +Found 5 for Tutorial ATM Params of type Spline +Found 4 for Tutorial ATM Params of type Functional +Found 3 for Tutorial ATM From GetNormParsFromDetID +Found 3 for tutorial beam Params of type Norm +Found 5 for tutorial beam Params of type Spline +Found 4 for tutorial beam Params of type Functional +Found 3 for tutorial beam From GetNormParsFromDetID +Found 0 for blarbATM Params of type Norm +Found 0 for blarbATM Params of type Spline +Found 0 for blarbATM Params of type Functional +Found 0 for blarbATM From GetNormParsFromDetID Inv Cov Matrix for 0 and 0 is equal to=82.6446 Inv Cov Matrix for 0 and 1 is equal to=-0 Inv Cov Matrix for 0 and 2 is equal to=-0 diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b9e500..95a457b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ set(CMAKE_VERBOSE_MAKEFILE ON) # CMake version check cmake_minimum_required(VERSION 3.14 FATAL_ERROR) -SET(MaCh3Tutorial_VERSION 1.3.2) +SET(MaCh3Tutorial_VERSION 1.4.0) # Create project (todo: set configurable CUDA) project(MaCh3Tutorial VERSION ${MaCh3Tutorial_VERSION} LANGUAGES CXX) @@ -63,7 +63,7 @@ if(NOT DEFINED MaCh3_Branch) endif() #If MaCh3 was sourced find it, otherwise use CPM -#find_package(MaCh3 QUIET EXACT MaCh3Tutorial_VERSION) +#find_package(MaCh3 QUIET EXACT ${MaCh3Tutorial_VERSION}) if(NOT MaCh3_FOUND) diff --git a/Inputs/Osc_Test.yaml b/Inputs/Osc_Test.yaml index fbada03..5267d4a 100755 --- a/Inputs/Osc_Test.yaml +++ b/Inputs/Osc_Test.yaml @@ -7,7 +7,7 @@ Systematics: FancyName: sin2th_12 ParameterName: sin2th_12 - DetID: 984 + DetID: ["Tutorial *"] Error: 0.0129961532770277840 FlatPrior: false ParameterBounds: [0, 1] @@ -24,7 +24,7 @@ Systematics: FancyName: sin2th_23 ParameterName: sin2th_23 - DetID: 984 + DetID: ["Tutorial *"] Error: 0.021 FlatPrior: true ParameterBounds: [0, 1] @@ -41,7 +41,7 @@ Systematics: FancyName: sin2th_13 ParameterName: sin2th_13 - DetID: 984 + DetID: ["Tutorial *"] Error: 0.0007 FlatPrior: true ParameterBounds: [0, 1] @@ -58,7 +58,7 @@ Systematics: FancyName: delm2_12 ParameterName: delm2_12 - DetID: 984 + DetID: ["Tutorial *"] Error: 0.0000018 FlatPrior: false ParameterBounds: [-999, 999] @@ -75,7 +75,7 @@ Systematics: FancyName: delm2_23 ParameterName: delm2_23 - DetID: 984 + DetID: ["Tutorial *"] Error: 0.000034 FlatPrior: true ParameterBounds: [-999, 999] @@ -92,7 +92,7 @@ Systematics: FancyName: delta_cp ParameterName: delta_cp - DetID: 984 + DetID: ["Tutorial *"] Error: 6.28331122896200340 FlatPrior: true # It has special treatment as it is continuous param @@ -110,7 +110,7 @@ Systematics: FancyName: baseline ParameterName: baseline - DetID: 984 + DetID: ["Tutorial Beam"] Error: 1.0 FlatPrior: true ParameterBounds: [0, 999] @@ -127,7 +127,7 @@ Systematics: FancyName: density ParameterName: density - DetID: 984 + DetID: ["Tutorial Beam"] Error: 0.01 FlatPrior: true ParameterBounds: [0, 999] @@ -144,7 +144,7 @@ Systematics: FancyName: Ye ParameterName: Ye - DetID: 984 + DetID: ["Tutorial Beam"] Error: 0.001 FlatPrior: true ParameterBounds: [0, 999] diff --git a/Inputs/PCATest.yaml b/Inputs/PCATest.yaml index 1b6a29d..4966a64 100755 --- a/Inputs/PCATest.yaml +++ b/Inputs/PCATest.yaml @@ -17,7 +17,7 @@ Systematics: - b_7: '0.48619159418126073' - b_8: '0.49407392294957464' - b_9: '0.27270216972314404' - DetID: '1' + DetID: ["Tutorial *"] Error: '0.059243759525005685' KinematicCuts: - HornCurrent: [0.5, 1.5] @@ -48,7 +48,7 @@ Systematics: - b_7: '0.6363766022443161' - b_8: '0.6436654970393295' - b_9: '0.37257173123032966' - DetID: '1' + DetID: ["Tutorial *"] Error: '0.052534917752228155' KinematicCuts: - HornCurrent: [0.5, 1.5] @@ -79,7 +79,7 @@ Systematics: - b_7: '0.6361099941519401' - b_8: '0.7111552414980179' - b_9: '0.3809408100022248' - DetID: '1' + DetID: ["Tutorial *"] Error: '0.05293373520097801' KinematicCuts: - HornCurrent: [0.5, 1.5] @@ -110,7 +110,7 @@ Systematics: - b_7: '0.620095554502362' - b_8: '0.7780068069310814' - b_9: '0.3976387942751631' - DetID: '1' + DetID: ["Tutorial *"] Error: '0.05145497551998185' KinematicCuts: - HornCurrent: [0.5, 1.5] @@ -141,7 +141,7 @@ Systematics: - b_7: '0.5169026277364072' - b_8: '0.6804627678149072' - b_9: '0.4301371250858676' - DetID: '1' + DetID: ["Tutorial *"] Error: '0.07381951635860204' KinematicCuts: - HornCurrent: [0.5, 1.5] @@ -172,7 +172,7 @@ Systematics: - b_7: '0.5535800561827778' - b_8: '0.5054211016174668' - b_9: '0.40696262517009857' - DetID: '1' + DetID: ["Tutorial *"] Error: '0.0875849864515004' KinematicCuts: - HornCurrent: [0.5, 1.5] @@ -203,7 +203,7 @@ Systematics: - b_7: '0.7790841764941654' - b_8: '0.5630092548705312' - b_9: '0.6009864264160337' - DetID: '1' + DetID: ["Tutorial *"] Error: '0.06983573708919912' KinematicCuts: - HornCurrent: [0.5, 1.5] @@ -234,7 +234,7 @@ Systematics: - b_7: '1.0' - b_8: '0.8494242119047807' - b_9: '0.684018671339497' - DetID: '1' + DetID: ["Tutorial *"] Error: '0.04979912201292179' KinematicCuts: - HornCurrent: [0.5, 1.5] @@ -264,7 +264,7 @@ Systematics: - b_7: '0.8494242119047807' - b_8: '1.0' - b_9: '0.7440340603749211' - DetID: '1' + DetID: ["Tutorial *"] Error: 0.05020509536942895 KinematicCuts: - HornCurrent: [0.5, 1.5] @@ -294,7 +294,7 @@ Systematics: - b_7: '0.684018671339497' - b_8: '0.7440340603749211' - b_9: '1.0' - DetID: '1' + DetID: ["Tutorial *"] Error: 0.07016589681893176 KinematicCuts: - HornCurrent: [0.5, 1.5] diff --git a/Inputs/SamplePDF_Tutorial.yaml b/Inputs/SamplePDF_Tutorial.yaml index 4da86b1..f7cd8ee 100755 --- a/Inputs/SamplePDF_Tutorial.yaml +++ b/Inputs/SamplePDF_Tutorial.yaml @@ -15,7 +15,7 @@ InputFiles: # No Splines splineprefix: "Inputs/MC/BinnedSplinesTutorialInputs" splinesuffix: "2D.root" -DetID: 1 +DetID: "Tutorial Beam" NuOsc: NuOscConfigFile: "Inputs/NuOscillator/NuFASTLinear.yaml" diff --git a/Inputs/SystematicModel.yaml b/Inputs/SystematicModel.yaml index 5ecd107..7ed5785 100755 --- a/Inputs/SystematicModel.yaml +++ b/Inputs/SystematicModel.yaml @@ -15,7 +15,7 @@ Systematics: ParameterValues: Generated: 1. PreFitValue: 1. - DetID: 985 + DetID: ["Tutorial *"] StepScale: MCMC: 0.2 Type: Norm @@ -35,7 +35,7 @@ Systematics: ParameterValues: Generated: 1. PreFitValue: 1. - DetID: 985 + DetID: ["Tutorial *"] StepScale: MCMC: 0.2 Type: Norm @@ -57,7 +57,7 @@ Systematics: ParameterValues: Generated: 1. PreFitValue: 1. - DetID: 985 + DetID: ["Tutorial *"] StepScale: MCMC: 0.2 Type: Norm @@ -78,7 +78,7 @@ Systematics: Mode: [0] InterpolationType: TSpline3 SplineName: mysyst1 - DetID: 985 + DetID: ["Tutorial *"] StepScale: MCMC: 0.2 Type: Spline @@ -99,7 +99,7 @@ Systematics: Mode: [2] InterpolationType: Linear SplineName: mysyst2 - DetID: 985 + DetID: ["Tutorial *"] StepScale: MCMC: 0.2 Type: Spline @@ -120,7 +120,7 @@ Systematics: Mode: [1] InterpolationType: Monotonic SplineName: mysyst3 - DetID: 985 + DetID: ["Tutorial *"] StepScale: MCMC: 0.2 Type: Spline @@ -141,7 +141,7 @@ Systematics: Mode: [9] InterpolationType: Akima SplineName: mysyst4 - DetID: 985 + DetID: ["Tutorial *"] StepScale: MCMC: 0.2 Type: Spline @@ -162,7 +162,7 @@ Systematics: Mode: [0] InterpolationType: Linear SplineName: mysyst5 - DetID: 985 + DetID: ["Tutorial *"] StepScale: MCMC: 0.2 Type: Spline @@ -184,7 +184,7 @@ Systematics: - Func_Param_3: 0.653 StepScale: MCMC: 0.2 - DetID: 985 + DetID: ["Tutorial *"] Type: Functional - Systematic: @@ -205,7 +205,7 @@ Systematics: - Func_Param_3: 0.778 StepScale: MCMC: 0.2 - DetID: 985 + DetID: ["Tutorial *"] Type: Functional - Systematic: @@ -226,7 +226,7 @@ Systematics: - Func_Param_3: 0.870 StepScale: MCMC: 0.2 - DetID: 985 + DetID: ["Tutorial *"] Type: Functional - Systematic: @@ -247,5 +247,5 @@ Systematics: - Func_Param_1: 0.778 StepScale: MCMC: 0.2 - DetID: 985 + DetID: ["Tutorial *"] Type: Functional diff --git a/samplePDF/samplePDFTutorial.cpp b/samplePDF/samplePDFTutorial.cpp index 0e8fba0..b1d6b56 100755 --- a/samplePDF/samplePDFTutorial.cpp +++ b/samplePDF/samplePDFTutorial.cpp @@ -209,7 +209,6 @@ void samplePDFTutorial::setupFDMC(int iSample) { auto &fdobj = MCSamples[iSample]; fdobj.signal = tutobj->signal; - fdobj.SampleDetID = SampleDetID; for(int iEvent = 0 ;iEvent < fdobj.nEvents ; ++iEvent) { fdobj.rw_etru[iEvent] = &(tutobj->TrueEnu[iEvent]);