ATLAS Offline Software
Functions | Variables
BTaggingConfigFlags Namespace Reference

Functions

def getGrades (flags)
 
def getTaggerList (flags)
 
def minimumJetPtForTrackAssociation (flags)
 
def calibrationTag (flags)
 
def saveSv1 (prevFlags)
 
def runOldSecVrtSecIncl (prevFlags)
 
def isRun3Derivation (flags)
 
def runFlipTag (flags)
 
def getNNs (flags)
 
def createBTaggingConfigFlags ()
 

Variables

list Run1Grades = [ "Good", "BlaShared", "PixShared", "SctShared", "0HitBLayer" ]
 
list Run2Grades
 
list Run4Grades
 
list calibrationChannelAliases
 

Function Documentation

◆ calibrationTag()

def BTaggingConfigFlags.calibrationTag (   flags)

Definition at line 55 of file BTaggingConfigFlags.py.

55 def calibrationTag(flags):
56  if flags.GeoModel.Run >= LHCPeriod.Run4:
57  return "BTagCalibITk-23-00-03-v1"
58  return ""
59 
60 

◆ createBTaggingConfigFlags()

def BTaggingConfigFlags.createBTaggingConfigFlags ( )

Definition at line 96 of file BTaggingConfigFlags.py.

97  btagcf = AthConfigFlags()
98 
99  btagcf.addFlag("BTagging.taggerList", getTaggerList)
100  btagcf.addFlag("BTagging.databaseScheme", '')
101  btagcf.addFlag("BTagging.calibrationChannelAliases",
102  calibrationChannelAliases)
103  btagcf.addFlag("BTagging.forcedCalibrationChannel", '')
104  btagcf.addFlag("BTagging.calibrationTag",
105  calibrationTag)
106 
107  # the track association minimum is set to 4 GeV because of track
108  # jets in offline reconstruction.
109  btagcf.addFlag("BTagging.minimumJetPtForTrackAssociation",
110  minimumJetPtForTrackAssociation)
111 
112  # these are only used for IPxD and SV1 likelihoods
113  btagcf.addFlag("BTagging.RunModus", "analysis") # reference mode used in FlavourTagPerformanceFramework (RetagFragment.py)
114  btagcf.addFlag("BTagging.ReferenceType", "ALL") # reference type for IP and SV taggers (B, UDSG, ALL)
115  btagcf.addFlag("BTagging.JetPtMinRef", 15e3) # in MeV for uncalibrated pt
116  btagcf.addFlag("BTagging.Grades", getGrades)
117 
118 
119  # Taggers for validation
120  btagcf.addFlag("BTagging.SaveSV1Probabilities", saveSv1)
121  # Run the flip taggers
122  btagcf.addFlag("BTagging.RunFlipTaggers", runFlipTag)
123 
124  # Trackless approach
125  btagcf.addFlag("BTagging.Trackless", False)
126  btagcf.addFlag("BTagging.Trackless_JetCollection", "AntiKt4EMPFlowJets")
127  btagcf.addFlag("BTagging.Trackless_JetPtMin", 250*Units.GeV)
128  btagcf.addFlag("BTagging.Trackless_dR", 0.4)
129 
130  # more aggressive trackless approach
131  btagcf.addFlag("BTagging.savePixelHits", False)
132  btagcf.addFlag("BTagging.saveSCTHits", False)
133 
134  # experimental flags
135  btagcf.addFlag("BTagging.Pseudotrack", False)
136 
137  #NewVrtSecInclusiveAlg
138  btagcf.addFlag("BTagging.RunNewVrtSecInclusive", runOldSecVrtSecIncl)
139 
140  # track classification tool flags
141  btagcf.addFlag("BTagging.TrkClassFiveBinMode",False)
142 
143  # a flag to add V0finder
144  btagcf.addFlag("BTagging.AddV0Finder", False)
145 
146  # GNN vertex fitter
147  btagcf.addFlag("BTagging.GNNVertexFitter", False)
148 
149  # (multifold) NN trainings, each jet collection maps to a list of
150  # dicts. The dict has several keys:
151  # - folds: list of NNs to run
152  # - remapping (optional): any variable remapping
153  btagcf.addFlag("BTagging.NNs", getNNs)
154 
155  return btagcf

◆ getGrades()

def BTaggingConfigFlags.getGrades (   flags)

Definition at line 28 of file BTaggingConfigFlags.py.

28 def getGrades(flags):
29  if flags.GeoModel.Run is LHCPeriod.Run1:
30  return Run1Grades
31  elif flags.GeoModel.Run in [LHCPeriod.Run2, LHCPeriod.Run3]:
32  return Run2Grades
33  else:
34  return Run4Grades
35 
36 

◆ getNNs()

def BTaggingConfigFlags.getNNs (   flags)

Definition at line 78 of file BTaggingConfigFlags.py.

78 def getNNs(flags):
79  # dummy for now
80  caldir = 'BTagging/20231205/GN2v01/antikt4empflow'
81  pf_nns = [f'{caldir}/network_fold{n}.onnx' for n in range(4)]
82  return {
83  'AntiKt4EMPFlowJets': [
84  {
85  'folds': pf_nns,
86  },
87  ],
88  'AntiKt4EMPFlowCustomVtxJets': [
89  {
90  'folds': pf_nns,
91  },
92  ]
93  }
94 
95 

◆ getTaggerList()

def BTaggingConfigFlags.getTaggerList (   flags)

Definition at line 37 of file BTaggingConfigFlags.py.

