ATLAS Offline Software
Loading...
Searching...
No Matches
OrthogonalSeedingTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSTRK_ORTHOGONALSEEDINGTOOL_SEEDINGTOOL_H
6#define ACTSTRK_ORTHOGONALSEEDINGTOOL_SEEDINGTOOL_H 1
7
8// ATHENA
11#include "ActsInterop/Logger.h"
12
13// ACTS CORE
14#include "Acts/Utilities/KDTree.hpp"
15#include "Acts/Geometry/Extent.hpp"
16#include "Acts/EventData/Seed.hpp"
17#include "Acts/Seeding/SeedFilter.hpp"
18#include "Acts/Seeding/SeedFinderOrthogonal.hpp"
19#include "Acts/Definitions/Units.hpp"
20#include "Acts/Seeding/SeedFinderOrthogonalConfig.hpp"
21#include "Acts/Seeding/SeedFinderOrthogonal.hpp"
22#include "Acts/Seeding/SeedFinderConfig.hpp"
23#include "Acts/Seeding/SeedFilterConfig.hpp"
24#include "Acts/Seeding/SeedFilter.hpp"
25
26#include <cmath> //for M_PI
27
28namespace ActsTrk {
29
31 public extends<AthAlgTool, ActsTrk::ISeedingTool> {
32
33 public:
34 using value_type = typename Acts::SpacePointContainer<ActsTrk::SpacePointCollector, Acts::detail::RefHolder>::SpacePointProxyType;
35 using seed_type = Acts::Seed< value_type, 3ul >;
36
37 OrthogonalSeedingTool(const std::string& type, const std::string& name,
38 const IInterface* parent);
39 virtual ~OrthogonalSeedingTool() = default;
40
41 virtual StatusCode initialize() override;
42
43 // Interface
44 virtual StatusCode
45 createSeeds(const EventContext& ctx,
46 const Acts::SpacePointContainer<ActsTrk::SpacePointCollector, Acts::detail::RefHolder>& spContainer,
47 const Acts::Vector3& beamSpotPos,
48 const Acts::Vector3& bField,
49 ActsTrk::SeedContainer& seedContainer ) const override;
50
51 private:
52 StatusCode prepareConfiguration();
53
54 // *********************************************************************
55 // *********************************************************************
56
57 private:
58 Acts::SeedFinderOrthogonal<value_type> m_finder;
59 Acts::SeedFinderOrthogonalConfig<value_type> m_finderCfg;
60
61 private:
62 // Used by Seed Finder Orthogonal Config
63 Gaudi::Property<float> m_minPt {this, "minPt", 900. * Acts::UnitConstants::MeV,
64 "Lower cutoff for seeds"};
65 Gaudi::Property<float> m_cotThetaMax {this, "cotThetaMax", 27.2899,
66 "Cot of maximum theta angle"};
67 Gaudi::Property<float> m_deltaRMinTopSP {this, "deltaRMinTopSP", 6 * Acts::UnitConstants::mm,
68 "minimum distance in r between middle and top SP in one seed"};
69 Gaudi::Property<float> m_deltaRMaxTopSP {this, "deltaRMaxTopSP", 280 * Acts::UnitConstants::mm,
70 "maximum distance in r between middle and top SP in one seed"};
71 Gaudi::Property<float> m_deltaRMinBottomSP {this, "deltaRMinBottomSP", 6 * Acts::UnitConstants::mm,
72 "minimum distance in r between middle and bottom SP in one seed"};
73 Gaudi::Property<float> m_deltaRMaxBottomSP {this, "deltaRMaxBottomSP", 120 * Acts::UnitConstants::mm,
74 "maximum distance in r between middle and bottom SP in one seed"};
75
76 Gaudi::Property<float> m_impactMax {this, "impactMax", 2. * Acts::UnitConstants::mm,
77 "impact parameter"};
78
79 Gaudi::Property<float> m_sigmaScattering {this, "sigmaScattering", 2,
80 "how many sigmas of scattering angle should be considered"};
81 Gaudi::Property<float> m_maxPtScattering {this, "maxPtScattering", 10e6,
82 "Upper pt limit for scattering calculation"};
83
84 Gaudi::Property<unsigned int> m_maxSeedsPerSpM {this, "maxSeedsPerSpM", 5, // also used by SeedFilterConfig
85 "For how many seeds can one SpacePoint be the middle SpacePoint"};
86
87 // Geometry Settings
88 // Detector ROI
89 // limiting location of collision region in z
90 Gaudi::Property<float> m_collisionRegionMin {this, "collisionRegionMin", -200 * Acts::UnitConstants::mm};
91 Gaudi::Property<float> m_collisionRegionMax {this, "collisionRegionMax", 200 * Acts::UnitConstants::mm};
92 Gaudi::Property<float> m_phiMin {this, "phiMin", -M_PI};
93 Gaudi::Property<float> m_phiMax {this, "phiMax", M_PI};
94 // limiting location of measurements
95 Gaudi::Property<float> m_zMin {this, "zMin", -3000 * Acts::UnitConstants::mm};
96 Gaudi::Property<float> m_zMax {this, "zMax", 3000 * Acts::UnitConstants::mm};
97 Gaudi::Property<float> m_rMax {this, "rMax", 320 * Acts::UnitConstants::mm};
98 Gaudi::Property<float> m_rMin {this, "rMin", 33 * Acts::UnitConstants::mm};
99
100 Gaudi::Property<float> m_rMinMiddle {this, "rMinMiddle", 60.f * Acts::UnitConstants::mm};
101 Gaudi::Property<float> m_rMaxMiddle {this, "rMaxMiddle", 120.f * Acts::UnitConstants::mm};
102
103 Gaudi::Property<float> m_deltaPhiMax {this, "deltaPhiMax", 0.085};
104
105 Gaudi::Property<float> m_deltaZMax {this, "deltaZMax", 600 * Acts::UnitConstants::mm,
106 "Cut to the maximum value of delta z between SPs"};
107
108 Gaudi::Property<bool> m_interactionPointCut {this, "interactionPointCut", true,
109 "Enable cut on the compatibility between interaction point and SPs"};
110
111 Gaudi::Property<bool> m_seedConfirmation {this, "seedConfirmation", true,
112 "Seed Confirmation"};
113
114 Gaudi::Property<float> m_radLengthPerSeed {this, "radLengthPerSeed", 0.1,
115 "average radiation lengths of material on the length of a seed. used for scattering"};
116
117 // Used by Seed Filter Config
118 Gaudi::Property<float> m_deltaInvHelixDiameter {this, "deltaInvHelixDiameter", 0.00003 * 1. / Acts::UnitConstants::mm,
119 "The allowed delta between two inverted seed radii for them to be considered compatible"};
120 Gaudi::Property<float> m_impactWeightFactor {this, "impactWeightFactor", 100.,
121 "The transverse impact parameters (d0) is multiplied by this factor and subtracted from weight"};
122 Gaudi::Property<float> m_zOriginWeightFactor {this, "zOriginWeightFactor", 1.,
123"The logitudinal impact parameters (z0) is multiplied by this factor and subtracted from weight"};
124 Gaudi::Property<float> m_compatSeedWeight {this, "compatSeedWeight", 100.,
125 "Seed weight increased by this value if a compatible seed has been found."};
126 Gaudi::Property<float> m_deltaRMin {this, "deltaRMin", 20. * Acts::UnitConstants::mm,
127 "Minimum distance between compatible seeds to be considered for weight boost"};
128 Gaudi::Property<std::size_t> m_compatSeedLimit {this, "compatSeedLimit", 3,
129 "How often do you want to increase the weight of a seed for finding a compatible seed"};
130
131 Gaudi::Property<float> m_seedWeightIncrement {this, "seedWeightIncrement", 0};
132 Gaudi::Property<float> m_numSeedIncrement {this, "numSeedIncrement", 3.40282e+38}; // cannot use std::numeric_limits<float>::infinity()
133
134 Gaudi::Property<bool> m_seedConfirmationInFilter {this, "seedConfirmationInFilter", true,
135 "Seed Confirmation"};
136
137 Gaudi::Property<int> m_maxSeedsPerSpMConf {this, "maxSeedsPerSpMConf", 5,
138 "maximum number of lower quality seeds in seed confirmation"};
139 Gaudi::Property<int> m_maxQualitySeedsPerSpMConf {this, "maxQualitySeedsPerSpMConf", 5,
140 "maximum number of quality seeds for each middle-bottom SP-duplet in seed confirmation if the limit is reached we check if there is a lower quality seed to be replaced"};
141
142 Gaudi::Property<bool> m_useDeltaRorTopRadius {this, "useDeltaRorTopRadius", true,
143 "use deltaR between top and middle SP instead of top radius to search for compatible SPs"};
144
145 // Used by SeedConfirmationRangeConfig
146 Gaudi::Property< float > m_seedConfCentralZMin {this, "seedConfCentralZMin", -250. * Acts::UnitConstants::mm,
147 "minimum z for central seed confirmation "};
148 Gaudi::Property< float > m_seedConfCentralZMax {this, "seedConfCentralZMax", 250. * Acts::UnitConstants::mm,
149 "maximum z for central seed confirmation "};
150 Gaudi::Property< float > m_seedConfCentralRMax {this, "seedConfCentralRMax", 140. * Acts::UnitConstants::mm,
151 "maximum r for central seed confirmation "};
152 Gaudi::Property< size_t > m_seedConfCentralNTopLargeR {this, "seedConfCentralNTopLargeR", 1,
153 "nTop for large R central seed confirmation"};
154 Gaudi::Property< size_t > m_seedConfCentralNTopSmallR {this, "seedConfCentralNTopSmallR", 2,
155 "nTop for small R central seed confirmation"};
156 Gaudi::Property< float > m_seedConfCentralMinBottomRadius {this, "seedConfCentralMinBottomRadius", 60 * Acts::UnitConstants::mm,
157 "Minimum radius for bottom SP in seed confirmation"};
158 Gaudi::Property< float > m_seedConfCentralMaxZOrigin {this, "seedConfCentralMaxZOrigin", 150 * Acts::UnitConstants::mm,
159 "Maximum zOrigin in seed confirmation"};
160 Gaudi::Property< float > m_seedConfCentralMinImpact {this, "seedConfCentralMinImpact", 1. * Acts::UnitConstants::mm,
161 "Minimum impact parameter for seed confirmation"};
162
163 Gaudi::Property< float > m_seedConfForwardZMin {this, "seedConfForwardZMin", -3000. * Acts::UnitConstants::mm,
164 "minimum z for forward seed confirmation "};
165 Gaudi::Property< float > m_seedConfForwardZMax {this, "seedConfForwardZMax", 3000. * Acts::UnitConstants::mm,
166 "maximum z for forward seed confirmation "};
167 Gaudi::Property< float > m_seedConfForwardRMax {this, "seedConfForwardRMax", 140. * Acts::UnitConstants::mm,
168 "maximum r for forward seed confirmation "};
169 Gaudi::Property< size_t > m_seedConfForwardNTopLargeR {this, "seedConfForwardNTopLargeR", 1,
170 "nTop for large R forward seed confirmation"};
171 Gaudi::Property< size_t > m_seedConfForwardNTopSmallR {this, "seedConfForwardNTopSmallR", 2,
172 "nTop for small R forward seed confirmation"};
173 Gaudi::Property< float > m_seedConfForwardMinBottomRadius {this, "seedConfForwardMinBottomRadius", 60 * Acts::UnitConstants::mm,
174 "Minimum radius for bottom SP in seed confirmation"};
175 Gaudi::Property< float > m_seedConfForwardMaxZOrigin {this, "seedConfForwardMaxZOrigin", 150 * Acts::UnitConstants::mm,
176 "Maximum zOrigin in seed confirmation"};
177 Gaudi::Property< float > m_seedConfForwardMinImpact {this, "seedConfForwardMinImpact", 1. * Acts::UnitConstants::mm,
178 "Minimum impact parameter for seed confirmation"};
179
180 // Fast Track
181 Gaudi::Property< bool > m_useExperimentCuts {this, "useExperimentCuts", false, ""};
182
183 Gaudi::Property< std::vector<std::vector<double>> > m_rRangeMiddleSP {this, "rRangeMiddleSP",
184 {{40.0, 90.0}, {40.0, 200.0}, {46.0, 200.0}, {46.0, 200.0}, {46.0, 250.0}, {46.0, 250.0}, {46.0, 250.0}, {46.0, 200.0}, {46.0, 200.0}, {40.0, 200.0}, {40.0, 90.0}},
185 "radial range for middle SP"};
186
188 const Acts::Logger &logger() const { return *m_logger; }
190 std::unique_ptr<const Acts::Logger> m_logger {nullptr};
191 };
192
193} // namespace
194
195#endif
196
#define M_PI
Gaudi::Property< float > m_deltaRMinTopSP
Gaudi::Property< bool > m_interactionPointCut
const Acts::Logger & logger() const
Private access to the logger.
Gaudi::Property< float > m_phiMax
Gaudi::Property< float > m_phiMin
Gaudi::Property< float > m_seedConfForwardRMax
Gaudi::Property< int > m_maxSeedsPerSpMConf
Gaudi::Property< float > m_radLengthPerSeed
Gaudi::Property< float > m_deltaInvHelixDiameter
Gaudi::Property< float > m_zOriginWeightFactor
Gaudi::Property< size_t > m_seedConfForwardNTopLargeR
Gaudi::Property< float > m_seedConfCentralZMin
Gaudi::Property< float > m_maxPtScattering
Gaudi::Property< float > m_seedConfCentralMinBottomRadius
Gaudi::Property< float > m_seedWeightIncrement
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Gaudi::Property< bool > m_seedConfirmation
Gaudi::Property< bool > m_useDeltaRorTopRadius
Gaudi::Property< float > m_deltaPhiMax
Gaudi::Property< float > m_deltaRMaxBottomSP
Gaudi::Property< float > m_cotThetaMax
Gaudi::Property< float > m_seedConfForwardZMin
Acts::SeedFinderOrthogonalConfig< value_type > m_finderCfg
Gaudi::Property< float > m_collisionRegionMax
Gaudi::Property< size_t > m_seedConfCentralNTopSmallR
Gaudi::Property< float > m_collisionRegionMin
Gaudi::Property< size_t > m_seedConfCentralNTopLargeR
typename Acts::SpacePointContainer< ActsTrk::SpacePointCollector, Acts::detail::RefHolder >::SpacePointProxyType value_type
Gaudi::Property< float > m_deltaRMin
Gaudi::Property< float > m_seedConfForwardZMax
Gaudi::Property< float > m_seedConfCentralZMax
Gaudi::Property< float > m_sigmaScattering
Gaudi::Property< float > m_rMaxMiddle
Gaudi::Property< float > m_seedConfForwardMinImpact
Gaudi::Property< float > m_deltaZMax
Gaudi::Property< float > m_seedConfCentralRMax
Gaudi::Property< float > m_rMinMiddle
virtual ~OrthogonalSeedingTool()=default
Gaudi::Property< size_t > m_seedConfForwardNTopSmallR
Gaudi::Property< bool > m_seedConfirmationInFilter
Gaudi::Property< bool > m_useExperimentCuts
Gaudi::Property< float > m_seedConfCentralMinImpact
Gaudi::Property< float > m_impactWeightFactor
Gaudi::Property< std::size_t > m_compatSeedLimit
Gaudi::Property< float > m_seedConfCentralMaxZOrigin
Gaudi::Property< std::vector< std::vector< double > > > m_rRangeMiddleSP
Gaudi::Property< float > m_deltaRMinBottomSP
Acts::Seed< value_type, 3ul > seed_type
Gaudi::Property< int > m_maxQualitySeedsPerSpMConf
Acts::SeedFinderOrthogonal< value_type > m_finder
virtual StatusCode initialize() override
Gaudi::Property< float > m_impactMax
OrthogonalSeedingTool(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< float > m_numSeedIncrement
Gaudi::Property< unsigned int > m_maxSeedsPerSpM
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
Gaudi::Property< float > m_seedConfForwardMaxZOrigin
Gaudi::Property< float > m_deltaRMaxTopSP
Gaudi::Property< float > m_compatSeedWeight
Gaudi::Property< float > m_seedConfForwardMinBottomRadius
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...