ATLAS Offline Software
Functions | Variables
BPHY10 Namespace Reference

Functions

def BPHY10Cfg (flags)
 

Variables

string BPHYDerivationName = "BPHY10"
 
string streamName = "StreamDAOD_BPHY10"
 

Function Documentation

◆ BPHY10Cfg()

def BPHY10.BPHY10Cfg (   flags)

Definition at line 14 of file BPHY10.py.

14 def BPHY10Cfg(flags):
15  from AthenaServices.PartPropSvcConfig import PartPropSvcCfg
16  from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg)
17  from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg
18 
19  acc = ComponentAccumulator()
20  acc.getPrimaryAndMerge(PartPropSvcCfg(flags))
21  isSimulation = flags.Input.isMC
22  BPHY10_AugOriginalCounts = CompFactory.DerivationFramework.AugOriginalCounts(
23  name = "BPHY10_AugOriginalCounts",
24  VertexContainer = "PrimaryVertices",
25  TrackContainer = "InDetTrackParticles" )
26  V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, BPHYDerivationName))
27  vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName)) # VKalVrt vertex fitter
28  acc.addPublicTool(vkalvrt)
29  acc.addPublicTool(V0Tools)
30  trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, BPHYDerivationName))
31  acc.addPublicTool(trackselect)
32  vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName))
33  acc.addPublicTool(vpest)
34  BPHY10JpsiFinder = CompFactory.Analysis.JpsiFinder(
35  name = "BPHY10JpsiFinder",
36  muAndMu = True,
37  muAndTrack = False,
38  TrackAndTrack = False,
39  assumeDiMuons = True,
40  invMassUpper = 4000.0,
41  invMassLower = 2600.0,
42  Chi2Cut = 200.,
43  oppChargesOnly = True,
44  combOnly = True,
45  atLeastOneComb = False,
46  useCombinedMeasurement = False, # Only takes effect if combOnly=True
47  muonCollectionKey = "Muons",
48  TrackParticleCollection = "InDetTrackParticles",
49  V0VertexFitterTool = None, # V0 vertex fitter
50  useV0Fitter = False, # if False a TrkVertexFitterTool will be used
51  TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
52  TrackSelectorTool = trackselect,
53  VertexPointEstimator = vpest,
54  useMCPCuts = False)
55 
56  BPHY10JpsiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(
57  name = "BPHY10JpsiSelectAndWrite",
58  VertexSearchTool = BPHY10JpsiFinder,
59  OutputVtxContainerName = "BPHY10JpsiCandidates",
60  PVContainerName = "PrimaryVertices",
61  V0Tools = V0Tools,
62  PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
63  RefPVContainerName = "SHOULDNOTBEUSED",
64  DoVertexType = 1)
65  BPHY10_Select_Jpsi2mumu = CompFactory.DerivationFramework.Select_onia2mumu(
66  name = "BPHY10_Select_Jpsi2mumu",
67  HypothesisName = "Jpsi",
68  InputVtxContainerName = "BPHY10JpsiCandidates",
69  V0Tools = V0Tools,
70  VtxMassHypo = 3096.916,
71  MassMin = 2600.0,
72  MassMax = 4000.0,
73  Chi2Max = 200,
74  DoVertexType =1)
75 
76  BPHY10BdJpsiKst = CompFactory.Analysis.JpsiPlus2Tracks(
77  name = "BPHY10BdJpsiKst",
78  kaonkaonHypothesis = False,
79  pionpionHypothesis = False,
80  kaonpionHypothesis = True,
81  trkThresholdPt = 500.0,
82  trkMaxEta = 3.0,
83  BThresholdPt = 5000.,
84  BMassLower = 4300.0,
85  BMassUpper = 6300.0,
86  JpsiContainerKey = "BPHY10JpsiCandidates",
87  TrackParticleCollection = "InDetTrackParticles",
88  ExcludeCrossJpsiTracks = False, #setting this to False rejects the muons from J/psi candidate
89  TrkVertexFitterTool = vkalvrt,
90  TrackSelectorTool = trackselect,
91  UseMassConstraint = True,
92  Chi2Cut = 10.0,
93  DiTrackPt = 500.,
94  TrkQuadrupletMassLower = 3500.0,
95  TrkQuadrupletMassUpper = 6800.0,
96  FinalDiTrackPt = 500.
97  )
98  BPHY10V0ContainerName = "BPHY10RecoV0Candidates"
99  BPHY10KshortContainerName = "BPHY10RecoKshortCandidates"
100  BPHY10LambdaContainerName = "BPHY10RecoLambdaCandidates"
101  BPHY10LambdabarContainerName = "BPHY10RecoLambdabarCandidates"
102 
103  BPHY10BdKstSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(
104  name = "BPHY10BdKstSelectAndWrite",
105  VertexSearchTool = BPHY10BdJpsiKst,
106  OutputVtxContainerName = "BPHY10BdJpsiKstCandidates",
107  PVContainerName = "PrimaryVertices",
108  V0Tools = V0Tools,
109  PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
110  RefPVContainerName = "BPHY10RefittedPrimaryVertices1",
111  RefitPV = True,
112  MaxPVrefit = 10000,
113  DoVertexType = 7)
114 
115  BPHY10_Select_Bd2JpsiKst = CompFactory.DerivationFramework.Select_onia2mumu(
116  name = "BPHY10_Select_Bd2JpsiKst",
117  HypothesisName = "Bd",
118  InputVtxContainerName = "BPHY10BdJpsiKstCandidates",
119  V0Tools = V0Tools,
120  TrkMasses = [105.658, 105.658, 493.677, 139.570],
121  VtxMassHypo = 5279.6,
122  MassMin = 100.0, #no mass cuts here
123  MassMax = 100000.0, #no mass cuts here
124  Chi2Max = 200)
125 
126  BPHY10_Select_Bd2JpsiKstbar = CompFactory.DerivationFramework.Select_onia2mumu(
127  name = "BPHY10_Select_Bd2JpsiKstbar",
128  HypothesisName = "Bdbar",
129  InputVtxContainerName = "BPHY10BdJpsiKstCandidates",
130  V0Tools = V0Tools,
131  TrkMasses = [105.658, 105.658, 139.570, 493.677],
132  VtxMassHypo = 5279.6,
133  MassMin = 100.0, #no mass cuts here
134  MassMax = 100000.0, #no mass cuts here
135  Chi2Max = 200)
136 
137  from DerivationFrameworkBPhys.V0ToolConfig import BPHY_Reco_V0FinderCfg
138  BPHY10_Reco_V0Finder = acc.popToolsAndMerge(BPHY_Reco_V0FinderCfg(
139  flags, derivation = BPHYDerivationName,
140  V0ContainerName = BPHY10V0ContainerName,
141  KshortContainerName = BPHY10KshortContainerName,
142  LambdaContainerName = BPHY10LambdaContainerName,
143  LambdabarContainerName = BPHY10LambdabarContainerName,
144  CheckVertexContainers = ['BPHY10JpsiCandidates']))
145 
146  from TrkConfig.TrkVKalVrtFitterConfig import JpsiV0VertexFitCfg
147  JpsiV0VertexFit = acc.popToolsAndMerge(JpsiV0VertexFitCfg(flags))
148  acc.addPublicTool(JpsiV0VertexFit)
149 
150  BPHY10JpsiKshort = CompFactory.DerivationFramework.JpsiPlusV0Cascade(
151  name = "BPHY10JpsiKshort",
152  V0Tools = V0Tools,
153  HypothesisName = "Bd",
154  TrkVertexFitterTool = JpsiV0VertexFit,
155  V0Hypothesis = 310,
156  PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
157  JpsiMassLowerCut = 2800.,
158  JpsiMassUpperCut = 4000.,
159  V0MassLowerCut = 400.,
160  V0MassUpperCut = 600.,
161  MassLowerCut = 4300.,
162  MassUpperCut = 6300.,
163  RefitPV = True,
164  RefPVContainerName = "BPHY10RefittedPrimaryVertices2",
165  JpsiVertices = "BPHY10JpsiCandidates",
166  CascadeVertexCollections= ["BPHY10JpsiKshortCascadeSV2", "BPHY10JpsiKshortCascadeSV1"],
167  V0Vertices = BPHY10V0ContainerName)
168 
169  BPHY10JpsiLambda = CompFactory.DerivationFramework.JpsiPlusV0Cascade(
170  name = "BPHY10JpsiLambda",
171  V0Tools = V0Tools,
172  HypothesisName = "Lambda_b",
173  TrkVertexFitterTool = JpsiV0VertexFit,
174  PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
175  V0Hypothesis = 3122,
176  JpsiMassLowerCut = 2800.,
177  JpsiMassUpperCut = 4000.,
178  V0MassLowerCut = 1050.,
179  V0MassUpperCut = 1250.,
180  MassLowerCut = 4600.,
181  MassUpperCut = 6600.,
182  RefitPV = True,
183  RefPVContainerName = "BPHY10RefittedPrimaryVertices3",
184  JpsiVertices = "BPHY10JpsiCandidates",
185  CascadeVertexCollections= ["BPHY10JpsiLambdaCascadeSV2", "BPHY10JpsiLambdaCascadeSV1"],
186  V0Vertices = BPHY10V0ContainerName)
187 
188  BPHY10JpsiLambdabar = CompFactory.DerivationFramework.JpsiPlusV0Cascade(
189  name = "BPHY10JpsiLambdabar",
190  HypothesisName = "Lambda_bbar",
191  V0Tools = V0Tools,
192  TrkVertexFitterTool = JpsiV0VertexFit,
193  PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
194  V0Hypothesis = -3122,
195  JpsiMassLowerCut = 2800.,
196  JpsiMassUpperCut = 4000.,
197  V0MassLowerCut = 1050.,
198  V0MassUpperCut = 1250.,
199  MassLowerCut = 4600.,
200  MassUpperCut = 6600.,
201  RefitPV = True,
202  RefPVContainerName = "BPHY10RefittedPrimaryVertices4",
203  JpsiVertices = "BPHY10JpsiCandidates",
204  CascadeVertexCollections= ["BPHY10JpsiLambdabarCascadeSV2", "BPHY10JpsiLambdabarCascadeSV1"],
205  V0Vertices = BPHY10V0ContainerName)
206 
207  CascadeCollections = []
208  CascadeCollections += BPHY10JpsiKshort.CascadeVertexCollections
209  CascadeCollections += BPHY10JpsiLambda.CascadeVertexCollections
210  CascadeCollections += BPHY10JpsiLambdabar.CascadeVertexCollections
211 
212  if not isSimulation: #Only Skim Data
213  BPHY10_SelectBdJpsiKstEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool(
214  name = "BPHY10_SelectBdJpsiKstEvent",
215  expression = "(count(BPHY10BdJpsiKstCandidates.passed_Bd > 0) + count(BPHY10BdJpsiKstCandidates.passed_Bdbar > 0)) >0")
216 
217  BPHY10_cascadeCheck = CompFactory.DerivationFramework.AnyVertexSkimmingTool("BPHY10_AnyVertexSkimmingTool",
218  VertexContainerNames =CascadeCollections,
219  UseHandles = True )
220  BPHY10SkimmingOR = CompFactory.DerivationFramework.FilterCombinationOR(
221  "BPHY10SkimmingOR",
222  FilterList = [BPHY10_cascadeCheck, BPHY10_SelectBdJpsiKstEvent])
223  acc.addPublicTool(BPHY10_cascadeCheck)
224  acc.addPublicTool(BPHY10_SelectBdJpsiKstEvent)
225  acc.addPublicTool(BPHY10SkimmingOR)
226 
227 
228  augTools = [BPHY10JpsiSelectAndWrite, BPHY10_Select_Jpsi2mumu,
229  BPHY10BdKstSelectAndWrite, BPHY10_Select_Bd2JpsiKst, BPHY10_Select_Bd2JpsiKstbar,
230  BPHY10_Reco_V0Finder, BPHY10JpsiKshort, BPHY10JpsiLambda, BPHY10JpsiLambdabar,
231  BPHY10_AugOriginalCounts]
232  for t in augTools : acc.addPublicTool(t)
233  #from AthenaCommon.Constants import DEBUG
234  acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel("BPHY10Kernel",
235  AugmentationTools = augTools,
236  #OutputLevel = DEBUG,
237  #Only skim if not MC
238  SkimmingTools = [BPHY10SkimmingOR] if not isSimulation else [],
239  ThinningTools = []))
240  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
241  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
242  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
243  BPHY10SlimmingHelper = SlimmingHelper("BPHY10SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
244  from DerivationFrameworkBPhys.commonBPHYMethodsCfg import getDefaultAllVariables
245  AllVariables = getDefaultAllVariables()
246  StaticContent = []
247 
248  # Needed for trigger objects
249  BPHY10SlimmingHelper.IncludeMuonTriggerContent = True
250  BPHY10SlimmingHelper.IncludeBPhysTriggerContent = True
251 
252 
253  AllVariables += ["PrimaryVertices"]
254 
255  for x in range(1,5):
256  StaticContent += ["xAOD::VertexContainer#BPHY10RefittedPrimaryVertices%s" % str(x)]
257  StaticContent += ["xAOD::VertexAuxContainer#BPHY10RefittedPrimaryVertices%sAux." % str(x)]
258 
259 
260  AllVariables += ["InDetTrackParticles"]
261 
262 
265  AllVariables += ["CombinedMuonTrackParticles"]
266  AllVariables += ["ExtrapolatedMuonTrackParticles"]
267 
268 
269  AllVariables += ["Muons", "MuonsLRT"]
270 
271 
272 
273  StaticContent += ["xAOD::VertexContainer#%s" % BPHY10JpsiSelectAndWrite.OutputVtxContainerName]
274 
275  StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10JpsiSelectAndWrite.OutputVtxContainerName]
276 
277  StaticContent += ["xAOD::VertexContainer#%s" % BPHY10BdKstSelectAndWrite.OutputVtxContainerName]
278  StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10BdKstSelectAndWrite.OutputVtxContainerName]
279 
280  StaticContent += ["xAOD::VertexContainer#%s" % BPHY10V0ContainerName]
281  StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10V0ContainerName]
282  StaticContent += ["xAOD::VertexContainer#%s" % BPHY10KshortContainerName]
283  StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10KshortContainerName]
284  StaticContent += ["xAOD::VertexContainer#%s" % BPHY10LambdaContainerName]
285  StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10LambdaContainerName]
286  StaticContent += ["xAOD::VertexContainer#%s" % BPHY10LambdabarContainerName]
287  StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10LambdabarContainerName]
288 
289  for cascades in CascadeCollections:
290  StaticContent += ["xAOD::VertexContainer#%s" % cascades]
291  StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % cascades]
292 
293  # Tagging information (in addition to that already requested by usual algorithms)
294  AllVariables += ["GSFTrackParticles", "MuonSpectrometerTrackParticles" ]
295 
296  # Truth information for MC only
297  if isSimulation:
298  AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"]
299 
300  AllVariables = list(set(AllVariables)) # remove duplicates
301 
302  BPHY10SlimmingHelper.AllVariables = AllVariables
303  BPHY10SlimmingHelper.StaticContent = StaticContent
304  BPHY10SlimmingHelper.SmartCollections = []
305  BPHY10ItemList = BPHY10SlimmingHelper.GetItemList()
306  acc.merge(OutputStreamCfg(flags, "DAOD_BPHY10", ItemList=BPHY10ItemList, AcceptAlgs=["BPHY10Kernel"]))
307  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_BPHY10", AcceptAlgs=["BPHY10Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
308  acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True, printComponentsOnly=False)
309  return acc

