Skip to content

Conversation

@anpicci
Copy link

@anpicci anpicci commented Jul 21, 2025

Here are some changes to adapt EFTFitter.py to netapp

@anpicci anpicci requested a review from ywan2 July 21, 2025 20:47
@anpicci anpicci self-assigned this Jul 21, 2025
@anpicci anpicci requested a review from bryates August 6, 2025 20:31
Copy link
Contributor

@bryates bryates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anpicci. I left a few minor comments.

print("Loading operators from {fpath}".format(fpath=fpath))
jsn = open(fpath,'r').read()
operators = json.loads(jsn)
self.alloperators = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't removing this case errors? Since self.alloperators is set below in a if block, it could be skipped. Plus, self.alloperators.extend(operators[sig]) is called there, but we're not initializing self.alloperators as a list.

# if level=='err': logging.error(line.rstrip('\n'))

def __override_CMSSW_BASE(self):
"""If CMSSW_BASE points to an /afs/ path but cwd is under /users/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice function, but really people should be moving their CMSSW builds from /afs/. to /users/ and run scram b ProjectRename to fix the dependencies.


print(f"CMSSW_BASE after manipulation is {CMSSW_BASE}")

if not (workspace.startswith("/afs/") or workspace.startswith("/users/") or workspace.startswith("/scratch365/")):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just check for a leading / instead. I know this covers the basis on glados and lxplus, but if a file system doesn't use one of these three paths it could still cause issues.

```
text2workspace.py combinedcard.txt -o yourworkspacename.root -P EFTFit.Fitter.AnomalousCouplingEFTNegative:analiticAnomalousCouplingEFTNegative --X-allow-no-background --for-fits --no-wrappers --X-pack-asympows --optimize-simpdf-constraints=cms --PO selectedWCs=/path/to/your/selectedWCs.txt
text2workspace.py combinedcard.txt -o yourworkspacename.root -P EFTFit.Fitter.AnomalousCouplingEFTNegative:analyticAnomalousCouplingEFTNegative --X-allow-no-background --for-fits --no-wrappers --X-pack-asympows --optimize-simpdf-constraints=cms --PO selectedWCs=/path/to/your/selectedWCs.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update the README with IM?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants