Issue with analyse_final.py

Hi,

I am having an issue when I run my analyse_final.py file, which is reproduced below.

I am running fccanalyses using the older protocol (vCERN2022) from a few weeks ago to analyse FCC-hh samples from the fcc_v04 database using:

fccanalysis run analysis_stage1.py

I then do:

fccanalysis final analysis_final.py 

and my error is:

[rlemmon@lxplus751 hh_bbtautau]$ fccanalysis final analysis_final.py
----> Info: Loading analyzers from libFCCAnalyses...
TUnixSystem::SetDisplay:0: RuntimeWarning: DISPLAY not set, setting it to host-2-100-222-76.as13285.net:0.0
----> Info: Loading analysis file:
      /afs/cern.ch/work/r/rlemmon/hh_bbtautau/analysis_final.py
----> Error: During the execution of the final stage file:
      /afs/cern.ch/work/r/rlemmon/hh_bbtautau/analysis_final.py
      exception occurred:
Expecting value: line 2 column 1 (char 1)
[rlemmon@lxplus751 hh_bbtautau]$

Again, it is not clear to me what the problem is especially because I have commented out most of the analysis_final.py so far …

Cheers
Roy

******************** analysis_final.py *************************

#Input directory where the files produced at the stage1 level are
inputDir = "output_stage1"

#Output directory where the files produced at the final-selection level are
outputDir  = "final"

#Integrated luminosity for scaling number of events (required only if setting doScale to true)
#intLumi = 150e6 #pb^-1
intLumi = 30e6 #pb^-1

#Scale event yields by intLumi and cross section (optional)
doScale = True

#Save event yields in a table (optional)
#saveTabular = True

processList = {
    #run over the full statistics from stage1
    'pwp8_pp_hh_lambda100_5f_hhbbaa':{},
#    'mgp8_pp_bbtata_QED':{},
#    'mgp8_pp_bbtata_QCDQED':{},
#    'mgp8_pp_tt012j_5f':{},
}

#Link to the dictonary that contains all the cross section information etc...
procDict = "FCChh_procDict_fcc_v04.json"

#Number of CPUs to use
nCPUS = 2

#produces ROOT TTrees, default is False
doTree = False

###Dictionnay of the list of cuts. The key is the name of the selection that will be added to the output file
cutList = {
#    "sel0":"seljet_pT.size()>6",
}

###Dictionary for prettier names of cuts (optional)
#cutLabels = {
#    "sel0": "At least 7 jets with pT$>$50 GeV",
#}

###Optinally Define new variables
#defineList = {"seljet_pT_0":"seljet_pT.at(0)",
#               "seljet_pT_1":"seljet_pT.at(1)",
#               "seljet_pT_2":"seljet_pT.at(2)",
#               "seljet_pT_3":"seljet_pT.at(3)",
#               "seljet_pT_4":"seljet_pT.at(4)",
#               "seljet_pT_5":"seljet_pT.at(5)"}

###Dictionary for the ouput variable/hitograms. The key is the name of the variable in the output files. "name" is the name of the variable in the input file, "title" is the x-axis label of the histogram, "bin" the number of bins of the histogram, "xmin" the minimum x-axis value and "xmax" the maximum x-axis value.
histoList = {
#    "jet_pt_0":{"name":"seljet_pT_0","title":"Leading jet p_{T} [GeV]","bin":100,"xmin":0,"xmax":4000},
#    "jet_pt_1":{"name":"seljet_pT_1","title":"Sub leading jet p_{T} [GeV]","bin":100,"xmin":0,"xmax":4000},
#    "jet_pt_2":{"name":"seljet_pT_2","title":"3rd jet p_{T} [GeV]","bin":100,"xmin":0,"xmax":4000},
#    "jet_pt_3":{"name":"seljet_pT_3","title":"4th jet p_{T} [GeV]","bin":100,"xmin":0,"xmax":4000},
#    "jet_pt_4":{"name":"seljet_pT_4","title":"5th jet p_{T} [GeV]","bin":100,"xmin":0,"xmax":4000},
#    "jet_pt_5":{"name":"seljet_pT_5","title":"6th jet p_{T} [GeV]","bin":100,"xmin":0,"xmax":4000},
}

Hello @rlemmon,

The input file FCChh_procDict_fcc_v04.json storing the procDicts, which is downloaded/opened in the background appears to be corrupted.

While we investigate the cause, I temporarily restored it here:

procDict = "https://fcc-physics-events.web.cern.ch/fcc-physics-events/data/FCCDicts/FCChh_procDict_fcc_v04.json"

Can you try to use it instead of the one you have now?

Best,
Juraj

Hi Juraj,

Ok. I used the procDict that you gave me (again I should have realised where this was) and it all works reasonably now.

Let me know when you know why the one I was using is corrupted.

Cheers
Roy

Hi,

The solution worked when I ran:

fccanalysis final analysis_final.py

on Friday last week. However today it doesn’t work again and gives the same error as before. Presumably it is related to the same procDict file as before but I previously replaced it with the one you gave me, i.e. :

procDict = “https://fcc-physics-events.web.cern.ch/fcc-physics-events/data/FCCDicts/FCChh_procDict_fcc_v04.json

But this file seems to be empty now ? Has this file been changed ?

Cheers
Roy

Hi @rlemmon ,
In case its helpful here- I had that problem when I was setting this off, and made my own local file instead which is at:
procDict = “/afs/cern.ch/work/w/williams/public/FCChh-tutorial/FCCAnalyses/FCChh_procDict_fcc_v04.json”
Maybe try that? It would be good to get the central dictionary fixed though! I did put a post about that on another thread.
Best wishes,
Sarah

Hi,

I will try that, though that might be the original one which they said was corrupted somehow. See above on this thread.

Cheers
Roy

Hi @rlemmon ,
This one I made by hand and tested- it should work :slight_smile:
Sarah

Hi,

I copy it across (and look to check) and put in the full address in analysis_final.py:

procDict = “/afs/cern.ch/work/r/rlemmon/hh_bbtautau/FCChh_procDict_fcc_v04.json”

But then it seems to add something else to the link now !

[rlemmon@lxplus747 hh_bbtautau]$ fccanalysis final analysis_final.py
----> Info: Loading analyzers from libFCCAnalyses…
TUnixSystem::SetDisplay:0: RuntimeWarning: DISPLAY not set, setting it to host-2-100-222-76.as13285.net:0.0
----> Info: Loading analysis file:
/afs/cern.ch/work/r/rlemmon/hh_bbtautau/analysis_final.py
----> No procDict found: ===/cvmfs/fcc.cern.ch/FCCDicts//afs/cern.ch/work/r/rlemmon/hh_bbtautau/FCChh_procDict_fcc_v04.json===, exit

Does it still work for you ?

Cheers
Roy

Dear @rlemmon & @williams,

the procDict FCChh_procDict_fcc_v04.json should be again available and valid.
Both from the CVMFS location and also from the web location.

Can you try to using it?

Best,
Juraj