ATLAS Offline Software
Loading...
Searching...
No Matches
GepJetAlg.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef TRIGL0GEPPERF_GEPJETALG_H
6#define TRIGL0GEPPERF_GEPJETALG_H
7
8/*
9 This algorithm creates jets from CaloClusters, and writes them out
10 as xAOD::Jets. The origin of the clusters maybe via standard ATLS
11 code, or by Gep clustering. The jet strategy is
12 carried out by helper objects.
13 The strategy used is chosen according to string set at configure time. *
14*/
15
16
17
19
21
25
26// JetTaggerLRJ maker (owns the runtime config + on-the-fly deltaR LUT)
27#include "./JetTaggerLRJMaker.h"
28
29//Athena::Units::GeV
30#include "AthenaKernel/Units.h"
31
32#include <string>
33
34
36 public:
37
38 GepJetAlg( const std::string& name, ISvcLocator* pSvcLocator );
39
40 virtual StatusCode initialize() override;
41 virtual StatusCode execute(const EventContext& ) const override;
42
43
44 private:
45
46 Gaudi::Property<std::string> m_jetAlgName{this, "jetAlgName", "",
47 "Gep jet alg idenfifier"};
48
49 Gaudi::Property<bool> m_configureLRJMaker{this, "EnableLRJMaker", false,
50 "Build and configure the JetTaggerLRJ maker in initialize(). Set by "
51 "GepJetTaggerLRJAlgCfg; must agree with jetAlgName == 'JetTaggerLRJ'."};
52
54 this, "caloClustersKey", "", "key to read in a CaloCluster constainer"};
55
57 this, "jFexSRJetRoIs", "L1_jFexSRJetRoISim", "key to read a L1 jet container"};
58
60 this, "outputJetsKey", "",
61 "key for xAOD:Jet wrappers for GepJets"};
62
63 // WTAConeMaker parameters
64 Gaudi::Property<float> m_WTAConstEtCut{this, "WTAConstEtCut", 2.0,
65 "Minimum Et for a tower to be considered as a constituent"};
66
67 Gaudi::Property<float> m_WTASeedEtCut{this, "WTASeedEtCut", 5.0,
68 "Minimum Et for a tower to be considered as a seed"};
69
70 Gaudi::Property<float> m_WTAJet_dR{this, "WTAJet_dR", 0.4,
71 "Jet radius to determine TOB-Jet association"};
72
73 Gaudi::Property<unsigned int> m_WTAMaxConstN{this, "WTAMaxConstN", 205,
74 "Maximum number of constituents per jet"};
75
76 Gaudi::Property<unsigned int> m_WTAMaxSeedSortingN{this, "WTAMaxSeedSortingN", 50,
77 "Maximum number of seeds to sort"};
78
79 Gaudi::Property<unsigned int> m_WTABlockN{this, "WTABlockN", 4,
80 "Number of blocks to divide the input towers into for parallel processing. Options: 1, 4"};
81
82 Gaudi::Property<std::string> m_WTASeedCleaningName{this, "WTASeedCleaningName", "TwoPass",
83 "Seed cleaning algorithm to use. Options: Baseline, TwoPass"};
84
85// ------------------------------------------------------------------
86// JetTaggerLRJ (modified seeded-cone large-R jet) algorithm wiring.
87// The algorithm body (JetTaggerLRJMaker) currently emits a placeholder
88// LRJ per seed; the substructure stages are still being filled in.
89// ------------------------------------------------------------------
91 this, "LRJWTAConeSeedsKey", "",
92 "WTACone small-R jets used as JetTaggerLRJ seeds (xAOD::JetContainer)."};
93
95 this, "LRJgFexSRJetRoIs", "L1_gFexSRJetRoISim",
96 "gFEX small-R jet RoIs used as JetTaggerLRJ seeds."};
97
98 // jFEX SR-jet seeds reuse m_jFexSRJetsKey above.
99
100 Gaudi::Property<std::string> m_LRJSeedSource{this, "LRJSeedSource", "WTACone",
101 "Source of JetTaggerLRJ seeds. Options: WTACone, jFexSRJ, gFexSRJ"};
102
103 Gaudi::Property<std::string> m_LRJConstSource{this, "LRJConstSource", "Towers",
104 "Source of JetTaggerLRJ constituents. Options: Towers, WTACone"};
105
106 // ---- preset selector ----
107 Gaudi::Property<unsigned int> m_LRJAlgoVersion{this, "LRJAlgoVersion", 3,
108 "Algorithm variant / preset: 2 = basic (BasicV2), 3 = advanced (AdvancedV3)."};
109
110 // ---- geometry (concrete defaults; <= 0 : inherit from preset instead) ----
111 Gaudi::Property<float> m_LRJJetR{this, "LRJJetR", 1.1,
112 "Large-R jet cone radius; r2Cut = LRJJetR^2. Default 1.1 (r2Cut=1.21). <=0 inherits the preset."};
113
114 Gaudi::Property<float> m_LRJDSearch{this, "LRJDSearch", 2.0,
115 "Seed-position-optimization search distance (rMergeCut); ignored when v2 (basic). "
116 "Default 2.0. <0 inherits the preset (which is 0.001/disabled for basic)."};
117
118 // ---- multiplicity overrides (0 : inherit from preset) ----
119 Gaudi::Property<unsigned int> m_LRJNSeedsInput{this, "LRJNSeedsInput", 0,
120 "Number of input seeds considered per event. 0 inherits the preset."};
121
122 Gaudi::Property<unsigned int> m_LRJNProtoSeeds{this, "LRJNProtoSeeds", 0,
123 "Number of proto-seeds for seed-position optimization. 0 inherits the preset."};
124
125 Gaudi::Property<unsigned int> m_LRJNSeedsOutput{this, "LRJNSeedsOutput", 0,
126 "Number of output LRJs per event (typically 2). 0 inherits the preset."};
127
128 Gaudi::Property<unsigned int> m_LRJMaxObjectsConsidered{this, "LRJMaxObjectsConsidered", 0,
129 "Maximum number of constituents to load per event. 0 inherits the preset."};
130
131 // ---- digitization overrides: bit lengths (0 : inherit from preset) ----
132 Gaudi::Property<unsigned int> m_LRJEtBitLength{this, "LRJEtBitLength", 0,
133 "Et field bit length. 0 inherits the preset."};
134 Gaudi::Property<unsigned int> m_LRJEtaBitLength{this, "LRJEtaBitLength", 0,
135 "Eta field bit length. 0 inherits the preset."};
136 Gaudi::Property<unsigned int> m_LRJPhiBitLength{this, "LRJPhiBitLength", 0,
137 "Phi field bit length. 0 inherits the preset."};
138 Gaudi::Property<unsigned int> m_LRJNumSubjetsLength{this, "LRJNumSubjetsLength", 0,
139 "n-subjets field bit length. 0 inherits the preset."};
140 Gaudi::Property<unsigned int> m_LRJNSubjetinessBitLength{this, "LRJNSubjetinessBitLength", 0,
141 "tau_1 / tau_2 field bit length. 0 inherits the preset."};
142 Gaudi::Property<unsigned int> m_LRJMassApproxBitLength{this, "LRJMassApproxBitLength", 0,
143 "massApprox field bit length. 0 inherits the preset."};
144 Gaudi::Property<unsigned int> m_LRJPsiRBitLength{this, "LRJPsiRBitLength", 0,
145 "psi_R / deltaR-LUT field bit length. 0 inherits the preset."};
146 Gaudi::Property<unsigned int> m_LRJDeltaRLutLength{this, "LRJDeltaRLutLength", 0,
147 "deltaR granularity bit length. 0 inherits the preset."};
148
149 // ---- digitization overrides: physical ranges (-9999 : inherit) ----
150 Gaudi::Property<float> m_LRJPhiMin{this, "LRJPhiMin", -9999.0, "phi range minimum. -9999 inherits the preset."};
151 Gaudi::Property<float> m_LRJPhiMax{this, "LRJPhiMax", -9999.0, "phi range maximum. -9999 inherits the preset."};
152 Gaudi::Property<float> m_LRJEtaMin{this, "LRJEtaMin", -9999.0, "eta range minimum. -9999 inherits the preset."};
153 Gaudi::Property<float> m_LRJEtaMax{this, "LRJEtaMax", -9999.0, "eta range maximum. -9999 inherits the preset."};
154 Gaudi::Property<float> m_LRJEtMin{this, "LRJEtMin", -9999.0, "Et range minimum (GeV). -9999 inherits the preset."};
155 Gaudi::Property<float> m_LRJEtMax{this, "LRJEtMax", -9999.0, "Et range maximum (GeV). -9999 inherits the preset."};
156 Gaudi::Property<float> m_LRJMassApproxMax{this, "LRJMassApproxMax", -1.0, "massApprox range maximum (GeV). <=0 inherits the preset."};
157 Gaudi::Property<float> m_LRJInputEtToGeV{this, "LRJInputEtToGeV", -1.0, "Input Et (MeV) -> GeV scale. <=0 inherits the preset (1e-3)."};
158
159 // ---- thresholds (<0 : inherit from preset) ----
160 Gaudi::Property<float> m_LRJSubjetEtThresholdGeV{this, "LRJSubjetEtThresholdGeV", -1.0,
161 "Minimum subjet Et (GeV) for counting nSubjets. <0 inherits the preset."};
162
163 Gaudi::Property<float> m_LRJMinEtSeedPosOptCutGeV{this, "LRJMinEtSeedPosOptCutGeV", -1.0,
164 "Minimum proto-seed Et (GeV) for seed-position optimization. <0 inherits the preset."};
165
166 // ---- reserved (per-object Et cuts not yet applied, matching the emulation) ----
167 Gaudi::Property<float> m_LRJSeedEtCutGeV{this, "LRJSeedEtCutGeV", 5.0,
168 "Minimum seed Et in GeV (reserved; not yet applied)."};
169 Gaudi::Property<float> m_LRJConstEtCutGeV{this, "LRJConstEtCutGeV", 2.0,
170 "Minimum constituent Et in GeV (reserved; not yet applied)."};
171
172 // ---- flow toggles (always applied; v2 ignores OR / seed-opt) ----
173 Gaudi::Property<bool> m_LRJEnableOverlapRemoval{this, "LRJEnableOverlapRemoval", true,
174 "Enable overlap removal between the leading two seeds (advanced only)."};
175 Gaudi::Property<bool> m_LRJEnableEtWeightedMidpoint{this, "LRJEnableEtWeightedMidpoint", false,
176 "Use Et-weighted midpoint in seed-position optimization."};
177 Gaudi::Property<bool> m_LRJMinEtSeedPosOptimization{this, "LRJMinEtSeedPosOptimization", true,
178 "Apply the minimum proto-seed Et cut in seed-position optimization."};
179
180 // ---- output toggles (always applied) ----
181 Gaudi::Property<bool> m_LRJWriteSubstructure{this, "LRJWriteSubstructure", true,
182 "Fill psi_R / tau_1 / tau_2 / massApprox / nSubjets on the output LRJ."};
183 Gaudi::Property<bool> m_LRJWriteSubjetKinematics{this, "LRJWriteSubjetKinematics", true,
184 "Fill per-subjet (et, eta, phi) vectors on the output LRJ."};
185 Gaudi::Property<bool> m_LRJWriteConstituentIndices{this, "LRJWriteConstituentIndices", true,
186 "Fill constituentsIndices / mergedIndices on the output LRJ."};
187
188 // Configured once in initialize() (builds the deltaR LUT); used read-only in execute().
190
191 StatusCode configureLRJMaker();
192
193 // Load JetTaggerLRJ seeds from an input collection into `seeds`. `kin` maps a
194 // collection element to (pt, eta, phi, m), hiding the per-source accessor
195 // differences (xAOD::Jet uses pt()/m(); the FEX RoIs use et() and mass 0).
196 template <typename Container, typename KinFn>
197 StatusCode loadLRJSeeds(const SG::ReadHandleKey<Container>& key,
198 const EventContext& ctx,
199 KinFn&& kin,
200 std::vector<Gep::Jet>& seeds) const;
201
202};
203
204#endif //> !TRIGL0GEPPERF_GEPJETALG_H
Wrapper to avoid constant divisions when using units.
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Property< unsigned int > m_LRJEtBitLength
Definition GepJetAlg.h:132
Gaudi::Property< unsigned int > m_LRJNumSubjetsLength
Definition GepJetAlg.h:138
Gaudi::Property< float > m_LRJEtMax
Definition GepJetAlg.h:155
Gaudi::Property< bool > m_LRJWriteSubjetKinematics
Definition GepJetAlg.h:183
Gaudi::Property< float > m_LRJEtMin
Definition GepJetAlg.h:154
StatusCode configureLRJMaker()
Definition GepJetAlg.cxx:64
Gaudi::Property< float > m_LRJPhiMin
Definition GepJetAlg.h:150
Gaudi::Property< float > m_LRJInputEtToGeV
Definition GepJetAlg.h:157
Gaudi::Property< unsigned int > m_LRJNSeedsOutput
Definition GepJetAlg.h:125
Gaudi::Property< float > m_LRJPhiMax
Definition GepJetAlg.h:151
Gaudi::Property< bool > m_LRJMinEtSeedPosOptimization
Definition GepJetAlg.h:177
StatusCode loadLRJSeeds(const SG::ReadHandleKey< Container > &key, const EventContext &ctx, KinFn &&kin, std::vector< Gep::Jet > &seeds) const
Gaudi::Property< float > m_WTAJet_dR
Definition GepJetAlg.h:70
SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > m_jFexSRJetsKey
Definition GepJetAlg.h:56
Gaudi::Property< float > m_WTASeedEtCut
Definition GepJetAlg.h:67
Gaudi::Property< float > m_LRJSeedEtCutGeV
Definition GepJetAlg.h:167
Gaudi::Property< float > m_WTAConstEtCut
Definition GepJetAlg.h:64
Gaudi::Property< bool > m_LRJWriteConstituentIndices
Definition GepJetAlg.h:185
Gaudi::Property< std::string > m_jetAlgName
Definition GepJetAlg.h:46
Gaudi::Property< unsigned int > m_LRJEtaBitLength
Definition GepJetAlg.h:134
virtual StatusCode initialize() override
Definition GepJetAlg.cxx:34
Gaudi::Property< unsigned int > m_LRJNSeedsInput
Definition GepJetAlg.h:119
Gaudi::Property< unsigned int > m_LRJMassApproxBitLength
Definition GepJetAlg.h:142
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClustersKey
Definition GepJetAlg.h:53
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_lrjGFexSRJetsKey
Definition GepJetAlg.h:94
virtual StatusCode execute(const EventContext &) const override
Gaudi::Property< std::string > m_WTASeedCleaningName
Definition GepJetAlg.h:82
Gaudi::Property< unsigned int > m_WTABlockN
Definition GepJetAlg.h:79
Gaudi::Property< unsigned int > m_WTAMaxConstN
Definition GepJetAlg.h:73
Gaudi::Property< std::string > m_LRJSeedSource
Definition GepJetAlg.h:100
Gaudi::Property< unsigned int > m_WTAMaxSeedSortingN
Definition GepJetAlg.h:76
Gaudi::Property< unsigned int > m_LRJAlgoVersion
Definition GepJetAlg.h:107
Gaudi::Property< float > m_LRJEtaMax
Definition GepJetAlg.h:153
Gaudi::Property< unsigned int > m_LRJNSubjetinessBitLength
Definition GepJetAlg.h:140
Gaudi::Property< float > m_LRJSubjetEtThresholdGeV
Definition GepJetAlg.h:160
SG::WriteHandleKey< xAOD::JetContainer > m_outputGepJetsKey
Definition GepJetAlg.h:59
Gaudi::Property< unsigned int > m_LRJNProtoSeeds
Definition GepJetAlg.h:122
Gaudi::Property< float > m_LRJJetR
Definition GepJetAlg.h:111
GepJetAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition GepJetAlg.cxx:28
Gaudi::Property< bool > m_LRJWriteSubstructure
Definition GepJetAlg.h:181
Gaudi::Property< bool > m_LRJEnableEtWeightedMidpoint
Definition GepJetAlg.h:175
Gaudi::Property< unsigned int > m_LRJPsiRBitLength
Definition GepJetAlg.h:144
Gaudi::Property< std::string > m_LRJConstSource
Definition GepJetAlg.h:103
Gaudi::Property< float > m_LRJMassApproxMax
Definition GepJetAlg.h:156
Gaudi::Property< bool > m_LRJEnableOverlapRemoval
Definition GepJetAlg.h:173
Gaudi::Property< float > m_LRJDSearch
Definition GepJetAlg.h:114
Gaudi::Property< float > m_LRJMinEtSeedPosOptCutGeV
Definition GepJetAlg.h:163
Gaudi::Property< bool > m_configureLRJMaker
Definition GepJetAlg.h:49
Gaudi::Property< float > m_LRJConstEtCutGeV
Definition GepJetAlg.h:169
Gaudi::Property< unsigned int > m_LRJPhiBitLength
Definition GepJetAlg.h:136
Gep::JetTaggerLRJMaker m_lrjMaker
Definition GepJetAlg.h:189
Gaudi::Property< unsigned int > m_LRJDeltaRLutLength
Definition GepJetAlg.h:146
Gaudi::Property< float > m_LRJEtaMin
Definition GepJetAlg.h:152
Gaudi::Property< unsigned int > m_LRJMaxObjectsConsidered
Definition GepJetAlg.h:128
SG::ReadHandleKey< xAOD::JetContainer > m_lrjWTAConeSeedsKey
Definition GepJetAlg.h:90
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.