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

Why combining cards two times? #45

Open
ram1123 opened this issue Jun 13, 2022 · 0 comments
Open

Why combining cards two times? #45

ram1123 opened this issue Jun 13, 2022 · 0 comments
Labels
enhancement New feature or request LongTerm

Comments

@ram1123
Copy link
Collaborator

ram1123 commented Jun 13, 2022

The combination of cards for each channels and bins are duplicated in two functions in module runHZZFiducialXS.py.

The first function where this is done is createAsimov(), here:

for fState in fStates:
"""Combine cards for all bins corresponding to each final state.
"""
# if (nBins>1):
cmd = 'combineCards.py '
for obsBin in range(nBins):
cmd = cmd + 'hzz4l_'+fState+'S_13TeV_xs_'+obsName.replace(' ','_')+'_bin'+str(obsBin)+'_'+physicalModel+'.txt '
cmd = cmd + '> hzz4l_'+fState+'S_13TeV_xs_'+obsName.replace(' ','_')+'_bin_'+physicalModel+'.txt' # Output combine card name
processCmd(cmd, get_linenumber(), os.path.basename(__file__), 1)
# combine 3 final state cards
cmd = 'combineCards.py hzz4l_4muS_13TeV_xs_'+obsName.replace(' ','_')+'_bin_'+physicalModel+'.txt hzz4l_4eS_13TeV_xs_'+obsName.replace(' ','_')+'_bin_'+physicalModel+'.txt hzz4l_2e2muS_13TeV_xs_'+obsName.replace(' ','_')+'_bin_'+physicalModel+'.txt > hzz4l_all_13TeV_xs_'+obsName.replace(' ','_')+'_bin_'+physicalModel+'.txt'

Later, exactly same patch we can find in function extractResults : here

for fState in fStates:
cmd = 'combineCards.py '
for bin in range(nBins):
cmd = cmd+'hzz4l_'+fState+'S_13TeV_xs_'+obsName.replace(' ','_')+'_bin'+str(bin)+'_'+physicalModel+'.txt '
cmd = cmd + '> hzz4l_'+fState+'S_13TeV_xs_'+obsName.replace(' ','_')+'_bin_'+physicalModel+'.txt'
processCmd(cmd, get_linenumber(), os.path.basename(__file__), 1)
cmd = 'combineCards.py hzz4l_4muS_13TeV_xs_'+obsName.replace(' ','_')+'_bin_'+physicalModel+'.txt hzz4l_4eS_13TeV_xs_'+obsName.replace(' ','_')+'_bin_'+physicalModel+'.txt hzz4l_2e2muS_13TeV_xs_'+obsName.replace(' ','_')+'_bin_'+physicalModel+'.txt > hzz4l_all_13TeV_xs_'+obsName.replace(' ','_')+'_bin_'+physicalModel+'.txt'

This can be improved.

@ram1123 ram1123 added enhancement New feature or request LongTerm labels Jun 13, 2022
@ram1123 ram1123 added this to the Framework improvement milestone Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request LongTerm
Projects
None yet
Development

No branches or pull requests

1 participant