5#ifndef HYPERANALYSISALGORITHMS_RUNHYPERALG_H
6#define HYPERANALYSISALGORITHMS_RUNHYPERALG_H
40using ROOT::Math::PtEtaPhiMVector;
82 virtual StatusCode
execute(
const EventContext& ctx)
override;
83 virtual StatusCode
finalize()
override;
94 const std::vector<int>& ids,
95 PtEtaPhiMVector& bJetP4,
96 PtEtaPhiMVector& leptonP4,
97 float& analyserCharge)
const;
99 const std::vector<int>& wIndices,
100 PtEtaPhiMVector& top_b_p4,
101 PtEtaPhiMVector& top_W_decay0_p4,
102 PtEtaPhiMVector& top_W_decay1_p4);
104 const std::vector<int>& wHadIndices,
105 const std::vector<int>& topLepIndices,
106 const std::vector<int>& topLepIDs,
107 PtEtaPhiMVector& tophad_b_p4,
108 PtEtaPhiMVector& tophad_w_decay0_p4,
109 PtEtaPhiMVector& tophad_w_decay1_p4,
110 PtEtaPhiMVector& toplep_b_p4,
111 PtEtaPhiMVector& toplep_lep_p4);
117 this,
"topology",
"",
118 "HyPER topology. Choose between: 'TtbarLJets', 'TtbarLJetsNoBTag', "
119 "'TtbarAllHadronic' and 'TtbarDiLepton'."};
121 this,
"btagger",
"GN2v01_Continuous",
122 "Name of the b-tagger and working point for jets. The "
123 "'ftag_quantile_' prefix is added internally."};
131 this,
"onnxToolTrainedOnEven",
"",
132 "ONNX inference tool holding the model trained on even-numbered events"};
134 this,
"onnxToolTrainedOnOdd",
"",
135 "ONNX inference tool holding the model trained on odd-numbered events"};
147 this,
"fullLogEventNumber", 0,
148 "Number of the event to log in full detail"};
161 this,
"electrons",
"",
"The electron container to use."};
163 this,
"electronSelection",
"",
"The selection on the input electrons."};
166 this,
"muons",
"",
"The muon container to use."};
168 this,
"muonSelection",
"",
"The selection on the input muons."};
171 this,
"jets",
"",
"The jet container to use."};
173 "The selection on the input jets."};
176 this,
"met",
"",
"The MET container to use."};
179 this,
"eventInfo",
"EventInfo",
180 "The EventInfo container to read selection decisions from."};
183 this,
"eventSelection",
"",
184 "Name of the selection on which this HyPER instance is allowed to run."};
192 this,
"TtbarAllHadronic_HyPER_Top1_Indices",
193 "TtbarAllHadronic_HyPER_Top1_Indices_%SYS%",
194 "Indices of the reconstructed top1 in the ttbar all-hadronic "
198 this,
"TtbarAllHadronic_HyPER_Top2_Indices",
199 "TtbarAllHadronic_HyPER_Top2_Indices_%SYS%",
200 "Indices of the reconstructed top2 in the ttbar all-hadronic "
203 this,
"TtbarAllHadronic_HyPER_W1_Indices",
204 "TtbarAllHadronic_HyPER_W1_Indices_%SYS%",
205 "Indices of the reconstructed W1 in the ttbar all-hadronic topology"};
207 this,
"TtbarAllHadronic_HyPER_W2_Indices",
208 "TtbarAllHadronic_HyPER_W2_Indices_%SYS%",
209 "Indices of the reconstructed W2 in the ttbar all-hadronic topology"};
212 this,
"TtbarAllHadronic_HyPER_Top1_Score",
213 "TtbarAllHadronic_HyPER_Top1_Score_%SYS%",
214 "Score of the reconstructed top1 in the ttbar all-hadronic topology"};
216 this,
"TtbarAllHadronic_HyPER_Top2_Score",
217 "TtbarAllHadronic_HyPER_Top2_Score_%SYS%",
218 "Score of the reconstructed top2 in the ttbar all-hadronic topology"};
220 this,
"TtbarAllHadronic_HyPER_W1_Score",
221 "TtbarAllHadronic_HyPER_W1_Score_%SYS%",
222 "Score of the reconstructed W1 in the ttbar all-hadronic topology"};
224 this,
"TtbarAllHadronic_HyPER_W2_Score",
225 "TtbarAllHadronic_HyPER_W2_Score_%SYS%",
226 "Score of the reconstructed W2 in the ttbar all-hadronic topology"};
230 this,
"top_Wplus_decay0_p4",
"",
231 "Visible top W+ leading decay product four-vector associated to the top "
234 this,
"top_Wplus_decay1_p4",
"",
235 "Visible top W+ subleading decay product four-vector associated to the "
238 this,
"topbar_Wminus_decay0_p4",
"",
239 "Visible anti-top W- leading decay product four-vector associated to the "
242 this,
"topbar_Wminus_decay1_p4",
"",
243 "Visible anti-top W- subleading decay product four-vector associated to "
244 "the anti-top quark"};
249 this,
"TtbarLJets_HyPER_Classification_Score",
250 "TtbarLJets_HyPER_Classification_Score_%SYS%",
251 "Classification score of the ttbar single lepton topology"};
254 this,
"TtbarLJets_HyPER_TopHad_Indices",
255 "TtbarLJets_HyPER_TopHad_Indices_%SYS%",
256 "Indices of the reconstructed hadronic top in the ttbar single "
259 this,
"TtbarLJets_HyPER_TopLep_Indices",
260 "TtbarLJets_HyPER_TopLep_Indices_%SYS%",
261 "Indices of the reconstructed leptonic top in the ttbar single "
264 this,
"TtbarLJets_HyPER_WHad_Indices",
265 "TtbarLJets_HyPER_WHad_Indices_%SYS%",
266 "Indices of the reconstructed hadronic W in the ttbar single lepton "
269 this,
"TtbarLJets_HyPER_WLep_Indices",
270 "TtbarLJets_HyPER_WLep_Indices_%SYS%",
271 "Indices of the reconstructed leptonic W in the ttbar single lepton "
275 this,
"TtbarLJets_HyPER_TopHad_Score",
276 "TtbarLJets_HyPER_TopHad_Score_%SYS%",
277 "Score of the reconstructed hadronic top in the ttbar single lepton "
280 this,
"TtbarLJets_HyPER_TopLep_Score",
281 "TtbarLJets_HyPER_TopLep_Score_%SYS%",
282 "Score of the reconstructed leptonic top in the ttbar single lepton "
285 this,
"TtbarLJets_HyPER_WHad_Score",
"TtbarLJets_HyPER_WHad_Score_%SYS%",
286 "Score of the reconstructed hadronic W in the ttbar single lepton "
289 this,
"TtbarLJets_HyPER_WLep_Score",
"TtbarLJets_HyPER_WLep_Score_%SYS%",
290 "Score of the reconstructed leptonic W in the ttbar single lepton "
294 this,
"TtbarLJets_HyPER_TopHad_IDs",
"TtbarLJets_HyPER_TopHad_IDs_%SYS%",
295 "IDs of the reconstructed hadronic top in the ttbar single lepton "
298 this,
"TtbarLJets_HyPER_TopLep_IDs",
"TtbarLJets_HyPER_TopLep_IDs_%SYS%",
299 "IDs of the reconstructed leptonic top in the ttbar single lepton "
303 this,
"toplep_b_p4",
"",
304 "Visible toplep b-jet four-vector associated to the leptonic top quark"};
306 this,
"toplep_lep_p4",
"",
307 "Lepton four-vector associated to the leptonic top quark"};
309 this,
"tophad_b_p4",
"",
310 "Visible tophad b-jet four-vector associated to the hadronic top quark"};
312 this,
"tophad_w_decay0_p4",
"",
313 "Visible hadronic top W leading decay product four-vector"};
315 this,
"tophad_w_decay1_p4",
"",
316 "Visible hadronic top W subleading decay product four-vector"};
321 this,
"TtbarDiLepton_HyPER_Classification_Score",
322 "TtbarDiLepton_HyPER_Classification_Score_%SYS%",
323 "Classification score of the ttbar di-lepton topology"};
326 this,
"TtbarDiLepton_HyPER_Top1_Indices",
327 "TtbarDiLepton_HyPER_Top1_Indices_%SYS%",
328 "Indices of the reconstructed top1 in the ttbar di-lepton "
331 this,
"TtbarDiLepton_HyPER_Top2_Indices",
332 "TtbarDiLepton_HyPER_Top2_Indices_%SYS%",
333 "Indices of the reconstructed top2 in the ttbar di-lepton "
337 this,
"TtbarDiLepton_HyPER_Top1_Score",
338 "TtbarDiLepton_HyPER_Top1_Score_%SYS%",
339 "Score of the reconstructed top1 in the ttbar di-lepton topology"};
341 this,
"TtbarDiLepton_HyPER_Top2_Score",
342 "TtbarDiLepton_HyPER_Top2_Score_%SYS%",
343 "Score of the reconstructed top2 in the ttbar di-lepton topology"};
346 this,
"TtbarDiLepton_HyPER_Top1_IDs",
347 "TtbarDiLepton_HyPER_Top1_IDs_%SYS%",
348 "IDs of the reconstructed top1 in the ttbar di-lepton topology"};
350 this,
"TtbarDiLepton_HyPER_Top2_IDs",
351 "TtbarDiLepton_HyPER_Top2_IDs_%SYS%",
352 "IDs of the reconstructed top2 in the ttbar di-lepton topology"};
355 this,
"TtbarDiLepton_HyPER_HE_Score",
356 "TtbarDiLepton_HyPER_HE_Score_%SYS%",
357 "HE score of the ttbar di-lepton topology"};
360 this,
"top_b_p4",
"",
361 "Visible top b-jet four-vector for the positive-charge lepton branch"};
363 this,
"topbar_bbar_p4",
"",
364 "Visible anti-top bbar-jet four-vector for the negative-charge lepton "
367 this,
"top_lep_p4",
"",
368 "Top lepton four-vector for the positive-charge lepton branch"};
370 this,
"topbar_lepbar_p4",
"",
371 "Anti-top lepton four-vector for the negative-charge lepton branch"};
DataVector adapter that acts like it holds const pointers.
std::vector< std::vector< int64_t > > indices
a class managing the property to configure the list of systematics to process
a data handle for reading systematics varied input data
a data handle for reading systematically varied selection properties from objects
a data handle for reading systematics varied input data
DataVector adapter that acts like it holds const pointers.
the (new) base class for EventLoop algorithms
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
virtual::StatusCode execute()
execute this algorithm
This class is in charge of building the HyPER graph and running the HyPER algorithm: The user-inputs ...
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_top_b_p4
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_top_lep_p4
CP::SysWriteDecorHandle< float > m_hyper_TtbarLJets_WHad_Score
std::unique_ptr< SG::ConstAccessor< int > > m_bTagDecoAcc
StatusCode buildTtbarLJetsGraph()
StatusCode buildTtbarDiLeptonGraph()
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_topbar_lepbar_p4
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarAllHadronic_Top2_Indices
CP::SysWriteDecorHandle< float > m_hyper_TtbarLJets_TopLep_Score
StatusCode buildTtbarAllHadronicGraph()
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarDiLepton_Top1_IDs
void buildTopP4TtbarAllHadronic(const std::vector< int > &topIndices, const std::vector< int > &wIndices, PtEtaPhiMVector &top_b_p4, PtEtaPhiMVector &top_W_decay0_p4, PtEtaPhiMVector &top_W_decay1_p4)
CP::SysWriteDecorHandle< float > m_hyper_TtbarDiLepton_Top2_Score
CP::SysReadSelectionHandle m_jetSelection
CP::SysReadSelectionHandle m_electronSelection
void buildTopP4TtbarLJets(const std::vector< int > &topHadIndices, const std::vector< int > &wHadIndices, const std::vector< int > &topLepIndices, const std::vector< int > &topLepIDs, PtEtaPhiMVector &tophad_b_p4, PtEtaPhiMVector &tophad_w_decay0_p4, PtEtaPhiMVector &tophad_w_decay1_p4, PtEtaPhiMVector &toplep_b_p4, PtEtaPhiMVector &toplep_lep_p4)
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarLJets_WHad_Indices
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_top_Wplus_decay1_p4
CP::SysReadHandle< xAOD::JetContainer > m_jetsHandle
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarAllHadronic_Top1_Indices
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarLJets_TopHad_IDs
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarLJets_TopHad_Indices
CP::SysWriteDecorHandle< float > m_hyper_TtbarLJets_TopHad_Score
CP::SysWriteDecorHandle< float > m_hyper_TtbarLJets_WLep_Score
CP::SysListHandle m_systematicsList
CP::SysWriteDecorHandle< float > m_hyper_TtbarAllHadronic_W2_Score
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarLJets_WLep_Indices
CP::SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_tophad_w_decay1_p4
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarDiLepton_Top1_Indices
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_toplep_lep_p4
std::string m_btagDecorName
HyPERTopology m_hyperTopology
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarDiLepton_Top2_IDs
CP::SysReadHandle< xAOD::MuonContainer > m_muonsHandle
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarLJets_TopLep_IDs
CP::SysReadHandle< xAOD::ElectronContainer > m_electronsHandle
CP::SysWriteDecorHandle< float > m_hyper_TtbarDiLepton_Top1_Score
std::unique_ptr< HyPERModel > m_hyperModel
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarDiLepton_Top2_Indices
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_topbar_Wminus_decay0_p4
CP::SysReadHandle< xAOD::MissingETContainer > m_metHandle
CP::SysReadSelectionHandle m_muonSelection
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarLJets_TopLep_Indices
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_toplep_b_p4
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarAllHadronic_W2_Indices
CP::SysWriteDecorHandle< std::vector< int > > m_hyper_TtbarAllHadronic_W1_Indices
Gaudi::Property< long unsigned int > m_fullLogEventNumber
ToolHandle< AthOnnx::IOnnxRuntimeInferenceTool > m_onnxToolTrainedOnEven
Gaudi::Property< std::string > m_btagger
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_topbar_bbar_p4
CP::SysWriteDecorHandle< float > m_hyper_TtbarAllHadronic_Top2_Score
CP::SysWriteDecorHandle< float > m_hyper_TtbarAllHadronic_Top1_Score
CP::SysWriteDecorHandle< float > m_hyper_TtbarDiLepton_Classification_Score
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_tophad_w_decay0_p4
CP::SysWriteDecorHandle< float > m_hyper_TtbarDiLepton_HE_Score
Gaudi::Property< std::string > m_topology
CP::SysWriteDecorHandle< float > m_hyper_TtbarLJets_Classification_Score
std::unique_ptr< HyPERGraph > m_hyperGraph
std::unique_ptr< HyPERParser > m_hyperParser
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_tophad_b_p4
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_topbar_Wminus_decay1_p4
virtual StatusCode initialize() override
CP::SysWriteDecorHandle< PtEtaPhiMVector > m_top_Wplus_decay0_p4
ToolHandle< AthOnnx::IOnnxRuntimeInferenceTool > m_onnxToolTrainedOnOdd
CP::SysReadSelectionHandle m_selection
CP::SysWriteDecorHandle< float > m_hyper_TtbarAllHadronic_W1_Score
StatusCode buildGraph()
These methods build the HyPER graph based on the user-input topology.
bool buildDileptonPartialCandidate(const std::vector< int > &indices, const std::vector< int > &ids, PtEtaPhiMVector &bJetP4, PtEtaPhiMVector &leptonP4, float &analyserCharge) const
virtual StatusCode finalize() override
MissingETContainer_v1 MissingETContainer