ATLAS Offline Software
Loading...
Searching...
No Matches
GbtsSeedingTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 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/Seeding2/GraphBasedTrackSeeder.hpp"
18#include "Acts/Definitions/Units.hpp"
19#include "Acts/EventData/SeedContainer2.hpp"
20#include "Acts/EventData/SpacePointContainer2.hpp"
21
22//for det elements, not sure which need:
25#include "GaudiKernel/ToolHandle.h"
27
31
33
35
38
39#include <numbers>
40#include <memory>
41
42namespace ActsTrk {
43
44 class GbtsSeedingTool final: public extends<AthAlgTool, ActsTrk::ISeedingTool> {
45
46 public:
47
48 GbtsSeedingTool(const std::string& type, const std::string& name,
49 const IInterface* parent);
50
51 virtual ~GbtsSeedingTool() = default;
52
53 virtual StatusCode initialize() override;
54
55 // Interface
56 StatusCode createSeeds(
57 const EventContext& ctx,
58 const std::vector<const xAOD::SpacePointContainer*>& spacePointCollections,
59 const Eigen::Vector3f& beamSpotPos, float bFieldInZ,
60 ActsTrk::SeedContainer& seedContainer) const override;
61
62 private:
63
66 void printGbtsConfig() const;
67
69 StatusCode prepareConfiguration();
70
72 const Acts::Logger &logger() const { return *m_logger; }
73
75 std::unique_ptr<const Acts::Logger> m_logger;
76
78 Acts::Experimental::GraphBasedTrackSeeder::Config m_finderCfg;
79
81 Acts::Experimental::GbtsTrackingFilter::Config m_filterCfg;
82
84 std::optional<Acts::Experimental::GraphBasedTrackSeeder> m_finder;
85
87 std::optional<Acts::Experimental::GbtsTrackingFilter> m_filter;
88
91 const std::vector<short>* m_sct_h2l = nullptr;
92 const std::vector<short>* m_pix_h2l = nullptr;
93 std::vector<bool> m_are_pixels;
94
96 ToolHandle<ITrigL2LayerNumberTool> m_layerNumberTool {this, "layerNumberTool", "TrigL2LayerNumberToolITk"};
97
98 // TODO: ADD NEW VERIABLES, DELETE OLD ONES AND CHANGE CURRENT ONES TO NEW VALUES
99 // Config settings
100 Gaudi::Property<std::string> m_connectorInputFile {this, "connectorInputFile","binTables_ITK_RUN4.txt", "input file for making connector object"};
101 Gaudi::Property<std::string> m_lutFile {this, "lutInputFile", "gbts_ml_pixel_barrel_loose.lut", "file to LUT"};
102
103 // SeedFinderGbts option
104 Gaudi::Property<bool> m_LRTmode {this, "LRTmode", false, "whether strip or pixel hits are used"};
105 Gaudi::Property<bool> m_useML {this, "useML", true, "use the cluster width of the spacepoint"};
106 Gaudi::Property<bool> m_matchBeforeCreate {this, "matchBeforeCreate", true, "need to check what this does"};
107 Gaudi::Property<bool> m_useOldTunings {this, "useOldTunings", false, "use the tunings for 900MeV cut"};
108 Gaudi::Property<float> m_tau_ratio_cut {this, "cut_tau_ratio_max",0.007, "tau cut for doublets and triplets"};
109 Gaudi::Property<float> m_tau_ratio_precut {this, "precut_tau_ratio_max",0.009f, "not sure"};
110 Gaudi::Property<float> m_etaBinWidthOverride {this, "etaBinOverride", 0.0f, "apply custom binning for connections"};
111 Gaudi::Property<float> m_nMaxPhiSlice {this, "nMaxPhiSlice",53, "used to calculate phi slices"};
112 Gaudi::Property<bool> m_beamSpotCorrection {this, "beamSpotCorrection", true, "apply primary vertex corrections to spacepoints"};
113 Gaudi::Property<float> m_minPt {this, "minPt", 1000.0, "Lower cutoff for seeds"};
114 Gaudi::Property<float> m_phiSliceWidth {this, "phiSliceWidth",0, "initialised in loadSpacePoints function"};
115 Gaudi::Property<float> m_tau_ratio_corr{this, "tau_ratio_correction", 0.006, "not sure"};
116 Gaudi::Property<bool> m_validateTriplets{this, "ValidateTriplets", true, "not sure"};
117 Gaudi::Property<bool> m_useAdaptiveCuts{this, "UseAdaptiveCuts", true, "not sure"};
118
119 // BuildTheGraph() options
120 Gaudi::Property<bool> m_useEtaBinning {this, "useEtaBinning",true, "bool to use eta binning from geometry structure"};
121 Gaudi::Property<bool> m_doubletFilterRZ {this, "doubletFilterRZ",true, "bool applies new Z cuts on doublets"};
122 Gaudi::Property<float> m_minDeltaRadius {this, "minDeltaRadius",2.0, " min dr for doublet"};
123 Gaudi::Property<int> m_nMaxEdges {this, "MaxEdges",3000000, " max number of Gbts edges/doublets"};
124
125 // triplet validation options
126 Gaudi::Property<float> m_d0_max{this, "d0_max", 3.0, "not sure"};
127
128 // GbtsTrackingFilter
129 Gaudi::Property<float> m_sigmaMS {this, "sigmaMS", 0.016, "process noise from multiple scattering"};
130 Gaudi::Property<float> m_radLen {this, "radLen", 0.025, "not sure"};
131 Gaudi::Property<float> m_sigma_x {this, "sigma_x", 0.08, "measurement resolution for residual on y direction"}; //was 0.22
132 Gaudi::Property<float> m_sigma_y {this, "sigma_y", 0.25, "measurement resolution on r-z plane"};// was 1.7
133 Gaudi::Property<float> m_weight_x {this, "weight_x", 0.5, "penalty weight for track"};
134 Gaudi::Property<float> m_weight_y {this, "weight_y", 0.5, "penalty weight for track"};
135 Gaudi::Property<float> m_maxDChi2_x {this, "maxDChi2_x", 5.0, "gate threshold for chi2 test"}; //was 35.0
136 Gaudi::Property<float> m_maxDChi2_y {this, "maxDChi2_y", 6.0, "gate threshold for chi2 test"};//was 31.0
137 Gaudi::Property<float> m_add_hit {this, "add_hit", 14.0, "reward added to tracks for each accepted hit before chi2"};
138 Gaudi::Property<float> m_max_curvature {this, "max_curvature", 1e-3f, "not sure"};
139 Gaudi::Property<float> m_max_z0 {this, "max_z0", 170.0, "not sure"};
140 Gaudi::Property<float> m_edge_mask_min_eta {this, "edge_mask_min_eta", 1.5, "not sure"};
141 Gaudi::Property<float> m_hit_share_threshold {this, "hit_share_threshold", 0.49, "not sure"};
142
143 // GbtsDataStorage
144 Gaudi::Property<float> m_max_endcap_clusterwidth {this, "max_endcap_clusterwidth", 0.35, "discards any spacepoints which dr/dz cant be accurately modelled"};
145 };
146
147} // namespace
148
149#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< float > m_tau_ratio_cut
Gaudi::Property< bool > m_doubletFilterRZ
Gaudi::Property< float > m_sigma_x
Gaudi::Property< int > m_nMaxEdges
Gaudi::Property< float > m_add_hit
Gaudi::Property< float > m_maxDChi2_x
Gaudi::Property< float > m_max_z0
Gaudi::Property< float > m_minPt
Gaudi::Property< bool > m_useAdaptiveCuts
std::vector< bool > m_are_pixels
Gaudi::Property< float > m_sigmaMS
virtual StatusCode initialize() override
const std::vector< short > * m_sct_h2l
lists of layers that pixel and strip modules are apart of (index defines hash ID of module),...
Gaudi::Property< bool > m_validateTriplets
Gaudi::Property< float > m_hit_share_threshold
Gaudi::Property< bool > m_LRTmode
Gaudi::Property< float > m_max_curvature
std::unique_ptr< const Acts::Logger > m_logger
logging instance
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_tau_ratio_corr
Gaudi::Property< float > m_etaBinWidthOverride
Gaudi::Property< bool > m_useOldTunings
Gaudi::Property< float > m_sigma_y
const Acts::Logger & logger() const
Private access to the logger.
Acts::Experimental::GbtsTrackingFilter::Config m_filterCfg
steering for track filter
Gaudi::Property< float > m_max_endcap_clusterwidth
void printGbtsConfig() const
prints all current config settings used either with default settings or properties changed by the gau...
Gaudi::Property< std::string > m_connectorInputFile
Acts::Experimental::GraphBasedTrackSeeder::Config m_finderCfg
steering for seeding algorithm
const std::vector< short > * m_pix_h2l
Gaudi::Property< float > m_d0_max
Gaudi::Property< float > m_weight_x
Gaudi::Property< bool > m_useML
Gaudi::Property< float > m_minDeltaRadius
Gaudi::Property< float > m_weight_y
std::optional< Acts::Experimental::GbtsTrackingFilter > m_filter
the seed filter
Gaudi::Property< float > m_tau_ratio_precut
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
Gaudi::Property< float > m_phiSliceWidth
Gaudi::Property< bool > m_beamSpotCorrection
ToolHandle< ITrigL2LayerNumberTool > m_layerNumberTool
used to create the detector layers and which modules correspond to pixels and strips
Gaudi::Property< float > m_maxDChi2_y
Gaudi::Property< std::string > m_lutFile
Gaudi::Property< float > m_edge_mask_min_eta
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...