From 640d25562cfd486b854f060a697201c2631300a4 Mon Sep 17 00:00:00 2001
From: Kamil <45295406+KSkwarczynski@users.noreply.github.com>
Date: Tue, 3 Mar 2026 13:02:21 +0000
Subject: [PATCH 1/2] Enhance README with PCA and Eigen Decomposition details
---
README.md | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/README.md b/README.md
index 696ae15..b95693b 100644
--- a/README.md
+++ b/README.md
@@ -316,6 +316,44 @@ General:
```
If you were to run a new MCMC with this configuration, you should see that `Norm_Param_0` does not move from its nominal position during the chain.
+
+(Detailed) Eigen Decomposition ‐ PCA
+
+PCA or Eigen Decomposition is turned off by default. PCA is being enabled based on the constructor. This is the default no PCA constructor.
+
+```cpp
+xsec = new ParameterHandlerGeneric({matrix.yaml}, "cov_name");
+```
+
+To enable it, code should look like it
+
+```cpp
+std::vector xsecCovMatrixFile = FitManager->raw()["General"]["Systematics"]["XsecCovFile"].as>();
+double PCAthreshold = 0.00001;
+xsec = new ParameterHandlerGeneric({matrix.yaml}, "cov_name", PCAthreshold);
+```
+
+This threshold indicates which Eigen value to remove and reduce fit dimensionality. If you set the threshold very low, you may not remove anything just to run with the decomposed matrix.
+
+
+
+It is also possible to decompose only part of the matrix
+
+```cpp
+std::vector xsecCovMatrixFile = FitManager->raw()["General"]["Systematics"]["XsecCovFile"].as>();
+double PCAthreshold = 0.00001;
+int FirstPCAdpar = 8;
+int LastPCAdpar = 108
+xsec = new ParameterHandlerGeneric({matrix.yaml}, "cov_name", PCAthreshold, FirstPCAdpar, LastPCAdpar) ;
+```
+
+This way parameters through 8-108 will be decomposed while 0-8 will be in undecomposed base.
+You can see the transition matrix between normal and Eigen base below:
+
+
+
+
+
## How to Develop New Samples
Analysis samples are where we compare data and simulation to extract our physics results. For example, you might have an analysis sample that is enriched in neutral-current pi0 events to precisely study NC-pi0 cross sections.
In this section, we will modify an existing analysis sample to explore how the inner workings of MaCh3 operate, and then see how to add a new one.
From e5c30b55b7211ce28a1984050ae689357d9cc754 Mon Sep 17 00:00:00 2001
From: Kamil <45295406+KSkwarczynski@users.noreply.github.com>
Date: Tue, 3 Mar 2026 13:18:11 +0000
Subject: [PATCH 2/2] happy now bot?
Updated image tags in README.md for better accessibility and clarity.
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index b95693b..ebcd141 100644
--- a/README.md
+++ b/README.md
@@ -335,7 +335,7 @@ xsec = new ParameterHandlerGeneric({matrix.yaml}, "cov_name", PCAthreshold);
This threshold indicates which Eigen value to remove and reduce fit dimensionality. If you set the threshold very low, you may not remove anything just to run with the decomposed matrix.
-
+
It is also possible to decompose only part of the matrix
@@ -347,10 +347,10 @@ int LastPCAdpar = 108
xsec = new ParameterHandlerGeneric({matrix.yaml}, "cov_name", PCAthreshold, FirstPCAdpar, LastPCAdpar) ;
```
-This way parameters through 8-108 will be decomposed while 0-8 will be in undecomposed base.
+This way parameters through 8-108 will be decomposed while 0-8 will be in undecomposed base.
You can see the transition matrix between normal and Eigen base below:
-
+