12 float extent = qmax - qmin;
14 float extra = 0.5f * (
m_nq * dq - extent);
20 : m_linfo(li), m_qmin(qmin), m_qmax(qmax), m_nq(nq) {}
23 setup(qmin, qmax, dq);
45 #ifdef COPY_SORTED_HITS 50 #ifdef COPY_SORTED_HITS 51 void LayerOfHits::alloc_hits(
int size) {
54 for (
int ihit = 0; ihit < m_capacity; ihit++) {
59 void LayerOfHits::free_hits() {
std::free(m_hits); }
81 #ifdef COPY_SORTED_HITS 88 std::vector<HitInfo> hinfos;
95 const Hit &
h = hitv[
i];
104 float half_length, qbar;
109 half_length = sqrt3 *
std::sqrt(
h.exx() +
h.eyy());
112 hinfos.emplace_back(
HitInfo({phi,
q, half_length, qbar}));
120 #ifdef COPY_SORTED_HITS 121 memcpy(&m_hits[
i], &hitv[
j],
sizeof(
Hit));
134 for (
const auto &
d : deadv) {
140 for (
bin_index_t q_bin = q_bin_1; q_bin != q_bin_2; q_bin++) {
159 const Hit &
h = (*m_ext_hits)[
idx];
172 float half_length, qbar;
177 half_length = sqrt3 *
std::sqrt(
h.exx() +
h.eyy());
193 #ifdef COPY_SORTED_HITS 200 std::vector<HitInfo> hinfos;
210 #ifdef COPY_SORTED_HITS 211 memcpy(&m_hits[
i], &hitv[
k],
sizeof(
Hit));
222 if (build_original_to_internal_map) {
232 "LayerOfHits::endRegistrationOfHits() original_to_internal index map vector is largish: m_n_hits=%d, " 233 "map_vector_size=%d\n",
252 printf(
"%c bin %d\n",
is_barrel() ?
'Z' :
'R', qb);
255 printf(
" Phi %4d: ", pb);
257 printf(
"%5d,%4d %s",
content.first,
content.count, ((pb + 1) % 8 == 0) ?
"\n" :
"");
void endRegistrationOfHits(bool build_original_to_internal_map)
constexpr int32_t ceil(float num)
void setup(float qmin, float qmax, float dq)
bin_index_t qBinChecked(float q) const
const HitVec * m_ext_hits
C_pair get_content(B_pair n_bin) const
unsigned int m_min_ext_idx
void finalize_registration()
constexpr bool usePhiQArrays
void free(void *ptr) noexcept
unsigned int size_of_N() const
bin_index_t phiBin(float phi) const
unsigned int * m_hit_ranks
void register_entry_safe(typename A1::real_t r1, typename A2::real_t r2)
void suckInDeads(const DeadVec &deadv)
void begin_registration(C n_items)
std::vector< bool > m_dead_bins
SeedingHitSet::ConstRecHitPointer Hit
std::vector< Hit > HitVec
const LayerInfo & layer(int l) const
Initializator(const LayerInfo &li, float qmin, float qmax, unsigned int nq)
std::vector< DeadRegion > DeadVec
LayerOfHits(const LayerOfHits::Initializator &i)
unsigned int size_of_N() const
unsigned int m_max_ext_idx
void suckInHits(const HitVec &hitv)
void beginRegistrationOfHits(const HitVec &hitv)
EventOfHits(const TrackerInfo &trk_inf)
void * aligned_alloc64(std::size_t size)
std::vector< unsigned int > m_ext_idcs
void registerHit(unsigned int idx)
const LayerInfo * m_layer_info
unsigned short bin_index_t
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
bin_index_t phiMaskApply(bin_index_t in) const
std::vector< LayerOfHits > m_layers_of_hits
std::vector< HitInfo > m_hit_infos
void reset_contents(bool shrink_vectors=true)