ATLAS Offline Software
Functions | Variables
python.STDM16 Namespace Reference

Functions

def DStarSelectionToolCfg (flags, name, **kwargs)
 
def STDM16Kernel (flags, name='STDM16Kernel', **kwargs)
 
def STDM16Cfg (flags)
 

Variables

 logSTDM16 = logging.getLogger('STDM16')
 
float massD0 = 1864.84
 
float massPiPlus = 139.570
 
float massKPlus = 493.677
 
string CandidatesContainerName = "STDM16_D0Candidates"
 
string streamName = "StreamDAOD_STDM16"
 

Function Documentation

◆ DStarSelectionToolCfg()

def python.STDM16.DStarSelectionToolCfg (   flags,
  name,
**  kwargs 
)

Definition at line 24 of file STDM16.py.

24 def DStarSelectionToolCfg(flags, name, **kwargs):
25  acc = ComponentAccumulator()
26  acc.addPublicTool(CompFactory.DerivationFramework.DStarSelectionTool(name = "STDM16_DStarSelectionTool",
27  InputVtxContainerName = CandidatesContainerName,
28  DeltaMassMax = 200.0), primary = True)
29  return acc
30 
31 

◆ STDM16Cfg()

def python.STDM16.STDM16Cfg (   flags)

Definition at line 281 of file STDM16.py.

