ATLAS Offline Software
Loading...
Searching...
No Matches
BPHY16 Namespace Reference

Functions

 BPHY16Cfg (flags)

Variables

str BPHYDerivationName = "BPHY16"
str streamName = "StreamDAOD_BPHY16"

Function Documentation

◆ BPHY16Cfg()

BPHY16.BPHY16Cfg ( flags)

Definition at line 14 of file BPHY16.py.

14def BPHY16Cfg(flags):
15 from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg)
16 from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg
17 acc = ComponentAccumulator()
18 isSimulation = flags.Input.isMC
19 V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, BPHYDerivationName))
20 vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName)) # VKalVrt vertex fitter
21 acc.addPublicTool(vkalvrt)
22 acc.addPublicTool(V0Tools)
23 trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, BPHYDerivationName))
24 acc.addPublicTool(trackselect)
25 vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName))
26 acc.addPublicTool(vpest)
27 BPHY16JpsiFinder = CompFactory.Analysis.JpsiFinder(
28 name = "BPHY16JpsiFinder",
29 muAndMu = True,
30 muAndTrack = False,
31 TrackAndTrack = False,
32 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
33 invMassUpper = 12000.0,
34 invMassLower = 8000.,
35 Chi2Cut = 20.,
36 oppChargesOnly = True,
37 atLeastOneComb = True,
38 useCombinedMeasurement = False, # Only takes effect if combOnly=True
39 muonCollectionKey = "Muons",
40 TrackParticleCollection = "InDetTrackParticles",
41 V0VertexFitterTool = None, # V0 vertex fitter
42 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
43 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
44 TrackSelectorTool = trackselect,
45 VertexPointEstimator = vpest,
46 useMCPCuts = False )
47 acc.addPublicTool(BPHY16JpsiFinder)
48 BPHY16_Reco_mumu = CompFactory.DerivationFramework.Reco_Vertex(
49 name = "BPHY16_Reco_mumu",
50 VertexSearchTool = BPHY16JpsiFinder,
51 OutputVtxContainerName = "BPHY16OniaCandidates",
52 PVContainerName = "PrimaryVertices",
53 RefPVContainerName = "BPHY16RefittedPrimaryVertices1",
54 RefitPV = True,
55 V0Tools = V0Tools,
56 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
57 MaxPVrefit = 100000,
58 DoVertexType = 7)
59
60 BPHY16_Select_Upsi = CompFactory.DerivationFramework.Select_onia2mumu(
61 name = "BPHY16_Select_Upsi",
62 HypothesisName = "Upsilon",
63 InputVtxContainerName = "BPHY16OniaCandidates",
64 V0Tools = V0Tools,
65 VtxMassHypo = 9460.30,
66 MassMin = 8000.,
67 MassMax = 12000.,
68 Chi2Max = 200,
69 DoVertexType = 7)
70
71 BPHY16Plus2Tracks = CompFactory.Analysis.JpsiPlus2Tracks(name = "BPHY16Plus2Tracks",
72 kaonkaonHypothesis = False,
73 pionpionHypothesis = False,
74 kaonpionHypothesis = False,
75 ManualMassHypo = [ 105.658, 105.658, 105.658, 105.658 ],
76 trkThresholdPt = 0.0,
77 trkMaxEta = 3.0,
78 BMassUpper = 50000.0,
79 BMassLower = 0,
80 oppChargesOnly = False,
81 Chi2Cut = 100.0,
82 JpsiContainerKey = "BPHY16OniaCandidates",
83 TrackParticleCollection = "InDetTrackParticles",
84 MuonsUsedInJpsi = "Muons",
85 ExcludeJpsiMuonsOnly = True,
86 RequireNMuonTracks = 1,
87 TrkVertexFitterTool = vkalvrt,
88 TrackSelectorTool = trackselect,
89 UseMassConstraint = False)
90
91 BPHY16FourTrackSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(name = "BPHY16FourTrackSelectAndWrite",
92 VertexSearchTool = BPHY16Plus2Tracks,
93 OutputVtxContainerName = "BPHY16FourTrack",
94 PVContainerName = "PrimaryVertices",
95 RefPVContainerName = "BPHY16RefittedPrimaryVertices2",
96 RefitPV = True,
97 V0Tools = V0Tools,
98 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
99 MaxPVrefit = 10000, DoVertexType = 7)
100
101 BPHY16_Select_FourTrack = CompFactory.DerivationFramework.Select_onia2mumu(
102 name = "BPHY16_Select_FourTracks",
103 HypothesisName = "FourTracks",
104 InputVtxContainerName = "BPHY16FourTrack",
105 V0Tools = V0Tools,
106 TrkMasses = [105.658, 105.658, 105.658, 105.658],
107 VtxMassHypo = 18100.0,
108 MassMin = 0,
109 MassMax = 500000,
110 Chi2Max = BPHY16Plus2Tracks.Chi2Cut)
111 BPHY16_Revertex = CompFactory.DerivationFramework.ReVertex(
112 name = "BPHY16_ReVertex",
113 InputVtxContainerName = "BPHY16FourTrack",
114 V0Tools = V0Tools,
115 TrackIndices = [ 2, 3 ],
116 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
117 TrkVertexFitterTool = vkalvrt,
118 OutputVtxContainerName = "BPHY16TwoTrack")
119 BPHY16_Select_TwoTrack = CompFactory.DerivationFramework.Select_onia2mumu(
120 name = "BPHY16_Select_TwoTracks",
121 HypothesisName = "TwoTracks",
122 InputVtxContainerName = "BPHY16TwoTrack",
123 V0Tools = V0Tools,
124 TrkMasses = [105.658, 105.658],
125 VtxMassHypo = 18100.0,
126 MassMin = 1,
127 MassMax = 500000,
128 Chi2Max = 90)
129
130 from DerivationFrameworkTools.DerivationFrameworkToolsConfig import (
131 xAODStringSkimmingToolCfg)
132 BPHY16_SelectEvent = acc.getPrimaryAndMerge(xAODStringSkimmingToolCfg(
133 flags, name = "BPHY16_SelectEvent",
134 expression = "count(BPHY16FourTrack.passed_FourTracks) > 0"))
135
136 augTools = [BPHY16_Reco_mumu, BPHY16_Select_Upsi, BPHY16FourTrackSelectAndWrite, BPHY16_Select_FourTrack, BPHY16_Revertex, BPHY16_Select_TwoTrack]
137 skimTools = [BPHY16_SelectEvent]
138 for t in augTools +skimTools : acc.addPublicTool(t)
139 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel("BPHY16Kernel",
140 AugmentationTools = augTools,
141 #Only skim if not MC
142 SkimmingTools = skimTools,
143 ThinningTools = []))
144
145 #====================================================================
146 # Slimming
147 #====================================================================
148
149 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
150 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
151 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
152 BPHY16SlimmingHelper = SlimmingHelper("BPHY16SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
153 from DerivationFrameworkBPhys.commonBPHYMethodsCfg import getDefaultAllVariables
154 AllVariables = getDefaultAllVariables()
155 StaticContent = []
156
157 # Needed for trigger objects
158 BPHY16SlimmingHelper.IncludeMuonTriggerContent = True
159 BPHY16SlimmingHelper.IncludeBPhysTriggerContent = True
160
161
162 AllVariables += ["PrimaryVertices"]
163 StaticContent += ["xAOD::VertexContainer#BPHY16RefittedPrimaryVertices1"]
164 StaticContent += ["xAOD::VertexAuxContainer#BPHY16RefittedPrimaryVertices1Aux."]
165 StaticContent += ["xAOD::VertexContainer#BPHY16RefittedPrimaryVertices2"]
166 StaticContent += ["xAOD::VertexAuxContainer#BPHY16RefittedPrimaryVertices2Aux."]
167
168
169 AllVariables += ["InDetTrackParticles"]
170
171
174 AllVariables += ["CombinedMuonTrackParticles"]
175 AllVariables += ["ExtrapolatedMuonTrackParticles"]
176
177
178 AllVariables += ["Muons"]
179
180
181 StaticContent += ["xAOD::VertexContainer#%s" % BPHY16_Reco_mumu.OutputVtxContainerName]
182
183 StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY16_Reco_mumu.OutputVtxContainerName]
184
185 StaticContent += ["xAOD::VertexContainer#%s" % BPHY16FourTrackSelectAndWrite.OutputVtxContainerName]
186
187 StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY16FourTrackSelectAndWrite.OutputVtxContainerName]
188
189 StaticContent += ["xAOD::VertexContainer#%s" % BPHY16_Revertex.OutputVtxContainerName]
190
191 StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY16_Revertex.OutputVtxContainerName]
192
193
194 # Truth information for MC only
195 if isSimulation:
196 AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"]
197 BPHY16SlimmingHelper.AllVariables = AllVariables
198 BPHY16SlimmingHelper.StaticContent = StaticContent
199 BPHY16ItemList = BPHY16SlimmingHelper.GetItemList()
200 acc.merge(OutputStreamCfg(flags, "DAOD_BPHY16", ItemList=BPHY16ItemList, AcceptAlgs=["BPHY16Kernel"]))
201 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_BPHY16", AcceptAlgs=["BPHY16Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
202 acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True)
203 return acc

Variable Documentation

◆ BPHYDerivationName

str BPHY16.BPHYDerivationName = "BPHY16"

Definition at line 11 of file BPHY16.py.

◆ streamName

str BPHY16.streamName = "StreamDAOD_BPHY16"

Definition at line 12 of file BPHY16.py.