37 : theLayerCache(layerCache),
50 template <
typename Algo>
53 void set(
Base const*
a) {
59 constexpr
float nSigmaRZ = 3.46410161514f;
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>...>;
82 for (std::size_t
i = 0;
i != ds.size(); ++
i) {
87 edm::LogError(
"TooManyPairs") <<
"number of pairs exceed maximum, no pairs produced";
94 const Layer& innerLayer,
95 const Layer& outerLayer,
98 if (innerHitsMap.
empty())
102 if (outerHitsMap.
empty())
128 const unsigned int theMaxElement,
138 for (
int io = 0; io !=
int(outerHitsMap.
theHits.size()); ++io) {
139 if (!
deltaPhi.prefilter(outerHitsMap.
x[io], outerHitsMap.
y[io]))
141 Hit const& ohit = outerHitsMap.
theHits[io].hit();
145 if (phiRange.
empty())
148 std::unique_ptr<const HitRZCompatibility> checkRZ =
149 region.checkRZ(&innerHitDetLayer,
154 outerHitsMap.
isBarrel ? outerHitsMap.
du[io] : outerHitsMap.
dv[io],
155 outerHitsMap.
isBarrel ? outerHitsMap.
dv[io] : outerHitsMap.
du[io]);
159 Kernels<HitZCheck, HitRCheck, HitEtaCheck> kernels;
162 LogDebug(
"HitPairGeneratorFromLayerPair")
163 <<
"preparing for combination of: " << innerRange[1] - innerRange[0] + innerRange[3] - innerRange[2]
164 <<
" inner and: " << outerHitsMap.
theHits.size() <<
" outter";
165 for (
int j = 0;
j < 3;
j += 2) {
166 auto b = innerRange[
j];
167 auto e = innerRange[
j + 1];
171 switch (checkRZ->algo()) {
173 std::get<0>(kernels).
set(checkRZ.get());
174 std::get<0>(kernels)(
b,
e, innerHitsMap,
ok);
177 std::get<1>(kernels).
set(checkRZ.get());
178 std::get<1>(kernels)(
b,
e, innerHitsMap,
ok);
181 std::get<2>(kernels).
set(checkRZ.get());
182 std::get<2>(kernels)(
b,
e, innerHitsMap,
ok);
185 for (
int i = 0;
i !=
e -
b; ++
i) {
190 edm::LogError(
"TooManyPairs") <<
"number of pairs exceed maximum, no pairs produced";
197 LogDebug(
"HitPairGeneratorFromLayerPair") <<
" total number of pairs provided back: " <<
result.size();
~HitPairGeneratorFromLayerPair()
std::vector< HitWithPhi > theHits
std::vector< float > drphi
HitPairGeneratorFromLayerPair(edm::ConsumesCollector iC, unsigned int inner, unsigned int outer, LayerCacheType *layerCache, unsigned int max=0)
void hitPairs(const TrackingRegion ®, OrderedHitPairs &prs, const edm::Event &ev, const edm::EventSetup &es, Layers layers)
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
bool getData(T &iHolder) const
constexpr float nSigmaPhi
HitDoublets doublets(const TrackingRegion ®, const edm::Event &ev, const edm::EventSetup &es, Layers layers)
const unsigned int theMaxElement
SeedingHitSet::ConstRecHitPointer Hit
BaseTrackerRecHit const * Hit
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
const edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > theMSMakerToken
PixelRecoRange< T > intersection(const PixelRecoRange< T > &r) const
PixelRecoRange< float > Range
Layer innerLayer(const Layers &layers) const