281 def STDM16Cfg(flags):
282 
283  acc = STDM16Kernel(flags)
284  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
285  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
286  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
287  from DerivationFrameworkBPhys.commonBPHYMethodsCfg import getDefaultAllVariables
288 
289  # PFlow augmentation tool
290 
291  AllVariables = getDefaultAllVariables()
292  StaticContent = []
293 
294 
295 
296  AllVariables += ["PrimaryVertices"]
297 
298 
299  AllVariables += ["InDetTrackParticles"]
300 
301 
302  #=======================================
303  # Decide what to save
304  #=======================================
305 
306  StaticContent += ["xAOD::VertexContainer#%s" % CandidatesContainerName ]
307 
308 
309  StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % CandidatesContainerName]
310 
311 
312  # # Truth information for MC only
313  if flags.Input.isMC :
314  AllVariables += ["TruthEvents","TruthParticles", "TruthVertices","MuonTruthParticles", "AntiKt4TruthJets","AntiKt4TruthWZJets"]
315 
316  STDM16SlimmingHelper = SlimmingHelper("STDM16SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
317 
318 
319  STDM16SlimmingHelper.SmartCollections = ["AntiKt4EMPFlowJets",
320  "EventInfo",
321  "Muons",
322  "PrimaryVertices",
323  "InDetTrackParticles"]
324 
325  # This variable is augmented by DStarSelectionTool
326  STDM16SlimmingHelper.ExtraVariables += ["InDetTrackParticles.trackPassDstar",
327  "AntiKt4EMPFlowJets.DFCommonJets_QGTagger_truthjet_nCharged.DFCommonJets_QGTagger_truthjet_pt.DFCommonJets_QGTagger_truthjet_eta.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.GhostPartons.isJvtHS.isJvtPU.IsoFixedCone5PtPUsub",
328  "TruthPrimaryVertices.t.x.y.z",
329  "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
330  "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ.HF_Classification.HF_SimpleClassification",
331  "TauJets.dRmax.etOverPtLeadTrk", "TauJets_MuonRM.dRmax.etOverPtLeadTrk",
332  "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
333  "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
334 
335  # Needed for trigger objects
336 
337  STDM16SlimmingHelper.IncludeJetTriggerContent = True
338  STDM16SlimmingHelper.IncludeMuonTriggerContent = True
339  STDM16SlimmingHelper.AllVariables = AllVariables
340  STDM16SlimmingHelper.StaticContent = StaticContent
341  STDM16ItemList = STDM16SlimmingHelper.GetItemList()
342 
343  acc.merge(OutputStreamCfg(flags, "DAOD_STDM16", ItemList=STDM16ItemList, AcceptAlgs=["STDM16Kernel"]))
344  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_STDM16", AcceptAlgs=["STDM16Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
345  acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True)
346  return acc

◆ STDM16Kernel()

def python.STDM16.STDM16Kernel (   flags,
  name = 'STDM16Kernel',
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel) for STDM16

Definition at line 32 of file STDM16.py.

32 def STDM16Kernel(flags, name='STDM16Kernel', **kwargs):
33  """Configure the derivation framework driving algorithm (kernel) for STDM16"""
34  from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg)
35 
36  acc = ComponentAccumulator()
37 
38  # #============================================================================
39  # # Adding jets, from DerivationFrameworkPhys/python/PhysCommonConfig.py
40  # #============================================================================
41 
42  # MC truth
43  if flags.Input.isMC:
44  from DerivationFrameworkMCTruth.MCTruthCommonConfig import (
45  AddStandardTruthContentsCfg,
46  #AddHFAndDownstreamParticlesCfg,
47  AddMiniTruthCollectionLinksCfg,
48  AddPVCollectionCfg,
49  AddTruthCollectionNavigationDecorationsCfg,
50  TruthClassificationAugmentationsCfg)
51  acc.merge(TruthClassificationAugmentationsCfg(flags))
52  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import DFCommonTruthCharmToolCfg
53  STDM16CommonTruthCharmTool = acc.getPrimaryAndMerge(DFCommonTruthCharmToolCfg(
54  flags,
55  name = "STDM16CommonTruthCharmTool"))
56  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
57  acc.addEventAlgo(CommonAugmentation("STDM16CommonTruthCharmKernel",AugmentationTools=[STDM16CommonTruthCharmTool]))
58 
59  acc.merge(AddStandardTruthContentsCfg(flags))
61  flags,
62  TruthCollections=["TruthMuons",
63  "TruthBottom",
64  "TruthCharm"
65  ],
66  prefix = 'STDM16_'))
67  # Re-point links on reco objects
68  acc.merge(AddMiniTruthCollectionLinksCfg(flags))
69  acc.merge(AddPVCollectionCfg(flags))
70 
71  # InDet, Muon, Egamma common augmentations
72  from DerivationFrameworkInDet.InDetCommonConfig import InDetCommonCfg
73  from DerivationFrameworkMuons.MuonsCommonConfig import MuonsCommonCfg
74  from DerivationFrameworkEGamma.EGammaCommonConfig import EGammaCommonCfg
75 
76  # TODO: need to find the new flags equivalent for the missing settings below, then we can
77  # drop these kwargs and do everything via the flags
78  acc.merge(InDetCommonCfg(flags,
79  DoVertexFinding = flags.Tracking.doVertexFinding,
80  AddPseudoTracks = flags.Tracking.doPseudoTracking,
81  DecoLRTTTVA = False,
82  DoR3LargeD0 = flags.Tracking.doLargeD0,
83  StoreSeparateLargeD0Container = flags.Tracking.storeSeparateLargeD0Container,
84  MergeLRT = False))
85  acc.merge(MuonsCommonCfg(flags))
86  acc.merge(EGammaCommonCfg(flags))
87 
88 
89  from DerivationFrameworkJetEtMiss.JetCommonConfig import JetCommonCfg
90  #from DerivationFrameworkFlavourTag.FtagDerivationConfig import FtagJetCollectionsCfg
91 
92  acc.merge(JetCommonCfg(flags))
93 
94  # FTagJetColl = ['AntiKt4EMPFlowJets', 'AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets']
95 
96  #acc.merge(FtagJetCollectionsCfg(flags,FTagJetColl))
97 
98  from TrkConfig.TrkV0FitterConfig import TrkV0VertexFitter_InDetExtrCfg
99 
100  V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, "STDM16"))
101  vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, "STDM16")) # VKalVrt vertex fitter
102  trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, "STDM16"))
103  vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, "STDM16"))
104  v0fitter = acc.popToolsAndMerge(TrkV0VertexFitter_InDetExtrCfg(flags))
105 
106  acc.addPublicTool(vkalvrt)
107  acc.addPublicTool(V0Tools)
108  acc.addPublicTool(trackselect)
109  acc.addPublicTool(vpest)
110  acc.addPublicTool(v0fitter)
111 
112  #====================================================================
113  # AUGMENTATION TOOLS
114  # Largely based on PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/share/BPHY1.py
115  #====================================================================
116 
117  STDM16_AugmentationTools = []
118 
119  #====================================================================
120  # Perform di-track vertex fit for D0 -> K- pi+ (and c.c.) candidates
121  #====================================================================
122 
123  STDM16_Finder_D0 = CompFactory.Analysis.JpsiFinder(
124  name = "STDM16_Finder_D0",
125  # OutputLevel = INFO,
126  muAndMu = False,
127  muAndTrack = False,
128  TrackAndTrack = True,
129  assumeDiMuons = False,
130  invMassUpper = 3000.0,
131  invMassLower = 0.0,
132  Chi2Cut = 200.,
133  oppChargesOnly = True,
134  atLeastOneComb = False,
135  useCombinedMeasurement = False,
136  track1Mass = massPiPlus, # Not very important, only used to calculate inv. mass cut, leave it loose here
137  track2Mass = massPiPlus, # Not very important, only used to calculate inv. mass cut, leave it loose here
138  trackThresholdPt = 1000.0,
139  muonCollectionKey = "Muons",
140  TrackParticleCollection = "InDetTrackParticles",
141  V0VertexFitterTool = v0fitter, # V0 vertex fitter
142  useV0Fitter = False, # if False a TrkVertexFitterTool will be used
143  TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
144  TrackSelectorTool = trackselect,
145  VertexPointEstimator = vpest,
146  useMCPCuts = False)
147 
148  acc.addPublicTool(STDM16_Finder_D0)
149 
150 
151  from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg
152  STDM16_Reco_D0 = CompFactory.DerivationFramework.Reco_Vertex(
153  name = "STDM16_Reco_D0",
154  VertexSearchTool = STDM16_Finder_D0,
155  OutputVtxContainerName = "STDM16_D0Candidates",
156  PVContainerName = "PrimaryVertices",
157  V0Tools = V0Tools,
158  PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
159  DoVertexType = 7, #ES not sure how this actually works, it only takes 7(all) and 1 but what does it mean ?????
160  RefPVContainerName = "SHOULDNOTBEUSED",
161  RefitPV = False)
162 
163  acc.addPublicTool(STDM16_Reco_D0)
164  STDM16_AugmentationTools += [STDM16_Reco_D0]
165 
166  #====================================================================
167  # Perform some selection on the D0 vertex candidates
168  #====================================================================
169 
170  # Loose D0 vertex cuts
171  cutMinLxy = -999 # mm
172  cutMinMass = 1600.0 # MeV
173  cutMaxMass = 2100.0 # MeV
174  cutMaxChiSq = 50.0
175 
176  # Need two of these, one for each track mass hypothesis
177  STDM16_Select_D0 = CompFactory.DerivationFramework.Select_onia2mumu(
178  name = "STDM16_Select_D0",
179  HypothesisName = "D0",
180  InputVtxContainerName = STDM16_Reco_D0.OutputVtxContainerName,
181  TrkMasses = [massPiPlus,massKPlus],
182  VtxMassHypo = massD0,
183  MassMin = cutMinMass,
184  MassMax = cutMaxMass,
185  Chi2Max = cutMaxChiSq,
186  LxyMin = cutMinLxy)
187 
188  acc.addPublicTool(STDM16_Select_D0)
189  STDM16_AugmentationTools += [STDM16_Select_D0]
190 
191  STDM16_Select_D0b = CompFactory.DerivationFramework.Select_onia2mumu(
192  name = "STDM16_Select_D0b",
193  HypothesisName = "D0b",
194  InputVtxContainerName = STDM16_Reco_D0.OutputVtxContainerName,
195  TrkMasses = [massKPlus,massPiPlus],
196  VtxMassHypo = massD0,
197  MassMin = cutMinMass,
198  MassMax = cutMaxMass,
199  Chi2Max = cutMaxChiSq,
200  LxyMin = cutMinLxy)
201 
202  acc.addPublicTool(STDM16_Select_D0b)
203  STDM16_AugmentationTools += [STDM16_Select_D0b]
204 
205  #====================================================================
206  # Look for D*+ -> D0 + pi+ candidates by looking for tracks which
207  # lead to low DeltaM w.r.t. D0 candidates. Good candidates (tracks and vertices)
208  # are augmented with "passed_Dstar" flag
209  #====================================================================
210 
211  STDM16_DStarSelectionTool = acc.getPrimaryAndMerge(DStarSelectionToolCfg(flags,
212  name = "STDM16_DStarSelectionTool",
213  InputVtxContainerName = STDM16_Reco_D0.OutputVtxContainerName,
214  DeltaMassMax = 200.0))
215 
216  STDM16_AugmentationTools += [STDM16_DStarSelectionTool]
217 
218 
219  #=======================================
220  # SKIMMING TOOLS
221  #=======================================
222  STDM16_SkimmingTools = []
223 
224  #====================================================================
225  # Only retain events with at least one D* candidate
226  #====================================================================
227 
228  # Skimming based on number of vertex candidates
229  SelectExpression = "count(STDM16_D0Candidates.passed_Dstar) > 0"
230 
231  STDM16_SelectEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool(
232  name = "STDM16_SelectEvent",
233  expression = SelectExpression)
234  acc.addPublicTool(STDM16_SelectEvent)
235  STDM16_SkimmingTools += [STDM16_SelectEvent]
236 
237  #====================================================================
238  # THINNING TOOLS
239  #====================================================================
240  STDM16_ThinningTools = []
241 
242  #====================================================================
243  # Only retain vertices passing loose D0 selection in Select_onia2mumu tool
244  #====================================================================
245 
246  STDM16_Thin_Vertex = CompFactory.DerivationFramework.Thin_vtxTrk(
247  name = "STDM16_Thin_Vertex",
248  StreamName = streamName,
249  ThinTracks = False,
250  VertexContainerNames = ["STDM16_D0Candidates"],
251  PassFlags = ["passed_Dstar"] )
252  STDM16_ThinningTools += [STDM16_Thin_Vertex]
253  acc.addPublicTool(STDM16_Thin_Vertex)
254 
255  #====================================================================
256  # Only retain tracks associated with above D0 vertices and soft pion
257  # candiates found in DStarSelectionTool
258  #====================================================================
259 
260  from DerivationFrameworkTools.DerivationFrameworkToolsConfig import GenericObjectThinningCfg
261 
262  track_thinning_expression = "(InDetTrackParticles.trackPassDstar == 1)"
263  STDM16_Thin_Tracks = acc.getPrimaryAndMerge(
265  name = "STDM16_Thin_Tracks",
266  ContainerName = "InDetTrackParticles",
267  StreamName = streamName,
268  SelectionString = track_thinning_expression))
269  STDM16_ThinningTools += [STDM16_Thin_Tracks]
270  acc.addPublicTool(STDM16_Thin_Tracks)
271 
272  acc.addPublicTool(STDM16_SelectEvent)
273  acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel("STDM16Kernel",
274  SkimmingTools = STDM16_SkimmingTools,
275  ThinningTools = STDM16_ThinningTools,
276  AugmentationTools = STDM16_AugmentationTools))
277 
278  return acc
279 
280 