37 def getTaggerList(flags):
38  base = ['IP2D','IP3D','SV1','JetFitterNN']
39  if flags.Trigger.doHLT:
40  base = []
41  elif flags.GeoModel.Run >= LHCPeriod.Run4:
42  base += ['MV2c10']
43  flip = ['IP2DNeg', 'IP3DNeg','IP2DFlip', 'IP3DFlip','SV1Flip']
44  if flags.BTagging.RunFlipTaggers:
45  return base + flip
46  return base
47 
48 

◆ isRun3Derivation()

def BTaggingConfigFlags.isRun3Derivation (   flags)

Definition at line 69 of file BTaggingConfigFlags.py.

69 def isRun3Derivation(flags):
70  derivation = flags.Common.ProductionStep is ProductionStep.Derivation
71  before_the_future = flags.GeoModel.Run < LHCPeriod.Run4
72  return derivation and before_the_future
73 
74 

◆ minimumJetPtForTrackAssociation()

def BTaggingConfigFlags.minimumJetPtForTrackAssociation (   flags)

Definition at line 49 of file BTaggingConfigFlags.py.

50  if flags.Trigger.doHLT:
51  return 5e3
52  return 4e3
53 
54 

◆ runFlipTag()

def BTaggingConfigFlags.runFlipTag (   flags)

Definition at line 75 of file BTaggingConfigFlags.py.

75 def runFlipTag(flags):
76  return isRun3Derivation(flags)
77 

◆ runOldSecVrtSecIncl()

def BTaggingConfigFlags.runOldSecVrtSecIncl (   prevFlags)

Definition at line 65 of file BTaggingConfigFlags.py.

65 def runOldSecVrtSecIncl(prevFlags):
66  return prevFlags.Common.ProductionStep is ProductionStep.Derivation
67 
68 

◆ saveSv1()

def BTaggingConfigFlags.saveSv1 (   prevFlags)

Definition at line 61 of file BTaggingConfigFlags.py.

61 def saveSv1(prevFlags):
62  return prevFlags.Common.ProductionStep is ProductionStep.Derivation or prevFlags.GeoModel.Run >= LHCPeriod.Run4
63 
64 

Variable Documentation

◆ calibrationChannelAliases

list BTaggingConfigFlags.calibrationChannelAliases
Initial value:
1 = [
2  "AntiKt4EMTopo->AntiKt4EMTopo,AntiKt4EMPFlow",
3  "AntiKt4EMPFlow->AntiKt4EMPFlow,AntiKt4EMTopo",
4  "AntiKt4HI->AntiKt4HI,AntiKt4EMPFlow,AntiKt4EMTopo,AntiKt4LCTopo",
5  "AntiKtVR30Rmax4Rmin02PV0Track->AntiKtVR30Rmax4Rmin02PV0Track,AntiKt4EMPFlow,AntiKt4EMTopo",
6  "AntiKt4PFlowCustomVtx->AntiKt4EMPFlow,AntiKt4EMTopo",
7  "AntiKtVR30Rmax4Rmin02Track->AntiKtVR30Rmax4Rmin02PV0Track,AntiKt4EMPFlow,AntiKt4EMTopo",
8 
9 ]

Definition at line 18 of file BTaggingConfigFlags.py.

◆ Run1Grades

list BTaggingConfigFlags.Run1Grades = [ "Good", "BlaShared", "PixShared", "SctShared", "0HitBLayer" ]

Definition at line 8 of file BTaggingConfigFlags.py.

◆ Run2Grades

list BTaggingConfigFlags.Run2Grades
Initial value:
1 = [ "0HitIn0HitNInExp2","0HitIn0HitNInExpIn","0HitIn0HitNInExpNIn","0HitIn0HitNIn",
2  "0HitInExp", "0HitIn",
3  "0HitNInExp", "0HitNIn",
4  "InANDNInShared", "PixShared", "SctShared",
5  "InANDNInSplit", "PixSplit",
6  "Good" ]

Definition at line 9 of file BTaggingConfigFlags.py.

◆ Run4Grades

list BTaggingConfigFlags.Run4Grades
Initial value:
1 = [ "A01","A02","A03","A04","A05","A06","A07","A08","A14_1","A14_2","A14_3","A14_4",
2  "B01","B02","B03","B04","B05","B06","B07","B08","B14_1","B14_2","B14_3","B14_4",
3  "C01","C02030405","C06","C07","C08","C14_1","C14_2","C14_3","C14_4" ]

Definition at line 15 of file BTaggingConfigFlags.py.

BTaggingConfigFlags.isRun3Derivation
def isRun3Derivation(flags)
Definition: BTaggingConfigFlags.py:69
BTaggingConfigFlags.getNNs
def getNNs(flags)
Definition: BTaggingConfigFlags.py:78
BTaggingConfigFlags.createBTaggingConfigFlags
def createBTaggingConfigFlags()
Definition: BTaggingConfigFlags.py:96
BTaggingConfigFlags.saveSv1
def saveSv1(prevFlags)
Definition: BTaggingConfigFlags.py:61
BTaggingConfigFlags.calibrationTag
def calibrationTag(flags)
Definition: BTaggingConfigFlags.py:55
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
BTaggingConfigFlags.getGrades
def getGrades(flags)
Definition: BTaggingConfigFlags.py:28
BTaggingConfigFlags.minimumJetPtForTrackAssociation
def minimumJetPtForTrackAssociation(flags)
Definition: BTaggingConfigFlags.py:49
BTaggingConfigFlags.getTaggerList
def getTaggerList(flags)
Definition: BTaggingConfigFlags.py:37
BTaggingConfigFlags.runOldSecVrtSecIncl
def runOldSecVrtSecIncl(prevFlags)
Definition: BTaggingConfigFlags.py:65
BTaggingConfigFlags.runFlipTag
def runFlipTag(flags)
Definition: BTaggingConfigFlags.py:75