ATLAS Offline Software
Functions | Variables
BPHY24 Namespace Reference

Functions

def BPHY24Cfg (flags)
 

Variables

string BPHYDerivationName = "BPHY24"
 
string streamName = "StreamDAOD_BPHY24"
 

Function Documentation

◆ BPHY24Cfg()

def BPHY24.BPHY24Cfg (   flags)

Definition at line 14 of file BPHY24.py.

14 def BPHY24Cfg(flags):
15 
16  # Lists for better code organization
17  augsList = [] # List of active augmentation tools
18  skimList = [] # List of active skimming algorithms
19  thinList = [] # List of active thinning algorithms
20  outVtxList = [] # List of reconstructed candidates to store
21  outRePVList = [] # List of candidates holding refitted primary vertices
22  thinTrkVtxList = [] # List of reconstructed candidates to use for the thinning of tracks from vertices
23  thinPassFlagsList = [] # List of pass-flags in the reconstructed candidates to se for the thinning
24  finalCandidateList = []
25 
26  from AthenaServices.PartPropSvcConfig import PartPropSvcCfg
27  from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg)
28  from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg
29  acc = ComponentAccumulator()
30  PartPropSvcName = acc.getPrimaryAndMerge(PartPropSvcCfg(flags)).name
31  isSimulation = flags.Input.isMC
32  V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, BPHYDerivationName))
33  vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName)) # VKalVrt vertex fitter
34  acc.addPublicTool(vkalvrt)
35  acc.addPublicTool(V0Tools)
36  trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, BPHYDerivationName))
37  acc.addPublicTool(trackselect)
38  vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName))
39  acc.addPublicTool(vpest)
40  PVrefit = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags))
41  acc.addPublicTool(PVrefit)
42 
43 
44  BPHY24_AugOriginalCounts = CompFactory.DerivationFramework.AugOriginalCounts(
45  name = "BPHY24_AugOriginalCounts",
46  VertexContainer = "PrimaryVertices",
47  TrackContainer = "InDetTrackParticles" )
48 
49  bSkim = "(count(BPHY24JpsimmKshortCascadeSV1.Bd_mass) + count(BPHY24JpsieeKshortCascadeSV1.Bd_mass)) > 0"
50 
51  BPHY24_Skim_Bcandidates = CompFactory.DerivationFramework.xAODStringSkimmingTool( name = "BPHY24_Skim_Bcandidates",
52  expression = bSkim )
53  skimList += [ BPHY24_Skim_Bcandidates ]
54  augsList += [ BPHY24_AugOriginalCounts ]
55 
56  # LRT track merge
57  from DerivationFrameworkInDet.InDetToolsConfig import InDetLRTMergeCfg
58  acc.merge(InDetLRTMergeCfg(flags))
59 
60  mainIDInput = "InDetWithLRTTrackParticles"
61  originalTrackCond = ["InDetTrackParticles", "InDetLargeD0TrackParticles","GSFTrackParticles"]
62  BPHY24_Finder_DiMuon = CompFactory.Analysis.JpsiFinder( name = "BPHY24_Finder_DiMuon",
63  muAndMu = True,
64  muAndTrack = False,
65  TrackAndTrack = False,
66  assumeDiMuons = True,
67  muonThresholdPt = 3000.,
68  higherPt = 3500.,
69  invMassUpper = 7000.,
70  invMassLower = 1.,
71  Chi2Cut = 30.,
72  oppChargesOnly = False,
73  allChargeCombinations = True,
74  atLeastOneComb = True,
75  useCombinedMeasurement = False, # Only takes effect if combOnly=True
76  muonCollectionKey = "Muons",
77  TrackParticleCollection = "InDetTrackParticles",
78  V0VertexFitterTool = None,
79  useV0Fitter = False,
80  TrkVertexFitterTool = vkalvrt,
81  TrackSelectorTool = trackselect,
82  VertexPointEstimator = vpest,
83  useMCPCuts = False )
84 
85 
86  BPHY24_SelectAndWrite_DiMuon = CompFactory.DerivationFramework.Reco_mumu( name = "BPHY24_SelectAndWrite_DiMuon",
87  JpsiFinder = BPHY24_Finder_DiMuon,
88  V0Tools = V0Tools,
89  PVRefitter = PVrefit,
90  OutputVtxContainerName = "BPHY24_DiMuon_Candidates",
91  PVContainerName = "PrimaryVertices",
92  RefPVContainerName = "SHOULDNOTBEUSED", # The container would be created if PV refit was requested (not needed at this point)
93  DoVertexType = 7 ) # Vertex type marking our own reconstruced secondary candidates
94 
95  augsList += [ BPHY24_SelectAndWrite_DiMuon ]
96  # Final selection of the di-muon candidates
97  thinTrkVtxList += [ "BPHY24_DiMuon_Candidates" ]
98  outVtxList += [ "BPHY24_DiMuon_Candidates" ]
99  thinPassFlagsList += [ "passed_Jpsi" ] # TODO: is this really needed?
100 
101  BPHY24_Select_DiMuons = CompFactory.DerivationFramework.Select_onia2mumu( name = "BPHY24_Select_DiMuons",
102  HypothesisName = "Jpsi",
103  InputVtxContainerName = "BPHY24_DiMuon_Candidates",
104  V0Tools = V0Tools,
105  VtxMassHypo = 3096.916, # used only for pseudo-proper decay time etc. calculations
106  MassMax = 10000., # loose cut to keep selection from BPHY24_Finder_DiMuon
107  MassMin = 0., # loose cut to keep selection from BPHY24_Finder_DiMuon
108  Chi2Max = 1000., # loose cut to keep selection from BPHY24_Finder_DiMuon (chi2, not chi2/NDF)
109  DoVertexType = 7 ) # Vertex type marking our own reconstruced secondary candidates
110 
111  augsList += [ BPHY24_Select_DiMuons ]
112 
113  ElectronLHSelectorLHvloose = CompFactory.AsgElectronLikelihoodTool("ElectronLHSelectorLHvloose",
114  primaryVertexContainer = "PrimaryVertices",
115  ConfigFile="ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodVeryLooseOfflineConfig2017_Smooth.conf")
116 
117 
118 
119  ElectronLHSelectorLHvloose_nod0 = CompFactory.AsgElectronLikelihoodTool("ElectronLHSelectorLHvloosenod0", primaryVertexContainer = "PrimaryVertices",
120  ConfigFile="ElectronPhotonSelectorTools/offline/mc16_20190328_nod0/ElectronLikelihoodVeryLooseOfflineConfig2017_Smooth_nod0.conf") # Still OK to use in Run3?
121 
122 
123  # decorate electrons with the output of LH vloose (nod0)
124  ElectronPassLHvloose = CompFactory.DerivationFramework.EGElectronLikelihoodToolWrapper(name = "ElectronPassLHvloose",
125  EGammaElectronLikelihoodTool = ElectronLHSelectorLHvloose,
126  EGammaFudgeMCTool = "",
127  CutType = "",
128  StoreGateEntryName = "DFCommonElectronsLHVeryLoose",
129  ContainerName = "Electrons",
130  StoreTResult=False)
131 
132  ElectronPassLHvloosenod0 = CompFactory.DerivationFramework.EGElectronLikelihoodToolWrapper(name = "ElectronPassLHvloosenod0",
133  EGammaElectronLikelihoodTool = ElectronLHSelectorLHvloose_nod0,
134  EGammaFudgeMCTool = "",
135  CutType = "",
136  StoreGateEntryName = "DFCommonElectronsLHVeryLoosenod0",
137  ContainerName = "Electrons",
138  StoreTResult=False)
139  augsList += [ElectronPassLHvloose, ElectronPassLHvloosenod0]
140 
141  BPHY24DiElectronFinder = CompFactory.Analysis.JpsiFinder_ee(
142  name = "BPHY24DiElectronFinder",
143  elAndEl = True,
144  elAndTrack = False,
145  TrackAndTrack = False,
146  assumeDiElectrons = True,
147  elThresholdPt = 4000.0,
148  invMassUpper = 7000.0,
149  invMassLower = 200.0,
150  Chi2Cut = 30.,
151  oppChargesOnly = False,
152  allChargeCombinations = True,
153  useElectronTrackMeasurement = True,
154  electronCollectionKey = "Electrons",
155  TrackParticleCollection = "GSFTrackParticles",
156  useEgammaCuts = True,
157  V0VertexFitterTool = None,
158  useV0Fitter = False,
159  TrkVertexFitterTool = vkalvrt,
160  TrackSelectorTool = trackselect,
161  VertexPointEstimator = vpest,
162  ElectronSelection = "d0_or_nod0",
163  PartPropSvc = PartPropSvcName
164  )
165 
166  BPHY24_SelectAndWrite_DiElectron = CompFactory.DerivationFramework.Reco_mumu(
167  name = "BPHY24_SelectAndWrite_DiElectron",
168  JpsiFinder = BPHY24DiElectronFinder,
169  V0Tools = V0Tools,
170  PVRefitter = PVrefit,
171  OutputVtxContainerName = "BPHY24_DiElectron_Candidates",
172  PVContainerName = "PrimaryVertices",
173  RefPVContainerName = "SHOULDNOTBEUSED",
174  DoVertexType = 7
175  )
176 
177  augsList += [ BPHY24_SelectAndWrite_DiElectron ]
178 
179  BPHY24_Select_DiElectrons = CompFactory.DerivationFramework.Select_onia2mumu(
180  name = "BPHY24_Select_DiElectrons",
181  HypothesisName = "Jpsi",
182  InputVtxContainerName = "BPHY24_DiElectron_Candidates",
183  V0Tools = V0Tools,
184  VtxMassHypo = 3096.916,
185  MassMin = 400.0,
186  MassMax = 7000.0,
187  Chi2Max = 30,
188  DoVertexType = 7
189  )
190 
191  thinTrkVtxList += [ "BPHY24_DiElectron_Candidates" ]
192  outVtxList += [ "BPHY24_DiElectron_Candidates" ]
193 
194  augsList += [ BPHY24_Select_DiElectrons ]
195 
196  V0ContainerName = "BPHY24RecoV0Candidates"
197  KshortContainerName = "BPHY24RecoKshortCandidates"
198  LambdaContainerName = "BPHY24RecoLambdaCandidates"
199  LambdabarContainerName = "BPHY24RecoLambdabarCandidates"
200 
201  from DerivationFrameworkBPhys.V0ToolConfig import (
202  BPHY_InDetV0FinderToolCfg, BPHY_Reco_V0FinderCfg)
203 
204  BPHY24_V0FinderTool = acc.popToolsAndMerge(BPHY_InDetV0FinderToolCfg(
205  flags, BPHYDerivationName,
206  TrackParticleCollection = mainIDInput,
207  V0ContainerName = V0ContainerName,
208  KshortContainerName = KshortContainerName,
209  LambdaContainerName = LambdaContainerName,
210  LambdabarContainerName = LambdabarContainerName,
211  RelinkTracks = originalTrackCond))
212 
213  BPHY24_Reco_V0Finder = acc.popToolsAndMerge(BPHY_Reco_V0FinderCfg(
214  flags, derivation = BPHYDerivationName,
215  V0ContainerName = V0ContainerName,
216  KshortContainerName = KshortContainerName,
217  LambdaContainerName = LambdaContainerName,
218  LambdabarContainerName = LambdabarContainerName,
219  CheckVertexContainers = ['BPHY24_DiMuon_Candidates',
220  'BPHY24_DiElectron_Candidates'],
221  V0FinderTool = BPHY24_V0FinderTool))
222 
223  augsList += [BPHY24_Reco_V0Finder]
224  outVtxList += ['BPHY24RecoKshortCandidates']
225  outVtxList += ["BPHY24RecoV0Candidates"]
226  thinTrkVtxList += ['BPHY24RecoKshortCandidates']
227  thinPassFlagsList += [ "" ] # TODO: is this really needed?
228  finalCandidateList += ["BPHY24RecoKshortCandidates"]
229  finalCandidateList += ["BPHY24RecoV0Candidates"]
230  from TrkConfig.TrkVKalVrtFitterConfig import JpsiV0VertexFitCfg
231  JpsiV0VertexFit = acc.popToolsAndMerge(JpsiV0VertexFitCfg(flags))
232  acc.addPublicTool(JpsiV0VertexFit)
233 
234  BPHY24JpsimmKshort = CompFactory.DerivationFramework.JpsiPlusV0Cascade(
235  name = "BPHY24mmKshort",
236  V0Tools = V0Tools,
237  HypothesisName = "Bd",
238  TrkVertexFitterTool = JpsiV0VertexFit,
239  PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
240  V0Hypothesis = 310,
241  JpsiMassLowerCut = 1.,
242  JpsiMassUpperCut = 7000.,
243  ApplyJpsiMassConstraint = False,
244  V0MassLowerCut = 400.,
245  V0MassUpperCut = 600.,
246  MassLowerCut = 4300.,
247  MassUpperCut = 6300.,
248  RefitPV = True,
249  RefPVContainerName = "BPHY24RefittedPrimaryVertices_mm",
250  JpsiVertices = "BPHY24_DiMuon_Candidates",
251  CascadeVertexCollections= ["BPHY24JpsimmKshortCascadeSV2", "BPHY24JpsimmKshortCascadeSV1"],
252  V0Vertices = "BPHY24RecoV0Candidates",
253  V0TrackContainerName = mainIDInput,
254  RelinkTracks = originalTrackCond)
255 
256  augsList += [BPHY24JpsimmKshort]
257  outVtxList += BPHY24JpsimmKshort.CascadeVertexCollections
258  outVtxList += ["BPHY24RefittedPrimaryVertices_mm"]
259  thinTrkVtxList += BPHY24JpsimmKshort.CascadeVertexCollections
260  finalCandidateList += BPHY24JpsimmKshort.CascadeVertexCollections
261 
262  BPHY24JpsieeKshort = CompFactory.DerivationFramework.JpsiPlusV0Cascade(
263  name = "BPHY24eeKshort",
264  V0Tools = V0Tools,
265  HypothesisName = "Bd",
266  TrkVertexFitterTool = JpsiV0VertexFit,
267  PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
268  V0Hypothesis = 310,
269  JpsiMassLowerCut = 100.,
270  JpsiMassUpperCut = 7000.,
271  ApplyJpsiMassConstraint = False,
272  V0MassLowerCut = 400.,
273  V0MassUpperCut = 600.,
274  MassLowerCut = 4300.,
275  MassUpperCut = 6300.,
276  JpsiTrackPDGID = 11,
277  JpsiTrackContainerName = "GSFTrackParticles",
278  RefitPV = True,
279  RefPVContainerName = "BPHY24RefittedPrimaryVertices_ee",
280  JpsiVertices = "BPHY24_DiElectron_Candidates",
281  CascadeVertexCollections= ["BPHY24JpsieeKshortCascadeSV2", "BPHY24JpsieeKshortCascadeSV1"],
282  V0Vertices = "BPHY24RecoV0Candidates",
283  V0TrackContainerName = mainIDInput,
284  RelinkTracks = originalTrackCond)
285 
286  augsList += [BPHY24JpsieeKshort]
287  finalCandidateList += BPHY24JpsieeKshort.CascadeVertexCollections
288  outVtxList += BPHY24JpsieeKshort.CascadeVertexCollections
289  outVtxList += ["BPHY24RefittedPrimaryVertices_ee"]
290  thinTrkVtxList += BPHY24JpsieeKshort.CascadeVertexCollections
291 
292  from TrackVertexAssociationTool.TrackVertexAssociationToolConfig import isoTTVAToolCfg
293  TTVATool = acc.popToolsAndMerge(isoTTVAToolCfg(flags,
294  WorkingPoint = "Custom",
295  d0_cut = -1,
296  d0sig_cut = -1,
297  dzSinTheta_cut = -1,
298  doUsedInFit = False))
299  acc.addPublicTool(TTVATool)
300 
301  from InDetConfig.InDetTrackSelectionToolConfig import isoTrackSelectionToolCfg
302  TrackSelTool = acc.popToolsAndMerge(isoTrackSelectionToolCfg(flags,
303  maxZ0SinTheta= 2,
304  minPt= 1000,
305  CutLevel= "Loose"))
306  acc.addPublicTool(TrackSelTool)
307 
308  from IsolationAlgs.IsoToolsConfig import TrackIsolationToolCfg
309  TrackIsoTool = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
310  TrackSelectionTool = TrackSelTool,
311  TTVATool = TTVATool))
312  acc.addPublicTool(TrackIsoTool)
313  BPHY24TrackIsolationDecoratorBtoKee = CompFactory.DerivationFramework.VertexTrackIsolation(
314  name = "BPHY24TrackIsolationDecoratorBtoKee",
315  TrackIsoTool = TrackIsoTool,
316  TrackContainer = "InDetTrackParticles",
317  InputVertexContainer = "BPHY24JpsieeKshortCascadeSV1",
318  FixElecExclusion = True,
319  IncludeV0 = True)
320  BPHY24TrackIsolationDecoratorBtoKmumu = CompFactory.DerivationFramework.VertexTrackIsolation(
321  name = "BPHY24TrackIsolationDecoratorBtoKmumu ",
322  TrackIsoTool = TrackIsoTool,
323  TrackContainer = "InDetTrackParticles",
324  InputVertexContainer = "BPHY24JpsimmKshortCascadeSV1",
325  FixElecExclusion = False,
326  IncludeV0 = True)
327 
328  BPHY24TrackIsolationDecoratorJpsiee = CompFactory.DerivationFramework.VertexTrackIsolation(
329  name = "BPHY24TrackIsolationDecoratorJpsiee",
330  TrackIsoTool = TrackIsoTool,
331  TrackContainer = "InDetTrackParticles",
332  InputVertexContainer = "BPHY24_DiElectron_Candidates",
333  FixElecExclusion = True,
334  IncludeV0 = False)
335 
336  BPHY24TrackIsolationDecoratorJpsimumu = CompFactory.DerivationFramework.VertexTrackIsolation(
337  name = "BPHY24TrackIsolationDecoratorJpsimumu",
338  TrackIsoTool = TrackIsoTool,
339  TrackContainer = "InDetTrackParticles",
340  InputVertexContainer = "BPHY24_DiMuon_Candidates",
341  FixElecExclusion = False,
342  IncludeV0 = False)
343 
344  BPHY24TrackIsolationDecoratorKshort = CompFactory.DerivationFramework.VertexTrackIsolation(
345  name = "BPHY24TrackIsolationDecoratorKshort",
346  TrackIsoTool = TrackIsoTool,
347  TrackContainer = "InDetTrackParticles",
348  InputVertexContainer = "BPHY24RecoKshortCandidates",
349  FixElecExclusion = False,
350  IncludeV0 = False)
351 
352  BPHY24TrackIsolationDecoratorV0 = CompFactory.DerivationFramework.VertexTrackIsolation(
353  name = "BPHY24TrackIsolationDecoratorV0",
354  TrackIsoTool = TrackIsoTool,
355  TrackContainer = "InDetTrackParticles",
356  InputVertexContainer = "BPHY24RecoV0Candidates",
357  FixElecExclusion = False,
358  IncludeV0 = False)
359 
360  augsList += [ BPHY24TrackIsolationDecoratorBtoKee,
361  BPHY24TrackIsolationDecoratorBtoKmumu,
362  BPHY24TrackIsolationDecoratorJpsiee,
363  BPHY24TrackIsolationDecoratorJpsimumu,
364  BPHY24TrackIsolationDecoratorKshort,
365  BPHY24TrackIsolationDecoratorV0]
366 
367  trigger_list = [ # Pure muon triggers
368  "HLT_mu11_mu6_bDimu",
369  "HLT_mu11_mu6_bDimu2700",
370  "HLT_mu11_mu6_bDimu_L1LFV-MU11",
371  "HLT_mu11_mu6_bDimu2700_L1LFV-MU11",
372  "HLT_mu11_mu6_bBmumuxv2",
373  "HLT_mu10_mu6_bBmumuxv2",
374  "HLT_mu10_mu6_bBmumuxv2_delayed",
375  "HLT_2mu6_bBmumuxv2",
376  "HLT_2mu6_bBmumuxv2_delayed",
377  "HLT_2mu6_bBmumuxv2_L1LFV-MU6",
378  "HLT_mu6_mu4_bBmumuxv2",
379  "HLT_mu6_mu4_bBmumuxv2_delayed",
380  "HLT_2mu4_bBmumuxv2",
381  "HLT_mu11_mu6_bJpsimumu",
382  "HLT_2mu10_bJpsimumu",
383  "HLT_mu11_mu6_bJpsimumu_L1LFV-MU11",
384  "HLT_2mu6_bJpsimumu_L1BPH-2M9-2MU6_BPH-2DR15-2MU6",
385  "HLT_2mu6_bJpsimumu_delayed_L1BPH-2M9-2MU6_BPH-2DR15-2MU6",
386  "HLT_2mu10_bJpsimumu_noL2",
387  "HLT_mu10_mu6_bJpsimumu",
388  "HLT_mu10_mu6_bJpsimumu_delayed",
389  "HLT_2mu6_bJpsimumu",
390  "HLT_2mu6_bJpsimumu_delayed",
391  "HLT_mu6_mu4_bJpsimumu",
392  "HLT_mu6_mu4_bJpsimumu_Lxy0_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4",
393  "HLT_2mu4_bJpsimumu",
394  "HLT_mu6_2mu4_bJpsi",
395  "HLT_mu6_2mu4_bJpsi_delayed",
396  "HLT_2mu14",
397  "HLT_2mu10",
398  # dielectron triggers
399  "HLT_2e5_lhvloose_nod0_bBeexM6000t", #37,143,877 inb
400  "HLT_e5_lhvloose_nod0_bBeexM6000t", #37,143,877
401  "HLT_e5_lhvloose_nod0_bBeexM6000t_2mu4_nomucomb_L1BPH-0DR3-EM7J15_2MU4", #37,312,506
402  "HLT_e5_lhvloose_nod0_bBeexM6000t_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6", #27,041,892
403  "HLT_e5_lhvloose_nod0_bBeexM6000_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6", #149,100
404  "HLT_e9_lhloose_bBeexM2700_2mu4_nomucomb_L1BPH-0DR3-EM7J15_2MU4", #2,681,764
405  "HLT_e9_lhloose_bBeexM2700_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6", #1,979,362
406  "HLT_e9_lhloose_bBeexM6000_2mu4_nomucomb_L1BPH-0DR3-EM7J15_2MU4", #3,359,105
407  "HLT_e9_lhloose_bBeexM6000_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6", #2,426,663
408  "HLT_e9_lhloose_e5_lhloose_bBeexM2700_2mu4_nomucomb_L1BPH-0M9-EM7-EM5_2MU4", #2,950,935
409  "HLT_e9_lhloose_e5_lhloose_bBeexM2700_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6", #2,928,030
410  "HLT_e9_lhloose_e5_lhloose_bBeexM6000_2mu4_nomucomb_L1BPH-0M9-EM7-EM5_2MU4", #3,647,507
411  "HLT_e9_lhloose_e5_lhloose_bBeexM6000_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6", #3,605,371
412  "HLT_e9_lhvloose_nod0_e5_lhvloose_nod0_bBeexM6000t_2mu4_nomucomb_L1BPH-0M9-EM7-EM5_2MU4", #40,169,436
413  "HLT_e9_lhvloose_nod0_e5_lhvloose_nod0_bBeexM6000t_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6", #37,312,506
414  "HLT_e9_lhvloose_nod0_e5_lhvloose_nod0_bBeexM6000_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6", #677,340
415  ]
416 
417  BPHY24TrigSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool( name = "BPHY24TrigSkimmingTool",
418  TriggerListOR = trigger_list,
419  TriggerListORHLTOnly = ["HLT_2e5_lhvloose_nod0_bBeexM6000t","HLT_e5_lhvloose_nod0_bBeexM6000t"] )
420  acc.addPublicTool(BPHY24TrigSkimmingTool)
421  skimList += [BPHY24TrigSkimmingTool]
422 
423  # ID tracks
424  BPHY24_Thin_VtxTracks = CompFactory.DerivationFramework.Thin_vtxTrk( name = "BPHY24_Thin_VtxTracks",
425  StreamName = streamName,
426  TrackParticleContainerName = "InDetTrackParticles",
427  VertexContainerNames = finalCandidateList,
428  IgnoreFlags = True )
429  # PassFlags = thinPassFlagsList )
430  thinList += [ BPHY24_Thin_VtxTracks ]
431 
432  # LRT ID tracks
433  BPHY24_Thin_VtxTracks_LRT = CompFactory.DerivationFramework.Thin_vtxTrk( name = "BPHY24_Thin_VtxTracks_LRT",
434  StreamName = streamName,
435  TrackParticleContainerName = "InDetLargeD0TrackParticles",
436  VertexContainerNames = finalCandidateList,
437  IgnoreFlags = True )
438  # PassFlags = thinPassFlagsList )
439  thinList += [ BPHY24_Thin_VtxTracks_LRT ]
440 
441  # GSF tracks
442  BPHY24_Thin_VtxTracks_GSF = CompFactory.DerivationFramework.Thin_vtxTrk( name = "BPHY24_Thin_VtxTracks_GSF",
443  StreamName = streamName,
444  TrackParticleContainerName = "GSFTrackParticles",
445  VertexContainerNames = finalCandidateList,
446  IgnoreFlags = True )
447  thinList += [ BPHY24_Thin_VtxTracks_GSF ]
448 
449  # Muons (TODO: thinning not used muons or something else ?)
450  BPHY24_Thin_Muons = CompFactory.DerivationFramework.MuonTrackParticleThinning( name = "BPHY24_Thin_Muons",
451  MuonKey = "Muons",
452  StreamName = streamName,
453  InDetTrackParticlesKey = "InDetTrackParticles" )
454  thinList += [ BPHY24_Thin_Muons ]
455 
456  # Electrons
457  BPHY24_Thin_Egamma = CompFactory.DerivationFramework.EgammaTrackParticleThinning(
458  name = "BPHY24_Thin_Egamma",
459  SGKey = "Electrons",
460  StreamName = streamName,
461  InDetTrackParticlesKey = mainIDInput)
462  thinList += [BPHY24_Thin_Egamma]
463 
464  # Primary vertices
465  BPHY24_Thin_PV = CompFactory.DerivationFramework.BPhysPVThinningTool( name = "BPHY24_Thin_PV",
466  CandidateCollections = finalCandidateList,
467  StreamName = streamName,
468  KeepPVTracks = True )
469  thinList += [ BPHY24_Thin_PV ]
470 
471  if isSimulation:
472 
473  # Keep all muons and electrons
474  keepParticles = ('abs(TruthParticles.pdgId) == 11 || ' # mu
475  'abs(TruthParticles.pdgId) == 13') # e
476  # Keep only the potentially signal b-hadrons
477 
478  keepParticles += (' || '
479  'abs(TruthParticles.pdgId) == 511 || ' # B0
480  'abs(TruthParticles.pdgId) == 513 || ' # B0*
481  'abs(TruthParticles.pdgId) == 515') # B0**
482 
483 
484  BPHY24_Thin_TruthHadrons = CompFactory.DerivationFramework.GenericTruthThinning( name = "BPHY24_Thin_TruthHadrons",
485  ParticleSelectionString = keepParticles,
486  PreserveDescendants = True,
487  StreamName = streamName,
488  PreserveAncestors = True)
489  thinList += [ BPHY24_Thin_TruthHadrons ]
490 
491  # Save also neutrinos and b-quarks, without their decay trees
492  BPHY24_Thin_TruthQuarks = CompFactory.DerivationFramework.GenericTruthThinning( name = "BPHY24_Thin_TruthQuarks",
493  ParticleSelectionString = ('abs(TruthParticles.pdgId) == 5 || '
494  'abs(TruthParticles.pdgId) == 12 || abs(TruthParticles.pdgId) == 14' ),
495  PreserveDescendants = False,
496  StreamName = streamName,
497  PreserveAncestors = False)
498  thinList += [ BPHY24_Thin_TruthQuarks ]
499 
500  for t in augsList + skimList + thinList: acc.addPublicTool(t)
501  acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel("BPHY24Kernel",
502  AugmentationTools = augsList,
503  #OutputLevel = DEBUG,
504  #Only skim if not MC
505  SkimmingTools = skimList,
506  ThinningTools = thinList))
507 
508 
509  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
510  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
511  BPHY24SlimmingHelper = SlimmingHelper("BPHY24SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
512  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
513  from AthenaConfiguration.Enums import MetadataCategory
514  from DerivationFrameworkBPhys.commonBPHYMethodsCfg import getDefaultAllVariables
515  AllVariables = getDefaultAllVariables()
516  StaticContent = []
517  ExtraVariables = []
518 
519  # Smart collections
520  # What is the difference w.r.t. adding them into AllVariables?
521  # AB Answer: SmarCollections trims commonly unused variables.
522  BPHY24SlimmingHelper.SmartCollections = [ "Electrons", "Muons", "InDetTrackParticles", "InDetLargeD0TrackParticles" ]
523 
524  # Full combined muon-ID tracks
525  AllVariables += ["InDetLargeD0TrackParticles"]
526  AllVariables += [ "CombinedMuonTrackParticles" ]
527  AllVariables += [ "ExtrapolatedMuonTrackParticles" ]
528  ExtraVariables += [ "Muons.etaLayer1Hits.etaLayer2Hits.etaLayer3Hits.etaLayer4Hits.phiLayer1Hits.phiLayer2Hits.phiLayer3Hits.phiLayer4Hits",
529  "Muons.numberOfTriggerEtaLayers.numberOfPhiLayers",
530  "InDetTrackParticles.numberOfTRTHits.numberOfTRTHighThresholdHits.vx.vy.vz",
531  "InDetLargeD0TrackParticles.numberOfTRTHits.numberOfTRTHighThresholdHits.vx.vy.vz",
532  "PrimaryVertices.chiSquared.covariance", "Electrons.deltaEta1.DFCommonElectronsLHVeryLoosenod0",
533  "egammaClusters.calE.calEta.calPhi.e_sampl.eta_sampl.etaCalo.phiCalo.ETACALOFRAME.PHICALOFRAME",
534  "HLT_xAOD__ElectronContainer_egamma_ElectronsAuxDyn.charge" ]
535 
536  # Include also trigger objects
537  # DONE: Test it works (HLT objects appear/not-present)
538 
539  BPHY24SlimmingHelper.IncludeMuonTriggerContent = True
540  BPHY24SlimmingHelper.IncludeEgammaTriggerContent = True
541  BPHY24SlimmingHelper.IncludeBPhysTriggerContent = True
542 
543  # Include primary vertices
544  AllVariables += [ "PrimaryVertices" ]
545  print("BPHY24: List of refitted-PV output: ", outRePVList)
546  for i in outRePVList:
547  StaticContent += [ "xAOD::VertexContainer#%s" % i ]
548  StaticContent += [ "xAOD::VertexAuxContainer#%sAux." % i ]
549 
550  # B-vertexing output
551  print("BPHY24: List of B-vertexing output: ", outVtxList)
552  for i in outVtxList:
553  StaticContent += [ "xAOD::VertexContainer#%s" % i ]
554  StaticContent += [ "xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % i ]
555 
556  print("BPHY24: Full list of B-augmentation: ", StaticContent)
557 
558  # Truth information for MC only
559  if isSimulation:
560  AllVariables += [ "TruthEvents",
561  "TruthParticles",
562  "TruthVertices",
563  "MuonTruthParticles" ]
564  AllVariables = list(set(AllVariables)) # remove duplicates
565 
566  BPHY24SlimmingHelper.AllVariables = AllVariables
567  BPHY24SlimmingHelper.StaticContent = StaticContent
568  BPHY24SlimmingHelper.ExtraVariables = ExtraVariables
569  BPHY24ItemList = BPHY24SlimmingHelper.GetItemList()
570  acc.merge(OutputStreamCfg(flags, "DAOD_BPHY24", ItemList=BPHY24ItemList, AcceptAlgs=["BPHY24Kernel"]))
571  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_BPHY24", AcceptAlgs=["BPHY24Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
572  acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True, printComponentsOnly=False)
573  return acc

Variable Documentation

◆ BPHYDerivationName

string BPHY24.BPHYDerivationName = "BPHY24"

Definition at line 11 of file BPHY24.py.

◆ streamName

string BPHY24.streamName = "StreamDAOD_BPHY24"

Definition at line 12 of file BPHY24.py.

python.TrkVKalVrtFitterConfig.JpsiV0VertexFitCfg
def JpsiV0VertexFitCfg(flags, name="JpsiV0VertexFit", **kwargs)
Definition: TrkVKalVrtFitterConfig.py:61
python.HIGG1D1CustomVertexConfig.PrimaryVertexRefittingToolCfg
def PrimaryVertexRefittingToolCfg(flags, **kwargs)
Definition: HIGG1D1CustomVertexConfig.py:7
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
commonBPHYMethodsCfg.BPHY_TrkVKalVrtFitterCfg
def BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName, **kwargs)
Definition: commonBPHYMethodsCfg.py:6
BPHY24.BPHY24Cfg
def BPHY24Cfg(flags)
Definition: BPHY24.py:14
V0ToolConfig.BPHY_Reco_V0FinderCfg
def BPHY_Reco_V0FinderCfg(flags, derivation="", suffix="", V0ContainerName="", KshortContainerName="", LambdaContainerName="", LambdabarContainerName="", CheckVertexContainers=[], **kwargs)
Definition: V0ToolConfig.py:46
python.InDetTrackSelectionToolConfig.isoTrackSelectionToolCfg
def isoTrackSelectionToolCfg(flags, name="isoTrackSelectionTool", **kwargs)
Definition: InDetTrackSelectionToolConfig.py:41
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.PartPropSvcConfig.PartPropSvcCfg
def PartPropSvcCfg(flags, **kwargs)
Definition: PartPropSvcConfig.py:6
V0ToolConfig.BPHY_InDetV0FinderToolCfg
def BPHY_InDetV0FinderToolCfg(flags, derivation="", V0ContainerName="", KshortContainerName="", LambdaContainerName="", LambdabarContainerName="", TrackParticleCollection="InDetTrackParticles", RelinkTracks=[])
Definition: V0ToolConfig.py:5
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
commonBPHYMethodsCfg.BPHY_V0ToolCfg
def BPHY_V0ToolCfg(flags, BPHYDerivationName)
Definition: commonBPHYMethodsCfg.py:11
python.TrackIsolationDecoratorConfig.TrackIsolationToolCfg
def TrackIsolationToolCfg(ConfigFlags, name="TrackIsolationTool", **kwargs)
Definition: TrackIsolationDecoratorConfig.py:12
python.InDetConversionFinderToolsConfig.BPHY_VertexPointEstimatorCfg
def BPHY_VertexPointEstimatorCfg(flags, name="BPHY_VertexPointEstimator", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:69
commonBPHYMethodsCfg.getDefaultAllVariables
def getDefaultAllVariables()
Definition: commonBPHYMethodsCfg.py:32
python.InDetToolsConfig.InDetLRTMergeCfg
def InDetLRTMergeCfg(flags, name="InDetLRTMerge", **kwargs)
Definition: InDetToolsConfig.py:14
python.InDetTrackSelectorToolConfig.BPHY_InDetDetailedTrackSelectorToolCfg
def BPHY_InDetDetailedTrackSelectorToolCfg(flags, name='BPHY_InDetDetailedTrackSelectorTool', **kwargs)
Definition: InDetTrackSelectorToolConfig.py:213
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:222
SlimmingHelper
Definition: SlimmingHelper.py:1
TrackVertexAssociationToolConfig.isoTTVAToolCfg
def isoTTVAToolCfg(flags, name="ttvaToolForIso", **kwargs)
Definition: TrackVertexAssociationToolConfig.py:36