Skip to content

Commit

Permalink
Merge pull request #100 from mach3-software/feature_PlotKinemDistr
Browse files Browse the repository at this point in the history
feat: Kinem Distribution
  • Loading branch information
KSkwarczynski authored Feb 21, 2025
2 parents 67ffee3 + 7ee4cf8 commit a39cf63
Show file tree
Hide file tree
Showing 19 changed files with 164,350 additions and 164,254 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/BumpVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# Checkout the MaCh3Tutorial repository
- name: Checkout MaCh3Tutorial repository
run: |
git clone https://${{ secrets.MACH3_VALIDATIONS_PAT }}@github.com/mach3-software/MaCh3Tutorial.git MaCh3Tutorial
git clone "https://${{ secrets.MACH3_VALIDATIONS_PAT }}@github.com/mach3-software/MaCh3Tutorial.git" MaCh3Tutorial
# Extract the MaCh3Tutorial version from CMakeLists.txt
- name: Get MaCh3Tutorial version
Expand All @@ -46,15 +46,16 @@ jobs:
if [ "$MaCh3_VERSION" != "$MaCh3Tutorial_VERSION" ]; then
echo "Versions are different. Creating a new branch in MaCh3Tutorial."
cd MaCh3Tutorial
git checkout -b update_version_${MaCh3_VERSION}
git checkout -b "update_version_${MaCh3_VERSION}"
# Update the MaCh3Tutorial_VERSION in CMakeLists.txt
sed -i "s/SET(MaCh3Tutorial_VERSION .*)/SET(MaCh3Tutorial_VERSION ${MaCh3_VERSION})/" CMakeLists.txt
sed -i "s/^project(MaCh3Tutorial VERSION [^ ]* LANGUAGES CXX)$/project(MaCh3Tutorial VERSION \"${MaCh3_VERSION}\" LANGUAGES CXX)/" CMakeLists.txt
git status
git diff
# Commit the changes
git add CMakeLists.txt
git add "CMakeLists.txt"
git commit -m "Bump MaCh3Tutorial_VERSION to ${MaCh3_VERSION}"
git push origin update_version_${MaCh3_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion CIValidations/LLHValidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int main(int argc, char *argv[])

for (int j = 1; j <= hist->GetNbinsX(); ++j) {
double binContent = hist->GetBinContent(j);
outFile << "Dial " << Names[i] << " bin = " << j << " content = " << std::fixed << std::setprecision(6) << binContent << std::endl;
outFile << "Dial " << Names[i] << " bin = " << j << " content = " << std::fixed << std::setprecision(6) << std::fabs(binContent) << std::endl;
}
}
outFile.close();
Expand Down
1 change: 1 addition & 0 deletions CIValidations/MaCh3CLI
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ run_reweight_validations() {
./CIValidations/SplineValidations
./CIValidations/SamplePDFValidations
./CIValidations/LLHValidation
${MaCh3_ROOT}/bin/KinemDistributionTutorial ${MaCh3_ROOT}/TutorialConfigs/FitterConfig.yaml
./CIValidations/NuOscillatorInterfaceValidations
}

Expand Down
10 changes: 10 additions & 0 deletions CIValidations/MaCh3ModeValidations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ int main(int argc, char *argv[])
outFile << "GetMode for CC2p2h = " << Modes->GetMode("CC2p2h") << std::endl;
outFile << "GetMode for Test = " << Modes->GetMode("Test") << std::endl;

outFile << "SplineSuffixFromMaCh3Mode for 1 = " << Modes->GetSplineSuffixFromMaCh3Mode(1) << std::endl;
outFile << "SplineSuffixFromMaCh3Mode for 2 = " << Modes->GetSplineSuffixFromMaCh3Mode(2) << std::endl;
outFile << "SplineSuffixFromMaCh3Mode for 10 = " << Modes->GetSplineSuffixFromMaCh3Mode(10) << std::endl;
outFile << "SplineSuffixFromMaCh3Mode for 60 = " << Modes->GetSplineSuffixFromMaCh3Mode(60) << std::endl;

outFile << "IsMaCh3ModeNC for 1 = " << Modes->IsMaCh3ModeNC(1) << std::endl;
outFile << "IsMaCh3ModeNC for 2 = " << Modes->IsMaCh3ModeNC(2) << std::endl;
outFile << "IsMaCh3ModeNC for 10 = " << Modes->IsMaCh3ModeNC(10) << std::endl;
outFile << "IsMaCh3ModeNC for 60 = " << Modes->IsMaCh3ModeNC(60) << std::endl;

outFile << "GetNModes = " << Modes->GetNModes() << std::endl;

outFile.close();
Expand Down
2 changes: 1 addition & 1 deletion CIValidations/Scripts/CreateBinnedSplineFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void CreateBinnedSplineFile(){
//Let's try out 5 systematics
//This gives us a total of 5*10*10*5 = 2500 splines
std::vector<int> SystematicKnots = {5, 7, 7, 2, 3};//, 7, 2, 7, 7, 7};
std::vector<std::vector<std::string>> SystematicModeNames = {{"ccqe"}, {"cc1pipm"}, {"2p2h"}, {"other"}, {"ccqe"}};
std::vector<std::vector<std::string>> SystematicModeNames = {{"ccqe"}, {"cc1pipm"}, {"2p2h"}, {"ccmultipi"}, {"ccdis"}};
//Values to centre the gaussian response on
std::vector<double> SystematicMeanResponse = {1.0, 2.0, 1.0, 1.5, 1.0};
std::vector<int> SystematicNominalKnot = {3, 4, 4, 1, 2};
Expand Down
Loading

0 comments on commit a39cf63

Please sign in to comment.