Skip to content
Snippets Groups Projects
Commit be2f259d authored by Abhishek Sharma's avatar Abhishek Sharma :call_me_tone4: Committed by Johannes Elmsheuser
Browse files

HF classification added to PHYSLITE

Dealing with odd behaviour from the FourLeptonVertices collections. They were previously not being saved.
parent b0553d95
No related merge requests found
...@@ -307,7 +307,7 @@ def PHYSLITECfg(flags): ...@@ -307,7 +307,7 @@ def PHYSLITECfg(flags):
from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
PHYSLITESlimmingHelper = SlimmingHelper("PHYSLITESlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags) PHYSLITESlimmingHelper = SlimmingHelper("PHYSLITESlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
PHYSLITESlimmingHelper.ExtraVariables = []
# Trigger content # Trigger content
PHYSLITESlimmingHelper.IncludeTriggerNavigation = False PHYSLITESlimmingHelper.IncludeTriggerNavigation = False
PHYSLITESlimmingHelper.IncludeJetTriggerContent = False PHYSLITESlimmingHelper.IncludeJetTriggerContent = False
...@@ -396,12 +396,22 @@ def PHYSLITECfg(flags): ...@@ -396,12 +396,22 @@ def PHYSLITECfg(flags):
'PrimaryVertices', 'PrimaryVertices',
] ]
from DerivationFrameworkMuons.MuonsCommonConfig import MuonVariablesCfg from DerivationFrameworkMuons.MuonsCommonConfig import MuonVariablesCfg
# add in extra values for Higgs
from DerivationFrameworkHiggs.HiggsPhysContent import setupHiggsSlimmingVariables
setupHiggsSlimmingVariables(flags, PHYSLITESlimmingHelper)
if flags.Input.isMC:
from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
addTruth3ContentToSlimmerTool(PHYSLITESlimmingHelper)
from DerivationFrameworkMCTruth.HFClassificationCommonConfig import HFClassificationCommonCfg
acc.merge(HFClassificationCommonCfg(flags))
# Save the extra variables which aren't included by other means
btag_variables = [f'GN2v01_p{x}' for x in ['b', 'c', 'u', 'tau']] btag_variables = [f'GN2v01_p{x}' for x in ['b', 'c', 'u', 'tau']]
btag_variables += [f'DL1dv01_p{x}' for x in ['b', 'c', 'u']] btag_variables += [f'DL1dv01_p{x}' for x in ['b', 'c', 'u']]
PHYSLITESlimmingHelper.ExtraVariables = [ PHYSLITESlimmingHelper.ExtraVariables += [
'AnalysisElectrons.trackParticleLinks.f1.pt.eta.phi.m.charge.author.DFCommonElectronsLHVeryLoose.DFCommonElectronsLHLoose.DFCommonElectronsLHLooseBL.DFCommonElectronsLHMedium.DFCommonElectronsLHTight.DFCommonElectronsLHVeryLooseIsEMValue.DFCommonElectronsLHLooseIsEMValue.DFCommonElectronsLHLooseBLIsEMValue.DFCommonElectronsLHMediumIsEMValue.DFCommonElectronsLHTightIsEMValue.DFCommonElectronsECIDS.DFCommonElectronsECIDSResult.topoetcone20.topoetcone20ptCorrection.neflowisol20.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt500.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt500.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000.topoetcone20_CloseByCorr.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr.caloClusterLinks.ambiguityLink.TruthLink.truthParticleLink.truthOrigin.truthType.truthPdgId.firstEgMotherTruthType.firstEgMotherTruthOrigin.firstEgMotherTruthParticleLink.firstEgMotherPdgId.ambiguityType.OQ', 'AnalysisElectrons.trackParticleLinks.f1.pt.eta.phi.m.charge.author.DFCommonElectronsLHVeryLoose.DFCommonElectronsLHLoose.DFCommonElectronsLHLooseBL.DFCommonElectronsLHMedium.DFCommonElectronsLHTight.DFCommonElectronsLHVeryLooseIsEMValue.DFCommonElectronsLHLooseIsEMValue.DFCommonElectronsLHLooseBLIsEMValue.DFCommonElectronsLHMediumIsEMValue.DFCommonElectronsLHTightIsEMValue.DFCommonElectronsECIDS.DFCommonElectronsECIDSResult.topoetcone20.topoetcone20ptCorrection.neflowisol20.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt500.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt500.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000.topoetcone20_CloseByCorr.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr.caloClusterLinks.ambiguityLink.TruthLink.truthParticleLink.truthOrigin.truthType.truthPdgId.firstEgMotherTruthType.firstEgMotherTruthOrigin.firstEgMotherTruthParticleLink.firstEgMotherPdgId.ambiguityType.OQ',
'AnalysisSiHitElectrons.pt.eta.phi.m.charge.author.topoetcone20_CloseByCorr.DFCommonElectronsLHVeryLoose.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr.OQ.truthOrigin.truthType.firstEgMotherTruthType.firstEgMotherTruthOrigin.z0stheta.d0Normalized.nInnerExpPix.clEta.clPhi', 'AnalysisSiHitElectrons.pt.eta.phi.m.charge.author.topoetcone20_CloseByCorr.DFCommonElectronsLHVeryLoose.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr.OQ.truthOrigin.truthType.firstEgMotherTruthType.firstEgMotherTruthOrigin.z0stheta.d0Normalized.nInnerExpPix.clEta.clPhi',
'AnalysisPhotons.f1.pt.eta.phi.m.author.OQ.DFCommonPhotonsIsEMLoose.DFCommonPhotonsIsEMTight.DFCommonPhotonsIsEMTightIsEMValue.DFCommonPhotonsCleaning.DFCommonPhotonsCleaningNoTime.ptcone20.topoetcone20.topoetcone40.topoetcone20ptCorrection.topoetcone40ptCorrection.topoetcone20_CloseByCorr.topoetcone40_CloseByCorr.ptcone20_CloseByCorr.caloClusterLinks.vertexLinks.ambiguityLink.TruthLink.truthParticleLink.truthOrigin.truthType', 'AnalysisPhotons.f1.pt.eta.phi.m.author.OQ.DFCommonPhotonsIsEMLoose.DFCommonPhotonsIsEMTight.DFCommonPhotonsIsEMTightIsEMValue.DFCommonPhotonsCleaning.DFCommonPhotonsCleaningNoTime.ptcone20.topoetcone20.topoetcone40.topoetcone20ptCorrection.topoetcone40ptCorrection.topoetcone20_CloseByCorr.topoetcone40_CloseByCorr.ptcone20_CloseByCorr.caloClusterLinks.vertexLinks.ambiguityLink.TruthLink.truthParticleLink.truthOrigin.truthType',
...@@ -419,24 +429,15 @@ def PHYSLITECfg(flags): ...@@ -419,24 +429,15 @@ def PHYSLITECfg(flags):
'MET_Core_AnalysisMET.name.mpx.mpy.sumet.source', 'MET_Core_AnalysisMET.name.mpx.mpy.sumet.source',
'METAssoc_AnalysisMET.', 'METAssoc_AnalysisMET.',
'InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.numberOfTRTHits.numberOfTRTOutliers', 'InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.numberOfTRTHits.numberOfTRTOutliers',
'EventInfo.RandomRunNumber.PileupWeight_NOSYS.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ', 'EventInfo.RandomRunNumber.PileupWeight_NOSYS.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ.HF_Classification.HF_SimpleClassification',
'Kt4EMPFlowEventShape.Density', 'Kt4EMPFlowEventShape.Density',
'TauTracks.pt.eta.phi.flagSet.trackLinks', 'TauTracks.pt.eta.phi.flagSet.trackLinks',
'AnalysisLargeRJets.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.DetectorEta.TrackSumMass.TrackSumPt.constituentLinks.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.D2.C2.R10TruthLabel_R22v1.R10TruthLabel_R21Precision_2022v1.R10TruthLabel_R21Precision.GhostBHadronsFinalCount.GhostCHadronsFinalCount.Parent.GN2Xv01_phbb.GN2Xv01_phcc.GN2Xv01_ptop.GN2Xv01_pqcd' 'AnalysisLargeRJets.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.DetectorEta.TrackSumMass.TrackSumPt.constituentLinks.ECF1.ECF2.ECF3.Tau1_wta.Tau2_wta.Tau3_wta.Split12.Split23.Qw.D2.C2.R10TruthLabel_R22v1.R10TruthLabel_R21Precision_2022v1.R10TruthLabel_R21Precision.GhostBHadronsFinalCount.GhostCHadronsFinalCount.Parent.GN2Xv01_phbb.GN2Xv01_phcc.GN2Xv01_ptop.GN2Xv01_pqcd',
] ]
# Truth extra content
if flags.Input.isMC:
from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
addTruth3ContentToSlimmerTool(PHYSLITESlimmingHelper)
# add in extra values for Higgs
from DerivationFrameworkHiggs.HiggsPhysContent import setupHiggsSlimmingVariables
setupHiggsSlimmingVariables(flags, PHYSLITESlimmingHelper)
# Output stream # Output stream
PHYSLITEItemList = PHYSLITESlimmingHelper.GetItemList() PHYSLITEItemList = PHYSLITESlimmingHelper.GetItemList()
formatString = 'D2AOD_PHYSLITE' if 'StreamDAOD_PHYS' in flags.Input.ProcessingTags else 'DAOD_PHYSLITE' formatString = 'D2AOD_PHYSLITE' if 'StreamDAOD_PHYS' in flags.Input.ProcessingTags else 'DAOD_PHYSLITE'
acc.merge(OutputStreamCfg(flags, formatString, ItemList=PHYSLITEItemList, AcceptAlgs=["PHYSLITEKernel"])) acc.merge(OutputStreamCfg(flags, formatString, ItemList=PHYSLITEItemList, AcceptAlgs=["PHYSLITEKernel"]))
acc.merge(SetupMetaDataForStreamCfg(flags, formatString, AcceptAlgs=["PHYSLITEKernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData])) acc.merge(SetupMetaDataForStreamCfg(flags, formatString, AcceptAlgs=["PHYSLITEKernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
......
...@@ -34,7 +34,7 @@ references_map = { ...@@ -34,7 +34,7 @@ references_map = {
"data_PHYS_Run3": "v18", "data_PHYS_Run3": "v18",
"data_PHYSLITE_Run3": "v2", "data_PHYSLITE_Run3": "v2",
"mc_PHYS_Run2": "v23", "mc_PHYS_Run2": "v23",
"mc_PHYSLITE_Run2": "v2", "mc_PHYSLITE_Run2": "v3",
"mc_PHYS_Run3": "v23", "mc_PHYS_Run3": "v23",
"mc_PHYSLITE_Run3": "v2", "mc_PHYSLITE_Run3": "v2",
"af3_PHYS_Run3": "v4", "af3_PHYS_Run3": "v4",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment