Open lathomas opened 1 year ago
Hi @lathomas ,
I took a look at this today. This error is of course a symptom of the fact that this module: hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits
is not run or that it's output has changed. The name is important, because this implies though that we are looking for HPS taus, not L1 taus.
Now, a quick search through CMSSW gives this file:
https://github.com/cms-sw/cmssw/blob/master/RecoTauTag/Configuration/python/HPSPFTaus_cff.py
would seem to show the module tasks are defined. They are in CMSSW, but that is no guarantee they are in our file or that there in the way we expect.
From the command you have provided here, the resulting configuration schedule consists of roughly this:
cms.Schedule(*
[ process.raw2digi_step,
process.endjob_step,
process.L1TReEmulPath,
process.l1ntupleraw,
process.l1ntupleemu,
process.l1CustomReco,
process.l1ntupleaod
],
tasks=[process.patAlgosToolsTask])
I wrote a quick script to dump out the sequence or module components of these. The last one is where the tau reco ntuplization task occurs in the l1ntuple job:
+--------------------------------------------------------------------------------------------------------+
|<class 'FWCore.ParameterSet.SequenceTypes.Path'> |
|l1EventTree+l1RecoTree+l1JetRecoTree+l1MetFilterRecoTree+l1ElectronRecoTree+l1TauRecoTree+l1MuonRecoTree|
+--------------------------------------------------------------------------------------------------------+
Given that tau's are a higher level object reconstructed via HPS after a reco step (i.e. they are a resident of AOD, and typically not before unless we want to discuss L1 taus). So, this leads me to believe that I should be seeing some sort of tau task happening in whatever AOD customizations are given to this ntuple OR it should exist in AOD without us doing it. Looking at the path before the tau tree, l1CustomReco
, I find the following:
+--------------------------------------------------------------------------------------------------+
|<class 'FWCore.ParameterSet.SequenceTypes.Path'> |
|HBHENoiseFilterResultProducer+pfMetT1+egmGsfElectronIDs+BadPFMuonFilter+BadChargedCandidateFilter,|
|ak4PFCHSL1FastjetCorrector, |
|ak4PFCHSL2RelativeCorrector, |
|ak4PFCHSL3AbsoluteCorrector, |
|ak4PFCHSResidualCorrector, |
|ak4PFCHSL1FastL2L3ResidualCorrector, |
|ak4CaloL1FastjetCorrector, |
|ak4CaloL2RelativeCorrector, |
|ak4CaloL3AbsoluteCorrector, |
|ak4CaloResidualCorrector, |
|ak4CaloL1FastL2L3ResidualCorrector, |
|pfJetsPtrForMetCorr, |
|particleFlowPtrs, |
|pfCandsNotInJetsPtrForMetCorr, |
|pfCandsNotInJetsForMetCorr, |
|pfCandMETcorr, |
|ak4PFCHSL1FastjetCorrector, |
|ak4PFCHSL2RelativeCorrector, |
|ak4PFCHSL3AbsoluteCorrector, |
|ak4PFCHSResidualCorrector, |
|ak4PFCHSL1FastL2L3ResidualCorrector, |
|ak4PFCHSL1FastjetCorrector, |
|ak4PFCHSL2RelativeCorrector, |
|ak4PFCHSL3AbsoluteCorrector, |
|ak4PFCHSL1FastL2L3Corrector, |
|corrPfMetType1, |
|corrPfMetType2 |
+--------------------------------------------------------------------------------------------------+
This is largely just ak4 jet tasks, met correction tasks, some filters, and whatever particleFlowPtrs
is (as best I can tell, it doesn't or shouldn't run the tau process). So we do not have any tau tasks run by this. We need to be able to find the thing we want in AOD then.
dumping out the contents of the AOD file, I find this:
edm::ValueMap<reco::SingleTauDiscriminatorContainer> "hpsPFTauBasicDiscriminators" "" "RECO"
edm::ValueMap<reco::SingleTauDiscriminatorContainer> "hpsPFTauBasicDiscriminatorsdR03" "" "RECO"
edm::ValueMap<reco::SingleTauDiscriminatorContainer> "hpsPFTauDiscriminationByMuonRejection3" "" "RECO"
reco::PFTauDiscriminator "hpsPFTauDiscriminationByDeadECALElectronRejection" "" "RECO"
reco::PFTauDiscriminator "hpsPFTauDiscriminationByDecayModeFinding" "" "RECO"
reco::PFTauDiscriminator "hpsPFTauDiscriminationByDecayModeFindingNewDMs" "" "RECO"
reco::PFTauDiscriminator "hpsPFTauDiscriminationByDecayModeFindingOldDMs" "" "RECO"
vector<reco::PFTau> "hpsPFTauProducer" "" "RECO"
Now this is interesting because hpsPFTauBasicDiscriminators is the module or class of modules that was associated with similar looking discriminants to the ones we had before, but it is not the module name we expect, nor is it the format we would expect.
So the issue is, these contents:
https://github.com/cms-sw/cmssw/blob/master/L1Trigger/L1TNtuples/python/l1TauRecoTree_cfi.py#L9-L16
are not in the AOD file, presumably because the module and method by which they are entered into the event have changed
This can be fixed by adjusting the L1 ntuples to use the new version of the stored discriminants.
This basic structure for reco taus seems to have existed for at least three years
Hello,
I believe this issue is known since a long time but was never reported here. Reco tau is broken when producing the L1 ntuples.
For example the following command (using CMSSW_13_0_0):
leads to an error;
The command works if one disables tau reco by commenting out the following line:
https://github.com/cms-sw/cmssw/blob/master/L1Trigger/L1TNtuples/python/L1NtupleAOD_cff.py#L20
Not sure if it's worth fixing or if one should rather work on porting this to custom NANO though !
Thanks,
Laurent