Skip to content

Commit

Permalink
Merge pull request #106 from clementhelsens/spring2021
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
clementhelsens authored May 25, 2021
2 parents bc8aa9c + bea5349 commit b8fd2ee
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 20 deletions.
35 changes: 19 additions & 16 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
{
"creators": [
{
"affiliation": "CERN",
"name": "Helsens, Clement",
"orcid": "0000-0002-9243-7554"
},
{
"affiliation": "CERN",
"name": "Perez, Emmanuel",
},
{
"affiliation": "CERN",
"name": "Selvaggi, Michele",
}

],
"creators": [
{
"affiliation": "CERN",
"name": "Helsens, Clement",
"orcid": "0000-0002-9243-7554"
},
{
"affiliation": "CERN",
"name": "Perez, Emmanuel",
"orcid": "0000-0002-7359-9689"

},
{
"affiliation": "CERN",
"name": "Selvaggi, Michele",
"orcid": "0000-0002-5144-9655"
}

],
"keywords": [
"monte carlo",
"generator",
Expand Down
31 changes: 28 additions & 3 deletions common/makeSampleList.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ def addEntry(self, process, yaml_lhe, yaml_reco, xsec, kf, heppyFile, procDict,p
processhad=process
if 'mgp8_' in process:
processhad=process.replace('mgp8_','mg_')
elif 'wzp6_' in process:
processhad=process.replace('wzp6_','wz_')
elif 'wzp8_' in process:
processhad=process.replace('wzp8_','wz_')
elif 'pwp8_' in process:
processhad=process.replace('pwp8_','pw_')


if proc_param!='':
processhad=proc_param.replace('mgp8_','mg_')

Expand All @@ -34,7 +42,7 @@ def addEntry(self, process, yaml_lhe, yaml_reco, xsec, kf, heppyFile, procDict,p

if not ut.file_exist(yaml_lhe):
print ('no merged file lhe for process %s continue'%process)
sys.exit(3)
#sys.exit(3)
return 1.0


Expand Down Expand Up @@ -77,7 +85,15 @@ def addEntry(self, process, yaml_lhe, yaml_reco, xsec, kf, heppyFile, procDict,p
heppyFile.write(" '/{}/{}',\n".format(yreco['merge']['outdir'],f[0].replace('.lhe.gz','.root')))
else:
heppyFile.write(" '/{}{}',\n".format(yreco['merge']['outdir'],f[0].replace('.lhe.gz','.root')))

if any(f[0].replace('.stdhep.gz','') in s[0] for s in yreco['merge']['outfiles']):
nlhe+=int(f[1])
if yreco['merge']['outdir'][-1]!='/':
heppyFile.write(" '/{}/{}',\n".format(yreco['merge']['outdir'],f[0].replace('.stdhep.gz','.root')))
else:
heppyFile.write(" '/{}{}',\n".format(yreco['merge']['outdir'],f[0].replace('.stdhep.gz','.root')))


heppyFile.write(']\n')
heppyFile.write(')\n')
heppyFile.write('\n')
Expand Down Expand Up @@ -137,13 +153,13 @@ def addEntryPythia(self,process, xsec, kf, yamldir_reco, heppyFile, procDict):
if nweights==0: nweights=nmatched
entry = ' "{}": {{"numberOfEvents": {}, "sumOfWeights": {}, "crossSection": {}, "kfactor": {}, "matchingEfficiency": {}}},\n'.format(process, nmatched, nweights, xsec, kf, matchingEff)
print ('N: {}, Nw:{}, xsec: {} , kf: {} pb, eff: {}'.format(nmatched, nweights, xsec, kf, matchingEff))
print ('entry : ',entry)
procDict.write(entry)
return matchingEff

#_______________________________________________________________________________________________________
def makelist(self):

yamldir_lhe=self.para.yamldir+'lhe/'
yamldir_reco=self.para.yamldir+self.version+'/'+self.detector+'/'

nmatched = 0
Expand All @@ -168,7 +184,11 @@ def makelist(self):
for l in ldir:
processhad=None
process=l

if 'mgp8_' in process or 'pwp8_' in process:
yamldir_lhe=self.para.yamldir+'lhe/'
elif 'wzp6_' in process or 'wzp8_' in process or 'wz_' in process :
yamldir_lhe=self.para.yamldir+'stdhep/'

yaml_reco=yamldir_reco+'/'+l+'/merge.yaml'
if not ut.file_exist(yaml_reco):
print ('no merged yaml for process %s continue'%l)
Expand All @@ -183,6 +203,11 @@ def makelist(self):
processhad=process.replace('mgp8_','mg_')
elif 'pwp8_' in process:
processhad=process.replace('pwp8_','pw_')
elif 'wzp6_' in process:
processhad=process.replace('wzp6_','wz_')
elif 'wzp8_' in process:
processhad=process.replace('wzp8_','wz_')

else: processhad=process
# maybe this was a decayed process, so it cannot be found as such in in the param file
br = 1.0
Expand Down
2 changes: 1 addition & 1 deletion config/param_FCCee.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#stat
lhe_stat = "/afs/cern.ch/user/h/helsens/www/data/FCCee/statlhe.html"
delphes_stat = "/afs/cern.ch/user/h/helsens/www/data/FCCee/statdelphesVERSION_DETECTOR.html"
stdhep_stat = "/afs/cern.ch/user/e/eperez/www/data/FCCee/statstdhep.html"
stdhep_stat = "/afs/cern.ch/user/h/helsens/www/data/FCCee/statstdhep.html"


#web
Expand Down

0 comments on commit b8fd2ee

Please sign in to comment.