37 : theLayerCache(layerCache),
50 template <
typename Algo>
53 void set(
Base const*
a) {
60 for (
int i =
b;
i !=
e; ++
i) {
61 Range allowed = checkRZ->range(innerHitsMap.
u[
i]);
63 Range hitRZ(innerHitsMap.
v[
i] - vErr, innerHitsMap.
v[
i] + vErr);
65 ok[
i -
b] = !crossRange.empty();
71 template <
typename...
Args>
72 using Kernels = std::tuple<Kernel<Args>...>;
85 for (std::size_t
i = 0;
i != ds->size(); ++
i) {
90 edm::LogError(
"TooManyPairs") <<
"number of pairs exceed maximum, no pairs produced";
99 const Layer& innerLayer,
100 const Layer& outerLayer,
103 if (innerHitsMap.
empty())
107 if (outerHitsMap.
empty())
136 const unsigned int theMaxElement,
153 if (phiRange.
empty())
156 std::unique_ptr<const HitRZCompatibility> checkRZ =
157 region.checkRZ(&innerHitDetLayer,
167 Kernels<HitZCheck, HitRCheck, HitEtaCheck> kernels;
170 LogDebug(
"HitPairGeneratorFromLayerPair")
171 <<
"preparing for combination of: " << innerRange[1] - innerRange[0] + innerRange[3] - innerRange[2]
172 <<
" inner and: " << outerHitsMap.
theHits.size() <<
" outter";
173 for (
int j = 0;
j < 3;
j += 2) {
174 auto b = innerRange[
j];
175 auto e = innerRange[
j + 1];
179 switch (checkRZ->algo()) {
181 std::get<0>(kernels).
set(checkRZ.get());
182 std::get<0>(kernels)(
b,
e, innerHitsMap,
ok);
185 std::get<1>(kernels).
set(checkRZ.get());
186 std::get<1>(kernels)(
b,
e, innerHitsMap,
ok);
189 std::get<2>(kernels).
set(checkRZ.get());
190 std::get<2>(kernels)(
b,
e, innerHitsMap,
ok);
193 for (
int i = 0;
i !=
e -
b; ++
i) {
198 edm::LogError(
"TooManyPairs") <<
"number of pairs exceed maximum, no pairs produced";
205 LogDebug(
"HitPairGeneratorFromLayerPair") <<
" total number of pairs provided back: " <<
result.size();
~HitPairGeneratorFromLayerPair()
std::vector< HitWithPhi > theHits
std::vector< float > drphi
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
HitPairGeneratorFromLayerPair(edm::ConsumesCollector iC, unsigned int inner, unsigned int outer, LayerCacheType *layerCache, unsigned int max=0)
Log< level::Error, false > LogError
Layer outerLayer(const Layers &layers) const
const DetLayer * detLayer() const
DoubleRange doubleRange(float phiMin, float phiMax) const
constexpr double nSigmaRZ
constexpr float nSigmaPhi
const unsigned int theMaxElement
SeedingHitSet::ConstRecHitPointer Hit
BaseTrackerRecHit const * Hit
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
const edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > theMSMakerToken
bool hitPairs(const TrackingRegion ®, OrderedHitPairs &prs, const edm::Event &ev, const edm::EventSetup &es, Layers layers)
PixelRecoRange< T > intersection(const PixelRecoRange< T > &r) const
PixelRecoRange< float > Range
Square< F >::type sqr(const F &f)
Layer innerLayer(const Layers &layers) const
std::optional< HitDoublets > doublets(const TrackingRegion ®, const edm::Event &ev, const edm::EventSetup &es, Layers layers)