ATLAS Offline Software
Classes | Functions
TauConfigFlags Namespace Reference

Classes

class  TestTauRecConfigFlags
 

Functions

def createTauConfigFlags ()
 
def createTauRecConfigFlags ()
 
def createTauEleRMConfigFlags ()
 

Function Documentation

◆ createTauConfigFlags()

def TauConfigFlags.createTauConfigFlags ( )

Definition at line 8 of file TauConfigFlags.py.

9  tau_cfg = AthConfigFlags()
10 
11  tau_cfg.addFlag("Tau.doTauRec", True)
12  tau_cfg.addFlag("Tau.ThinTaus", True)
13  tau_cfg.addFlag("Tau.doEarlyStopping", True)
14 
15  # Switches for enabling/disabling some tools
16  tau_cfg.addFlag("Tau.doVertexCorrection", True)
17  tau_cfg.addFlag("Tau.doTJVA", True)
18  tau_cfg.addFlag("Tau.doPi0Clus", True)
19  tau_cfg.addFlag("Tau.doPanTau", True)
20  tau_cfg.addFlag("Tau.doRNNTrackClass", True)
21  tau_cfg.addFlag("Tau.doTauDiscriminant", True)
22  tau_cfg.addFlag("Tau.associateLRT", False)
23  tau_cfg.addFlag("Tau.isStandalone", False)
24  # Classify Large Radius Tracks in tau track classifier
25  tau_cfg.addFlag("Tau.classifyLRT", False)
26 
27  # Settings common to Run2 and Run3
28  tau_cfg.addFlag("Tau.SeedMinPt", 0.0*Units.GeV)
29  tau_cfg.addFlag("Tau.SeedMaxEta", lambda prevFlags: 2.5 if prevFlags.GeoModel.Run <= LHCPeriod.Run3 else 4.0)
30  tau_cfg.addFlag("Tau.MaxNTracks", -1)
31  tau_cfg.addFlag("Tau.RemoveDupeCoreTracks", True)
32  tau_cfg.addFlag("Tau.useGhostTracks", True)
33  tau_cfg.addFlag("Tau.ghostTrackDR", 0.25)
34  tau_cfg.addFlag("Tau.shotPtCut_1Photon", [430.*Units.MeV, 300.*Units.MeV, 9999999.*Units.MeV, 330.*Units.MeV, 350.*Units.MeV])
35  tau_cfg.addFlag("Tau.shotPtCut_2Photons", [10000.*Units.MeV, 10000.*Units.MeV, 9999999.*Units.MeV, 10000.*Units.MeV, 10000.*Units.MeV])
36  tau_cfg.addFlag("Tau.Pi0ScoreConfig", "TauPi0BDTWeights.root")
37  tau_cfg.addFlag("Tau.pi0EtCuts", [2800.*Units.MeV, 2700.*Units.MeV, 2500.*Units.MeV, 2900.*Units.MeV, 2700.*Units.MeV])
38  tau_cfg.addFlag("Tau.pi0MVACuts_1prong", [0.45, 0.37, 0.39, 0.40, 0.38])
39  tau_cfg.addFlag("Tau.pi0MVACuts_mprong", [0.73, 0.69, 0.58, 0.69, 0.67])
40 
41  # Run2 settings and calibration files
42  tau_cfg.addFlag("Tau.tauRecToolsCVMFSPath", "tauRecTools/R22_preprod")
43  tau_cfg.addFlag("Tau.tauRNNTrackClassConfig", "RNNTrackClassifier_2021-07-19_14-25-14_90_25_30.json")
44  tau_cfg.addFlag("Tau.CalibrateLCConfig", "CaloTES_R22_Round2.5.root")
45  tau_cfg.addFlag("Tau.CombinedTESConfig", "CombinedTES_R22_Round2.5.root")
46  tau_cfg.addFlag("Tau.MvaTESConfig0p", "MvaTES_0p_R23.root")
47  tau_cfg.addFlag("Tau.MvaTESConfig", "MvaTES_R23.root")
48  tau_cfg.addFlag("Tau.MinPt0p", 9.25*Units.GeV)
49  tau_cfg.addFlag("Tau.MinPt", 6.75*Units.GeV)
50  tau_cfg.addFlag("Tau.MinPtDAOD", 13*Units.GeV)
51  tau_cfg.addFlag("Tau.TauJetRNNConfig", ["tauid_rnn_1p_R22_v1.json", "tauid_rnn_2p_R22_v1.json", "tauid_rnn_3p_R22_v1.json"])
52  tau_cfg.addFlag("Tau.TauJetRNNWPConfig", ["tauid_rnnWP_1p_R22_v0.root", "tauid_rnnWP_2p_R22_v0.root", "tauid_rnnWP_3p_R22_v0.root"])
53  tau_cfg.addFlag("Tau.TauEleRNNConfig", ["taueveto_rnn_config_1P_r22.json", "taueveto_rnn_config_3P_r22.json"])
54  tau_cfg.addFlag("Tau.TauEleRNNWPConfig", ["taueveto_rnn_flat_1P_r22.root", "taueveto_rnn_flat_3P_r22.root"])
55  tau_cfg.addFlag("Tau.DecayModeNNClassifierConfig", "NNDecayMode_R22_v1.json")
56  tau_cfg.addFlag("Tau.TauEleRNNWPfix", ["rnneveto_mc16d_flat_1p_fix.root", "rnneveto_mc16d_flat_3p_fix.root"])
57  # GNTau ID tune file (need to add another version for noAux)
58  tau_cfg.addFlag("Tau.TauGNNConfig", ["GNTau_pruned_MC23.onnx","GNTau_trunc_MC23.onnx"])
59  tau_cfg.addFlag("Tau.TauGNNWP",
60  [
61  ["GNTauNAprune_flat_model_1p.root", "GNTauNAprune_flat_model_2p.root", "GNTauNAprune_flat_model_3p.root"],
62  ["GNTauNAtrunc_flat_model_1p.root", "GNTauNAtrunc_flat_model_2p.root", "GNTauNAtrunc_flat_model_3p.root"]
63  ])
64  tau_cfg.addFlag("Tau.GNTauScoreName", ["GNTauScore_v0prune","GNTauScore_v1trunc"])
65  tau_cfg.addFlag("Tau.GNTauTransScoreName", ["GNTauScoreSigTrans_v0prune","GNTauScoreSigTrans_v1trunc"])
66  tau_cfg.addFlag("Tau.GNTauMaxTracks", [30,10])
67  tau_cfg.addFlag("Tau.GNTauMaxClusters", [20,6])
68  tau_cfg.addFlag("Tau.GNTauNodeNameTau", "GN2TauNoAux_pb")
69  tau_cfg.addFlag("Tau.GNTauNodeNameJet", "GN2TauNoAux_pu")
70  tau_cfg.addFlag("Tau.GNTauDecorWPNames",
71  [
72  ["GNTauVL_v0prune", "GNTauL_v0prune", "GNTauM_v0prune", "GNTauT_v0prune"],
73  ["GNTauVL_v1trunc", "GNTauL_v1trunc", "GNTauM_v1trunc", "GNTauT_v1trunc"]
74  ])
75 
76 
77  # PanTau config flags
78  from PanTauAlgs.PanTauConfigFlags import createPanTauConfigFlags
79  tau_cfg.addFlagsCategory("Tau.PanTau", createPanTauConfigFlags, prefix=True)
80 
81  # create 2 flag categories, for standard taus and electron-subtracted taus
82  tau_cfg.addFlagsCategory("Tau.TauRec", createTauRecConfigFlags, prefix=True)
83  tau_cfg.addFlagsCategory("Tau.TauEleRM", createTauEleRMConfigFlags, prefix=True)
84  # define ActiveConfig in TauConfigFlags.py so it exists for client code like DerivationFramework that don't want to define it via cloneAndReplace
85  # FIXME: this looks more like a hack than good design, maybe dropping Tau.ActiveConfig and using Tau.TauRec as active config would be better?
86  tau_cfg.addFlagsCategory("Tau.ActiveConfig", createTauRecConfigFlags, prefix=True)
87 
88  # e-had boosted ditaus, aka electron-subtracted taus
89  tau_cfg.addFlag("Tau.doTauEleRMRec", True)
90  # helper for derivations, TauJets_EleRM not available for AODs produced before 24.0.17
91  tau_cfg.addFlag("Tau.TauEleRM_isAvailable", lambda prevFlags : "xAOD::TauJetContainer#TauJets_EleRM" in prevFlags.Input.TypedCollections)
92  # had-had boosted ditaus
93  tau_cfg.addFlag("Tau.doDiTauRec", True)
94 
95  return tau_cfg
96 
97 

