Closed kpedro88 closed 6 years ago
Hi @kpedro88, I merged your changes, but I am trying to test it in a simple config and I am getting errors about postFix names. Can you send me the snap of the toolbox that you test for the EnergyCorrFunc? After I test this, I will create a first preliminary tag and put it in the twiki. cheers,
@alefisico, my setup is the following: https://github.com/kpedro88/TreeMaker/blob/090674d2bc1dea5a2ec5d196b3488830d0ca5430/TreeMaker/python/doZinvBkg.py#L7-L39
(cleanedCandidates
is a subset of the full miniAOD PF collection with leptons or photons removed, but you could just use the standard set of candidates for testing.)
I'm running on this file: /store/relval/CMSSW_9_4_5_cand1/RelValTTbar_13/MINIAODSIM/94X_mc2017_realistic_v14_RelVal_rmaod-v1/10000/A8356B71-6E2E-E811-8A63-0CC47A7C3424.root
If you send me your config, I can also take a look at the error.
@kpedro88 Based on your setup, I tried to run this:
listBTagInfos = ['pfInclusiveSecondaryVertexFinderTagInfos','pfImpactParameterTagInfos'] listBtagDiscriminatorsAK8 = [ 'pfBoostedDoubleSecondaryVertexAK8BJetTags', ] jecLevels = ['L1FastJet', 'L2Relative', 'L3Absolute'] jetToolbox(process, 'ak8', 'jetSequence', 'out', PUMethod = 'Puppi', miniAOD = True, runOnMC = True, postFix='Clean',
#nameNewPFCollection = cleanedCandidates.value(),
Cut = 'pt>170.',
addPruning = True,
addSoftDropSubjets = True,
addNsub = True,
maxTau = 3,
bTagInfos = listBTagInfos,
bTagDiscriminators = listBtagDiscriminatorsAK8,
JETCorrLevels = jecLevels,
subJETCorrLevels = jecLevels,
addEnergyCorrFunc = True,
)
and I am getting this error:
----- Begin Fatal Exception 26-Apr-2018 16:18:13 CEST----------------------- An exception of category 'ConfigFileReadError' occurred while [0] Processing the python configuration file named jettoolbox_cfg.py Exception Message: python encountered the error: <type 'exceptions.AttributeError'> 'Process' object has no attribute 'nb1AK8PuppiCleanSoftDrop' ----- End Fatal Exception -------------------------------------------------
when I dump my config, I see this:
process.nb1AK8PuppiCleanSoftDrop = cms.EDProducer("ECFAdder",
Njets = cms.vuint32(1, 2, 3),
alpha = cms.double(1),
beta = cms.double(1),
cuts = cms.vstring('',
'',
'pt > 250'),
ecftype = cms.string('N'),
src = cms.InputTag("ak8PFJetsPuppiCleanSoftDrop")
)
Can you send me the your entire config and any other pertinent info (CMSSW version, etc.)?
CMSSW_9_4_4, without any additional packages besides the jetToolbox. the configuration is here (although it only has what I wrote before): jettoolbox_test_cfg.txt
I can't reproduce your error after the following steps:
setenv SCRAM_ARCH slc6_amd64_gcc630
cmsrel CMSSW_9_4_4
cd CMSSW_9_4_4/src
cmsenv
git clone git@github.com:cms-jet/JetToolbox JMEAnalysis/JetToolbox -b jetToolbox_94X
scram b -j 8
cmsRun jettoolbox_test_cfg.py
Here I am using your config exactly, but with the file I specified instead of the PAT relval (https://www.dropbox.com/s/j43483ucac11ub7/jettoolbox_test_cfg.py?dl=0). The PAT relval file was produced in 9_2_X, which is significantly out of date with respect to 9_4_X. (In fact I couldn't even open the PAT relval file over xrootd...)
I change it to the file that you mentioned (/store/relval/CMSSW_9_4_5_cand1/RelValTTbar_13/MINIAODSIM/94X_mc2017_realistic_v14_RelVal_rmaod-v1/10000/A8356B71-6E2E-E811-8A63-0CC47A7C3424.root) and I get the same error:
----- Begin Fatal Exception 26-Apr-2018 18:14:30 CEST----------------------- An exception of category 'ConfigFileReadError' occurred while [0] Processing the python configuration file named jettoolbox_test_cfg.py Exception Message: python encountered the error: <type 'exceptions.AttributeError'> 'Process' object has no attribute 'nb1AK8PuppiCleanSoftDrop' ----- End Fatal Exception -------------------------------------------------
Can you point me to your full work area (if it's on lxplus or something)? It's hard to say more if I can't reproduce the error...
@kpedro88 sorry my mistake, I forgot to compile it (but since we are not changing anything c++ related I thought that I dont need it). sorry for the mess. I'll update the README and the twiki now.
FastjetJetProducer
instances) or to the miniAOD constituents selector, meaning the toolbox could not be reused with different sets of candidates in the same job. The problem should be remedied now, as far as I could see.Problems like 2. would be significantly less likely if every construction was assigned to a clearly named variable the first time used or created (instead of repeating e.g.
jetalgo+'PFJets'+PUMethod+postFix
dozens of times).