Variable Documentation

◆ BPHYDerivationName

string BPHY10.BPHYDerivationName = "BPHY10"

Definition at line 11 of file BPHY10.py.

◆ streamName

string BPHY10.streamName = "StreamDAOD_BPHY10"

Definition at line 12 of file BPHY10.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
BPHY10.BPHY10Cfg
def BPHY10Cfg(flags)
Definition: BPHY10.py:14
V0ToolConfig.BPHY_Reco_V0FinderCfg
def BPHY_Reco_V0FinderCfg(flags, derivation="", suffix="", V0ContainerName="", KshortContainerName="", LambdaContainerName="", LambdabarContainerName="", CheckVertexContainers=[], **kwargs)
Definition: V0ToolConfig.py:46
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.PartPropSvcConfig.PartPropSvcCfg
def PartPropSvcCfg(flags, **kwargs)
Definition: PartPropSvcConfig.py:6
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
commonBPHYMethodsCfg.BPHY_V0ToolCfg
def BPHY_V0ToolCfg(flags, BPHYDerivationName)
Definition: commonBPHYMethodsCfg.py:11
python.InDetConversionFinderToolsConfig.BPHY_VertexPointEstimatorCfg
def BPHY_VertexPointEstimatorCfg(flags, name="BPHY_VertexPointEstimator", **kwargs)
Definition: InDetConversionFinderToolsConfig.py:69
commonBPHYMethodsCfg.getDefaultAllVariables
def getDefaultAllVariables()
Definition: commonBPHYMethodsCfg.py:32
str
Definition: BTagTrackIpAccessor.cxx:11
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