CMS 3D CMS Logo

SiPixelDigisSoA.h
Go to the documentation of this file.
1 #ifndef DataFormats_SiPixelDigi_interface_SiPixelDigisSoA_h
2 #define DataFormats_SiPixelDigi_interface_SiPixelDigisSoA_h
3 
4 #include <cstddef>
5 #include <cstdint>
6 #include <vector>
7 
8 // The main purpose of this class is to deliver digi and cluster data
9 // from an EDProducer that transfers the data from GPU to host to an
10 // EDProducer that converts the SoA to legacy data products. The class
11 // is independent of any GPU technology, and in prunciple could be
12 // produced by host code, and be used for other purposes than
13 // conversion-to-legacy as well.
15 public:
16  SiPixelDigisSoA() = default;
17  explicit SiPixelDigisSoA(
18  size_t nDigis, const uint32_t* pdigi, const uint32_t* rawIdArr, const uint16_t* adc, const int32_t* clus);
19  ~SiPixelDigisSoA() = default;
20 
21  auto size() const { return pdigi_.size(); }
22 
23  uint32_t pdigi(size_t i) const { return pdigi_[i]; }
24  uint32_t rawIdArr(size_t i) const { return rawIdArr_[i]; }
25  uint16_t adc(size_t i) const { return adc_[i]; }
26  int32_t clus(size_t i) const { return clus_[i]; }
27 
28  const std::vector<uint32_t>& pdigiVector() const { return pdigi_; }
29  const std::vector<uint32_t>& rawIdArrVector() const { return rawIdArr_; }
30  const std::vector<uint16_t>& adcVector() const { return adc_; }
31  const std::vector<int32_t>& clusVector() const { return clus_; }
32 
33 private:
34  std::vector<uint32_t> pdigi_; // packed digi (row, col, adc) of each pixel
35  std::vector<uint32_t> rawIdArr_; // DetId of each pixel
36  std::vector<uint16_t> adc_; // ADC of each pixel
37  std::vector<int32_t> clus_; // cluster id of each pixel
38 };
39 
40 #endif
const std::vector< uint32_t > & rawIdArrVector() const
std::vector< uint32_t > rawIdArr_
uint32_t pdigi(size_t i) const
std::vector< uint16_t > adc_
uint16_t adc(size_t i) const
SiPixelDigisSoA()=default
std::vector< uint32_t > pdigi_
int32_t clus(size_t i) const
const std::vector< int32_t > & clusVector() const
uint32_t rawIdArr(size_t i) const
std::vector< int32_t > clus_
~SiPixelDigisSoA()=default
const std::vector< uint32_t > & pdigiVector() const
auto size() const
const std::vector< uint16_t > & adcVector() const