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