ATLAS Offline Software
StandardLargeRJets.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from JetRecConfig.StandardJetConstits import stdConstitDic as cst
4 from .JetDefinition import JetDefinition
5 from .JetGrooming import JetTrimming, JetSoftDrop
6 from JetRecConfig.JetRecConfig import registerAsInputConstit
7 
8 # needed to ensure the smallR VR jets are defined
9 import JetRecConfig.StandardSmallRJets # noqa: F401
10 
11 # *********************************************************
12 # Ghost-associated particles for the standard large R jets
13 # *********************************************************
14 standardghosts = ["Track","MuonSegment","Truth"]
15 
16 
17 flavourghosts = [ "BHadronsFinal","CHadronsFinal",
18  "WBosons", "ZBosons", "HBosons", "TQuarksFinal",
19  "Partons",]
20 
21 
22 
23 
24 
25 # *********************************************************
26 # Modifiers for the standard large R jets
27 # *********************************************************
28 # (use tuples rather than lists to prevent accidental modification)
29 standardrecomods = (
30  "Sort",
31  "Width",
32  "ConstitFourMom"
33 )
34 
35 ufo_dnn_moments = ("CaloEnergiesLargeR","ConstitFrac","groomMRatio")
36 
37 clustermods = ("ECPSFrac","ClusterMoments",)
38 truthmods = ("PartonTruthLabel",)
39 pflowmods = ()
40 
41 truthlabels = ("JetTaggingTruthLabel:R10TruthLabel_R21Consolidated","JetTaggingTruthLabel:R10TruthLabel_R21Precision","JetTaggingTruthLabel:R10TruthLabel_R21Precision_2022v1","JetTaggingTruthLabel:R10TruthLabel_R22v1")
42 truthlabels_SD = ("JetTaggingTruthLabel:R10TruthLabel_R21Precision","JetTaggingTruthLabel:R10TruthLabel_R21Precision_2022v1","JetTaggingTruthLabel:R10TruthLabel_R22v1", "JetTaggingTruthLabel:R10WZTruthLabel_R22v1")
43 
44 substrmods = ("nsubjettiness", "nsubjettinessR", "ktsplitter",
45  "ecorr", "ecorrR", "qw",
46  # ... others ?
47 )
48 
49 #Variables used for trimmed large-R jets
50 lctopo_trimmed_mods = ("planarflow","angularity","comshapes","ktdr","TrackSumMoments","softdropobs")
51 ufo_softdrop_mods = ("planarflow","angularity","comshapes","ktdr","ecorrgeneral","ecorrgeneralratios","softdropobs")
52 
53 # *********************************************************
54 # Standard large R jets definitions
55 # *********************************************************
56 
57 
58 AntiKt10LCTopo = JetDefinition("AntiKt",1.0,cst.LCTopoOrigin,
59  ghostdefs = standardghosts+flavourghosts+["AntiKtVR30Rmax4Rmin02PV0TrackJets"] ,
60  modifiers = ("Sort", "Filter:50000","TrackMoments","JetGhostLabel"),
61  standardRecoMode = True,
62  lock = True
63 )
64 
65 #Remove VR track jets from ghosts for core reco
66 AntiKt10LCTopo_noVR = AntiKt10LCTopo.clone(
67  ghostdefs = standardghosts+flavourghosts
68 )
69 
70 AntiKt10LCTopo_withmoms = AntiKt10LCTopo.clone(
71  modifiers = ("Sort", "Filter:50000", "Width", "TrackMoments", "TrackSumMoments","JetDeltaRLabel:5000")+clustermods+truthmods,
72  # NOT all moments from old AntiKt10LCTopo config here yet.
73 )
74 
75 AntiKt10LCTopoTrimmed = JetTrimming(AntiKt10LCTopo,
76  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after trimming
77  modifiers = ("Filter:1000","Calib:CombinedMass:mc","Filter:100000",)+standardrecomods+substrmods+lctopo_trimmed_mods+truthlabels,
78  PtFrac = 0.05, RClus = 0.2,
79  )
80 
81 AntiKt10LCTopoTrimmed_trigger = JetTrimming(AntiKt10LCTopo_noVR,
82  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after trimming
83  modifiers = ("Filter:1000","Calib:CombinedMass:mc","Filter:50000","Sort","ConstitFourMom"),
84  PtFrac = 0.05, RClus = 0.2,
85 )
86 
87 AntiKt10LCTopoSoftDrop = JetSoftDrop(AntiKt10LCTopo,
88  modifiers = standardrecomods+substrmods,
89  Beta = 1., ZCut= 0.1,
90  )
91 
92 
93 AntiKt10UFOCHS = JetDefinition("AntiKt",1.0,cst.UFO,
94  standardRecoMode = True)
95 
96 
97 AntiKt10UFOCSSK = JetDefinition("AntiKt",1.0,cst.UFOCSSK,
98  ghostdefs = standardghosts+flavourghosts+["AntiKtVR30Rmax4Rmin02PV0TrackJets"] ,
99  modifiers = ("Sort", "Filter:50000","TrackMoments","JetGhostLabel","PartonTruthLabel"),
100  standardRecoMode = True,
101  )
102 
103 AntiKt10UFOCSSK_noElectrons = JetDefinition("AntiKt",1.0,cst.UFOCSSK_noElectrons,
104  ghostdefs = standardghosts+flavourghosts+["AntiKtVR30Rmax4Rmin02PV0TrackJets"],
105  modifiers = ("Sort", "Filter:50000","TrackMoments","JetGhostLabel","PartonTruthLabel"),
106  standardRecoMode = True,
107  )
108 
109 AntiKt10UFOCSSK_noMuons = JetDefinition("AntiKt",1.0,cst.UFOCSSK_noMuons,
110  ghostdefs = standardghosts+flavourghosts+["AntiKtVR30Rmax4Rmin02PV0TrackJets"],
111  modifiers = ("Sort", "Filter:50000","TrackMoments","JetGhostLabel","PartonTruthLabel"),
112  standardRecoMode = True,
113  )
114 
115 AntiKt10UFOCSSK_noLeptons = JetDefinition("AntiKt",1.0,cst.UFOCSSK_noLeptons,
116  ghostdefs = standardghosts+flavourghosts+["AntiKtVR30Rmax4Rmin02PV0TrackJets"],
117  modifiers = ("Sort", "Filter:50000","TrackMoments","JetGhostLabel","PartonTruthLabel"),
118  standardRecoMode = True,
119  )
120 
121 AntiKt10UFOCSSKSoftDrop = JetSoftDrop(AntiKt10UFOCSSK,
122  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after the soft drop alg is applied
123  modifiers = ("Filter:1000","Calib:SoftDrop:mc","Filter:100000","JetGhostLabel")+standardrecomods+substrmods+ufo_softdrop_mods+truthlabels_SD+ufo_dnn_moments,
124  Beta = 1., ZCut= 0.1,
125  )
126 
127 AntiKt10UFOCSSKSoftDrop_noElectrons = JetSoftDrop(AntiKt10UFOCSSK_noElectrons,
128  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after the soft drop alg is applied
129  modifiers = ("Filter:1000","Calib:SoftDrop:mc","Filter:100000","Sort","JetGhostLabel")+standardrecomods+substrmods+ufo_softdrop_mods+truthlabels_SD+ufo_dnn_moments,
130  Beta = 1., ZCut= 0.1,
131  )
132 
133 AntiKt10UFOCSSKSoftDrop_noMuons = JetSoftDrop(AntiKt10UFOCSSK_noMuons,
134  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after the soft drop alg is applied
135  modifiers = ("Filter:1000","Calib:SoftDrop:mc","Filter:100000","Sort","JetGhostLabel")+standardrecomods+substrmods+ufo_softdrop_mods+truthlabels_SD+ufo_dnn_moments,
136  Beta = 1., ZCut= 0.1,
137  )
138 
139 AntiKt10UFOCSSKSoftDrop_noLeptons = JetSoftDrop(AntiKt10UFOCSSK_noLeptons,
140  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after the soft drop alg is applied
141  modifiers = ("Filter:1000","Calib:SoftDrop:mc","Filter:100000","Sort","JetGhostLabel")+standardrecomods+substrmods+ufo_softdrop_mods+truthlabels_SD+ufo_dnn_moments,
142  Beta = 1., ZCut= 0.1,
143  )
144 
145 AntiKt10UFOCSSKSoftDrop_trigger = JetSoftDrop(AntiKt10UFOCSSK,
146  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after the soft drop alg is applied
147  modifiers = ("Filter:1000","Calib:SoftDrop:mc","Filter:50000","Sort","ConstitFourMom"),
148  Beta = 1., ZCut= 0.1,
149  )
150 
151 
152 
153 AntiKt10Truth = JetDefinition("AntiKt",1.0,cst.Truth,
154  ghostdefs = flavourghosts ,
155  modifiers = ("Sort", "Filter:50000","ktsplitter","JetGhostLabel"),
156  standardRecoMode = True,
157  lock = True
158 )
159 
160 AntiKt10TruthTrimmed = JetTrimming(AntiKt10Truth,
161  modifiers = ("Sort","JetGhostLabel")+substrmods+truthmods,
162  PtFrac = 0.05, RClus = 0.2,
163  )
164 
165 AntiKt10TruthSoftDrop = JetSoftDrop(AntiKt10Truth,
166  modifiers = ("Sort","JetGhostLabel")+substrmods+truthmods,
167  Beta = 1., ZCut= 0.1,
168  )
169 
170 
171 AntiKt10TruthWZ = JetDefinition("AntiKt",1.0, cst.TruthWZ,
172  ghostdefs = flavourghosts,
173  modifiers = ("Sort", "Filter:50000","ktsplitter","JetGhostLabel"),
174  standardRecoMode = True,
175  lock = True,
176 )
177 
178 AntiKt10TruthWZSoftDrop = JetSoftDrop(AntiKt10TruthWZ,
179  modifiers = ("Sort","JetGhostLabel")+substrmods+truthmods,
180  Beta = 1., ZCut= 0.1,
181 )
182 
183 AntiKt10TruthDressedWZ = JetDefinition("AntiKt",1.0,cst.TruthDressedWZ,
184  ghostdefs = flavourghosts ,
185  modifiers = ("Sort", "Filter:50000","ktsplitter","JetGhostLabel"),
186  standardRecoMode = True,
187  lock = True
188 )
189 
190 AntiKt10TruthDressedWZSoftDrop = JetSoftDrop(AntiKt10TruthDressedWZ,
191  modifiers = ("Sort","JetGhostLabel")+substrmods+truthmods,
192  Beta = 1., ZCut= 0.1,
193 )
194 
195 # These jets may be used as input for the JetTruthLabelling, so they also need to be defined as constituents:
196 registerAsInputConstit(AntiKt10TruthDressedWZSoftDrop)
197 
198 AntiKt10TruthGEN = JetDefinition("AntiKt",1.0, cst.TruthGEN,
199  ptmin = 5000,
200  ghostdefs = [],
201  modifiers = ("Sort", )+truthmods,
202  ghostarea = 0.,
203  lock = True,
204 )
205 AntiKt10TruthGENWZ = AntiKt10TruthGEN.clone(inputdef=cst.TruthGENWZ)
206 
207 
208 
209 
210 
211 
212 
python.JetRecConfig.registerAsInputConstit
def registerAsInputConstit(jetdef)
Definition: JetRecConfig.py:852
python.JetGrooming.JetSoftDrop
Definition: JetGrooming.py:145
python.JetDefinition.JetDefinition
Definition: JetDefinition.py:68
JetGrooming::JetTrimming
Definition: JetTrimming.h:38