File indexing completed on 2023-03-17 10:49:12
0001 #ifndef CUDADataFormats_HcalRecHitCollectionSoA_interface_RecHitCollection_h
0002 #define CUDADataFormats_HcalRecHitCollectionSoA_interface_RecHitCollection_h
0003
0004 #include <vector>
0005
0006 #include "CUDADataFormats/CaloCommon/interface/Common.h"
0007 #include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"
0008
0009 namespace hcal {
0010
0011 template <typename StoragePolicy>
0012 struct RecHitCollection : public ::calo::common::AddSize<typename StoragePolicy::TagType> {
0013 RecHitCollection() = default;
0014 RecHitCollection(const RecHitCollection&) = default;
0015 RecHitCollection& operator=(const RecHitCollection&) = default;
0016
0017 RecHitCollection(RecHitCollection&&) = default;
0018 RecHitCollection& operator=(RecHitCollection&&) = default;
0019
0020 typename StoragePolicy::template StorageSelector<float>::type energy;
0021 typename StoragePolicy::template StorageSelector<float>::type chi2;
0022 typename StoragePolicy::template StorageSelector<float>::type energyM0;
0023 typename StoragePolicy::template StorageSelector<float>::type timeM0;
0024 typename StoragePolicy::template StorageSelector<uint32_t>::type did;
0025
0026 template <typename U = typename StoragePolicy::TagType>
0027 typename std::enable_if<std::is_same<U, ::calo::common::tags::Vec>::value, void>::type resize(size_t size) {
0028 energy.resize(size);
0029 chi2.resize(size);
0030 energyM0.resize(size);
0031 timeM0.resize(size);
0032 did.resize(size);
0033 }
0034 };
0035
0036 }
0037
0038 #endif