ATLAS Offline Software
Loading...
Searching...
No Matches
python.PhysCommonThinningConfig Namespace Reference

Functions

 PhysCommonThinningCfg (flags, StreamName="StreamDAOD_PHYS", **kwargs)

Function Documentation

◆ PhysCommonThinningCfg()

python.PhysCommonThinningConfig.PhysCommonThinningCfg ( flags,
StreamName = "StreamDAOD_PHYS",
** kwargs )
Configure the common augmentation

Definition at line 9 of file PhysCommonThinningConfig.py.

9def PhysCommonThinningCfg(flags, StreamName = "StreamDAOD_PHYS", **kwargs):
10 """Configure the common augmentation"""
11 acc = ComponentAccumulator()
12
13 # Thinning tools...
14 from DerivationFrameworkInDet.InDetToolsConfig import TrackParticleThinningPHYSCfg, MuonTrackParticleThinningCfg, DiTauTrackParticleThinningCfg
15 from DerivationFrameworkTools.DerivationFrameworkToolsConfig import GenericObjectThinningCfg
16 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import CaloClusterThinningCfg
17 from DerivationFrameworkTau.TauCommonConfig import TauThinningCfg
18
19 # Inner detector group recommendations for indet tracks in analysis
20 # https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/DaodRecommendations
21 if "TrackParticleThinningToolName" in kwargs:
22 acc.merge(TrackParticleThinningPHYSCfg(
23 flags,
24 name = kwargs['TrackParticleThinningToolName'],
25 StreamName = StreamName,
26 Z0SGEntryName = "DFCommonInDetTrackZ0AtPV",
27 InDetTrackParticlesKey = "InDetTrackParticles"))
28
29 # Include inner detector tracks associated with muons
30 if "MuonTPThinningToolName" in kwargs:
31 acc.merge(MuonTrackParticleThinningCfg(
32 flags,
33 name = kwargs['MuonTPThinningToolName'],
34 StreamName = StreamName,
35 MuonKey = "Muons",
36 InDetTrackParticlesKey = "InDetTrackParticles"))
37
38 # Tau-related containers: taus, tau tracks and associated ID tracks, neutral PFOs, secondary vertices
39 if "TauJetThinningToolName" in kwargs:
40 tau_thinning_expression = f"TauJets.pt >= {flags.Tau.MinPtDAOD} && TauJets.nTracks <= {flags.Tau.MaxTracksDAOD}"
41 acc.merge(TauThinningCfg(flags,
42 name = kwargs['TauJetThinningToolName'],
43 StreamName = StreamName,
44 Taus = "TauJets",
45 TauTracks = "TauTracks",
46 TrackParticles = "InDetTrackParticles",
47 TauNeutralPFOs = "TauNeutralParticleFlowObjects",
48 TauSecondaryVertices = "TauSecondaryVertices",
49 SelectionString = tau_thinning_expression))
50
51 if "TauJets_MuonRMThinningToolName" in kwargs:
52 tau_murm_thinning_expression = tau_thinning_expression.replace('TauJets', 'TauJets_MuonRM')
53 acc.merge(TauThinningCfg(flags,
54 name = kwargs['TauJets_MuonRMThinningToolName'],
55 StreamName = StreamName,
56 Taus = "TauJets_MuonRM",
57 TauTracks = "TauTracks_MuonRM",
58 TrackParticles = "InDetTrackParticles",
59 TauNeutralPFOs = "TauNeutralParticleFlowObjects_MuonRM",
60 TauSecondaryVertices = "TauSecondaryVertices_MuonRM",
61 SelectionString = tau_murm_thinning_expression))
62
63 if "TauJets_EleRMThinningToolName" in kwargs:
64 tau_erm_thinning_expression = tau_thinning_expression.replace('TauJets', 'TauJets_EleRM')
65 acc.merge(TauThinningCfg(flags,
66 name = kwargs['TauJets_EleRMThinningToolName'],
67 StreamName = StreamName,
68 Taus = "TauJets_EleRM",
69 TauTracks = "TauTracks_EleRM",
70 TrackParticles = "InDetTrackParticles",
71 TauNeutralPFOs = "TauNeutralParticleFlowObjects_EleRM",
72 TauSecondaryVertices = "TauSecondaryVertices_EleRM",
73 SelectionString = tau_erm_thinning_expression))
74
75 # di-tau thinning
76 if "DiTauThinningToolName" in kwargs:
77 acc.merge(GenericObjectThinningCfg(
78 flags,
79 name = kwargs['DiTauThinningToolName'],
80 StreamName = StreamName,
81 ContainerName = "DiTauJets",
82 SelectionString = "DiTauJets.nSubjets > 1 && abs(DiTauJets.charge) < 3"))
83
84 # ID tracks associated with high-pt di-tau
85 if "DiTauTPThinningToolName" in kwargs:
86 acc.merge(DiTauTrackParticleThinningCfg(
87 flags,
88 name = kwargs['DiTauTPThinningToolName'],
89 StreamName = StreamName,
90 DiTauKey = "DiTauJets",
91 InDetTrackParticlesKey = "InDetTrackParticles",
92 SelectionString = "DiTauJets.nSubjets > 1 && abs(DiTauJets.charge) < 3"))
93
94
95 if "DiTauLowPtThinningToolName" in kwargs:
96 acc.merge(GenericObjectThinningCfg(
97 flags,
98 name = kwargs['DiTauLowPtThinningToolName'],
99 StreamName = StreamName,
100 ContainerName = "DiTauJetsLowPt",
101 SelectionString = "DiTauJetsLowPt.nSubjets > 1 && (DiTauJetsLowPt.charge == 0 || abs(DiTauJetsLowPt.charge) == 2)"))
102
103 # ID tracks associated with low-pt ditau
104 if "DiTauLowPtTPThinningToolName" in kwargs:
105 acc.merge(DiTauTrackParticleThinningCfg(
106 flags,
107 name = kwargs['DiTauLowPtTPThinningToolName'],
108 StreamName = StreamName,
109 DiTauKey = "DiTauJetsLowPt",
110 InDetTrackParticlesKey = "InDetTrackParticles",
111 SelectionString = "DiTauJetsLowPt.nSubjets > 1 && (DiTauJetsLowPt.charge == 0 || abs(DiTauJetsLowPt.charge) == 2)"))
112
113 # keep calo clusters around electrons
114 if "ElectronCaloClusterThinningToolName" in kwargs:
115 acc.merge(CaloClusterThinningCfg(
116 flags,
117 name = kwargs['ElectronCaloClusterThinningToolName'],
118 StreamName = StreamName,
119 SGKey = "AnalysisElectrons",
120 CaloClCollectionSGKey = "egammaClusters",
121 ConeSize = -1.0))
122
123 # keep calo clusters around photons
124 if "PhotonCaloClusterThinningToolName" in kwargs:
125 acc.merge(CaloClusterThinningCfg(
126 flags,
127 name = kwargs['PhotonCaloClusterThinningToolName'],
128 StreamName = StreamName,
129 SGKey = "AnalysisPhotons",
130 CaloClCollectionSGKey = "egammaClusters",
131 ConeSize=-1.0))
132
133 # GSF tracks associated to electrons
134 if "ElectronGSFTPThinningToolName" in kwargs:
135 ElectronGSFTPThinningTool = CompFactory.DerivationFramework.EgammaTrackParticleThinning(
136 name = kwargs['ElectronGSFTPThinningToolName'],
137 StreamName = StreamName,
138 SGKey = "AnalysisElectrons",
139 GSFTrackParticlesKey = "GSFTrackParticles",
140 InDetTrackParticlesKey = "",
141 BestMatchOnly = True)
142 acc.addPublicTool(ElectronGSFTPThinningTool)
143
144 # GSF tracks associated to photons
145 if "PhotonGSFTPThinningToolName" in kwargs:
146 PhotonGSFTPThinningTool = CompFactory.DerivationFramework.EgammaTrackParticleThinning(
147 name = kwargs['PhotonGSFTPThinningToolName'],
148 StreamName = StreamName,
149 SGKey = "AnalysisPhotons",
150 GSFTrackParticlesKey = "GSFTrackParticles",
151 GSFConversionVerticesKey = "GSFConversionVertices",
152 InDetTrackParticlesKey = "",
153 BestMatchOnly = True,
154 BestVtxMatchOnly = True)
155 acc.addPublicTool(PhotonGSFTPThinningTool)
156
157 return acc
158