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  ghostarea = 0.,
63  lock = True
64 )
65 
66 #Remove VR track jets from ghosts for core reco
67 AntiKt10LCTopo_noVR = AntiKt10LCTopo.clone(
68  ghostdefs = standardghosts+flavourghosts
69 )
70 
71 AntiKt10LCTopo_withmoms = AntiKt10LCTopo.clone(
72  modifiers = ("Sort", "Filter:50000", "Width", "TrackMoments", "TrackSumMoments","JetDeltaRLabel:5000")+clustermods+truthmods,
73  # NOT all moments from old AntiKt10LCTopo config here yet.
74 )
75 
76 AntiKt10LCTopoTrimmed = JetTrimming(AntiKt10LCTopo,
77  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after trimming
78  modifiers = ("Filter:1000","Calib:CombinedMass:mc","Filter:100000",)+standardrecomods+substrmods+lctopo_trimmed_mods+truthlabels,
79  PtFrac = 0.05, RClus = 0.2,
80  )
81 
82 AntiKt10LCTopoTrimmed_trigger = JetTrimming(AntiKt10LCTopo_noVR,
83  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after trimming
84  modifiers = ("Filter:1000","Calib:CombinedMass:mc","Filter:50000","Sort","ConstitFourMom"),
85  PtFrac = 0.05, RClus = 0.2,
86 )
87 
88 AntiKt10LCTopoSoftDrop = JetSoftDrop(AntiKt10LCTopo,
89  modifiers = standardrecomods+substrmods,
90  Beta = 1., ZCut= 0.1,
91  )
92 
93 
94 AntiKt10UFOCHS = JetDefinition("AntiKt",1.0,cst.UFO,
95  standardRecoMode = True)
96 
97 
98 AntiKt10UFOCSSK = JetDefinition("AntiKt",1.0,cst.UFOCSSK,
99  ghostdefs = standardghosts+flavourghosts+["AntiKtVR30Rmax4Rmin02PV0TrackJets"] ,
100  modifiers = ("Sort", "Filter:50000","TrackMoments","JetGhostLabel","PartonTruthLabel"),
101  standardRecoMode = True,
102  ghostarea = 0.,
103  )
104 
105 AntiKt10UFOCSSK_noElectrons = JetDefinition("AntiKt",1.0,cst.UFOCSSK_noElectrons,
106  ghostdefs = standardghosts+flavourghosts+["AntiKtVR30Rmax4Rmin02PV0TrackJets"],
107  modifiers = ("Sort", "Filter:50000","TrackMoments","JetGhostLabel","PartonTruthLabel"),
108  standardRecoMode = True,
109  ghostarea = 0.,
110  )
111 
112 AntiKt10UFOCSSK_noMuons = JetDefinition("AntiKt",1.0,cst.UFOCSSK_noMuons,
113  ghostdefs = standardghosts+flavourghosts+["AntiKtVR30Rmax4Rmin02PV0TrackJets"],
114  modifiers = ("Sort", "Filter:50000","TrackMoments","JetGhostLabel","PartonTruthLabel"),
115  standardRecoMode = True,
116  ghostarea = 0.,
117  )
118 
119 AntiKt10UFOCSSK_noLeptons = JetDefinition("AntiKt",1.0,cst.UFOCSSK_noLeptons,
120  ghostdefs = standardghosts+flavourghosts+["AntiKtVR30Rmax4Rmin02PV0TrackJets"],
121  modifiers = ("Sort", "Filter:50000","TrackMoments","JetGhostLabel","PartonTruthLabel"),
122  standardRecoMode = True,
123  ghostarea = 0.,
124  )
125 
126 AntiKt10UFOCSSKSoftDrop = JetSoftDrop(AntiKt10UFOCSSK,
127  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after the soft drop alg is applied
128  modifiers = ("Filter:1000","Calib:SoftDrop:mc","Filter:100000","JetGhostLabel")+standardrecomods+substrmods+ufo_softdrop_mods+truthlabels_SD+ufo_dnn_moments,
129  Beta = 1., ZCut= 0.1,
130  )
131 
132 AntiKt10UFOCSSKSoftDrop_noElectrons = JetSoftDrop(AntiKt10UFOCSSK_noElectrons,
133  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after the soft drop alg is applied
134  modifiers = ("Filter:1000","Calib:SoftDrop:mc","Filter:100000","Sort","JetGhostLabel")+standardrecomods+substrmods+ufo_softdrop_mods+truthlabels_SD+ufo_dnn_moments,
135  Beta = 1., ZCut= 0.1,
136  )
137 
138 AntiKt10UFOCSSKSoftDrop_noMuons = JetSoftDrop(AntiKt10UFOCSSK_noMuons,
139  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after the soft drop alg is applied
140  modifiers = ("Filter:1000","Calib:SoftDrop:mc","Filter:100000","Sort","JetGhostLabel")+standardrecomods+substrmods+ufo_softdrop_mods+truthlabels_SD+ufo_dnn_moments,
141  Beta = 1., ZCut= 0.1,
142  )
143 
144 AntiKt10UFOCSSKSoftDrop_noLeptons = JetSoftDrop(AntiKt10UFOCSSK_noLeptons,
145  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after the soft drop alg is applied
146  modifiers = ("Filter:1000","Calib:SoftDrop:mc","Filter:100000","Sort","JetGhostLabel")+standardrecomods+substrmods+ufo_softdrop_mods+truthlabels_SD+ufo_dnn_moments,
147  Beta = 1., ZCut= 0.1,
148  )
149 
150 AntiKt10UFOCSSKSoftDrop_trigger = JetSoftDrop(AntiKt10UFOCSSK,
151  #A filter of 1 GeV is applied before the calibration to remove jets with zero constituents after the soft drop alg is applied
152  modifiers = ("Filter:1000","Calib:SoftDrop:mc","Filter:50000","Sort","ConstitFourMom"),
153  Beta = 1., ZCut= 0.1,
154  )
155 
156 
157 
158 AntiKt10Truth = JetDefinition("AntiKt",1.0,cst.Truth,
159  ghostdefs = flavourghosts ,
160  modifiers = ("Sort", "Filter:50000","ktsplitter","JetGhostLabel"),
161  standardRecoMode = True,
162  ghostarea = 0.,
163  lock = True
164 )
165 
166 AntiKt10TruthTrimmed = JetTrimming(AntiKt10Truth,
167  modifiers = ("Sort","JetGhostLabel")+substrmods+truthmods,
168  PtFrac = 0.05, RClus = 0.2,
169  )
170 
171 AntiKt10TruthSoftDrop = JetSoftDrop(AntiKt10Truth,
172  modifiers = ("Sort","JetGhostLabel")+substrmods+truthmods,
173  Beta = 1., ZCut= 0.1,
174  )
175 
176 
177 AntiKt10TruthWZ = JetDefinition("AntiKt",1.0, cst.TruthWZ,
178  ghostdefs = flavourghosts,
179  modifiers = ("Sort", "Filter:50000","ktsplitter","JetGhostLabel"),
180  standardRecoMode = True,
181  ghostarea = 0.,
182  lock = True,
183 )
184 
185 AntiKt10TruthWZSoftDrop = JetSoftDrop(AntiKt10TruthWZ,
186  modifiers = ("Sort","JetGhostLabel")+substrmods+truthmods,
187  Beta = 1., ZCut= 0.1,
188 )
189 
190 AntiKt10TruthDressedWZ = JetDefinition("AntiKt",1.0,cst.TruthDressedWZ,
191  ghostdefs = flavourghosts ,
192  modifiers = ("Sort", "Filter:50000","ktsplitter","JetGhostLabel"),
193  standardRecoMode = True,
194  lock = True
195 )
196 
197 AntiKt10TruthDressedWZSoftDrop = JetSoftDrop(AntiKt10TruthDressedWZ,
198  modifiers = ("Sort","JetGhostLabel")+substrmods+truthmods,
199  Beta = 1., ZCut= 0.1,
200 )
201 
202 # These jets may be used as input for the JetTruthLabelling, so they also need to be defined as constituents:
203 registerAsInputConstit(AntiKt10TruthDressedWZSoftDrop)
204 
205 AntiKt10TruthGEN = JetDefinition("AntiKt",1.0, cst.TruthGEN,
206  ptmin = 5000,
207  ghostdefs = [],
208  modifiers = ("Sort", )+truthmods,
209  ghostarea = 0.,
210  lock = True,
211 )
212 AntiKt10TruthGENWZ = AntiKt10TruthGEN.clone(inputdef=cst.TruthGENWZ)
213 
214 
215 
216 
217 
218 
219 
python.JetRecConfig.registerAsInputConstit
def registerAsInputConstit(jetdef)
Definition: JetRecConfig.py:861
python.JetGrooming.JetSoftDrop
Definition: JetGrooming.py:145
python.JetDefinition.JetDefinition
Definition: JetDefinition.py:68
JetGrooming::JetTrimming
Definition: JetTrimming.h:38