cms-analysis / CombineHarvester

CMSSW package for the creation, editing and analysis of combine datacards and workspaces
cms-analysis.github.io/CombineHarvester/
15 stars 180 forks source link

ValidateDatacards.py cannot read Datacards which have one root file for each systematic #245

Open Andrej-CMS opened 4 years ago

Andrej-CMS commented 4 years ago

Hello,

As the title says: I have a datacard with one root file per systematic (70 systematics total). This would take hours to hadd into one file and I would not like to do that. text2workspace can read such datacards without any problem and create a workspace, but ValidateDatacards.py seems not be able to do that and prints the error below.

Is it possible to add this functionality?

Kind regards, Andrej

[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 : input: ../../../miniTreeHistograms/MergedTrees/miniTree$SYSTEMATIC.root, output: ../../../miniTreeHistograms/MergedTrees/miniTree$SYSTEMATIC.root Error in : error expanding path ../../../miniTreeHistograms/MergedTrees/miniTree$SYSTEMATIC.root Traceback (most recent call last): File "/nfs/dust/cms/user/asaibel/PhDWorkFolder/HiggsCombineTool/SL7/CMSSW_10_2_13/bin/slc7_amd64_gcc700/ValidateDatacards.py", line 110, in cb.ParseDatacard(args.cards,"","",mass=args.mass) File "/nfs/dust/cms/user/asaibel/PhDWorkFolder/HiggsCombineTool/SL7/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::GetClonedTH1 at /nfs/dust/cms/user/asaibel/PhDWorkFolder/HiggsCombineTool/SL7/CMSSW_10_2_13/src/CombineHarvester/CombineTools/src/TFileIO.cc:21 Problem: TH1 Nominal/combined/GreaterThreeBTag/DeltaRbin1/GreaterThreeJet/data_obs/jet4_btag not found in ../../../miniTreeHistograms/MergedTrees/miniTree$SYSTEMATIC.root

Andrej-CMS commented 3 years ago

@adewit Are there any plans to change this behavior? The hadding of the files takes really forever

adewit commented 3 years ago

Hi Andrej,

Sorry for not replying earlier. CombineHarvester is indeed not able to parse such datacards at the moment. This functionality can probably be added, but it's not a small amount of work and as (so far) this is the only analysis we know of that requires this feature we can't promise a fix on a short timescale.