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#include <memory>
6#ifndef ACTSTRK_GBTSSEEDINGTOOL_SEEDINGTOOL_H
7#define ACTSTRK_GBTSSEEDINGTOOL_SEEDINGTOOL_H 1
8
9// ATHENA
14#include "ActsInterop/Logger.h"
16
17// ACTS CORE
18#include "Acts/Seeding2/GraphBasedTrackSeeder.hpp"
19#include "Acts/Seeding2/GbtsConfig.hpp"
20#include "Acts/Definitions/Units.hpp"
21#include "Acts/EventData/SeedContainer2.hpp"
22#include "Acts/EventData/SpacePointContainer2.hpp"
23
24//for det elements, not sure which need:
27#include "GaudiKernel/ToolHandle.h"
29
33
35
37
40
41#include <numbers> // for std::numbers::pi
42
43
44namespace ActsTrk {
45
46 class GbtsSeedingTool final:
47 public extends<AthAlgTool, ActsTrk::ISeedingTool> {
48
49 public:
50
51 GbtsSeedingTool(const std::string& type, const std::string& name,
52 const IInterface* parent);
53 virtual ~GbtsSeedingTool() = default;
54
55 virtual StatusCode initialize() override;
56
57 // Interface
58 StatusCode createSeeds2(
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
65
66
67
68 // own class functions
69
70 private:
71
72 //prints all current config settings used either with default settings or properties changed by the gaudi options
73 //tells what the defaults in the config are
74 void printGbtsConfig(const Acts::Experimental::GbtsConfig& cfg);
75
76 //sets configs based on gaudi properties defined below
77 StatusCode prepareConfiguration();
78
79 std::unique_ptr<Acts::Experimental::GbtsConnector> m_connector = nullptr; //holds the connection information on what detector layers are linked
80
81 Acts::Experimental::GbtsConfig m_cfg; //steering for seeding algorithm
82
83 std::unique_ptr<Acts::Experimental::GbtsGeometry> m_gbtsGeo = nullptr; //holds all geometry information (m_layergeomtry and connection table)
84
85 std::vector<Acts::Experimental::TrigInDetSiLayer> m_layerGeometry{}; //layer objects used by GBTS
86
87 std::unique_ptr<Acts::Experimental::GraphBasedTrackSeeder> m_finder = nullptr; //the actual seed fining algorithm
88
89
90 // used to create the detector layers and which modules correspond to pixels and strips
91 ToolHandle<ITrigL2LayerNumberTool> m_layerNumberTool {this, "layerNumberTool", "TrigL2LayerNumberToolITk"};
92
93 //lists of layers that pixel and strip modules are apart of (index defines hash ID of module),
94 // used to sort Spacepoints based on the type of module its assigned to
95 const std::vector<short>* m_sct_h2l{nullptr};
96 const std::vector<short>* m_pix_h2l{nullptr};
97 std::vector<bool> m_are_pixels;
98 //TO DO: 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 //SeedFinderGbts option
103 Gaudi::Property<bool> m_LRTmode {this, "LRTmode", false, "whether strip or pixel hits are used"};
104 Gaudi::Property<bool> m_useML {this, "useML", true, "use the cluster width of the spacepoint"};
105 Gaudi::Property<bool> m_matchBeforeCreate {this, "matchBeforeCreate", true, "need to check what this does"};
106 Gaudi::Property<bool> m_useOldTunings {this, "useOldTunings", false, "use the tunings for 900MeV cut"};
107 Gaudi::Property<float> m_tau_ratio_cut {this, "cut_tau_ratio_max",0.007, "tau cut for doublets and triplets"};
108 Gaudi::Property<float> m_tau_ratio_precut {this, "precut_tau_ratio_max",0.009f, "not sure"};
109 Gaudi::Property<float> m_etaBinOverride {this, "etaBinOverride", 0.0f, "apply custom binning for connections"};
110 Gaudi::Property<float> m_nMaxPhiSlice {this, "nMaxPhiSlice",53, "used to calculate phi slices"};
111 Gaudi::Property<bool> m_BeamSpotCorrection {this, "beamSpotCorrection", true, "apply primary vertex corrections to spacepoints"};
112 Gaudi::Property<float> m_minPt {this, "minPt", 1000.0, "Lower cutoff for seeds"};
113 Gaudi::Property<float> m_phiSliceWidth {this, "phiSliceWidth",0, "initialised in loadSpacePoints function"};
114
115 //BuildTheGraph() options
116 Gaudi::Property<bool> m_useEtaBinning {this, "useEtaBinning",true, "bool to use eta binning from geometry structure"};
117 Gaudi::Property<bool> m_doubletFilterRZ {this, "doubletFilterRZ",true, "bool applies new Z cuts on doublets"};
118 Gaudi::Property<float> m_minDeltaRadius {this, "minDeltaRadius",2.0, " min dr for doublet"};
119 Gaudi::Property<int> m_nMaxEdges {this, "MaxEdges",3000000, " max number of Gbts edges/doublets"};
120 Gaudi::Property<double> m_ptCoeff {this, "ptCoeff", 0.29997 * 1.9972 / 2.0, "~0.3*B/2 - assumes nominal field of 2*T"};
121 //GbtsTrackingFilter
122
123 Gaudi::Property<float> m_sigmaMS {this, "sigmaMS", 0.016, "process noise from multiple scattering"};
124 Gaudi::Property<float> m_radLen {this, "radLen", 0.025, "not sure"};
125 Gaudi::Property<float> m_sigma_x {this, "sigma_x", 0.08, "measurement resolution for residual on y direction"}; //was 0.22
126 Gaudi::Property<float> m_sigma_y {this, "sigma_y", 0.25, "measurement resolution on r-z plane"};// was 1.7
127 Gaudi::Property<float> m_weight_x {this, "weight_x", 0.5, "penalty weight for track"};
128 Gaudi::Property<float> m_weight_y {this, "weight_y", 0.5, "penalty weight for track"};
129 Gaudi::Property<float> m_maxDChi2_x {this, "maxDChi2_x", 5.0, "gate threshold for chi2 test"}; //was 35.0
130 Gaudi::Property<float> m_maxDChi2_y {this, "maxDChi2_y", 6.0, "gate threshold for chi2 test"};//was 31.0
131 Gaudi::Property<float> m_add_hit {this, "add_hit", 14.0, "reward added to tracks for each accepted hit before chi2"};
132 Gaudi::Property<float> m_max_curvature {this, "max_curvature", 1e-3f, "not sure"};
133 Gaudi::Property<float> m_max_z0 {this, "max_z0", 170.0, "not sure"};
134 Gaudi::Property<float> m_edge_mask_min_eta {this, "edge_mask_min_eta", 1.5, "not sure"};
135 Gaudi::Property<float> m_hit_share_threshold {this, "hit_share_threshold", 0.49, "not sure"};
136
137 //GbtsDataStorage
138 Gaudi::Property<float> m_max_endcap_clusterwidth {this, "max_endcap_clusterwidth", 0.35, "discards any spacepoints which dr/dz cant be accurately modelled"};
140 const Acts::Logger &logger() const { return *m_logger; }
142 std::unique_ptr<const Acts::Logger> m_logger {nullptr};
143
144 };
145
146} // namespace
147
148#endif
149
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
std::unique_ptr< Acts::Experimental::GbtsConnector > m_connector
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_BeamSpotCorrection
Gaudi::Property< double > m_ptCoeff
std::vector< bool > m_are_pixels
Gaudi::Property< float > m_sigmaMS
virtual StatusCode initialize() override
const std::vector< short > * m_sct_h2l
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
Gaudi::Property< float > m_nMaxPhiSlice
Gaudi::Property< bool > m_useOldTunings
Gaudi::Property< float > m_sigma_y
const Acts::Logger & logger() const
Private access to the logger.
Gaudi::Property< float > m_max_endcap_clusterwidth
Gaudi::Property< std::string > m_connectorInputFile
std::unique_ptr< Acts::Experimental::GraphBasedTrackSeeder > m_finder
std::vector< Acts::Experimental::TrigInDetSiLayer > m_layerGeometry
const std::vector< short > * m_pix_h2l
Gaudi::Property< float > m_weight_x
Gaudi::Property< bool > m_useML
Gaudi::Property< float > m_minDeltaRadius
Gaudi::Property< float > m_weight_y
void printGbtsConfig(const Acts::Experimental::GbtsConfig &cfg)
Gaudi::Property< float > m_tau_ratio_precut
Gaudi::Property< bool > m_useEtaBinning
Gaudi::Property< bool > m_matchBeforeCreate
virtual ~GbtsSeedingTool()=default
Gaudi::Property< float > m_phiSliceWidth
std::unique_ptr< Acts::Experimental::GbtsGeometry > m_gbtsGeo
ToolHandle< ITrigL2LayerNumberTool > m_layerNumberTool
Acts::Experimental::GbtsConfig m_cfg
Gaudi::Property< float > m_etaBinOverride
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)
StatusCode createSeeds2(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_radLen
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...