Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-14 23:17:08

0001 #ifndef RecoLocalCalo_HcalRecProducers_plugins_alpaka_Mahi_h
0002 #define RecoLocalCalo_HcalRecProducers_plugins_alpaka_Mahi_h
0003 
0004 #include <vector>
0005 
0006 #include "DataFormats/HcalDigi/interface/alpaka/HcalDigiDeviceCollection.h"
0007 #include "DataFormats/HcalRecHit/interface/alpaka/HcalRecHitDeviceCollection.h"
0008 #include "CondFormats/HcalObjects/interface/alpaka/HcalMahiConditionsDevice.h"
0009 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0010 #include "HeterogeneousCore/AlpakaInterface/interface/traits.h"
0011 #include "CondFormats/HcalObjects/interface/alpaka/HcalMahiConditionsDevice.h"
0012 #include "CondFormats/HcalObjects/interface/alpaka/HcalSiPMCharacteristicsDevice.h"
0013 #include "CondFormats/HcalObjects/interface/alpaka/HcalRecoParamWithPulseShapeDevice.h"
0014 
0015 #include "HcalMahiPulseOffsetsSoA.h"
0016 
0017 namespace ALPAKA_ACCELERATOR_NAMESPACE::hcal::reconstruction {
0018 
0019   struct ConfigParameters {
0020     uint32_t maxTimeSamples;
0021     uint32_t kprep1dChannelsPerBlock;
0022     int sipmQTSShift;
0023     int sipmQNTStoSum;
0024     int firstSampleShift;
0025     bool useEffectivePedestals;
0026 
0027     float meanTime;
0028     float timeSigmaSiPM, timeSigmaHPD;
0029     float ts4Thresh;
0030 
0031     std::array<uint32_t, 3> kernelMinimizeThreads;
0032 
0033     // FIXME:
0034     //   - add "getters" to HcalTimeSlew calib formats
0035     //   - add ES Producer to consume what is produced above not to replicate.
0036     //   which ones to use is hardcoded, therefore no need to send those to the device
0037     bool applyTimeSlew;
0038     float tzeroTimeSlew, slopeTimeSlew, tmaxTimeSlew;
0039   };
0040 
0041   using IProductTypef01 = hcal::Phase1DigiDeviceCollection;
0042   using IProductTypef5 = hcal::Phase0DigiDeviceCollection;
0043   using IProductTypef3 = hcal::Phase1DigiDeviceCollection;
0044   using OProductType = hcal::RecHitDeviceCollection;
0045 
0046   void runMahiAsync(Queue& queue,
0047                     IProductTypef01::ConstView const& f01HEDigis,
0048                     IProductTypef5::ConstView const& f5HBDigis,
0049                     IProductTypef3::ConstView const& f3HBDigis,
0050                     OProductType::View outputGPU,
0051                     HcalMahiConditionsPortableDevice::ConstView const& mahi,
0052                     HcalSiPMCharacteristicsPortableDevice::ConstView const& sipmCharacteristics,
0053                     HcalRecoParamWithPulseShapeDevice::ConstView const& recoParams,
0054                     HcalMahiPulseOffsetsSoA::ConstView const& mahiPulseOffsets,
0055                     ConfigParameters const& configParameters);
0056 
0057 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE::hcal::reconstruction
0058 #endif