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

ValidateDatacards.py does cannot read csv inputs. #284

Open
rymuelle opened this issue Nov 7, 2022 · 1 comment
Open

ValidateDatacards.py does cannot read csv inputs. #284

rymuelle opened this issue Nov 7, 2022 · 1 comment

Comments

@rymuelle
Copy link

rymuelle commented Nov 7, 2022


CMSSW: CMSSW_10_2_13

Higgs combine tool env:

  1. Branch: CMSSW_10_2_X
  2. Tag: v8.2.1 (for csv support)

CombineHarvester branch: master (last commit: 128e41e)


Example data cards and data:

https://gitlab.cern.ch/bff-zprime/exo-datacards/-/tree/EXO-22-006/EXO-22-006

Issue:
While running ValidateDatacards.py datacard.txt I receive this error:

[SetFlag] Changing value of flag "check-negative-bins-on-import" from 1 to 0
[SetFlag] Changing value of flag "workspaces-use-clone" from 0 to 1
Error in <TFile::Init>: 2017_shapes_df_input.csv not a ROOT file
Traceback (most recent call last):
  File "/afs/cern.ch/work/r/rymuelle/public/nanoAODzPrime/higgscombine/CMSSW_10_2_13/bin/slc7_amd64_gcc700/ValidateDatacards.py", line 110, in <module>
    cb.ParseDatacard(args.cards,"","",mass=args.mass)
  File "/afs/cern.ch/work/r/rymuelle/public/nanoAODzPrime/higgscombine/CMSSW_10_2_13/python/CombineHarvester/CombineTools/ch.py", line 21, in ParseDatacard
    return self.__ParseDatacard__(card, analysis, era, channel, bin_id, mass)
RuntimeError: 
*******************************************************************************
Context: Function ch::CombineHarvester::ParseDatacard at 
  /afs/cern.ch/work/r/rymuelle/public/nanoAODzPrime/higgscombine/CMSSW_10_2_13/src/CombineHarvester/CombineTools/src/CombineHarvester_Datacards.cc:131
Problem: Workspace not found in file
*******************************************************************************
Please report issues at
  https://github.com/cms-analysis/CombineHarvester/issues
*******************************************************************************

I appears like it expects a root file. A search through the documentation and github repo did not clearly show a solution.

@ajgilbert
Copy link
Collaborator

Unfortunately this isn't supported, as CombineHarvester has a different datacard parser from combine, and we didn't implement csv support there. In the short term the only option would be to convert to normal TH1 input first. In the longer term we'd like to unify the CH and combine datacard parsers, but this is a big project.

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