Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segmentation violation Error using partialCorrelationEdit.py script #247

Open
setesami opened this issue Dec 9, 2020 · 2 comments
Open

Comments

@setesami
Copy link

setesami commented Dec 9, 2020

Hello,
I have installed the latest version of combine tool and CombineHarvester and I tried the "partialCorrelationEdit.py" script using one of the simple shape Datacard examples in the
CMSSW_10_2_13/src/HiggsAnalysis/CombinedLimit/data/benchmarks/shapes/simple-shapes-TH1.txt

with the following command
python ../../../../../CombineHarvester/CombineTools/scripts/partialCorrelationEdit.py simple-shapes-TH1.txt -m 125 --process lumi,0.6
but I always get the segmentation violation Error at the last stage of the script[1]. I also tried with different datacards but always get the same problem. could you please let me know if I am missing something or there is an issue with the script?
Thanks
Mohsen

[1][SetFlag] Changing value of flag "workspace-uuid-recycle" from 1 to 1
[SetFlag] Changing value of flag "workspaces-use-clone" from 0 to 1
[SetFlag] Changing value of flag "import-parameter-err" from 1 to 0
[SetFlag] Changing value of flag "zero-negative-bins-on-import" from 0 to 0
[SetFlag] Changing value of flag "check-negative-bins-on-import" from 1 to 0

Setting correlation coefficient of lumi to 0.600000
The following systematics will be cloned and adjusted:


mass analysis era channel bin id process sig nuisance type value sh_d sh_u

125 1 0 signal 1 lumi lnN 1.1 0 0
125 1 0 background 0 lumi lnN 1 0 0

Writing new card and ROOT file: ('decorrelated_card.txt', 'decorrelated_card.shapes.root')

*** Break *** segmentation violation

@adewit
Copy link
Collaborator

adewit commented Dec 9, 2020

Hi Mohsen,
Thanks for reporting. We need to make some changes to the CardWriter to fix this - in the meantime can you change the last line: https://github.com/cms-analysis/CombineHarvester/blob/master/CombineTools/scripts/partialCorrelationEdit.py#L81
from
cb.WriteDatacard(args.output_txt, args.output_root)
To these 2 lines:

outputfile = ROOT.TFile(args.output_root, 'recreate')
cb.WriteDatacard(args.output_txt, outputfile)

It should then not seg fault.

(We'll make this change in the central CombineHarvester version as well, but probably not until a bit later)

Best,
Adinda

@setesami
Copy link
Author

setesami commented Dec 9, 2020

Thank you very much Adinda. It works perfectly now.

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

No branches or pull requests

2 participants