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/Geometry/TrackingGeometry.hpp"
18#include "Acts/Seeding/SeedFilter.hpp"
19#include "Acts/Seeding/SeedFinderGbts.hpp"
20#include "Acts/Definitions/Units.hpp"
21#include "Acts/Seeding/SeedFinderGbtsConfig.hpp"
22#include "Acts/Seeding/SeedFinderConfig.hpp"
23#include "Acts/Seeding/SeedFilterConfig.hpp"
24#include "Acts/Seeding/SeedFilter.hpp"
25#include "Acts/EventData/SeedContainer2.hpp"
26#include "Acts/EventData/SpacePointContainer2.hpp"
27
28//for det elements, not sure which need:
31#include "GaudiKernel/ToolHandle.h"
33
37
39
41
44
45#include <numbers> // for std::numbers::pi
46
47
48namespace ActsTrk {
49
50 class GbtsSeedingTool final:
51 public extends<AthAlgTool, ActsTrk::ISeedingTool> {
52
53 public:
54
55 GbtsSeedingTool(const std::string& type, const std::string& name,
56 const IInterface* parent);
57 virtual ~GbtsSeedingTool() = default;
58
59 virtual StatusCode initialize() override;
60
61 // Interface
62 virtual StatusCode
63 createSeeds(const EventContext& ctx,
64 const Acts::SpacePointContainer<ActsTrk::SpacePointCollector, Acts::detail::RefHolder>& spContainer,
65 const Acts::Vector3& beamSpotPos,
66 const Acts::Vector3& bField,
67 ActsTrk::SeedContainer& seedContainer ) const override;
68
69
70
71
72 // own class functions
73
74 private:
75
76 //prints all current config settings used either with default settings or properties changed by the gaudi options
77 //tells what the defaults in the config are
78 void printSeedFinderGbtsConfig(const Acts::Experimental::SeedFinderGbtsConfig& cfg);
79
80 //sets configs based on gaudi properties defined below
81 StatusCode prepareConfiguration();
82
83 std::unique_ptr<Acts::Experimental::GbtsConnector> m_connector = nullptr; //holds the connection information on what detector layers are linked
84
85 Acts::Experimental::SeedFinderGbtsConfig m_finderCfg; //steering for seeding algorithm
86
87 std::unique_ptr<Acts::Experimental::GbtsGeometry> m_gbtsGeo = nullptr; //holds all geometry information (m_layergeomtry and connection table)
88
89 std::vector<Acts::Experimental::TrigInDetSiLayer> m_layerGeometry{}; //layer objects used by GBTS
90
91 // used to create the detector layers and which modules correspond to pixels and strips
92 ToolHandle<ITrigL2LayerNumberTool> m_layerNumberTool {this, "layerNumberTool", "TrigL2LayerNumberToolITk"};
93
94 //lists of layers that pixel and strip modules are apart of (index defines hash ID of module),
95 // used to sort Spacepoints based on the type of module its assigned to
96 const std::vector<short>* m_sct_h2l{nullptr};
97 const std::vector<short>* m_pix_h2l{nullptr};
98 std::vector<bool> m_are_pixels;
99
100 //Config settings
101 Gaudi::Property<std::string> m_ConnectorInputFile {this, "ConnectorInputFile","binTables_ITK_RUN4.txt", "input file for making connector object"};
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", false, "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_etaBinOverride {this, "etaBinOverride", 0.0f, "apply custom binning for connections"};
109 Gaudi::Property<float> m_nMaxPhiSlice {this, "nMaxPhiSlice",53, "used to calculate phi slices"};
110 Gaudi::Property<bool> m_BeamSpotCorrection {this, "beamSpotCorrection", true, "apply primary vertex corrections to spacepoints"};
111 Gaudi::Property<float> m_minPt {this, "minPt", 1000.0, "Lower cutoff for seeds"};
112 Gaudi::Property<float> m_phiSliceWidth {this, "phiSliceWidth",0, "initialised in loadSpacePoints function"};
113
114 //BuildTheGraph() options
115 Gaudi::Property<bool> m_useEtaBinning {this, "useEtaBinning",true, "bool to use eta binning from geometry structure"};
116 Gaudi::Property<bool> m_doubletFilterRZ {this, "doubletFilterRZ",true, "bool applies new Z cuts on doublets"};
117 Gaudi::Property<float> m_minDeltaRadius {this, "minDeltaRadius",2.0, " min dr for doublet"};
118 Gaudi::Property<int> m_nMaxEdges {this, "MaxEdges",3000000, " max number of Gbts edges/doublets"};
119 Gaudi::Property<double> m_ptCoeff {this, "ptCoeff", 0.29997 * 1.9972 / 2.0, "~0.3*B/2 - assumes nominal field of 2*T"};
120 //GbtsTrackingFilter
121 Gaudi::Property<float> m_sigma_t {this, "sigma_t", 0.0003, "process noise on transverse slope"};
122 Gaudi::Property<float> m_sigma_w {this, "sigma_w", 0.00009, "process noise on transverse curvature"};
123 Gaudi::Property<float> m_sigmaMS {this, "sigmaMS", 0.016, "process noise from multiple scattering"};
124 Gaudi::Property<float> m_sigma_x {this, "sigma_x", 0.25, "measurement resolution for residual on y direction"}; //was 0.22
125 Gaudi::Property<float> m_sigma_y {this, "sigma_y", 2.5, "measurement resolution on r-z plane"};// was 1.7
126 Gaudi::Property<float> m_weight_x {this, "weight_x", 0.5, "penalty weight for track"};
127 Gaudi::Property<float> m_weight_y {this, "weight_y", 0.5, "penalty weight for track"};
128 Gaudi::Property<float> m_maxDChi2_x {this, "maxDChi2_x", 60.0, "gate threshold for chi2 test"}; //was 35.0
129 Gaudi::Property<float> m_maxDChi2_y {this, "maxDChi2_y", 60.0, "gate threshold for chi2 test"};//was 31.0
130 Gaudi::Property<float> m_add_hit {this, "add_hit", 14.0, "reward added to tracks for each accepted hit before chi2"};
131
132
133
135 const Acts::Logger &logger() const { return *m_logger; }
137 std::unique_ptr<const Acts::Logger> m_logger {nullptr};
138
139 };
140
141} // namespace
142
143#endif
144
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_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< bool > m_LRTmode
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.
std::vector< Acts::Experimental::TrigInDetSiLayer > m_layerGeometry
const std::vector< short > * m_pix_h2l
Gaudi::Property< float > m_weight_x
Gaudi::Property< float > m_sigma_t
Gaudi::Property< bool > m_useML
Gaudi::Property< float > m_minDeltaRadius
Gaudi::Property< float > m_weight_y
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
Gaudi::Property< std::string > m_ConnectorInputFile
Gaudi::Property< float > m_sigma_w
ToolHandle< ITrigL2LayerNumberTool > m_layerNumberTool
Gaudi::Property< float > m_etaBinOverride
Gaudi::Property< float > m_maxDChi2_y
GbtsSeedingTool(const std::string &type, const std::string &name, const IInterface *parent)
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...