38template class std::vector<vf, vf_vector::allocator_type>;
50#if defined(__x86_64__) && HAVE_TARGET_CLONES && HAVE_VECTOR_SIZE_ATTRIBUTE
53[[gnu::target_clones(
"default,sse2,avx,avx2")]]
56void calcImpl (
const float* lumi,
58 const unsigned ncoeff,
59 const unsigned int nshapes,
60 const unsigned int npad,
68 vf_vector llv (ncoeff);
69 for (
size_t i = 0;
i < ncoeff;
i++) {
75 out.resize(ncell + npad);
78 const vf* cpos =
reinterpret_cast<const vf*
> (
coeffs.data());
79 vf* opos =
reinterpret_cast<vf*
> (
out.data());
101 for (;
i >= 3;
i -= 3) {
102 sum1 += *cpos++ * *
ll++;
103 sum2 += *cpos++ * *
ll++;
104 sum3 += *cpos++ * *
ll++;
112 sum1 += *cpos++ * *
ll++;
115 sum2 += *cpos++ * *
ll++;
122 *opos++ = sum1 + sum2 + sum3;
172 fillCoeffs (hwids, online_id, ofcs, shapes, minbias);
195 std::vector<float> cell_coeffs (
m_ncoeff);
197 for (
size_t icell = 0; icell <
m_ncell; ++icell) {
203 if (cell_minbias > 0) {
206 shapes.
Shape (hwid, 0).data(),
212 for (
size_t icoeff = 0; icoeff <
m_ncoeff; ++icoeff) {
213 coeff(icoeff, icell) = cell_coeffs[icoeff] * cell_minbias;
230 std::vector<float>& cell_coeffs)
const
233 std::fill (cell_coeffs.begin(), cell_coeffs.end(), 0);
240 for (
size_t j = 0; j <
nshapes; ++j) {
242 size_t ndx = (
nshapes-1) + i - j;
252 if (i > 0) ofc = ofcs[i-1];
255 if (i < 4) ofc = ofcs[i];
263 cell_coeffs.at(ndx) += ofc * shapes[j];
Luminosity-dependent pileup offset correction conditions object.
float & coeff(size_t icoeff, size_t icell)
Indexing into m_coeffs.
unsigned int m_nsamples
Number of samples per cell (length of OFC vector).
CxxUtils::vec_aligned_vector< float > m_coeffs
Storage for coeffients, m_ncoeff per cell, laid out in groups of CHUNKSIZE like this: icoeff0,...
size_t nsamples_coeff() const
Return the number of samples per cell used in the calculation (after padding).
unsigned int m_ncell
Number of cells.
size_t nshapes() const
Return the number of shape points per cell.
unsigned int m_npad
Number of padding cells we need to add to get a multiple of CHUNKSIZE.
CaloBCIDCoeffs(const std::vector< HWIdentifier > &hwids, const LArOnlineID_Base &online_id, const ILArOFC &ofcs, const ILArShape &shapes, const ILArMinBiasAverage &minbias)
Constructor.
void calc(const float *lumi, CxxUtils::vec_aligned_vector< float > &out) const
Perform the calculation for a given set of per-bunch luminosities.
static constexpr size_t CHUNKSIZE
Number of cells that we calculate at one time.
unsigned int m_nsamples_coeff
Number of samples per cell used in the calculation, after padding.
unsigned int m_nshapes
Number of shape points per cell.
unsigned int m_ncoeff
Number of coefficients per cell (length of dot product).
void fillCoeffs(const std::vector< HWIdentifier > &hwids, const LArOnlineID_Base &online_id, const ILArOFC &ofcs, const ILArShape &shapes, const ILArMinBiasAverage &minbias)
Initialize all coefficients.
void findCellCoeffs(const float *ofcs, const float *shapes, bool ishec, std::vector< float > &cell_coeffs) const
Find coefficients for one cell.
virtual const float & minBiasAverage(const HWIdentifier &id) const =0
access to average of E in minimum bias events index by Identifier
virtual OFCRef_t OFC_a(const HWIdentifier &id, int gain, int tbin=0) const =0
access to OFCs by online ID, gain, and tbin (!=0 for testbeam)
virtual ShapeRef_t Shape(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
Helper for the Liquid Argon Calorimeter cell identifiers.
virtual bool isHECchannel(const HWIdentifier id) const =0
Some additional feature test macros.
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
aligned_vector< T, 64 > vec_aligned_vector
A std::vector with alignment sufficient for any vector instructions on this platform.
ATH_ALWAYS_INLINE void vbroadcast(VEC &v, T x)
Copy a scalar to each element of a vectorized type.