ATLAS Offline Software
Classes | Functions
python.VertexFindingFlags Namespace Reference

Classes

class  VertexSetup
 
class  VertexSortingSetup
 

Functions

def createPriVertexingFlags ()
 

Function Documentation

◆ createPriVertexingFlags()

def python.VertexFindingFlags.createPriVertexingFlags ( )

Definition at line 22 of file VertexFindingFlags.py.

23  from AthenaConfiguration.AthConfigFlags import AthConfigFlags
24  flags = AthConfigFlags()
25 
26  flags.addFlag("maxAbsEta", 9999.0)
27  flags.addFlag("minNTrtHits", 0)
28  flags.addFlag("maxNPixelHoles", 1)
29  flags.addFlag("maxZ0", 1000.0 * Units.mm)
30  flags.addFlag("maxZ0SinTheta", 1000.0 * Units.mm)
31  flags.addFlag("minNInnermostLayerHits", 0)
32  # MaxTracks cuts are specific to the IterativeFinding config
33  flags.addFlag("doMaxTracksCut", lambda pcf:
34  not(pcf.Tracking.PriVertex.useBeamConstraint or
35  pcf.Tracking.PrimaryPassConfig is (
36  PrimaryPassConfig.HeavyIon)))
37  flags.addFlag("maxTracks", 3000)
38  flags.addFlag("maxVertices", lambda pcf:
39  1 if pcf.Tracking.PrimaryPassConfig in [
40  PrimaryPassConfig.HeavyIon, PrimaryPassConfig.VtxLumiHeavyIon]
41  else 200)
42 
43  # string to store the setup for primary vertexing.
44 
45  def vertexSetup(pcf):
46  if pcf.Reco.EnableHI:
47  return VertexSetup.FastIVF
48  elif pcf.Tracking.PrimaryPassConfig is PrimaryPassConfig.VtxLumiHeavyIon:
49  return VertexSetup.FastIVF
50  elif (pcf.Tracking.doMinBias or
51  pcf.Tracking.doLowMu or
52  pcf.Tracking.PrimaryPassConfig in [
53  PrimaryPassConfig.VtxLumi,
54  PrimaryPassConfig.VtxBeamSpot,
55  PrimaryPassConfig.HighPileup]):
56  return VertexSetup.IVF
57  else: # Default
58  return VertexSetup.ActsGaussAMVF
59 
60  flags.addFlag("setup", vertexSetup, type=VertexSetup)
61 
62  # string to store the type of sorting algorithm to separate signal and pile-up vertices.
63  flags.addFlag("sortingSetup", VertexSortingSetup.SumPt2Sorting, type=VertexSortingSetup)
64  flags.addFlag("useBeamConstraint", lambda pcf:
65  not(pcf.Tracking.PrimaryPassConfig in [
66  PrimaryPassConfig.VtxLumi,
67  PrimaryPassConfig.VtxBeamSpot]))
68 
69  def maxD0(pcf):
70  if pcf.Detector.GeometryITk:
71  return 1.0 * Units.mm
72  else:
73  if not pcf.Tracking.PriVertex.useBeamConstraint:
74  return 10.0 * Units.mm
75  elif pcf.Tracking.PrimaryPassConfig is PrimaryPassConfig.VtxLumiHeavyIon:
76  return 10.0 * Units.mm
77  else: # Default ID
78  return 4.0 * Units.mm
79 
80  flags.addFlag("maxD0", maxD0)
81 
82  def minPt(pcf):
83  if pcf.Detector.GeometryITk:
84  return 900.0 * Units.MeV
85  else:
86  if pcf.Tracking.doMinBias or pcf.Tracking.doLowPt:
87  return 100.0 * Units.MeV
88  elif pcf.Reco.EnableHI or pcf.Tracking.doLowMu \
89  or pcf.Tracking.PrimaryPassConfig is PrimaryPassConfig.VtxLumiHeavyIon:
90  return 400.0 * Units.MeV
91  else: # Default ID
92  return 500.0 * Units.MeV
93 
94  flags.addFlag("minPt", minPt)
95 
96  def maxSigmaD0(pcf):
97  if pcf.Detector.GeometryITk:
98  return 0.35 * Units.mm
99  else:
100  if pcf.Tracking.doLowPt:
101  return 0.9 * Units.mm
102  else: # Default ID
103  return 5.0 * Units.mm
104 
105  flags.addFlag("maxSigmaD0", maxSigmaD0)
106 
107  idflags = { "maxSigmaZ0SinTheta" : 10.0 * Units.mm,
108  "minNPixelHits" : 1,
109  "minNSctHits" : 4,
110  "minNSiHits" : 6,
111  "maxZinterval" : 3}
112 
113  itkflags = {"maxSigmaZ0SinTheta" : 2.5 * Units.mm,
114  "minNPixelHits" : 3,
115  "minNSctHits" : 0,
116  "minNSiHits" : 7,
117  "maxZinterval" : 0.5}
118 
119  for k in idflags:
120  # Need to use default arguments in lambda function to keep them set
121  # despite the loop
122  flags.addFlag(k, lambda pcf, a=idflags[k], b=itkflags[k]:
123  a if pcf.Detector.GeometryID else b)
124 
125  return flags
python.VertexFindingFlags.createPriVertexingFlags
def createPriVertexingFlags()
Definition: VertexFindingFlags.py:22