delphi-edm4hep
DELPHI SDST/FDST -> EDM4hep converter
Loading...
Searching...
No Matches
Btag.h
Go to the documentation of this file.
1// Btag.h — b-tagging domain writer.
2//
3// Emits both forms of DELPHI's b-tag:
4//
5// <prefix>_BTG_* the tag stored on the DST. Transcribed; NaN where the
6// bank was not written.
7// <prefix>_AABTAG_* the tag recalculated here. Derived, and the only form
8// carrying per-track quantities and a primary vertex.
9//
10// Per-track rows are in AABTAG's own ordering (1..NTRK), each linked to its
11// particle. Impact parameters ride on the track as a TrackState at AtVertex
12// (see Tracking.cpp), not here.
13
14#pragma once
15
17
18#include <string_view>
19#include <unordered_map>
20
22
24public:
26
27 void emit() override;
28
29private:
30 // Emit the event and hemisphere b-tag probabilities plus the thrust that
31 // are currently in the PSCBTG common, under `bank`. Both the stored tag and
32 // the recalculated one land there, one after the other, so the caller
33 // controls which is being read.
34 void emitEventLevel(std::string_view bank, Provenance prov, bool valid);
35
36 // Run DELPHI's combined tag (AACMBT / AACMZ0, DELPHI 97-094) on the commons
37 // AABTGS left behind and emit, under AABTAG_*: the secondary-vertex
38 // hypotheses of AAFSEC, one CombinedTagRow per AABTAG jet carrying that
39 // jet's tag variables, and the event-level combined tag. AABTAG's jets
40 // themselves are not emitted. `lpa_to_pa` resolves AABTAG's track
41 // addresses to particles. Emits empty collections / NaN when `valid` is
42 // false, without calling into AABTAG.
43 void emitCombinedTag(bool valid,
44 const std::unordered_map<int, int>& lpa_to_pa);
45};
46
47} // namespace delphi_edm4hep::btag
CollectionWriter(podio::Frame &frame, EventContext &ctx, bank::Pass pass)
CollectionWriter(podio::Frame &frame, EventContext &ctx, bank::Pass pass)