◆ createTauEleRMConfigFlags()

def TauConfigFlags.createTauEleRMConfigFlags ( )

Definition at line 137 of file TauConfigFlags.py.

138  flags = createTauRecConfigFlags()
139  flags.prefix = "EleRM_"
140  _output_suffix = "_EleRM"
141 
142  # Output containers
143  flags.TauJets = f"TauJets{_output_suffix}"
144  flags.TauTracks = f"TauTracks{_output_suffix}"
145  flags.TauShotClusters = f"TauShotClusters{_output_suffix}"
146  flags.TauShotClustersLinks = f"TauShotClusters{_output_suffix}_links"
147  flags.TauShotPFOs = f"TauShotParticleFlowObjects{_output_suffix}"
148  flags.TauPi0Clusters = f"TauPi0Clusters{_output_suffix}"
149  flags.TauPi0ClustersLinks = f"TauPi0Clusters{_output_suffix}_links"
150  flags.TauHadronicPFOs = f"TauHadronicParticleFlowObjects{_output_suffix}"
151  flags.TauNeutralPFOs = f"TauNeutralParticleFlowObjects{_output_suffix}"
152  flags.TauChargedPFOs = f"TauChargedParticleFlowObjects{_output_suffix}"
153  flags.TauSecondaryVertices = f"TauSecondaryVertices{_output_suffix}"
154  flags.TauFinalPi0s = f"TauFinalPi0s{_output_suffix}"
155 
156  # Transient containers
157  flags.TauJets_tmp = "TauJets_tmp_EleRM"
158  flags.TauCommonPi0Cells = "TauCommonPi0Cells_EleRM"
159  flags.TauPi0Clusters_tmp = "TauPi0Clusters_tmp_EleRM"
160 
161  # Input containers
162  flags.TrackCollection = "InDetTrackParticles_EleRM"
163  flags.SeedJetCollection = "AntiKt4LCTopoJets_EleRM"
164  flags.EventShapeCollection = "EleRM_Kt4LCTopoOriginEventShape"
165 
166  # Electron-subtracted tau flags appearing in standard tau reconstruction
167  flags.inTauEleRM = True
168  flags.RemoveElectronCells = True
169  flags.RemovedElectronClusters = "RemovedClusters_EleRM"
170 
171  # Electron-subtracted tau specific flags
172  flags.addFlag("EleRM_ElectronWorkingPoint", "Medium")
173  flags.addFlag("RemovedElectronTracks", "RemovedTracks_EleRM")
174  flags.addFlag("CaloCalTopoClusters_EleRM", "CaloCalTopoClusters_EleRM")
175  flags.addFlag("LCOriginTopoClusters_EleRM", "LCOriginTopoClusters_EleRM")
176  flags.addFlag("LCTopoOrigin_EleRM", "LCTopoOrigin_EleRM")
177  flags.addFlag("EleRM_CheckingConeSize", 0.6)
178 
179  return flags
180 
181 
182 # Self test
183 

