15 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import (
16 BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg,
17 BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg,
19 from JpsiUpsilonTools.JpsiUpsilonToolsConfig
import PrimaryVertexRefittingToolCfg
20 acc = ComponentAccumulator()
21 isSimulation = flags.Input.isMC
22 V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, BPHYDerivationName))
23 vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName))
24 acc.addPublicTool(vkalvrt)
25 acc.addPublicTool(V0Tools)
26 trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, BPHYDerivationName))
27 acc.addPublicTool(trackselect)
28 vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName))
29 acc.addPublicTool(vpest)
35 BPHY21_triggerList = [
41 "HLT_mu18_nomucomb_mu8noL1",
43 "HLT_mu20_nomucomb_mu8noL1",
45 "HLT_mu22_nomucomb_mu8noL1",
48 "HLT_mu10_mu6_bJpsimumu",
49 "HLT_mu22_mu8noL1_calotag_0eta010_L1MU1"
52 BPHY21_JpsiFinder = CompFactory.Analysis.JpsiFinder(
53 name =
"BPHY21_JpsiFinder",
56 TrackAndTrack =
False,
58 muonThresholdPt = 2700,
59 invMassUpper = 3400.0,
60 invMassLower = 2800.0,
62 oppChargesOnly =
True,
64 atLeastOneComb =
False,
65 useCombinedMeasurement =
False,
66 muonCollectionKey =
"Muons",
67 TrackParticleCollection =
"InDetTrackParticles",
68 V0VertexFitterTool =
None,
70 TrkVertexFitterTool = vkalvrt,
71 TrackSelectorTool = trackselect,
72 VertexPointEstimator = vpest,
74 acc.addPublicTool(BPHY21_JpsiFinder)
75 BPHY21_JpsiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(
76 name =
"BPHY21_JpsiSelectAndWrite",
77 VertexSearchTool = BPHY21_JpsiFinder,
78 OutputVtxContainerName =
"BPHY21_JpsiCandidates",
80 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
81 PVContainerName =
"PrimaryVertices",
82 RefPVContainerName =
"SHOULDNOTBEUSED",
84 BPHY21_Select_Jpsi2mumu = CompFactory.DerivationFramework.Select_onia2mumu(
85 name =
"BPHY21_Select_Jpsi2mumu",
86 HypothesisName =
"Jpsi",
87 InputVtxContainerName =
"BPHY21_JpsiCandidates",
89 VtxMassHypo = 3096.900,
96 BPHY21_AugOriginalCounts = acc.popToolsAndMerge(
97 AugOriginalCountsCfg(flags, name =
"BPHY21_AugOriginalCounts"))
100 BPHY21_TriggerSkim = CompFactory.DerivationFramework.TriggerSkimmingTool(name =
"BPHY21_TriggerSkim",
101 TriggerListOR = BPHY21_triggerList)
102 BPHY21_SelectJpsiEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool(
103 name =
"BPHY21_SelectJpsiEvent",
104 expression =
"count(BPHY21_JpsiCandidates.passed_Jpsi) > 0")
106 BPHY21_SkimmingOR = CompFactory.DerivationFramework.FilterCombinationOR(
"BPHY21_SkimmingOR",
107 FilterList = [ BPHY21_TriggerSkim, BPHY21_SelectJpsiEvent] )
108 acc.addPublicTool(BPHY21_SelectJpsiEvent)
109 acc.addPublicTool(BPHY21_TriggerSkim)
110 acc.addPublicTool(BPHY21_SkimmingOR)
112 augTools = [BPHY21_JpsiSelectAndWrite, BPHY21_Select_Jpsi2mumu,
113 BPHY21_AugOriginalCounts]
114 for t
in augTools : acc.addPublicTool(t)
116 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
"BPHY21Kernel",
117 AugmentationTools = augTools,
119 SkimmingTools = [BPHY21_SkimmingOR]
if not isSimulation
else [],
124 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
125 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
126 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
127 BPHY21_SlimmingHelper =
SlimmingHelper(
"BPHY21_SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
128 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import getDefaultAllVariables
129 BPHY21_AllVariables = getDefaultAllVariables()
130 BPHY21_StaticContent = []
133 BPHY21_SlimmingHelper.IncludeMuonTriggerContent =
True
134 BPHY21_SlimmingHelper.IncludeBPhysTriggerContent =
True
137 BPHY21_AllVariables += [
"PrimaryVertices"]
138 BPHY21_StaticContent += [
"xAOD::VertexContainer#BPHY21_RefittedPrimaryVertices"]
139 BPHY21_StaticContent += [
"xAOD::VertexAuxContainer#BPHY21_RefittedPrimaryVerticesAux."]
142 BPHY21_AllVariables += [
"InDetTrackParticles"]
147 BPHY21_AllVariables += [
"CombinedMuonTrackParticles"]
148 BPHY21_AllVariables += [
"ExtrapolatedMuonTrackParticles"]
151 BPHY21_AllVariables += [
"Muons"]
155 BPHY21_StaticContent += [
"xAOD::VertexContainer#%s" % BPHY21_JpsiSelectAndWrite.OutputVtxContainerName]
157 BPHY21_StaticContent += [
"xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY21_JpsiSelectAndWrite.OutputVtxContainerName]
166 BPHY21_AllVariables += [
"TruthEvents",
"TruthParticles",
"TruthVertices",
"MuonTruthParticles"]
169 BPHY21_AllVariables = list(
set(BPHY21_AllVariables))
170 BPHY21_SlimmingHelper.AllVariables = BPHY21_AllVariables
171 BPHY21_SlimmingHelper.StaticContent = BPHY21_StaticContent
172 acc.merge(OutputStreamCfg(flags,
"DAOD_BPHY21", ItemList=BPHY21_SlimmingHelper.GetItemList(), AcceptAlgs=[
"BPHY21Kernel"]))
173 acc.merge(SetupMetaDataForStreamCfg(flags,
"DAOD_BPHY21", AcceptAlgs=[
"BPHY21Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
174 acc.printConfig(withDetails=
True, summariseProps=
True, onlyComponents = [], printDefaults=
True)