Variable Documentation

◆ CandidatesContainerName

string python.STDM16.CandidatesContainerName = "STDM16_D0Candidates"

Definition at line 19 of file STDM16.py.

◆ logSTDM16

python.STDM16.logSTDM16 = logging.getLogger('STDM16')

Definition at line 12 of file STDM16.py.

◆ massD0

float python.STDM16.massD0 = 1864.84

Definition at line 15 of file STDM16.py.

◆ massKPlus

float python.STDM16.massKPlus = 493.677

Definition at line 17 of file STDM16.py.

◆ massPiPlus

float python.STDM16.massPiPlus = 139.570

Definition at line 16 of file STDM16.py.

◆ streamName

string python.STDM16.streamName = "StreamDAOD_STDM16"

Definition at line 20 of file STDM16.py.

python.STDM16.STDM16Kernel
def STDM16Kernel(flags, name='STDM16Kernel', **kwargs)
Definition: STDM16.py:32
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=None, MetadataItemList=None, disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, keepProvenanceTagsRegEx=None, AcceptAlgs=None, HelperTools=None)
Definition: OutputStreamConfig.py:13
python.HIGG1D1CustomVertexConfig.PrimaryVertexRefittingToolCfg
def PrimaryVertexRefittingToolCfg(flags, **kwargs)
Definition: HIGG1D1CustomVertexConfig.py:7
python.TrkV0FitterConfig.TrkV0VertexFitter_InDetExtrCfg
def TrkV0VertexFitter_InDetExtrCfg(flags, name="TrkV0VertexFitter_InDetExtr", **kwargs)
Definition: TrkV0FitterConfig.py:22
python.JetCommonConfig.JetCommonCfg
def JetCommonCfg(ConfigFlags)
Definition: JetCommonConfig.py:11
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
commonBPHYMethodsCfg.BPHY_TrkVKalVrtFitterCfg
def BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName, **kwargs)
Definition: commonBPHYMethodsCfg.py:6
python.STDM16.DStarSelectionToolCfg
def DStarSelectionToolCfg(flags, name, **kwargs)
Definition: STDM16.py:24
python.MCTruthCommonConfig.AddMiniTruthCollectionLinksCfg
def AddMiniTruthCollectionLinksCfg(flags, **kwargs)
Definition: MCTruthCommonConfig.py:445
python.MCTruthCommonConfig.AddPVCollectionCfg
def AddPVCollectionCfg(flags)
Definition: MCTruthCommonConfig.py:332
python.EGammaCommonConfig.EGammaCommonCfg
def EGammaCommonCfg(ConfigFlags)
Definition: EGammaCommonConfig.py:15
python.MuonsCommonConfig.MuonsCommonCfg
def MuonsCommonCfg(flags, suff="")
Definition: MuonsCommonConfig.py:13
python.TruthDerivationToolsConfig.DFCommonTruthCharmToolCfg
def DFCommonTruthCharmToolCfg(flags, name)
Definition: TruthDerivationToolsConfig.py:36
python.DerivationFrameworkToolsConfig.GenericObjectThinningCfg
def GenericObjectThinningCfg(ConfigFlags, name, **kwargs)
Definition: DerivationFrameworkToolsConfig.py:20
python.MCTruthCommonConfig.TruthClassificationAugmentationsCfg
def TruthClassificationAugmentationsCfg(flags, **kwargs)
Definition: MCTruthCommonConfig.py:96
python.MCTruthCommonConfig.AddStandardTruthContentsCfg
def AddStandardTruthContentsCfg(flags, decorationDressing='dressedPhoton', includeTausInDressingPhotonRemoval=False, navInputCollections=["TruthElectrons", "TruthMuons", "TruthPhotons", "TruthTaus", "TruthNeutrinos", "TruthBSM", "TruthBottom", "TruthTop", "TruthBoson"], prefix='')
Definition: MCTruthCommonConfig.py:179
python.STDM16.STDM16Cfg
def STDM16Cfg(flags)
Definition: STDM16.py:281
commonBPHYMethodsCfg.BPHY_V0ToolCfg
def BPHY_V0ToolCfg(flags, BPHYDerivationName)
Definition: commonBPHYMethodsCfg.py:11
python.MCTruthCommonConfig.AddTruthCollectionNavigationDecorationsCfg
def AddTruthCollectionNavigationDecorationsCfg(flags, TruthCollections=[], prefix='')
Definition: MCTruthCommonConfig.py:348
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.InDetCommonConfig.InDetCommonCfg
def InDetCommonCfg(flags, **kwargs)
Definition: InDetCommonConfig.py:16
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