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