Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:50

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 chi2;
0025     typename StoragePolicy::template StorageSelector<reco::StorageScalarType>::type pedestal;
0026     typename StoragePolicy::template StorageSelector<reco::StorageScalarType>::type jitter;
0027     typename StoragePolicy::template StorageSelector<reco::StorageScalarType>::type jitterError;
0028     typename StoragePolicy::template StorageSelector<uint32_t>::type did;
0029     typename StoragePolicy::template StorageSelector<uint32_t>::type flags;
0030 
0031     template <typename U = typename StoragePolicy::TagType>
0032     typename std::enable_if<std::is_same<U, ::calo::common::tags::Vec>::value, void>::type resize(size_t size) {
0033       amplitudesAll.resize(size * EcalDataFrame::MAXSAMPLES);
0034       amplitude.resize(size);
0035       pedestal.resize(size);
0036       chi2.resize(size);
0037       did.resize(size);
0038       flags.resize(size);
0039       jitter.resize(size);
0040       jitterError.resize(size);
0041     }
0042   };
0043 
0044 }  // namespace ecal
0045 
0046 #endif  // CUDADataFormats_EcalRecHitSoA_interface_EcalUncalibratedRecHit_h