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
SiPixelDigisSoA::~SiPixelDigisSoA
~SiPixelDigisSoA()=default
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelDigisSoA::pdigiVector
const std::vector< uint32_t > & pdigiVector() const
Definition: SiPixelDigisSoA.h:28
SiPixelDigisSoA::clus
int32_t clus(size_t i) const
Definition: SiPixelDigisSoA.h:26
SiPixelDigisSoA::adc
uint16_t adc(size_t i) const
Definition: SiPixelDigisSoA.h:25
SiPixelDigisSoA::rawIdArr_
std::vector< uint32_t > rawIdArr_
Definition: SiPixelDigisSoA.h:35
SiPixelDigisSoA::rawIdArrVector
const std::vector< uint32_t > & rawIdArrVector() const
Definition: SiPixelDigisSoA.h:29
SiPixelDigisSoA::SiPixelDigisSoA
SiPixelDigisSoA()=default
SiPixelDigisSoA::rawIdArr
uint32_t rawIdArr(size_t i) const
Definition: SiPixelDigisSoA.h:24
SiPixelDigisSoA::adc_
std::vector< uint16_t > adc_
Definition: SiPixelDigisSoA.h:36
SiPixelDigisSoA::pdigi_
std::vector< uint32_t > pdigi_
Definition: SiPixelDigisSoA.h:34
SiPixelDigisSoA::pdigi
uint32_t pdigi(size_t i) const
Definition: SiPixelDigisSoA.h:23
SiPixelDigisSoA::clus_
std::vector< int32_t > clus_
Definition: SiPixelDigisSoA.h:37
SiPixelDigisSoA
Definition: SiPixelDigisSoA.h:14
SiPixelDigisSoA::size
auto size() const
Definition: SiPixelDigisSoA.h:21
SiPixelDigisSoA::clusVector
const std::vector< int32_t > & clusVector() const
Definition: SiPixelDigisSoA.h:31
SiPixelDigisSoA::adcVector
const std::vector< uint16_t > & adcVector() const
Definition: SiPixelDigisSoA.h:30