Belle II Software development
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
41 class CATFinderModule : public Module {
42
43 public:
44 CATFinderModule();
45
52 void initialize() override;
53
59 void beginRun() override;
60
67 void event() override;
68
69 private:
70
73
75 std::string m_catFinderWeightfileName = "CATFinderWeightFile";
76
79
82
85
88
90 float m_tdcOffset = 0.;
91
93 float m_tdcScale = 0.;
94
96 float m_adcClip = 0.;
97
99 float m_slayerScale = 0.;
100
102 float m_clayerScale = 0.;
103
105 float m_layerScale = 0.;
106
109
111 unsigned int m_nInputFeatures = 0;
112
114 unsigned int m_latentSpaceNDim = 0;
115
117 float m_tBeta = 0.;
118
120 float m_tDistance = 0.;
121
123 float m_maxRadius = 0.;
124
126 unsigned int m_minNumberHits = 0.;
127
130
132 std::string m_outputTBetaName;
133
136
139
142
145
147 std::unique_ptr<MVA::ONNX::Session> m_session;
148 };
149
151}
std::string m_outputTBetaName
Name of the output tensor carrying the per-hit beta (condensation score) values.
StoreArray< RecoTrack > m_CDCRecoTracks
Output store array of RecoTrack.
float m_adcClip
Maximum ADC value used for normalization; values above are clipped.
std::string m_outputTCoordinatesName
Name of the output tensor carrying the per-hit condensation coordinates.
std::string m_outputTVertexName
Name of the output tensor carrying the predicted vertices.
std::unique_ptr< MVA::ONNX::Session > m_session
ONNX inference session.
std::string m_CDCRecoTracksName
Name of the output store array of CDC RecoTrack.
float m_slayerScale
Scale factor for normalizing superlayer indices.
TrackingUtilities::StoreWrappedObjPtr< std::vector< TrackingUtilities::CDCWireHit > > m_wireHitVector
Input vector of CDCWireHit.
std::string m_outputTChargeName
Name of the output tensor carrying the predicted charges.
void initialize() override
Initializes the module and registers required store arrays and relations.
float m_maxRadius
Maximum radius in latent space to associate hits with a condensation point.
void event() override
Processes a single event in the CATFinderModule.
float m_clayerScale
Scale factor for normalizing cell layer indices.
float m_spatialCoordinatesScale
Scale factor for spatial coordinates (from basf2 units to internal GNN units).
std::string m_inputTFeaturesName
Name of the input tensor carrying the per-hit features.
void beginRun() override
Prepares the CATFinderModule for a new run by initializing the ONNX session from the weight file.
float m_tdcScale
Scale factor for TDC normalization.
float m_tBeta
Threshold for the beta value to select candidate condensation points.
unsigned int m_minNumberHits
Minimum number of associated CDC hits required to form a valid track.
std::string m_outputTMomentumName
Name of the output tensor carrying the predicted momenta.
unsigned int m_latentSpaceNDim
Dimensionality of the latent space used by the GNN.
float m_tDistance
Minimum distance required between condensation points in latent space.
unsigned int m_nInputFeatures
Number of input features per node for the GNN model.
float m_layerScale
Scale factor for normalizing layer indices.
float m_tdcOffset
Offset applied to TDC counts.
StoreArray< RecoHitInformation > m_recoHitInformations
Output store array of RecoHitInformation.
std::string m_catFinderWeightfileName
Name of the CATFinder weightfile as stored in the conditions database.
StoreArray< CDCHit > m_CDCHits
Input store array of CDCHit.
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition CDCHit.h:40
Module()
Constructor.
Definition Module.cc:30
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
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
This class is for convenience access and registration of objects, that are stored inside the StoreWra...
Abstract base class for different kinds of events.