◆ createTauRecConfigFlags()

def TauConfigFlags.createTauRecConfigFlags ( )

Definition at line 98 of file TauConfigFlags.py.

99  from AthenaConfiguration.AthConfigFlags import AthConfigFlags
100  flags = AthConfigFlags()
101  flags.addFlag("prefix", "")
102 
103  # Output containers
104  flags.addFlag("TauJets", "TauJets")
105  flags.addFlag("TauTracks", "TauTracks")
106  flags.addFlag("TauShotClusters", "TauShotClusters")
107  flags.addFlag("TauShotClustersLinks", "TauShotClusters_links")
108  flags.addFlag("TauShotPFOs", "TauShotParticleFlowObjects")
109  flags.addFlag("TauPi0Clusters", "TauPi0Clusters")
110  flags.addFlag("TauPi0ClustersLinks", "TauPi0Clusters_links")
111  flags.addFlag("TauHadronicPFOs", "TauHadronicParticleFlowObjects")
112  flags.addFlag("TauNeutralPFOs", "TauNeutralParticleFlowObjects")
113  flags.addFlag("TauChargedPFOs", "TauChargedParticleFlowObjects")
114  flags.addFlag("TauSecondaryVertices", "TauSecondaryVertices")
115  flags.addFlag("TauFinalPi0s", "TauFinalPi0s")
116 
117  # Transient containers
118  flags.addFlag("TauJets_tmp", "TauJets_tmp")
119  flags.addFlag("TauCommonPi0Cells", "TauCommonPi0Cells")
120  flags.addFlag("TauPi0Clusters_tmp", "TauPi0Clusters_tmp")
121 
122  # Input containers
123  flags.addFlag("VertexCollection", "PrimaryVertices")
124  flags.addFlag("TrackCollection", "InDetTrackParticles")
125  flags.addFlag("SeedJetCollection", "AntiKt4LCTopoJets")
126  flags.addFlag("LargeD0TrackCollection", "InDetLargeD0TrackParticles")
127  flags.addFlag("EventShapeCollection", "Kt4LCTopoOriginEventShape")
128 
129  # Electron-subtracted tau flags appearing in standard tau reconstruction
130  flags.addFlag("inTauEleRM", False)
131  flags.addFlag("RemoveElectronCells", False)
132  flags.addFlag("RemovedElectronClusters", "")
133 
134  return flags
135 
136 
TauConfigFlags.createTauEleRMConfigFlags
def createTauEleRMConfigFlags()
Definition: TauConfigFlags.py:137
TauConfigFlags.createTauConfigFlags
def createTauConfigFlags()
Definition: TauConfigFlags.py:8
TauConfigFlags.createTauRecConfigFlags
def createTauRecConfigFlags()
Definition: TauConfigFlags.py:98