ATLAS Offline Software
Loading...
Searching...
No Matches
GbtsSeedingTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSTRK_GBTSSEEDINGTOOL_SEEDINGTOOL_H
6#define ACTSTRK_GBTSSEEDINGTOOL_SEEDINGTOOL_H 1
7
8// ATHENA
13#include "ActsInterop/Logger.h"
15
16// ACTS CORE
17#include "Acts/Seeding/GbtsGraphBuilder.hpp"
18#include "Acts/Seeding/GbtsLayerConnection.hpp"
19#include "Acts/Seeding/GraphBasedTrackSeeder.hpp"
20#include "Acts/Definitions/Units.hpp"
21#include "Acts/EventData/SeedContainer.hpp"
22#include "Acts/EventData/SpacePointContainer.hpp"
23
24//for det elements, not sure which need:
27#include "GaudiKernel/ToolHandle.h"
29
33
35
37
40
41#include <memory>
42#include <vector>
43
44namespace ActsTrk {
45
46 class GbtsSeedingTool final: public extends<AthAlgTool, ActsTrk::ISeedingTool> {
47
48 public:
49
50 GbtsSeedingTool(const std::string& type, const std::string& name,
51 const IInterface* parent);
52
53 virtual ~GbtsSeedingTool() = default;
54
55 virtual StatusCode initialize() override;
56
57 // Interface
58 StatusCode createSeeds(
59 const EventContext& ctx,
60 const std::vector<const xAOD::SpacePointContainer*>& spacePointCollections,
61 const Eigen::Vector3f& beamSpotPos, float bFieldInZ,
62 ActsTrk::SeedContainer& seedContainer) const override;
63
64 private:
65
68 void printGbtsConfig() const;
69
71 StatusCode prepareConfiguration();
72
75 StatusCode readTauLookupTable(
76 Acts::Experimental::GbtsTauLookupTable& tauLookupTable) const;
77
79 const Acts::Logger &logger() const { return *m_logger; }
80
82 std::unique_ptr<const Acts::Logger> m_logger;
83
85 Acts::Experimental::GraphBasedTrackSeeder::Config m_finderCfg;
86
88 Acts::Experimental::GbtsGraphBuilder::Config m_graphCfg;
89
91 Acts::Experimental::GbtsTrackingFilter::Config m_filterCfg;
92
94 std::optional<Acts::Experimental::GraphBasedTrackSeeder> m_finder;
95
97 std::optional<Acts::Experimental::GbtsGraphBuilder> m_graphBuilder;
98
100 std::optional<Acts::Experimental::GbtsTrackingFilter> m_filter;
101
103 std::optional<Acts::Experimental::GbtsRoiDescriptor> m_internalRoi;
104
107 const std::vector<short>* m_stripHashToLayer = nullptr;
108 const std::vector<short>* m_pixelHashToLayer = nullptr;
109
111 ToolHandle<IGbtsLayerTool> m_layerTool {this, "layerTool", "ActsTrk::GbtsLayerTool/ActsGbtsLayerTool"};
112
113 // Config settings
114 Gaudi::Property<std::string> m_connectorInputFile {this, "connectorInputFile","binTables_ITK_RUN4.txt", "input file for making connector object"};
115 Gaudi::Property<bool> m_pixelConnections {this, "usePixelConnections", true, "keep the pixel to pixel connections of the table"};
116 Gaudi::Property<bool> m_stripConnections {this, "useStripConnections", false, "keep the strip to strip connections of the table"};
117 Gaudi::Property<std::string> m_lutFile {this, "lutInputFile", "gbts_ml_pixel_barrel_loose.lut", "file to LUT"};
118
121 Gaudi::Property<bool> m_usePixelLayers {this, "usePixelLayers", true, "seed on the pixel layers"};
122 Gaudi::Property<bool> m_useStripLayers {this, "useStripLayers", false, "seed on the strip layers"};
123
124 // GraphBasedTrackSeeder: feature option
125 Gaudi::Property<bool> m_LRTmode {this, "LRTmode", false, "whether strip or pixel hits are used"};
126 Gaudi::Property<bool> m_useML {this, "useML", true, "use the cluster width of the spacepoint"};
127 Gaudi::Property<bool> m_matchBeforeCreate {this, "matchBeforeCreate", true, "need to check what this does"};
128 Gaudi::Property<bool> m_beamSpotCorrection {this, "beamSpotCorrection", true, "apply primary vertex corrections to spacepoints"};
129 Gaudi::Property<bool> m_validateTriplets{this, "ValidateTriplets", true, "extra validation on pT and d0 performed to connected barrel edges"};
130 Gaudi::Property<bool> m_useAdaptiveCuts{this, "UseAdaptiveCuts", true, "allows for larger accpetance of candidate edges that skip layers"};
131 Gaudi::Property<bool> m_addTriplets{this, "addTriplets", false, "add seeds with three spacepoints in a defined eta region"};
132 Gaudi::Property<bool> m_useEtaBinning {this, "useEtaBinning",true, "bool to use eta binning from geometry structure"};
133 Gaudi::Property<bool> m_doubletFilterRZ {this, "doubletFilterRZ",true, "bool applies new Z cuts on doublets"};
134 // GraphBasedTrackSeeder: Geometry options
135 Gaudi::Property<float> m_etaBinWidthOverride {this, "etaBinOverride", 0.0f, "apply custom binning for connections"};
136 Gaudi::Property<float> m_nMaxPhiSlice {this, "nMaxPhiSlice",53, "used to calculate phi slices"};
137
138 // BuildTheGraph() general options
139 Gaudi::Property<float> m_tauRatioCut {this, "tauRatioCut",0.007, "tau cut for doublets and triplets"};
140 Gaudi::Property<float> m_tauRatioPrecut {this, "precutTauRatioMax",0.009f, "used to reject edges early if matchBeforCreate is on"};
141 Gaudi::Property<float> m_tauRatioCorr{this, "tauRatioCorrection", 0.006, "correction added to tau accpetance if candidate edge skips a layer"};
142 Gaudi::Property<float> m_minPt {this, "minPt", 1000.0, "Lower cutoff for seeds"};
143 Gaudi::Property<float> m_maxEtaAddTriplets{this, "maxEtaAddTriplets", 1.5, "eta region in which three sapcepoint seeds are allowed"};
144 Gaudi::Property<float> m_minDeltaRadius {this, "minDeltaRadius",2.0, " min dr for doublet"};
145 Gaudi::Property<float> m_maxEdgesPerSP {this, "MaxEdgesPerSP", 30.0f, " max number of Gbts edges/doublets per space point"};
146 Gaudi::Property<float> m_cutDPhiMax {this, "cutDPhiMax", 0.012f, "not sure"};
147 Gaudi::Property<float> m_cutDCurvMax {this, "cutDCurvMax", 0.001f, "not sure"};
148 Gaudi::Property<float> m_maxOuterRadius {this, "maxOuterRadius", 550.0f, "not sure"};
149
150 // these are only used for LRT mode, pixel seeding uses values from the roi
151 // set to small value so that issues can be debugged if not set properly
152 Gaudi::Property<float> m_minZ0 {this, "minZ0", -99999, "not sure"};
153 Gaudi::Property<float> m_maxZ0 {this, "maxZ0", -99999, "not sure"};
154
155 // triplet validation options
156 Gaudi::Property<float> m_d0Max{this, "d0Max", 3.0, "maximum d0 value allowed when using validateTiplets"};
157
158 // GbtsTrackingFilter
159 Gaudi::Property<float> m_sigmaMS {this, "sigmaMS", 0.016, "process noise from multiple scattering"};
160 Gaudi::Property<float> m_radLen {this, "radLen", 0.025, "defines how much material scattering the kalman filter should take into account"};
161 Gaudi::Property<float> m_sigmaX {this, "sigmaX", 0.08, "measurement resolution for residual on y direction"};
162 Gaudi::Property<float> m_sigmaY {this, "sigmaY", 0.25, "measurement resolution on r-z plane"};
163 Gaudi::Property<float> m_weightX {this, "weightX", 0.5, "penalty weight for track"};
164 Gaudi::Property<float> m_weightY {this, "weightY", 0.5, "penalty weight for track"};
165 Gaudi::Property<float> m_maxDChi2X {this, "maxDChi2X", 5.0, "gate threshold for chi2 test"};
166 Gaudi::Property<float> m_maxDChi2Y {this, "maxDChi2Y", 6.0, "gate threshold for chi2 test"};
167 Gaudi::Property<float> m_addHit {this, "addHit", 14.0, "reward added to tracks for each accepted hit before chi2"};
168 Gaudi::Property<float> m_maxCurvature {this, "maxCurvature", 1e-3f, "maximum curvature allowed for candiadte tracklet"};
169 Gaudi::Property<float> m_filterMaxZ0 {this, "filterMaxZ0", 170.0, "maximum z0 allowed for candidate tracklet"};
170 Gaudi::Property<float> m_edgeMaskMinEta {this, "edgeMaskMinEta", 1.5, "minimum eta allowed for masking edges in graph so they are not used again"};
171 Gaudi::Property<float> m_hitShareThreshold {this, "hitShareThreshold", 0.49, "threshold of hits that are shared between seeds before one seed is labelled a clone"};
172
173 // GbtsNodeStorage
174 Gaudi::Property<float> m_maxEndcapClusterwidth {this, "maxEndcapClusterwidth", 0.35, "discards any spacepoints which dr/dz cant be accurately modelled"};
175 };
176
177} // namespace
178
179#endif
This is an Identifier helper class for the Pixel subdetector.
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.
Gaudi::Property< bool > m_doubletFilterRZ
Gaudi::Property< float > m_maxZ0
Gaudi::Property< float > m_maxEtaAddTriplets
Gaudi::Property< float > m_filterMaxZ0
Gaudi::Property< float > m_minPt
Gaudi::Property< bool > m_useAdaptiveCuts
Gaudi::Property< bool > m_usePixelLayers
Which technologies this instance seeds on.
Gaudi::Property< float > m_maxDChi2X
Acts::Experimental::GbtsGraphBuilder::Config m_graphCfg
steering for doublet graph building
Gaudi::Property< float > m_weightX
std::optional< Acts::Experimental::GbtsGraphBuilder > m_graphBuilder
the doublet graph builder
Gaudi::Property< float > m_sigmaMS
virtual StatusCode initialize() override
Gaudi::Property< float > m_cutDPhiMax
Gaudi::Property< bool > m_validateTriplets
Gaudi::Property< float > m_sigmaY
Gaudi::Property< float > m_maxEdgesPerSP
Gaudi::Property< bool > m_LRTmode
StatusCode readTauLookupTable(Acts::Experimental::GbtsTauLookupTable &tauLookupTable) const
Reads the tau lookup table the cluster width cuts need: per line a cluster width, the bulk tau bounds...
std::optional< Acts::Experimental::GbtsRoiDescriptor > m_internalRoi
region of interest for pixel seeding
Gaudi::Property< float > m_edgeMaskMinEta
Gaudi::Property< float > m_addHit
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Gaudi::Property< bool > m_stripConnections
StatusCode createSeeds(const EventContext &ctx, const std::vector< const xAOD::SpacePointContainer * > &spacePointCollections, const Eigen::Vector3f &beamSpotPos, float bFieldInZ, ActsTrk::SeedContainer &seedContainer) const override
Gaudi::Property< float > m_nMaxPhiSlice
Gaudi::Property< float > m_maxCurvature
Gaudi::Property< bool > m_useStripLayers
Gaudi::Property< bool > m_pixelConnections
Gaudi::Property< float > m_maxOuterRadius
Gaudi::Property< float > m_etaBinWidthOverride
Gaudi::Property< float > m_minZ0
const Acts::Logger & logger() const
Private access to the logger.
Acts::Experimental::GbtsTrackingFilter::Config m_filterCfg
steering for track filter
void printGbtsConfig() const
prints all current config settings used either with default settings or properties changed by the gau...
Gaudi::Property< float > m_maxDChi2Y
Gaudi::Property< std::string > m_connectorInputFile
Acts::Experimental::GraphBasedTrackSeeder::Config m_finderCfg
steering for seeding algorithm
Gaudi::Property< float > m_cutDCurvMax
Gaudi::Property< bool > m_useML
Gaudi::Property< float > m_minDeltaRadius
std::optional< Acts::Experimental::GbtsTrackingFilter > m_filter
the seed filter
Gaudi::Property< float > m_tauRatioPrecut
Gaudi::Property< bool > m_useEtaBinning
Gaudi::Property< bool > m_matchBeforeCreate
virtual ~GbtsSeedingTool()=default
std::optional< Acts::Experimental::GraphBasedTrackSeeder > m_finder
the actual seed fining algorithm
StatusCode prepareConfiguration()
sets configs based on gaudi properties defined below
ToolHandle< IGbtsLayerTool > m_layerTool
Builds the GBTS layers out of the ITk readout geometry.
Gaudi::Property< float > m_maxEndcapClusterwidth
Gaudi::Property< float > m_tauRatioCorr
Gaudi::Property< float > m_hitShareThreshold
Gaudi::Property< float > m_sigmaX
Gaudi::Property< bool > m_beamSpotCorrection
const std::vector< short > * m_stripHashToLayer
Wafer hash to dense GBTS layer index, one map per technology.
Gaudi::Property< float > m_weightY
Gaudi::Property< float > m_tauRatioCut
Gaudi::Property< float > m_d0Max
Gaudi::Property< bool > m_addTriplets
Gaudi::Property< std::string > m_lutFile
const std::vector< short > * m_pixelHashToLayer
GbtsSeedingTool(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< float > m_radLen
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...