CMS 3D CMS Logo

Namespaces | Classes | Functions
hcal Namespace Reference

Namespaces

 constants
 
 raw
 
 reconstruction
 

Classes

class  AMC13Header
 
struct  DigiCollection
 
struct  DigiCollection< Flavor5, StoragePolicy >
 
struct  DigiCollectionBase
 
struct  Flavor1
 
struct  Flavor3
 
struct  Flavor5
 
struct  RecHitCollection
 

Functions

template<typename Flavor >
constexpr uint8_t adc_for_sample (uint16_t const *const dfstart, uint32_t const sample)
 
template<>
constexpr uint8_t adc_for_sample< Flavor5 > (uint16_t const *const dfstart, uint32_t const sample)
 
template<typename Flavor >
constexpr uint8_t capid_for_sample (uint16_t const *const dfstart, uint32_t const sample)
 
template<>
constexpr uint8_t capid_for_sample< Flavor3 > (uint16_t const *const dfstart, uint32_t const sample)
 
template<typename Flavor >
constexpr uint32_t compute_nsamples (uint32_t const nwords)
 
template<typename Flavor >
constexpr uint32_t compute_stride (uint32_t const nsamples)
 
template<typename Flavor >
constexpr uint8_t soibit_for_sample (uint16_t const *const dfstart, uint32_t const sample)
 
template<typename Flavor >
constexpr uint8_t tdc_for_sample (uint16_t const *const dfstart, uint32_t const sample)
 

Function Documentation

◆ adc_for_sample()

template<typename Flavor >
constexpr uint8_t hcal::adc_for_sample ( uint16_t const *const  dfstart,
uint32_t const  sample 
)
constexpr

Definition at line 59 of file DigiCollection.h.

59  {
60  return Flavor::adc(dfstart + Flavor::HEADER_WORDS + sample * Flavor::WORDS_PER_SAMPLE);
61  }

References gpuClustering::adc, and simplePhotonAnalyzer_cfi::sample.

◆ adc_for_sample< Flavor5 >()

template<>
constexpr uint8_t hcal::adc_for_sample< Flavor5 > ( uint16_t const *const  dfstart,
uint32_t const  sample 
)
constexpr

Definition at line 69 of file DigiCollection.h.

69  {
70  // avoid using WORDS_PER_SAMPLE and simply shift
71  return Flavor5::adc(dfstart + Flavor5::HEADER_WORDS + (sample >> 1), sample % 2);
72  }

References hcal::Flavor5::adc(), hcal::Flavor5::HEADER_WORDS, and simplePhotonAnalyzer_cfi::sample.

◆ capid_for_sample()

template<typename Flavor >
constexpr uint8_t hcal::capid_for_sample ( uint16_t const *const  dfstart,
uint32_t const  sample 
)
constexpr

Definition at line 43 of file DigiCollection.h.

43  {
44  auto const capid_first = (*dfstart >> 8) & 0x3;
45  return (capid_first + sample) & 0x3; // same as % 4
46  }

References simplePhotonAnalyzer_cfi::sample.

◆ capid_for_sample< Flavor3 >()

template<>
constexpr uint8_t hcal::capid_for_sample< Flavor3 > ( uint16_t const *const  dfstart,
uint32_t const  sample 
)
constexpr

Definition at line 49 of file DigiCollection.h.

49  {
50  return Flavor3::capid(dfstart + Flavor3::HEADER_WORDS + sample * Flavor3::WORDS_PER_SAMPLE);
51  }

References hcal::Flavor3::capid(), hcal::Flavor3::HEADER_WORDS, simplePhotonAnalyzer_cfi::sample, and hcal::Flavor3::WORDS_PER_SAMPLE.

◆ compute_nsamples()

template<typename Flavor >
constexpr uint32_t hcal::compute_nsamples ( uint32_t const  nwords)
constexpr

Definition at line 80 of file DigiCollection.h.

80  {
81  if constexpr (Flavor::SAMPLES_PER_WORD >= 1)
82  return (nwords - Flavor::HEADER_WORDS) * Flavor::SAMPLES_PER_WORD;
83  else
84  return (nwords - Flavor::HEADER_WORDS) / Flavor::WORDS_PER_SAMPLE;
85  }

◆ compute_stride()

template<typename Flavor >
constexpr uint32_t hcal::compute_stride ( uint32_t const  nsamples)
constexpr

Definition at line 75 of file DigiCollection.h.

75  {
76  return static_cast<uint32_t>(nsamples * Flavor::WORDS_PER_SAMPLE) + Flavor::HEADER_WORDS;
77  }

◆ soibit_for_sample()

template<typename Flavor >
constexpr uint8_t hcal::soibit_for_sample ( uint16_t const *const  dfstart,
uint32_t const  sample 
)
constexpr

Definition at line 54 of file DigiCollection.h.

54  {
55  return Flavor::soibit(dfstart + Flavor::HEADER_WORDS + sample * Flavor::WORDS_PER_SAMPLE);
56  }

References simplePhotonAnalyzer_cfi::sample.

◆ tdc_for_sample()

template<typename Flavor >
constexpr uint8_t hcal::tdc_for_sample ( uint16_t const *const  dfstart,
uint32_t const  sample 
)
constexpr

Definition at line 64 of file DigiCollection.h.

64  {
65  return Flavor::tdc(dfstart + Flavor::HEADER_WORDS + sample * Flavor::WORDS_PER_SAMPLE);
66  }

References simplePhotonAnalyzer_cfi::sample.

simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
mathSSE::return
return((rh ^ lh) &mask)