Belle II Software prerelease-11-00-00a
CATFinderModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <framework/core/Module.h>
11
12#include <framework/datastore/StoreArray.h>
13#include <mva/methods/ONNX.h>
14#include <tracking/trackingUtilities/eventdata/hits/CDCWireHit.h>
15#include <tracking/trackingUtilities/rootification/StoreWrappedObjPtr.h>
16
17namespace Belle2 {
22
23 class CDCHit;
25 class RecoTrack;
26
31 * @class CATFinderModule
32 * @brief Belle II module for the CDC AI Track Finder (CATFinder) using a Graph Neural Network (GNN) and condensation clustering.
33 *
34 * The CATFinderModule processes Central Drift Chamber (CDC) wire hits and reconstructs charged particle tracks
35 * by applying a Graph Neural Network (GNN) followed by condensation-based clustering and spatial hit ordering.
36 *
37 * The module workflow consists of:
38 * - **Preprocessing** ``CDCWireHit`` objects to construct the input feature tensor.
39 * - **GNN inference** using a trained model loaded from a weight file.
40 * - **Postprocessing** GNN outputs to extract condensation points, assign hits, and build `RecoTrack` objects.
41 *
42 * The GNN is run via the ONNX interface.
43 */
47 class CATFinderModule : public Module {
48
49 public:
50 CATFinderModule();
51
58 void initialize() override;
59
65 void beginRun() override;
66
73 void event() override;
74
75 private:
76
78 std::string m_CDCRecoTracksName;
79
81 std::string m_catFinderWeightfileName = "CATFinderWeightFile";
82
84 StoreArray<CDCHit> m_CDCHits;
85
87 TrackingUtilities::StoreWrappedObjPtr<std::vector<TrackingUtilities::CDCWireHit>> m_wireHitVector{"CDCWireHitVector"};
88
90 StoreArray<RecoTrack> m_CDCRecoTracks;
91
93 StoreArray<RecoHitInformation> m_recoHitInformations;
94
96 float m_tdcOffset = 0.;
97
99 float m_tdcScale = 0.;
100
102 float m_adcClip = 0.;
103
105 float m_slayerScale = 0.;
106
108 float m_clayerScale = 0.;
109
111 float m_layerScale = 0.;
112
114 float m_spatialCoordinatesScale = 0.;
115
117 unsigned int m_nInputFeatures = 0;
118
120 unsigned int m_latentSpaceNDim = 0;
121
123 float m_tBeta = 0.;
124
126 float m_tDistance = 0.;
127
129 float m_maxRadius = 0.;
130
132 unsigned int m_minNumberHits = 0.;
133
135 std::string m_inputTFeaturesName;
136
138 std::string m_outputTBetaName;
139
141 std::string m_outputTCoordinatesName;
142
144 std::string m_outputTMomentumName;
145
147 std::string m_outputTVertexName;
148
150 std::string m_outputTChargeName;
151
153 std::unique_ptr<MVA::ONNX::Session> m_session;
154 };
155
157}
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition CDCHit.h:40
Base class for Modules.
Definition Module.h:72
This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.
This is the Reconstruction Event-Data Model Track.
Definition RecoTrack.h:79
Class that bundles various TrackFitResults.
Definition Track.h:25
Class representing a hit wire in the central drift chamber.
Definition CDCWireHit.h:58
Abstract base class for different kinds of events.