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
90 std::optional<Acts::Experimental::GbtsRoiDescriptor> m_internalRoi;
91
94 const std::vector<short>* m_sct_h2l = nullptr;
95 const std::vector<short>* m_pix_h2l = nullptr;
96 std::vector<bool> m_are_pixels;
97
99 ToolHandle<ITrigL2LayerNumberTool> m_layerNumberTool {this, "layerNumberTool", "TrigL2LayerNumberToolITk"};
100
101 // Config settings
102 Gaudi::Property<std::string> m_connectorInputFile {this, "connectorInputFile","binTables_ITK_RUN4.txt", "input file for making connector object"};
103 Gaudi::Property<std::string> m_lutFile {this, "lutInputFile", "gbts_ml_pixel_barrel_loose.lut", "file to LUT"};
104
105 // GraphBasedTrackSeeder: feature option
106 Gaudi::Property<bool> m_LRTmode {this, "LRTmode", false, "whether strip or pixel hits are used"};
107 Gaudi::Property<bool> m_useML {this, "useML", true, "use the cluster width of the spacepoint"};
108 Gaudi::Property<bool> m_matchBeforeCreate {this, "matchBeforeCreate", true, "need to check what this does"};
109 Gaudi::Property<bool> m_useOldTunings {this, "useOldTunings", false, "use the tunings for 900MeV cut"};
110 Gaudi::Property<bool> m_beamSpotCorrection {this, "beamSpotCorrection", true, "apply primary vertex corrections to spacepoints"};
111 Gaudi::Property<bool> m_validateTriplets{this, "ValidateTriplets", true, "extra validation on pT and d0 performed to connected barrel edges"};
112 Gaudi::Property<bool> m_useAdaptiveCuts{this, "UseAdaptiveCuts", true, "allows for larger accpetance of candidate edges that skip layers"};
113 Gaudi::Property<bool> m_addTriplets{this, "addTriplets", false, "add seeds with three spacepoints in a defined eta region"};
114 Gaudi::Property<bool> m_useEtaBinning {this, "useEtaBinning",true, "bool to use eta binning from geometry structure"};
115 Gaudi::Property<bool> m_doubletFilterRZ {this, "doubletFilterRZ",true, "bool applies new Z cuts on doublets"};
116 // GraphBasedTrackSeeder: Geometry options
117 Gaudi::Property<float> m_etaBinWidthOverride {this, "etaBinOverride", 0.0f, "apply custom binning for connections"};
118 Gaudi::Property<float> m_nMaxPhiSlice {this, "nMaxPhiSlice",53, "used to calculate phi slices"};
119
120 // BuildTheGraph() general options
121 Gaudi::Property<float> m_tauRatioCut {this, "tauRatioCut",0.007, "tau cut for doublets and triplets"};
122 Gaudi::Property<float> m_tauRatioPrecut {this, "precutTauRatioMax",0.009f, "used to reject edges early if matchBeforCreate is on"};
123 Gaudi::Property<float> m_tauRatioCorr{this, "tauRatioCorrection", 0.006, "correction added to tau accpetance if candidate edge skips a layer"};
124 Gaudi::Property<float> m_minPt {this, "minPt", 1000.0, "Lower cutoff for seeds"};
125 Gaudi::Property<float> m_maxEtaAddTriplets{this, "maxEtaAddTriplets", 1.5, "eta region in which three sapcepoint seeds are allowed"};
126 Gaudi::Property<float> m_minDeltaRadius {this, "minDeltaRadius",2.0, " min dr for doublet"};
127 Gaudi::Property<int> m_nMaxEdges {this, "MaxEdges",3000000, " max number of Gbts edges/doublets"};
128 Gaudi::Property<float> m_cutDPhiMax {this, "cutDPhiMax", 0.012f, "not sure"};
129 Gaudi::Property<float> m_cutDCurvMax {this, "cutDCurvMax", 0.001f, "not sure"};
130 Gaudi::Property<float> m_minDeltaPhi {this, "minDeltaPhi", 0.001f, "not sure"};
131 Gaudi::Property<float> m_maxOuterRadius {this, "maxOuterRadius", 550.0f, "not sure"};
132
133 // these are only used for LRT mode, pixel seeding uses values from the roi
134 // set to small value so that issues can be debugged if not set properly
135 Gaudi::Property<float> m_minZ0 {this, "minZ0", -99999, "not sure"};
136 Gaudi::Property<float> m_maxZ0 {this, "maxZ0", -99999, "not sure"};
137
138 // triplet validation options
139 Gaudi::Property<float> m_d0Max{this, "d0Max", 3.0, "maximum d0 value allowed when using validateTiplets"};
140
141 // GbtsTrackingFilter
142 Gaudi::Property<float> m_sigmaMS {this, "sigmaMS", 0.016, "process noise from multiple scattering"};
143 Gaudi::Property<float> m_radLen {this, "radLen", 0.025, "defines how much material scattering the kalman filter should take into account"};
144 Gaudi::Property<float> m_sigmaX {this, "sigmaX", 0.08, "measurement resolution for residual on y direction"};
145 Gaudi::Property<float> m_sigmaY {this, "sigmaY", 0.25, "measurement resolution on r-z plane"};
146 Gaudi::Property<float> m_weightX {this, "weightX", 0.5, "penalty weight for track"};
147 Gaudi::Property<float> m_weightY {this, "weightY", 0.5, "penalty weight for track"};
148 Gaudi::Property<float> m_maxDChi2X {this, "maxDChi2X", 5.0, "gate threshold for chi2 test"};
149 Gaudi::Property<float> m_maxDChi2Y {this, "maxDChi2Y", 6.0, "gate threshold for chi2 test"};
150 Gaudi::Property<float> m_addHit {this, "addHit", 14.0, "reward added to tracks for each accepted hit before chi2"};
151 Gaudi::Property<float> m_maxCurvature {this, "maxCurvature", 1e-3f, "maximum curvature allowed for candiadte tracklet"};
152 Gaudi::Property<float> m_filterMaxZ0 {this, "filterMaxZ0", 170.0, "maximum z0 allowed for candidate tracklet"};
153 Gaudi::Property<float> m_edgeMaskMinEta {this, "edgeMaskMinEta", 1.5, "minimum eta allowed for masking edges in graph so they are not used again"};
154 Gaudi::Property<float> m_hitShareThreshold {this, "hitShareThreshold", 0.49, "threshold of hits that are shared between seeds before one seed is labelled a clone"};
155
156 // GbtsDataStorage
157 Gaudi::Property<float> m_maxEndcapClusterwidth {this, "maxEndcapClusterwidth", 0.35, "discards any spacepoints which dr/dz cant be accurately modelled"};
158 };
159
160} // namespace
161
162#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
std::vector< bool > m_are_pixels
Gaudi::Property< float > m_sigmaMS
virtual StatusCode initialize() override
Gaudi::Property< float > m_cutDPhiMax
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_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
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_maxCurvature
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
const std::vector< short > * m_pix_h2l
Gaudi::Property< float > m_cutDCurvMax
Gaudi::Property< float > m_minDeltaPhi
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
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
Gaudi::Property< float > m_weightY
ToolHandle< ITrigL2LayerNumberTool > m_layerNumberTool
used to create the detector layers and which modules correspond to pixels and strips
Gaudi::Property< float > m_tauRatioCut
Gaudi::Property< float > m_d0Max
Gaudi::Property< bool > m_addTriplets
Gaudi::Property< std::string > m_lutFile
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...