From f1e82e1d62f047d62b4564017cc2e63d59d13abf Mon Sep 17 00:00:00 2001
From: Yizhou Cai <yizhou.cai@cern.ch>
Date: Tue, 30 Jan 2024 22:01:25 +0100
Subject: [PATCH] improve WS modifier

---
 quickstats/components/workspaces/xml_ws_modifier.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/quickstats/components/workspaces/xml_ws_modifier.py b/quickstats/components/workspaces/xml_ws_modifier.py
index e1a6396f..82546c9d 100644
--- a/quickstats/components/workspaces/xml_ws_modifier.py
+++ b/quickstats/components/workspaces/xml_ws_modifier.py
@@ -611,7 +611,7 @@ class XMLWSModifier(XMLWSBase):
                 self.stdout.warning(f"The nuisance parameter {nuis_name} no longer exists in "
                                     "the new workspace. It will be removed from the new ModelConfig.")
                 continue
-            if nuis.isConstant():
+            if nuis.isConstant() and nuis not in pois:
                 self.stdout.warning(f"The nuisace parameter {nuis_name} is initialized as a constant. "
                                     "It will be floated in the new workspace.")
                 nuis.setConstant(False)
-- 
GitLab