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

Dynamic padding of columns in datacard txt files #258

Closed ktht closed 3 years ago

ktht commented 3 years ago

Makes the datacard text files a bit more human-readable. I briefly considered precomputing the string lengths and storing them in a map, but I don't think it matters too much in practice. (The feature is implemented in our fork but I figured that it's useful enough to have in upstream as well.)

adewit commented 3 years ago

Thanks for the development - in some cases will this not make the datacards less readable though? If I understand correctly you're not enforcing a minimum column width, so let's say you have a process called DYJets - that would give a 6-character wide column. If you want to assign an asymmetric lnN to this process, something like 0.98/1.01 that's 3 characters more than the column width based on the process name, so at this point the alignment will break, right? Maybe you can add a minimum of 10 characters? (the maximum doesn't have to be the same as the original default width, of course)