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