5 #ifndef ACTSTRKSEEDINGTOOL_SEEDINGTOOL_H
6 #define ACTSTRKSEEDINGTOOL_SEEDINGTOOL_H
12 # pragma GCC diagnostic ignored "-Wstringop-overread"
18 #include "Acts/EventData/Seed.hpp"
21 template <
typename external_spacepo
int_t, std::
size_t N = 3ul>
25 #define Seed AthenaSeed
26 #include "Acts/Seeding/SeedFinder.hpp"
27 #include "Acts/Seeding/SeedFilter.hpp"
37 #include "Acts/Definitions/Units.hpp"
38 #include "Acts/Definitions/Common.hpp"
39 #include "Acts/Definitions/Algebra.hpp"
40 #include "Acts/Seeding/SpacePointGrid.hpp"
41 #include "Acts/Utilities/GridBinFinder.hpp"
42 #include "Acts/Seeding/BinnedGroup.hpp"
43 #include "Acts/Seeding/SeedFinderConfig.hpp"
44 #include "Acts/Seeding/SeedFilterConfig.hpp"
45 #include "Acts/EventData/Seed.hpp"
54 public extends<AthAlgTool, ActsTrk::ISeedingTool> {
56 using value_type =
typename Acts::SpacePointContainer<ActsTrk::SpacePointCollector, Acts::detail::RefHolder>::SpacePointProxyType;
61 typename value_type::ValueType
66 const std::string&
name,
75 const Acts::SpacePointContainer<ActsTrk::SpacePointCollector, Acts::detail::RefHolder>& spContainer,
76 const Acts::Vector3& beamSpotPos,
77 const Acts::Vector3& bField,
81 template<
typename spacepo
int_iterator_t>
83 using type =
typename std::conditional<
90 template<
typename external_iterator_t >
93 external_iterator_t spEnd,
94 const Acts::Vector3& beamSpotPos,
95 const Acts::Vector3& bField,
107 Acts::SeedFinder< value_type, Acts::CylindricalSpacePointGrid<value_type> >
m_finder;
113 "Select seed according to quality criteria"};
117 "lower pT cutoff for seeds"};
119 "cot of maximum theta angle"};
121 "limiting location of measurements"};
123 "limiting location of measurements"};
125 "maximum distance in r between two measurements within one seed"};
127 "maximum impact parameter"};
128 Gaudi::Property< std::vector< float > >
m_zBinEdges {
this,
"zBinEdges",
129 {-3000., -2700., -2500., -1400., -925., -500., -250., 250., 500., 925., 1400., 2500., 2700, 3000.},
130 "enable non equidistant binning in z"};
132 "enable non equidistant binning in radius"};
134 "radial extension of subdetector to be used in grid building"};
135 Gaudi::Property< float >
m_gridPhiMin {
this,
"gridPhiMin", -std::numbers::pi_v<float>,
136 "phi min for space point grid formation"};
137 Gaudi::Property< float >
m_gridPhiMax {
this,
"gridPhiMax", std::numbers::pi_v<float>,
138 "phi max for space point grid formation"};
140 "sets of consecutive phi bins to cover full deflection of minimum pT particle"};
141 Gaudi::Property< int >
m_maxPhiBins {
this,
"maxPhiBins", 200,
"max number of bins"};
145 "limiting location of measurements"};
147 "defining radial bin for space point sorting"};
149 "minimum distance in r between two measurements within one seed"};
151 "minimum distance in r between middle and top SP"};
153 "maximum distance in r between middle and top SP"};
155 "minimum distance in r between middle and top SP"};
157 "maximum distance in r between middle and top SP"};
159 "maximum distance in z between two measurements within one seed"};
161 "limiting location of collision region in z"};
163 "limiting location of collision region in z"};
165 "how many sigmas of scattering angle should be considered"};
167 "Upper pt limit for scattering calculation"};
169 "average radiation lengths of material on the length of a seed. used for scattering"};
171 "In dense environments many seeds may be found per middle space point. Only seeds with the highest weight will be kept if this limit is reached."};
173 "Enable cut on the compatibility between interaction point and SPs"};
175 {2, 3, 4, 5, 12, 11, 10, 9, 7, 6, 8} ,
"defines order of z bins for looping"};
177 "defines order of r bins for looping"};
179 "Enable variable range to search for middle SPs"};
180 Gaudi::Property< std::vector<std::vector<double>> >
m_rRangeMiddleSP {
this,
"rRangeMiddleSP",
181 {{40.0, 90.0}, {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}, {40.0, 90.0}},
182 "radial range for middle SP"};
184 "delta R for middle SP range (min)"};
186 "delta R for middle SP range (max)"};
188 "run seed confirmation"};
190 "minimum z for central seed confirmation "};
193 "maximum z for central seed confirmation "};
196 "maximum r for central seed confirmation "};
199 "nTop for large R central seed confirmation"};
202 "nTop for small R central seed confirmation"};
205 "Minimum radius for bottom SP in seed confirmation"};
208 "Maximum zOrigin in seed confirmation"};
211 "Minimum impact parameter for seed confirmation"};
214 "minimum z for forward seed confirmation "};
217 "maximum z for forward seed confirmation "};
220 "maximum r for forward seed confirmation "};
223 "nTop for large R forward seed confirmation"};
226 "nTop for small R forward seed confirmation"};
229 "Minimum radius for bottom SP in seed confirmation"};
232 "Maximum zOrigin in seed confirmation"};
235 "Minimum impact parameter for seed confirmation"};
238 "enable use of double measurement details"};
241 "tolerance parameter used to check the compatibility of SPs coordinates in xyz"};
242 Gaudi::Property<float>
m_phiMin {
this,
"phiMin", -std::numbers::pi_v<float>,
""};
243 Gaudi::Property<float>
m_phiMax {
this,
"phiMax", std::numbers::pi_v<float>,
""};
251 "the impact parameters (d0) is multiplied by this factor and subtracted from weight"};
254 "seed weight increased by this value if a compatible seed has been found"};
256 "how often do you want to increase the weight of a seed for finding a compatible seed"};
258 "increment in seed weight if needed"};
260 "increment in seed weight is applied if the number of compatible seeds is larger than numSeedIncrement"};
262 "run seed confirmation"};
264 "Maximum number of lower quality seeds in seed confirmation."};
266 "Maximum number of quality seeds for each middle-bottom SP-duplet in seed confirmation."};
268 "use deltaR (top radius - middle radius) instead of top radius"};
270 "the allowed delta between two inverted seed radii for them to be considered compatible"};
276 {{0, 0}, {-1, 0}, {-2, 0}, {-1, 0}, {-1, 0}, {-1, 0}, {-1, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 2} , {0, 1}, {0, 0}},
277 "vector containing the map of z bins in the top layers"};
279 {{0, 0}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 0}, {-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}, {0, 0}},
280 "vector containing the map of z bins in the top layers"};
281 Gaudi::Property< std::vector<std::pair<int, int>> >
m_rBinNeighborsTop{
this,
"rBinNeighborsTop", {{0, 0}},
282 "vector containing the map of radius bins in the top layers"};
284 "vector containing the map of radius bins in the bottom layers"};
286 "number of phi bin neighbors at each side of the current bin that will be used to search for SPs"};
290 Gaudi::Property< int >
m_stateVectorReserveSize {
this,
"stateVectorReserveSize", 500,
"Size of the initial Seeding State internal vectors"};
301 std::unique_ptr<const Acts::Logger>
m_logger {
nullptr};
309 float r = sp.radius();
310 float zabs = std::abs(sp.z());
311 float absCotTheta = zabs /
r;
325 static constexpr
float cotThetaEta120 = 1.5095;
326 if (absCotTheta < cotThetaEta120)
330 static constexpr
float cotThetaEta340 = 14.9654;
331 if (absCotTheta < cotThetaEta340 and
338 static constexpr
float cotThetaEta220 = 4.4571;
339 if (absCotTheta > cotThetaEta220 and
344 static constexpr
float cotThetaEta260 = 6.6947;
345 if (absCotTheta > cotThetaEta260 and
350 static constexpr
float cotThetaEta320 = 12.2459;
351 if (absCotTheta > cotThetaEta320 and
356 static constexpr
float cotThetaEta400 = 27.2899;
357 if (absCotTheta > cotThetaEta400)
366 float cotTheta,
bool isBottomCandidate)
const {
372 if (std::abs(middle.z()) > 1500 and
373 middle.radius() > 100 and middle.radius() < 150) {
382 static constexpr
float cotThetaEta120 = 1.5095;
383 static constexpr
float cotThetaEta360 = 18.2855;
385 float absCotTheta = std::abs(
cotTheta);
387 absCotTheta > cotThetaEta120 and
388 absCotTheta < cotThetaEta360) {