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/GbtsLayerConnection.hpp"
18#include "Acts/Seeding/GraphBasedTrackSeeder.hpp"
19#include "Acts/Definitions/Units.hpp"
20#include "Acts/EventData/SeedContainer.hpp"
21#include "Acts/EventData/SpacePointContainer.hpp"
22
23//for det elements, not sure which need:
26#include "GaudiKernel/ToolHandle.h"
28
32
34
36
39
40#include <memory>
41#include <vector>
42
43namespace ActsTrk {
44
45 class GbtsSeedingTool final: public extends<AthAlgTool, ActsTrk::ISeedingTool> {
46
47 public:
48
49 GbtsSeedingTool(const std::string& type, const std::string& name,
50 const IInterface* parent);
51
52 virtual ~GbtsSeedingTool() = default;
53
54 virtual StatusCode initialize() override;
55
56 // Interface
57 StatusCode createSeeds(
58 const EventContext& ctx,
59 const std::vector<const xAOD::SpacePointContainer*>& spacePointCollections,
60 const Eigen::Vector3f& beamSpotPos, float bFieldInZ,
61 ActsTrk::SeedContainer& seedContainer) const override;
62
63 private:
64
67 void printGbtsConfig() const;
68
70 StatusCode prepareConfiguration();
71
77 StatusCode readConnections(
78 const std::vector<Acts::Experimental::GbtsLayerDescription>& layers,
79 const std::vector<GbtsTechnology>& technologies,
80 std::vector<Acts::Experimental::GbtsLayerConnection>& connections,
81 float& etaBinWidth) const;
82
85 StatusCode readTauLookupTable(
86 Acts::Experimental::detail::GbtsTauLookupTable& tauLookupTable) const;
87
89 const Acts::Logger &logger() const { return *m_logger; }
90
92 std::unique_ptr<const Acts::Logger> m_logger;
93
95 Acts::Experimental::GraphBasedTrackSeeder::Config m_finderCfg;
96
98 Acts::Experimental::GbtsTrackingFilter::Config m_filterCfg;
99
101 std::optional<Acts::Experimental::GraphBasedTrackSeeder> m_finder;
102
104 std::optional<Acts::Experimental::GbtsTrackingFilter> m_filter;
105
107 std::optional<Acts::Experimental::GbtsRoiDescriptor> m_internalRoi;
108
111 const std::vector<short>* m_stripHashToLayer = nullptr;
112 const std::vector<short>* m_pixelHashToLayer = nullptr;
113
115 ToolHandle<IGbtsLayerTool> m_layerTool {this, "layerTool", "ActsTrk::GbtsLayerTool/ActsGbtsLayerTool"};
116
117 // Config settings
118 Gaudi::Property<std::string> m_connectorInputFile {this, "connectorInputFile","binTables_ITK_RUN4.txt", "input file for making connector object"};
119 Gaudi::Property<bool> m_pixelConnections {this, "usePixelConnections", true, "keep the pixel to pixel connections of the table"};
120 Gaudi::Property<bool> m_stripConnections {this, "useStripConnections", false, "keep the strip to strip connections of the table"};
121 Gaudi::Property<std::string> m_lutFile {this, "lutInputFile", "gbts_ml_pixel_barrel_loose.lut", "file to LUT"};
122
123 // GraphBasedTrackSeeder: feature option
124 Gaudi::Property<bool> m_LRTmode {this, "LRTmode", false, "whether strip or pixel hits are used"};
125 Gaudi::Property<bool> m_useML {this, "useML", true, "use the cluster width of the spacepoint"};
126 Gaudi::Property<bool> m_matchBeforeCreate {this, "matchBeforeCreate", true, "need to check what this does"};
127 Gaudi::Property<bool> m_useOldTunings {this, "useOldTunings", false, "use the tunings for 900MeV cut"};
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<int> m_nMaxEdges {this, "MaxEdges",3000000, " max number of Gbts edges/doublets"};
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_minDeltaPhi {this, "minDeltaPhi", 0.001f, "not sure"};
149 Gaudi::Property<float> m_maxOuterRadius {this, "maxOuterRadius", 550.0f, "not sure"};
150
151 // these are only used for LRT mode, pixel seeding uses values from the roi
152 // set to small value so that issues can be debugged if not set properly
153 Gaudi::Property<float> m_minZ0 {this, "minZ0", -99999, "not sure"};
154 Gaudi::Property<float> m_maxZ0 {this, "maxZ0", -99999, "not sure"};
155
156 // triplet validation options
157 Gaudi::Property<float> m_d0Max{this, "d0Max", 3.0, "maximum d0 value allowed when using validateTiplets"};
158
159 // GbtsTrackingFilter
160 Gaudi::Property<float> m_sigmaMS {this, "sigmaMS", 0.016, "process noise from multiple scattering"};
161 Gaudi::Property<float> m_radLen {this, "radLen", 0.025, "defines how much material scattering the kalman filter should take into account"};
162 Gaudi::Property<float> m_sigmaX {this, "sigmaX", 0.08, "measurement resolution for residual on y direction"};
163 Gaudi::Property<float> m_sigmaY {this, "sigmaY", 0.25, "measurement resolution on r-z plane"};
164 Gaudi::Property<float> m_weightX {this, "weightX", 0.5, "penalty weight for track"};
165 Gaudi::Property<float> m_weightY {this, "weightY", 0.5, "penalty weight for track"};
166 Gaudi::Property<float> m_maxDChi2X {this, "maxDChi2X", 5.0, "gate threshold for chi2 test"};
167 Gaudi::Property<float> m_maxDChi2Y {this, "maxDChi2Y", 6.0, "gate threshold for chi2 test"};
168 Gaudi::Property<float> m_addHit {this, "addHit", 14.0, "reward added to tracks for each accepted hit before chi2"};
169 Gaudi::Property<float> m_maxCurvature {this, "maxCurvature", 1e-3f, "maximum curvature allowed for candiadte tracklet"};
170 Gaudi::Property<float> m_filterMaxZ0 {this, "filterMaxZ0", 170.0, "maximum z0 allowed for candidate tracklet"};
171 Gaudi::Property<float> m_edgeMaskMinEta {this, "edgeMaskMinEta", 1.5, "minimum eta allowed for masking edges in graph so they are not used again"};
172 Gaudi::Property<float> m_hitShareThreshold {this, "hitShareThreshold", 0.49, "threshold of hits that are shared between seeds before one seed is labelled a clone"};
173
174 // GbtsNodeStorage
175 Gaudi::Property<float> m_maxEndcapClusterwidth {this, "maxEndcapClusterwidth", 0.35, "discards any spacepoints which dr/dz cant be accurately modelled"};
176 };
177
178} // namespace
179
180#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< int > m_nMaxEdges
Gaudi::Property< float > m_maxEtaAddTriplets
Gaudi::Property< float > m_filterMaxZ0
Gaudi::Property< float > m_minPt
Gaudi::Property< bool > m_useAdaptiveCuts
Gaudi::Property< float > m_maxDChi2X
Gaudi::Property< float > m_weightX
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< bool > m_LRTmode
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
StatusCode readTauLookupTable(Acts::Experimental::detail::GbtsTauLookupTable &tauLookupTable) const
Reads the tau lookup table the cluster width cuts need: per line a cluster width, the bulk tau bounds...
Gaudi::Property< float > m_maxCurvature
Gaudi::Property< bool > m_pixelConnections
Gaudi::Property< float > m_maxOuterRadius
Gaudi::Property< float > m_etaBinWidthOverride
Gaudi::Property< bool > m_useOldTunings
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< float > m_minDeltaPhi
StatusCode readConnections(const std::vector< Acts::Experimental::GbtsLayerDescription > &layers, const std::vector< GbtsTechnology > &technologies, std::vector< Acts::Experimental::GbtsLayerConnection > &connections, float &etaBinWidth) const
Reads the connection table and keeps the connections this pass is for: both layers have to be layers ...
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...