File indexing completed on 2022-08-04 22:44:52
0001 #ifndef CUDADataFormats_EcalRecHitSoA_interface_EcalUncalibratedRecHit_h
0002 #define CUDADataFormats_EcalRecHitSoA_interface_EcalUncalibratedRecHit_h
0003
0004 #include <array>
0005 #include <vector>
0006
0007 #include "CUDADataFormats/CaloCommon/interface/Common.h"
0008 #include "CUDADataFormats/EcalRecHitSoA/interface/RecoTypes.h"
0009 #include "DataFormats/EcalDigi/interface/EcalDataFrame.h"
0010
0011 namespace ecal {
0012
0013 template <typename StoragePolicy>
0014 struct UncalibratedRecHit : public ::calo::common::AddSize<typename StoragePolicy::TagType> {
0015 UncalibratedRecHit() = default;
0016 UncalibratedRecHit(const UncalibratedRecHit&) = default;
0017 UncalibratedRecHit& operator=(const UncalibratedRecHit&) = default;
0018
0019 UncalibratedRecHit(UncalibratedRecHit&&) = default;
0020 UncalibratedRecHit& operator=(UncalibratedRecHit&&) = default;
0021
0022 typename StoragePolicy::template StorageSelector<reco::ComputationScalarType>::type amplitudesAll;
0023 typename StoragePolicy::template StorageSelector<reco::StorageScalarType>::type amplitude;
0024 typename StoragePolicy::template StorageSelector<reco::StorageScalarType>::type amplitudeError;
0025 typename StoragePolicy::template StorageSelector<reco::StorageScalarType>::type chi2;
0026 typename StoragePolicy::template StorageSelector<reco::StorageScalarType>::type pedestal;
0027 typename StoragePolicy::template StorageSelector<reco::StorageScalarType>::type jitter;
0028 typename StoragePolicy::template StorageSelector<reco::StorageScalarType>::type jitterError;
0029 typename StoragePolicy::template StorageSelector<uint32_t>::type did;
0030 typename StoragePolicy::template StorageSelector<uint32_t>::type flags;
0031
0032 template <typename U = typename StoragePolicy::TagType>
0033 typename std::enable_if<std::is_same<U, ::calo::common::tags::Vec>::value, void>::type resize(size_t size) {
0034 amplitudesAll.resize(size * EcalDataFrame::MAXSAMPLES);
0035 amplitude.resize(size);
0036 amplitudeError.resize(size);
0037 pedestal.resize(size);
0038 chi2.resize(size);
0039 did.resize(size);
0040 flags.resize(size);
0041 jitter.resize(size);
0042 jitterError.resize(size);
0043 }
0044 };
0045
0046 }
0047
0048 #endif